export type Role = "system" | "user" | "assistant" | "tool"; export type ChatMessage = { id: string; role: Role; content: string; createdAt: number; }; export type ChatRequest = { sessionId: string; message: string; mode?: "auto" | "search" | "no-search"; }; export type SearchResult = { title: string; url: string; snippet: string; score: number; content: string; }; export type SearchSummary = { query: string; results: Array<{ title: string; url: string; snippet: string; score: number; }>; topContent: Array<{ url: string; title: string; content: string; }>; };