moved from tauri to a server with embedded UI

This commit is contained in:
Dave
2026-02-13 12:31:36 +00:00
parent d4203cfaab
commit 0876c53e17
79 changed files with 5755 additions and 10655 deletions
+66
View File
@@ -0,0 +1,66 @@
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;
}
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 WsRequest =
| {
type: "chat";
messages: Message[];
config: ProviderConfig;
}
| {
type: "cancel";
};
export type WsResponse =
| { type: "token"; content: string }
| { type: "update"; messages: Message[] }
| { type: "error"; message: string };
// Re-export API client types for convenience
export type {
Message as ApiMessage,
ProviderConfig as ApiProviderConfig,
FileEntry as ApiFileEntry,
SearchResult as ApiSearchResult,
CommandOutput as ApiCommandOutput,
WsRequest as ApiWsRequest,
WsResponse as ApiWsResponse,
};