From cf92ffab346b3844ed3922f5647bd03170d3e448 Mon Sep 17 00:00:00 2001 From: Allen Hutchison Date: Wed, 23 Apr 2025 17:25:47 -0700 Subject: Add concatenation tool (#130) * Adding a tool inspired by files-to-prompt that will recursivly read through all the files in a directory (guarded by targetDir) and concatenate those files for the model. Ignores common build artifacts and non-text files. * Migraded glob logic to fast-glob. Buffed the tool description to give more guidance to the model. Incorporated reveiw feedback. * lint and error checking. --- packages/server/src/config/config.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'packages/server/src/config') diff --git a/packages/server/src/config/config.ts b/packages/server/src/config/config.ts index 2cb05318..d24fad4e 100644 --- a/packages/server/src/config/config.ts +++ b/packages/server/src/config/config.ts @@ -17,6 +17,7 @@ import { EditTool } from '../tools/edit.js'; import { TerminalTool } from '../tools/terminal.js'; import { WriteFileTool } from '../tools/write-file.js'; import { WebFetchTool } from '../tools/web-fetch.js'; +import { ReadManyFilesTool } from '../tools/read-many-files.js'; const DEFAULT_PASSTHROUGH_COMMANDS = ['ls', 'git', 'npm']; @@ -130,6 +131,7 @@ function createToolRegistry(config: Config): ToolRegistry { new TerminalTool(targetDir, config), new WriteFileTool(targetDir), new WebFetchTool(), // Note: WebFetchTool takes no arguments + new ReadManyFilesTool(targetDir), ]; for (const tool of tools) { registry.registerTool(tool); -- cgit v1.2.3