diff --git a/tools/echo.js b/tools/echo.js deleted file mode 100644 index 2e213ba..0000000 --- a/tools/echo.js +++ /dev/null @@ -1,15 +0,0 @@ -export default { - type: "function", name: "echo", description: "Echoes back the input string provided", strict: true, - parameters: { - type: "object", additionalProperties: false, required: [ "input" ], - properties: { "input": { type: "string", description: "The text to be echoed back" } } - } -}; - -export async function run(args) { - const text = typeof args?.text === 'string' ? args.text : ''; - if (!text) { - return { error: 'Missing required parameter: text' }; - } - return { content: text }; -} diff --git a/tools/read_file.js b/tools/read_file.js new file mode 100644 index 0000000..6f00425 --- /dev/null +++ b/tools/read_file.js @@ -0,0 +1,14 @@ +const virtual_chroot = '/home/seb/src/aiTools/tmp'; + +export default { + type: "function", name: "read_file", description: "read a file", strict: true, + parameters: { + type: "object", required: ["path","linesToSkip","linesToRead"],additionalProperties: false, properties: { + path: { type: "string", description: "The path to the file to read.",}, + linesToSkip: { type: "number", description: "The number of lines to skip. Use 0 to read from the beginning.",}, + linesToRead: { type: "number",description: "1-400 The number of lines to read. Use 0 or more than 400 to read 400 lines.",} +},},}; + +export async function run() { + return `read_file error (not implemented)` +} diff --git a/tools/ripgrep.js b/tools/ripgrep.js new file mode 100644 index 0000000..62e2869 --- /dev/null +++ b/tools/ripgrep.js @@ -0,0 +1,16 @@ +const virtual_chroot = '/home/seb/src/aiTools/tmp'; + +export default { + type: "function", name: "ripgrep", strict: true, + description: "ripgrep (rg) search ( rg pattern -g filePattern | head -200) , always limited to 200 lines", + parameters: { + type: "object", required: ["pattern","filePattern","n_flag","i_flag"], additionalProperties: false, properties: { + pattern: {type: "string", description: 'The pattern to search for.'}, + filePattern: { type: "string", description: "'*.js' for only js files, '!*.log' for all files except log files , '' for all files"}, + n_flag: { type: "boolean",description: "show line numbers."}, + i_flag: { type: "boolean",description: "case insensitive search."} +},},}; + +export async function run(args) { + return `ripgrep error (not implemented)` +} \ No newline at end of file