* 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>
42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
import { Tool } from "../..";
|
|
|
|
import { BUILT_IN_GROUP_NAME, BuiltInToolNames } from "../builtIn";
|
|
|
|
export const lsTool: Tool = {
|
|
type: "function",
|
|
displayTitle: "ls",
|
|
wouldLikeTo: "list files in {{{ dirPath }}}",
|
|
isCurrently: "listing files in {{{ dirPath }}}",
|
|
hasAlready: "listed files in {{{ dirPath }}}",
|
|
readonly: true,
|
|
isInstant: true,
|
|
group: BUILT_IN_GROUP_NAME,
|
|
function: {
|
|
name: BuiltInToolNames.LSTool,
|
|
description: "List files and folders in a given directory",
|
|
parameters: {
|
|
type: "object",
|
|
properties: {
|
|
dirPath: {
|
|
type: "string",
|
|
description:
|
|
"The directory path relative to the root of the project. Use forward slash paths like '/'. rather than e.g. '.'",
|
|
},
|
|
recursive: {
|
|
type: "boolean",
|
|
description:
|
|
"If true, lists files and folders recursively. To prevent unexpected large results, use this sparingly",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
defaultToolPolicy: "allowedWithoutPermission",
|
|
systemMessageDescription: {
|
|
prefix: `To list files and folders in a given directory, call the ${BuiltInToolNames.LSTool} tool with "dirPath" and "recursive". For example:`,
|
|
exampleArgs: [
|
|
["dirPath", "path/to/dir"],
|
|
["recursive", "false"],
|
|
],
|
|
},
|
|
toolCallIcon: "FolderIcon",
|
|
};
|