refactor: make shell the canonical tool internals

This commit is contained in:
LukeParkerDev
2026-04-23 19:46:00 +10:00
parent b75f831eaa
commit 3e30068907
16 changed files with 36 additions and 60 deletions
+1 -3
View File
@@ -12,8 +12,6 @@ import matter from "gray-matter"
import { Instance } from "../../project/instance"
import { EOL } from "os"
import type { Argv } from "yargs"
import { ShellToolID } from "../../tool/shell/id"
type AgentMode = "all" | "primary" | "subagent"
const AVAILABLE_TOOLS = ["shell", "read", "write", "edit", "glob", "grep", "webfetch", "task", "todowrite"]
@@ -129,7 +127,7 @@ const AgentCreateCommand = cmd({
...new Set(
cliTools
.split(",")
.map((t) => ShellToolID.normalize(t.trim()))
.map((t) => t.trim())
.filter(Boolean),
),
]
-1
View File
@@ -880,7 +880,6 @@ export const GithubRunCommand = cmd({
const TOOL: Record<string, [string, string]> = {
todowrite: ["Todo", UI.Style.TEXT_WARNING_BOLD],
shell: ["Shell", UI.Style.TEXT_DANGER_BOLD],
bash: ["Shell", UI.Style.TEXT_DANGER_BOLD],
edit: ["Edit", UI.Style.TEXT_SUCCESS_BOLD],
glob: ["Glob", UI.Style.TEXT_INFO_BOLD],
grep: ["Grep", UI.Style.TEXT_INFO_BOLD],
+1 -1
View File
@@ -23,7 +23,7 @@ import { CodeSearchTool } from "../../tool/codesearch"
import { WebSearchTool } from "../../tool/websearch"
import { TaskTool } from "../../tool/task"
import { SkillTool } from "../../tool/skill"
import { ShellTool } from "../../tool/shell/tool"
import { ShellTool } from "../../tool/shell"
import { ShellToolID } from "../../tool/shell/id"
import { TodoWriteTool } from "../../tool/todo"
import { Locale } from "../../util"
@@ -37,7 +37,7 @@ import { Locale } from "@/util"
import type { Tool } from "@/tool"
import type { ReadTool } from "@/tool/read"
import type { WriteTool } from "@/tool/write"
import { ShellTool } from "@/tool/shell/tool"
import { ShellTool } from "@/tool/shell"
import { ShellToolID } from "@/tool/shell/id"
import type { GlobTool } from "@/tool/glob"
import { TodoWriteTool } from "@/tool/todo"