fix json import warning (#291)
This commit is contained in:
parent
5db1b7622a
commit
3b025883b6
|
@ -16,7 +16,6 @@ import {
|
||||||
ToolExecuteConfirmationDetails,
|
ToolExecuteConfirmationDetails,
|
||||||
ToolConfirmationOutcome,
|
ToolConfirmationOutcome,
|
||||||
} from './tools.js';
|
} from './tools.js';
|
||||||
import toolParameterSchema from './shell.json' with { type: 'json' };
|
|
||||||
import { SchemaValidator } from '../utils/schemaValidator.js';
|
import { SchemaValidator } from '../utils/schemaValidator.js';
|
||||||
export interface ShellToolParams {
|
export interface ShellToolParams {
|
||||||
command: string;
|
command: string;
|
||||||
|
@ -33,6 +32,8 @@ export class ShellTool extends BaseTool<ShellToolParams, ToolResult> {
|
||||||
const toolDisplayName = 'Shell';
|
const toolDisplayName = 'Shell';
|
||||||
const descriptionUrl = new URL('shell.md', import.meta.url);
|
const descriptionUrl = new URL('shell.md', import.meta.url);
|
||||||
const toolDescription = fs.readFileSync(descriptionUrl, 'utf-8');
|
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(
|
super(
|
||||||
ShellTool.Name,
|
ShellTool.Name,
|
||||||
toolDisplayName,
|
toolDisplayName,
|
||||||
|
|
Loading…
Reference in New Issue