mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
feat: Add flow to allow modifying edits during edit tool call (#808)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user