Initial commit — ClawChat v1.0.0

This commit is contained in:
Nicolas Varrot
2026-02-11 00:48:43 +00:00
commit 1f8ff9ae0a
30 changed files with 7862 additions and 0 deletions

36
src/types/index.ts Normal file
View File

@@ -0,0 +1,36 @@
export interface ChatMessage {
id: string;
role: 'user' | 'assistant';
content: string;
timestamp: number;
blocks: MessageBlock[];
isStreaming?: boolean;
runId?: string;
}
export type MessageBlock =
| { type: 'text'; text: string }
| { type: 'thinking'; text: string }
| { type: 'tool_use'; name: string; input: any; id?: string }
| { type: 'tool_result'; content: string; toolUseId?: string; name?: string };
export interface Session {
key: string;
label?: string;
messageCount?: number;
isActive?: boolean;
totalTokens?: number;
contextTokens?: number;
inputTokens?: number;
outputTokens?: number;
}
export type ConnectionStatus = 'disconnected' | 'connecting' | 'connected';
export interface GatewayState {
status: ConnectionStatus;
sessions: Session[];
activeSession: string;
messages: ChatMessage[];
isGenerating: boolean;
}