feat: refactor bash tool with shell-aware prompts for bash, pwsh+powershell, and cmd (#20039)

This commit is contained in:
Luke Parker
2026-05-03 09:18:48 +10:00
committed by GitHub
parent 1986a6e817
commit 3f459819ba
14 changed files with 506 additions and 177 deletions

View File

@@ -620,7 +620,7 @@ describe("session.message-v2.toModelMessage", () => {
status: "completed",
input: { cmd: "ls" },
output: "abcdefghij",
title: "Bash",
title: "Shell",
metadata: {},
time: { start: 0, end: 1 },
},
@@ -740,9 +740,9 @@ describe("session.message-v2.toModelMessage", () => {
"12179",
"4575",
"",
"<bash_metadata>",
"<shell_metadata>",
"User aborted the command",
"</bash_metadata>",
"</shell_metadata>",
].join("\n")
const input: MessageV2.WithParts[] = [