fix(acp): show shell command in ACP tool calls (#32304)

Co-authored-by: Mert Can Demir <validatedev@gmail.com>
This commit is contained in:
Shoubhit Dash
2026-06-14 14:46:27 +02:00
committed by GitHub
co-authored by Mert Can Demir
parent 3ab19bfd7d
commit 51461429f4
4 changed files with 93 additions and 29 deletions
+6 -1
View File
@@ -37,7 +37,12 @@ describe("acp tool conversion", () => {
expect(toLocations("external_directory", { directories: ["/tmp/outside"], patterns: ["/tmp/outside/*"] })).toEqual([
{ path: "/tmp/outside" },
])
expect(toLocations("bash", { filePath: "/tmp/nope.ts", path: "/tmp" })).toEqual([])
expect(toLocations("bash", { cmd: "pwd" }, "/workspace")).toEqual([{ path: "/workspace" }])
expect(toLocations("bash", { command: "pwd", workdir: "subdir" }, "/workspace")).toEqual([
{ path: "/workspace/subdir" },
])
expect(toLocations("bash", { command: "pwd", workdir: "/abs/dir" }, "/workspace")).toEqual([{ path: "/abs/dir" }])
expect(toLocations("bash", { command: "printf hello" })).toEqual([])
expect(toLocations("read", { path: "/tmp/missing-file-path.ts" })).toEqual([])
})