Skip to content

Commit 3d07128

Browse files
committed
fix: update CLI tool renderer to recognize skill tool and add auto-approval comment
- Replace fetchInstructions/fetch_instructions with skill in CLI types.ts - Update CLI utils.ts display names for skill tool - Add explanatory comment for skill auto-approval policy
1 parent b3bfbb3 commit 3d07128

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

apps/cli/src/ui/components/tools/types.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,7 @@ export type ToolCategory =
1616
| "other"
1717

1818
export function getToolCategory(toolName: string): ToolCategory {
19-
const fileReadTools = [
20-
"readFile",
21-
"read_file",
22-
"fetchInstructions",
23-
"fetch_instructions",
24-
"listFilesTopLevel",
25-
"listFilesRecursive",
26-
"list_files",
27-
]
19+
const fileReadTools = ["readFile", "read_file", "skill", "listFilesTopLevel", "listFilesRecursive", "list_files"]
2820

2921
const fileWriteTools = [
3022
"editedExistingFile",

apps/cli/src/ui/components/tools/utils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ export function getToolDisplayName(toolName: string): string {
5050
// File read operations
5151
readFile: "Read",
5252
read_file: "Read",
53-
fetchInstructions: "Fetch Instructions",
54-
fetch_instructions: "Fetch Instructions",
53+
skill: "Load Skill",
5554
listFilesTopLevel: "List Files",
5655
listFilesRecursive: "List Files (Recursive)",
5756
list_files: "List Files",

src/core/auto-approval/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ export async function checkAutoApproval({
151151
return { decision: "approve" }
152152
}
153153

154+
// The skill tool only loads pre-defined instructions from built-in, global, or project skills.
155+
// It does not read arbitrary files - skills must be explicitly installed/defined by the user.
156+
// Auto-approval is intentional to provide a seamless experience when loading task instructions.
154157
if (tool.tool === "skill") {
155158
return { decision: "approve" }
156159
}

0 commit comments

Comments
 (0)