refactor(core): remove shell description input

This commit is contained in:
Aiden Cline
2026-06-18 12:42:25 +02:00
parent ec50db334b
commit 736e9c335f
23 changed files with 46 additions and 137 deletions
+3 -5
View File
@@ -623,14 +623,13 @@ function snapQuestion(p: ToolProps<typeof QuestionTool>): ToolSnapshot {
function scrollBashStart(p: ToolProps<typeof BashTool>): string {
const cmd = p.input.command ?? ""
const desc = p.input.description || "Shell"
const wd = p.input.workdir ?? ""
const dir = wd && wd !== "." ? toolPath(wd) : ""
if (cmd && desc === "Shell" && !dir) {
if (cmd && !dir) {
return `$ ${cmd}`
}
const title = dir && !desc.includes(dir) ? `${desc} in ${dir}` : desc
const title = dir ? `Shell in ${dir}` : "Shell"
if (!cmd) {
return `# ${title}`
@@ -968,11 +967,10 @@ function permList(p: ToolPermissionProps): ToolPermissionInfo {
}
function permBash(p: ToolPermissionProps<typeof BashTool>): ToolPermissionInfo {
const title = p.input.description || "Shell command"
const cmd = p.input.command || ""
return {
icon: "#",
title,
title: "Shell command",
lines: cmd ? [`$ ${cmd}`] : p.patterns.map((item) => `- ${item}`),
}
}