feat: Add flow to allow modifying edits during edit tool call (#808)

This commit is contained in:
Leo
2025-06-08 18:56:58 +01:00
committed by GitHub
parent 584286cfd9
commit 9efca40dae
14 changed files with 520 additions and 6 deletions

View File

@@ -78,6 +78,7 @@ export interface ConfigParameters {
telemetryLogUserPromptsEnabled?: boolean;
fileFilteringRespectGitIgnore?: boolean;
fileFilteringAllowBuildArtifacts?: boolean;
enableModifyWithExternalEditors?: boolean;
}
export class Config {
@@ -106,6 +107,7 @@ export class Config {
private readonly geminiIgnorePatterns: string[] = [];
private readonly fileFilteringRespectGitIgnore: boolean;
private readonly fileFilteringAllowBuildArtifacts: boolean;
private readonly enableModifyWithExternalEditors: boolean;
private fileDiscoveryService: FileDiscoveryService | null = null;
constructor(params: ConfigParameters) {
@@ -135,6 +137,8 @@ export class Config {
params.fileFilteringRespectGitIgnore ?? true;
this.fileFilteringAllowBuildArtifacts =
params.fileFilteringAllowBuildArtifacts ?? false;
this.enableModifyWithExternalEditors =
params.enableModifyWithExternalEditors ?? false;
if (params.contextFileName) {
setGeminiMdFilename(params.contextFileName);
@@ -266,6 +270,10 @@ export class Config {
return this.fileFilteringAllowBuildArtifacts;
}
getEnableModifyWithExternalEditors(): boolean {
return this.enableModifyWithExternalEditors;
}
async getFileService(): Promise<FileDiscoveryService> {
if (!this.fileDiscoveryService) {
this.fileDiscoveryService = new FileDiscoveryService(this.targetDir);