Refactor: Standardize Tool Naming and Configuration System (#1004)

This commit is contained in:
tanzhenxin
2025-11-12 19:46:05 +08:00
committed by GitHub
parent 22edef0cb9
commit 06141cda8d
23 changed files with 480 additions and 87 deletions

View File

@@ -6,7 +6,7 @@
import type { ToolInvocation, ToolResult } from './tools.js';
import { BaseDeclarativeTool, BaseToolInvocation, Kind } from './tools.js';
import { ToolNames } from './tool-names.js';
import { ToolNames, ToolDisplayNames } from './tool-names.js';
import { getErrorMessage } from '../utils/errors.js';
import * as fs from 'node:fs';
import * as path from 'node:path';
@@ -554,7 +554,7 @@ export class ReadManyFilesTool extends BaseDeclarativeTool<
super(
ReadManyFilesTool.Name,
'ReadManyFiles',
ToolDisplayNames.READ_MANY_FILES,
`Reads content from multiple files specified by paths or glob patterns within a configured target directory. For text files, it concatenates their content into a single string. It is primarily designed for text-based files. However, it can also process image (e.g., .png, .jpg) and PDF (.pdf) files if their file names or extensions are explicitly included in the 'paths' argument. For these explicitly requested non-text files, their data is read and included in a format suitable for model consumption (e.g., base64 encoded).
This tool is useful when you need to understand or analyze a collection of files, such as: