refactor(core): remove shell description input (#32823)

This commit is contained in:
Aiden Cline
2026-06-22 21:18:06 -05:00
committed by GitHub
parent fbf889db83
commit d29f5eba92
27 changed files with 124 additions and 161 deletions
+6 -9
View File
@@ -623,20 +623,18 @@ 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) {
const formatted = wd && wd !== "." ? toolPath(wd) : ""
const dir = formatted === "." ? "" : formatted
if (cmd && !dir) {
return `$ ${cmd}`
}
const title = dir && !desc.includes(dir) ? `${desc} in ${dir}` : desc
if (!cmd) {
return `# ${title}`
return dir ? `# Running in ${dir}` : ""
}
return `# ${title}\n$ ${cmd}`
return `# Running in ${dir}\n$ ${cmd}`
}
function scrollBashProgress(p: ToolProps<typeof BashTool>): string {
@@ -968,11 +966,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}`),
}
}