import type { AgentTool } from "@oh-my-pi/pi-agent-core"; import { Container, type TUI } from "@oh-my-pi/pi-tui"; export interface ToolExecutionOptions { showImages?: boolean; editFuzzyThreshold?: number; editAllowFuzzy?: boolean; hashlineAutoDropPureInsertDuplicates?: boolean; } export interface ToolExecutionHandle { updateArgs(args: any, toolCallId?: string): void; updateResult(result: { content: Array<{ type: string; text?: string; data?: string; mimeType?: string; }>; details?: any; isError?: boolean; }, isPartial?: boolean, toolCallId?: string): void; setArgsComplete(toolCallId?: string): void; setExpanded(expanded: boolean): void; } /** * Component that renders a tool call with its result (updateable) */ export declare class ToolExecutionComponent extends Container { #private; constructor(toolName: string, args: any, options: ToolExecutionOptions | undefined, tool: AgentTool | undefined, ui: TUI, cwd?: string, _toolCallId?: string); updateArgs(args: any, _toolCallId?: string): void; /** * Signal that args are complete (tool is about to execute). * This triggers an immediate final diff computation for edit-like tools. */ setArgsComplete(_toolCallId?: string): void; updateResult(result: { content: Array<{ type: string; text?: string; data?: string; mimeType?: string; }>; details?: any; isError?: boolean; }, isPartial?: boolean, _toolCallId?: string): void; /** * Stop spinner animation and cleanup resources. */ stopAnimation(): void; setExpanded(expanded: boolean): void; setShowImages(show: boolean): void; invalidate(): void; }