import { ToolResult } from "../types/index.js"; import { ToolDiscovery } from "./tool-discovery.js"; export declare class MorphEditorTool implements ToolDiscovery { private confirmationService; private morphApiKey; private morphBaseUrl; constructor(apiKey?: string); /** * Use this tool to make fast, efficient edits to existing files using Morph Fast Apply. * * Morph provides enhanced code editing capabilities with 10,500 tokens/second processing speed, * offering more reliable code edits and faster iteration cycles compared to standard editing tools. * * Key advantages over str_replace or full file writes: * - Works with partial code snippets—no need for full file content * - Handles multiple distinct edits in a single call * - More reliable and efficient code generation * * When writing the edit, you should specify each edit in sequence, with the special comment * // ... existing code ... to represent unchanged code in between edited lines. * * For example: * * // ... existing code ... * FIRST_EDIT * // ... existing code ... * SECOND_EDIT * // ... existing code ... * THIRD_EDIT * // ... existing code ... * * Best practices: * - Use for broader code changes rather than single-line edits (use str_replace for those) * - Provide sufficient context around edits to resolve ambiguity * - Bias towards repeating minimal lines of original code * - Make all related edits in a single edit_file call instead of multiple calls * * Technical notes: * - DO NOT omit spans of pre-existing code without using // ... existing code ... comments * - Provide context before and after when deleting sections * - The apply model can handle many distinct edits at once efficiently */ editFile(targetFile: string, instructions: string, codeEdit: string): Promise; private callMorphApply; private generateDiff; view(filePath: string, viewRange?: [number, number]): Promise; setApiKey(apiKey: string): void; getApiKey(): string; getHandledToolNames(): string[]; }