feat: add web search, file edit, MCP management, file refs, and /stop to CLI/TUI
1. Web search tools (multi-provider): web_search, web_search_news, web_search_providers - Brave, Tavily, SearXNG (env-var activated), DuckDuckGo (always available) - Auto mode tries providers in priority order 2. File edit tool (fs_edit_file): targeted text replacement with validation - Unique oldText matching, overlap detection, atomic application - Sandboxed with size limits 3. MCP management commands: /mcp status, /mcp servers, /mcp reconnect <name> - Shows connection status, tool counts, errors for all MCP servers - Reconnect disconnected servers from the TUI 4. File reference in chat: @path/to/file inline expansion + /attach command - Auto-detects @file patterns and inlines contents as fenced code blocks - 256KB per file limit, max 10 files per message - Language-aware syntax highlighting hints 5. /stop command: abort streaming via Pi SDK abort() - New AbortPayload type in @mosaic/types - Gateway abort handler calls piSession.abort() - TUI emits abort event on /stop
This commit is contained in:
@@ -99,6 +99,11 @@ export interface SetThinkingPayload {
|
||||
level: string;
|
||||
}
|
||||
|
||||
/** Client request to abort the current agent operation */
|
||||
export interface AbortPayload {
|
||||
conversationId: string;
|
||||
}
|
||||
|
||||
/** Socket.IO typed event map: server → client */
|
||||
export interface ServerToClientEvents {
|
||||
'message:ack': (payload: MessageAckPayload) => void;
|
||||
@@ -120,4 +125,5 @@ export interface ClientToServerEvents {
|
||||
message: (data: ChatMessagePayload) => void;
|
||||
'set:thinking': (data: SetThinkingPayload) => void;
|
||||
'command:execute': (data: SlashCommandPayload) => void;
|
||||
abort: (data: AbortPayload) => void;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ export type {
|
||||
SessionInfoPayload,
|
||||
RoutingDecisionInfo,
|
||||
SetThinkingPayload,
|
||||
AbortPayload,
|
||||
ErrorPayload,
|
||||
ChatMessagePayload,
|
||||
ServerToClientEvents,
|
||||
|
||||
Reference in New Issue
Block a user