continue-custom/core/tools/runTerminalCommand.ts
2024-11-19 22:19:43 -08:00

24 lines
620 B
TypeScript

import { Tool } from "..";
import { ToolParams } from "./types";
export const runTerminalCommandTool = ({ ide }: ToolParams): Tool => ({
type: "function",
action: async (args) => {
await ide.runCommand(args.command);
},
function: {
name: "run_terminal_command",
description: "Run a terminal command in the current directory",
parameters: {
type: "object",
required: ["command"],
properties: {
command: {
type: "string",
description:
"The command to run. This will be passed directly into the shell.",
},
},
},
},
});