* feat: Adding the isExecutionResultSearchable property to the Tool indicates whether the tool indicates whether the result is inspectable fix: 移除 SimpleToolCallUI 中 ToggleWithIcon 重复的 onClick 函数 * feat: Adding the isExecutionResultSearchable property to the Tool indicates whether the tool's execution results are checkable fix: 移除 SimpleToolCallUI 中 ToggleWithIcon 重复的 onClick 函数 * fix: cleanup file security pr * fix: ignore .idea etc. * fix: move .continue from security to indexing ignore * fix: move ide dirs and venv dirs to indexing not security ignores * feat: remove isExecutionResultSearchable from Tool * feat: prettier --------- Co-authored-by: Dallin Romney <dallinromney@gmail.com>
34 lines
1.2 KiB
TypeScript
34 lines
1.2 KiB
TypeScript
import { Tool } from "../..";
|
|
import { BUILT_IN_GROUP_NAME, BuiltInToolNames } from "../builtIn";
|
|
|
|
export const viewSubdirectoryTool: Tool = {
|
|
type: "function",
|
|
displayTitle: "View Subdirectory",
|
|
wouldLikeTo: 'view a map of "{{{ directory_path }}}"',
|
|
isCurrently: 'getting a map of "{{{ directory_path }}}"',
|
|
hasAlready: 'viewed a map of "{{{ directory_path }}}"',
|
|
readonly: true,
|
|
group: BUILT_IN_GROUP_NAME,
|
|
isInstant: true,
|
|
function: {
|
|
name: BuiltInToolNames.ViewSubdirectory,
|
|
description: "View the contents of a subdirectory",
|
|
parameters: {
|
|
type: "object",
|
|
required: ["directory_path"],
|
|
properties: {
|
|
directory_path: {
|
|
type: "string",
|
|
description:
|
|
"The path of the subdirectory to view, relative to the root of the workspace",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
systemMessageDescription: {
|
|
prefix: `To view a map of a specific folder within the project, you can use the ${BuiltInToolNames.ViewSubdirectory} tool. This will provide a visual representation of the folder's structure and organization.`,
|
|
exampleArgs: [["directory_path", "path/to/subdirectory"]],
|
|
},
|
|
defaultToolPolicy: "allowedWithPermission",
|
|
toolCallIcon: "FolderOpenIcon",
|
|
};
|