import type { AgentToolResult } from "@earendil-works/pi-agent-core";
import { Container, type TUI } from "@earendil-works/pi-tui";
import type { TSchema } from "typebox";
import type { ToolDefinition } from "../../../core/extensions/types.ts";
export interface ToolExecutionOptions {
    showImages?: boolean;
    imageWidthCells?: number;
}
type RenderableToolResult = Omit<AgentToolResult<unknown>, "details"> & {
    details?: unknown;
    isError: boolean;
};
export declare class ToolExecutionComponent extends Container {
    private contentBox;
    private contentText;
    private selfRenderContainer;
    private callRendererComponent?;
    private resultRendererComponent?;
    private rendererState;
    private imageComponents;
    private imageSpacers;
    private toolName;
    private toolCallId;
    private args;
    private expanded;
    private showImages;
    private imageWidthCells;
    private isPartial;
    private toolDefinition?;
    private builtInToolDefinition?;
    private ui;
    private cwd;
    private executionStarted;
    private argsComplete;
    private result?;
    private convertedImages;
    private hideComponent;
    constructor(toolName: string, toolCallId: string, args: unknown, options: ToolExecutionOptions | undefined, toolDefinition: ToolDefinition<TSchema, unknown> | undefined, ui: TUI, cwd: string);
    private getCallRenderer;
    private getResultRenderer;
    private hasRendererDefinition;
    private getRenderShell;
    private getRenderContext;
    private createCallFallback;
    private createResultFallback;
    updateArgs(args: unknown): void;
    markExecutionStarted(): void;
    setArgsComplete(): void;
    updateResult(result: RenderableToolResult, isPartial?: boolean): void;
    private maybeConvertImagesForKitty;
    setExpanded(expanded: boolean): void;
    setShowImages(show: boolean): void;
    setImageWidthCells(width: number): void;
    invalidate(): void;
    render(width: number): string[];
    private updateDisplay;
    private getTextOutput;
    private formatToolExecution;
}
export {};
//# sourceMappingURL=tool-execution.d.ts.map