mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
enable json imports (#165)
* enable json imports * Merge remote-tracking branch 'origin/main' into enable_json_imports
This commit is contained in:
@@ -8,6 +8,7 @@ import path from 'path';
|
||||
import fs from 'fs';
|
||||
import { Config } from '../config/config.js';
|
||||
import { BaseTool, ToolResult } from './tools.js';
|
||||
import toolParameterSchema from './shell.json' with { type: 'json' };
|
||||
|
||||
export interface ShellToolParams {
|
||||
command: string;
|
||||
@@ -23,8 +24,6 @@ export class ShellTool extends BaseTool<ShellToolParams, ToolResult> {
|
||||
const toolDisplayName = 'Shell';
|
||||
const descriptionUrl = new URL('shell.md', import.meta.url);
|
||||
const toolDescription = fs.readFileSync(descriptionUrl, 'utf-8');
|
||||
const schemaUrl = new URL('shell.json', import.meta.url);
|
||||
const toolParameterSchema = JSON.parse(fs.readFileSync(schemaUrl, 'utf-8'));
|
||||
super(
|
||||
ShellTool.Name,
|
||||
toolDisplayName,
|
||||
|
||||
Reference in New Issue
Block a user