feat(web): add notebook chat panel (#8)
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user