batch4: chats-in-sessions, force-send, /compact, right-rail file browser
Session 1:N Chat data model with backfill. Workspace switches to client-side multi-tab pane management. Right-rail file browser with float-over viewer and click-drag line selection replaces FileBrowserPane. Adds /compact streaming summarizer (respects compact markers in context builder), force-send (cancels in-flight, persists partial as 'cancelled', awaits cancellation completion via deferred Promise + 5s timeout), message queue, stop generation, chat auto-rename, session archive/unarchive with Closed Sessions section on repo landing page. CHECK constraints on sessions.status, messages.role, messages.status with KEEP IN SYNC comments tying to MESSAGE_ROLES / MESSAGE_STATUSES const arrays. Deletes dead pane routes/hook and the api.panes.* client block. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
37
apps/web/src/components/AttachmentPreviewModal.tsx
Normal file
37
apps/web/src/components/AttachmentPreviewModal.tsx
Normal file
@@ -0,0 +1,37 @@
|
||||
import type { Attachment } from '@/lib/attachments';
|
||||
import { CodeBlock } from '@/components/CodeBlock';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@/components/ui/dialog';
|
||||
|
||||
interface Props {
|
||||
attachment: Attachment | null;
|
||||
onClose: () => void;
|
||||
}
|
||||
|
||||
export function AttachmentPreviewModal({ attachment, onClose }: Props) {
|
||||
const title = attachment
|
||||
? attachment.kind === 'lines' && attachment.range
|
||||
? `${attachment.filename}:${attachment.range[0]}-${attachment.range[1]}`
|
||||
: attachment.filename
|
||||
: '';
|
||||
|
||||
return (
|
||||
<Dialog open={attachment !== null} onOpenChange={() => onClose()}>
|
||||
<DialogContent className="sm:max-w-2xl max-h-[80vh] overflow-y-auto">
|
||||
<DialogHeader>
|
||||
<DialogTitle className="font-mono text-sm">{title}</DialogTitle>
|
||||
</DialogHeader>
|
||||
{attachment && (
|
||||
<CodeBlock
|
||||
code={attachment.content}
|
||||
lang={attachment.language ?? undefined}
|
||||
/>
|
||||
)}
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user