feat(web): add notebook chat panel (#8)

This commit is contained in:
Florian Schmidt
2026-11-16 10:17:20 +01:00
parent 4fe7e4e376
commit 0055001abf
19 changed files with 602 additions and 16 deletions
+19
View File
@@ -126,3 +126,22 @@ export type ServerEvent =
export type TerminalClientMessage =
| { type: "input"; data: string }
| { type: "resize"; cols: number; rows: number };
// Chat: JSON WebSocket frames on /api/chat (separate from run events).
export interface ChatConversation {
id: string;
title: string;
sessionId?: string;
createdAt: string;
updatedAt: string;
}
export type ChatClientMessage =
| { type: "send"; conversationId?: string; message: string; notebookPath?: string; allowShell: boolean }
| { type: "cancel" };
export type ChatEvent =
| { type: "history"; conversations: ChatConversation[] }
| { type: "conversation"; conversation: ChatConversation }
| { type: "delta"; text: string }
| { type: "tool"; name: string; path?: string }
| { type: "finished"; cancelled?: boolean; costUsd?: number; durationMs?: number }
| { type: "error"; code: "login" | "missing" | "cli" | "busy" | "invalid" | "limit" | "timeout"; message: string };