mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 12:40:44 +00:00
Use parameter properties where possible. (#242)
This commit is contained in:
parent
a7679db6e9
commit
539ab947a4
12 changed files with 18 additions and 53 deletions
|
|
@ -25,10 +25,9 @@ import { spawn } from 'child_process';
|
|||
|
||||
export class ShellTool extends BaseTool<ShellToolParams, ToolResult> {
|
||||
static Name: string = 'execute_bash_command';
|
||||
private readonly config: Config;
|
||||
private whitelist: Set<string> = new Set();
|
||||
|
||||
constructor(config: Config) {
|
||||
constructor(private readonly config: Config) {
|
||||
const toolDisplayName = 'Shell';
|
||||
const descriptionUrl = new URL('shell.md', import.meta.url);
|
||||
const toolDescription = fs.readFileSync(descriptionUrl, 'utf-8');
|
||||
|
|
@ -38,7 +37,6 @@ export class ShellTool extends BaseTool<ShellToolParams, ToolResult> {
|
|||
toolDescription,
|
||||
toolParameterSchema,
|
||||
);
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
getDescription(params: ShellToolParams): string {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue