Something went wrong. Try again.
A full-screen TUI CLI agent powered by local LLMs via Docker Model Runner
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152export interface ProjectConfig { name: string; lang: string; framework: string; database: string[]; services: string[]; port: number;}
export interface Model { id: string; name: string; engine?: string;}
export interface Message { role: "system" | "user" | "assistant"; content: string; timestamp?: number;}
export interface ThinkingState { active: boolean; content: string; tokens: number;}
export interface Step { id: string; name: string; status: "done" | "current" | "pending";}
export interface AppState { model: Model | null; models: Model[]; messages: Message[]; steps: Step[]; thinking: ThinkingState; result: string; prompt: string; scrollOffset: number; thinkingVisible: boolean; streaming: boolean; agentSteps: AgentStep[]; toolCallsStreaming: Map<string, { name: string; argsBuffer: string }>; uiMode: UIMode; paletteIndex: number; suggestions: string[]; suggestionIndex: number;}
export interface DMRChatRequest { model: string; messages: { role: string; content: string }[]; stream: boolean; temperature?: number; max_tokens?: number;}
export interface DMRChatChunk { choices: { delta: { content?: string; reasoning_content?: string; tool_calls?: { id: string; type: "function"; function: { name: string; arguments: string }; }[]; }; finish_reason: string | null; }[];}
export type ToolHandler = "shell" | "http" | "js" | "builtin";
export interface ToolParameter { type: "string" | "number" | "boolean"; description: string; enum?: string[];}
export interface ToolDefinition { name: string; description: string; parameters: { type: "object"; properties: Record<string, ToolParameter>; required: string[]; }; handler: ToolHandler; command?: string; url?: string; method?: string; script?: string; sandbox?: boolean; destructive?: boolean;}
export interface ToolCall { id: string; name: string; arguments: Record<string, string>;}
// Chat message in the OpenAI-compatible shape DMR expects. An assistant// message that invokes tools carries `tool_calls`, and each subsequent `tool`// message links back to it via `tool_call_id`.export interface ChatMessage { role: string; content: string; tool_call_id?: string; name?: string; tool_calls?: { id: string; type: "function"; function: { name: string; arguments: string }; }[];}
export interface ToolResult { toolCallId: string; name: string; success: boolean; result: string;}
export type StreamChunk = | { type: "thinking"; text: string } | { type: "content"; text: string } | { type: "tool_call"; id: string; name: string; arguments: string };
export interface AgentStep { id: string; type: "tool_call" | "tool_result" | "thinking" | "content"; name?: string; arguments?: Record<string, string>; content?: string; status: "running" | "done" | "error"; timestamp: number;}
export type UIMode = "normal" | "palette";
export interface Action { id: string; label: string; shortcut?: string; action: () => void;}