64d1b788be
- Backend: Added OllamaProvider::chat_stream() with newline-delimited JSON parsing - Backend: Emit chat:token events for each token received from Ollama - Backend: Added futures dependency and stream feature for reqwest - Frontend: Added streamingContent state and chat:token event listener - Frontend: Real-time token display with auto-scroll - Frontend: Markdown and syntax highlighting support for streaming content - Fixed all TypeScript errors (tsc --noEmit) - Fixed all Biome warnings and errors - Fixed all Clippy warnings - Added comprehensive code quality documentation - Added tsc --noEmit to verification checklist Tested and verified: - Tokens stream in real-time - Auto-scroll works during streaming - Tool calls interrupt streaming correctly - Multi-turn conversations work - Smooth performance with no lag
41 lines
631 B
TypeScript
41 lines
631 B
TypeScript
export interface FileEntry {
|
|
name: string;
|
|
kind: "file" | "dir";
|
|
}
|
|
|
|
export interface SearchResult {
|
|
path: string;
|
|
matches: number;
|
|
}
|
|
|
|
export interface CommandOutput {
|
|
stdout: string;
|
|
stderr: string;
|
|
exit_code: number;
|
|
}
|
|
|
|
export type Role = "system" | "user" | "assistant" | "tool";
|
|
|
|
export interface ToolCall {
|
|
id?: string;
|
|
type: string;
|
|
function: {
|
|
name: string;
|
|
arguments: string;
|
|
};
|
|
}
|
|
|
|
export interface Message {
|
|
role: Role;
|
|
content: string;
|
|
tool_calls?: ToolCall[];
|
|
tool_call_id?: string;
|
|
}
|
|
|
|
export interface ProviderConfig {
|
|
provider: string;
|
|
model: string;
|
|
base_url?: string;
|
|
enable_tools?: boolean;
|
|
}
|