mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
feat(core): share file list patterns between glob and grep tools (#6359)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Arya Gummadi <aryagummadi@google.com>
This commit is contained in:
@@ -54,6 +54,7 @@ import { IdeConnectionEvent, IdeConnectionType } from '../telemetry/types.js';
|
||||
export type { MCPOAuthConfig };
|
||||
import { WorkspaceContext } from '../utils/workspaceContext.js';
|
||||
import { Storage } from './storage.js';
|
||||
import { FileExclusions } from '../utils/ignorePatterns.js';
|
||||
|
||||
export enum ApprovalMode {
|
||||
DEFAULT = 'default',
|
||||
@@ -277,6 +278,7 @@ export class Config {
|
||||
private readonly enablePromptCompletion: boolean = false;
|
||||
private initialized: boolean = false;
|
||||
readonly storage: Storage;
|
||||
private readonly fileExclusions: FileExclusions;
|
||||
|
||||
constructor(params: ConfigParameters) {
|
||||
this.sessionId = params.sessionId;
|
||||
@@ -349,6 +351,7 @@ export class Config {
|
||||
this.skipNextSpeakerCheck = params.skipNextSpeakerCheck ?? false;
|
||||
this.storage = new Storage(this.targetDir);
|
||||
this.enablePromptCompletion = params.enablePromptCompletion ?? false;
|
||||
this.fileExclusions = new FileExclusions(this);
|
||||
|
||||
if (params.contextFileName) {
|
||||
setGeminiMdFilename(params.contextFileName);
|
||||
@@ -621,6 +624,21 @@ export class Config {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets custom file exclusion patterns from configuration.
|
||||
* TODO: This is a placeholder implementation. In the future, this could
|
||||
* read from settings files, CLI arguments, or environment variables.
|
||||
*/
|
||||
getCustomExcludes(): string[] {
|
||||
// Placeholder implementation - returns empty array for now
|
||||
// Future implementation could read from:
|
||||
// - User settings file
|
||||
// - Project-specific configuration
|
||||
// - Environment variables
|
||||
// - CLI arguments
|
||||
return [];
|
||||
}
|
||||
|
||||
getCheckpointingEnabled(): boolean {
|
||||
return this.checkpointing;
|
||||
}
|
||||
@@ -766,6 +784,10 @@ export class Config {
|
||||
return this.gitService;
|
||||
}
|
||||
|
||||
getFileExclusions(): FileExclusions {
|
||||
return this.fileExclusions;
|
||||
}
|
||||
|
||||
async createToolRegistry(): Promise<ToolRegistry> {
|
||||
const registry = new ToolRegistry(this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user