refactor: make shell the canonical tool internals
This commit is contained in:
@@ -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),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user