import { ChatToolContext, FileReadTracker } from '@theia/ai-chat'; import { ChangeSetFileElementFactory } from '@theia/ai-chat/lib/browser/change-set-file-element'; import { ToolProvider, ToolRequest, ToolRequestParameters } from '@theia/ai-core'; import { ContentReplacer } from '@theia/core/lib/common/content-replacer'; import { FileService } from '@theia/filesystem/lib/browser/file-service'; import { WorkspaceFunctionScope } from './workspace-functions'; import { ILogger } from '@theia/core'; export declare const FileChangeSetTitleProvider: unique symbol; export interface FileChangeSetTitleProvider { getChangeSetTitle(ctx: ChatToolContext): string; } export declare class SuggestFileContent implements ToolProvider { static ID: string; protected readonly workspaceFunctionScope: WorkspaceFunctionScope; fileService: FileService; protected readonly fileChangeFactory: ChangeSetFileElementFactory; protected readonly fileChangeSetTitleProvider: FileChangeSetTitleProvider; /** Optional: the guard is advisory, so containers without a tracker still get a working tool. */ protected readonly fileReadTracker: FileReadTracker | undefined; getTool(): ToolRequest; } export declare class WriteFileContent implements ToolProvider { static ID: string; protected readonly workspaceFunctionScope: WorkspaceFunctionScope; fileService: FileService; protected readonly fileChangeFactory: ChangeSetFileElementFactory; protected readonly fileChangeSetTitleProvider: FileChangeSetTitleProvider; /** Optional: the guard is advisory, so containers without a tracker still get a working tool. */ protected readonly fileReadTracker: FileReadTracker | undefined; getTool(): ToolRequest; } export declare class ReplaceContentInFileFunctionHelper { protected readonly workspaceFunctionScope: WorkspaceFunctionScope; fileService: FileService; protected readonly fileChangeFactory: ChangeSetFileElementFactory; protected readonly fileChangeSetTitleProvider: FileChangeSetTitleProvider; protected readonly logger: ILogger; private replacer; constructor(); protected setReplacer(replacer: ContentReplacer): void; getToolMetadata(supportMultipleReplace?: boolean, immediateApplication?: boolean): { description: string; parameters: ToolRequestParameters; }; createChangesetFromToolCall(toolCallString: string, ctx: ChatToolContext): Promise; writeChangesetFromToolCall(toolCallString: string, ctx: ChatToolContext): Promise; private processReplacementsCommon; private findExistingChangeElement; clearFileChanges(path: string, ctx: ChatToolContext): Promise; getProposedFileState(path: string, ctx: ChatToolContext): Promise; } export declare class SimpleSuggestFileReplacements implements ToolProvider { static ID: string; protected readonly replaceContentInFileFunctionHelper: ReplaceContentInFileFunctionHelper; getTool(): ToolRequest; } export declare class SimpleWriteFileReplacements implements ToolProvider { static ID: string; protected readonly replaceContentInFileFunctionHelper: ReplaceContentInFileFunctionHelper; getTool(): ToolRequest; } export declare class SuggestFileReplacements_Simple implements ToolProvider { static ID: string; protected readonly replaceContentInFileFunctionHelper: ReplaceContentInFileFunctionHelper; getTool(): ToolRequest; } /** * Legacy WriteFileReplacements implementation using V1 content replacer. * @deprecated Use WriteFileReplacements instead which uses the improved V2 implementation. */ export declare class WriteFileReplacements_Simple implements ToolProvider { static ID: string; protected readonly replaceContentInFileFunctionHelper: ReplaceContentInFileFunctionHelper; getTool(): ToolRequest; } export declare class ClearFileChanges implements ToolProvider { static ID: string; protected readonly replaceContentInFileFunctionHelper: ReplaceContentInFileFunctionHelper; getTool(): ToolRequest; } export declare class GetProposedFileState implements ToolProvider { static ID: string; protected readonly replaceContentInFileFunctionHelper: ReplaceContentInFileFunctionHelper; getTool(): ToolRequest; } export declare class ReplaceContentInFileFunctionHelperV2 extends ReplaceContentInFileFunctionHelper { constructor(); } export declare class SuggestFileReplacements implements ToolProvider { static ID: string; protected readonly replaceContentInFileFunctionHelper: ReplaceContentInFileFunctionHelperV2; getTool(): ToolRequest; } export declare class WriteFileReplacements implements ToolProvider { static ID: string; protected readonly replaceContentInFileFunctionHelper: ReplaceContentInFileFunctionHelperV2; getTool(): ToolRequest; } export declare class DefaultFileChangeSetTitleProvider implements FileChangeSetTitleProvider { getChangeSetTitle(_ctx: ChatToolContext): string; } //# sourceMappingURL=file-changeset-functions.d.ts.map