mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 19:52:02 +00:00
Pure refactor: Consolidate isWithinRoot() function calling. (#4163)
This commit is contained in:
parent
e584241141
commit
fefa7ecbea
13 changed files with 96 additions and 179 deletions
|
|
@ -525,7 +525,6 @@ export class Config {
|
|||
|
||||
async createToolRegistry(): Promise<ToolRegistry> {
|
||||
const registry = new ToolRegistry(this);
|
||||
const targetDir = this.getTargetDir();
|
||||
|
||||
// helper to create & register core tools that are enabled
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
|
|
@ -560,14 +559,14 @@ export class Config {
|
|||
}
|
||||
};
|
||||
|
||||
registerCoreTool(LSTool, targetDir, this);
|
||||
registerCoreTool(ReadFileTool, targetDir, this);
|
||||
registerCoreTool(GrepTool, targetDir);
|
||||
registerCoreTool(GlobTool, targetDir, this);
|
||||
registerCoreTool(LSTool, this);
|
||||
registerCoreTool(ReadFileTool, this);
|
||||
registerCoreTool(GrepTool, this);
|
||||
registerCoreTool(GlobTool, this);
|
||||
registerCoreTool(EditTool, this);
|
||||
registerCoreTool(WriteFileTool, this);
|
||||
registerCoreTool(WebFetchTool, this);
|
||||
registerCoreTool(ReadManyFilesTool, targetDir, this);
|
||||
registerCoreTool(ReadManyFilesTool, this);
|
||||
registerCoreTool(ShellTool, this);
|
||||
registerCoreTool(MemoryTool);
|
||||
registerCoreTool(WebSearchTool, this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue