import { Type } from "typebox"; import { type ExtensionAPI } from "@earendil-works/pi-coding-agent"; import { Container, Text } from "@earendil-works/pi-tui"; import { type ExecutePatchResult } from "../../patch/types.ts"; import { clearApplyPatchRenderState } from "./render-state.ts"; interface ApplyPatchToolOptions { customRustBinariesDir?: string | undefined; promptSnippet?: boolean | undefined; showDiffWhenCollapsed?: boolean | undefined; } declare function prepareApplyPatchArguments(args: unknown): { input: string; }; export type { ExecutePatchResult } from "../../patch/types.ts"; export { clearApplyPatchRenderState }; export declare function createApplyPatchTool(options?: ApplyPatchToolOptions): { name: string; label: string; description: string; promptSnippet?: string; parameters: Type.TObject<{ input: Type.TString; }>; executionMode: "sequential"; prepareArguments: typeof prepareApplyPatchArguments; execute(toolCallId: string, params: unknown, signal: AbortSignal | undefined, _onUpdate: import("@earendil-works/pi-coding-agent").AgentToolUpdateCallback | undefined, ctx: import("@earendil-works/pi-coding-agent").ExtensionContext): Promise<{ content: { type: "text"; text: string; }[]; details: { status: "partial_failure"; result: ExecutePatchResult; failedTargets: string[]; }; } | { content: { type: "text"; text: string; }[]; details: { failedTargets?: never; status: "success"; result: ExecutePatchResult; }; }>; renderCall: any; renderResult(result: import("@earendil-works/pi-coding-agent").AgentToolResult, { isPartial }: import("@earendil-works/pi-coding-agent").ToolRenderResultOptions, theme: import("@earendil-works/pi-coding-agent").Theme): Container | Text; }; export declare function registerApplyPatchTool(pi: ExtensionAPI, options?: ApplyPatchToolOptions): void; export declare function registerApplyPatchResultEvent(pi: ExtensionAPI): void;