mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
Remove terminal tool and dependencies.
- We now solely use the shell tool. This deletes all content around the legacy terminal tool so we can focus on improving the new Shell tool. - Remove instances from sandboxing, tests, utilities etc.
This commit is contained in:
committed by
N. Taylor Mullen
parent
dcb67c32a5
commit
cf91f72c5c
@@ -14,7 +14,6 @@ import { ReadFileTool } from '../tools/read-file.js';
|
||||
import { GrepTool } from '../tools/grep.js';
|
||||
import { GlobTool } from '../tools/glob.js';
|
||||
import { EditTool } from '../tools/edit.js';
|
||||
import { TerminalTool } from '../tools/terminal.js';
|
||||
import { ShellTool } from '../tools/shell.js';
|
||||
import { WriteFileTool } from '../tools/write-file.js';
|
||||
import { WebFetchTool } from '../tools/web-fetch.js';
|
||||
@@ -146,15 +145,9 @@ function createToolRegistry(config: Config): ToolRegistry {
|
||||
new WriteFileTool(targetDir),
|
||||
new WebFetchTool(), // Note: WebFetchTool takes no arguments
|
||||
new ReadManyFilesTool(targetDir),
|
||||
new ShellTool(config),
|
||||
];
|
||||
|
||||
// if TERMINAL_TOOL is set, revert to deprecated TerminalTool
|
||||
if (process.env.TERMINAL_TOOL) {
|
||||
tools.push(new TerminalTool(targetDir, config));
|
||||
} else {
|
||||
tools.push(new ShellTool(config));
|
||||
}
|
||||
|
||||
for (const tool of tools) {
|
||||
registry.registerTool(tool);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user