refactor(tools): Move all tool names into tool-names.ts (#11493)

This commit is contained in:
Abhi
2025-10-19 20:53:53 -04:00
committed by GitHub
parent 0fd9ff0f53
commit c8518d6a63
17 changed files with 90 additions and 100 deletions
+2 -3
View File
@@ -12,6 +12,7 @@ import { makeRelative, shortenPath } from '../utils/paths.js';
import type { Config } from '../config/config.js';
import { DEFAULT_FILE_FILTERING_OPTIONS } from '../config/constants.js';
import { ToolErrorType } from './tool-error.js';
import { LS_TOOL_NAME } from './tool-names.js';
/**
* Parameters for the LS tool
@@ -252,11 +253,9 @@ class LSToolInvocation extends BaseToolInvocation<LSToolParams, ToolResult> {
* Implementation of the LS tool logic
*/
export class LSTool extends BaseDeclarativeTool<LSToolParams, ToolResult> {
static readonly Name = 'list_directory';
constructor(private config: Config) {
super(
LSTool.Name,
LS_TOOL_NAME,
'ReadFolder',
'Lists the names of files and subdirectories directly within a specified directory path. Can optionally ignore entries matching provided glob patterns.',
Kind.Search,