mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-21 10:16:03 +00:00
fix(opencode): describe retained shell pipes
This commit is contained in:
@@ -578,7 +578,7 @@ export const ShellTool = Tool.define(
|
||||
if (aborted) meta.push("User aborted the command")
|
||||
if (incomplete)
|
||||
meta.push(
|
||||
`shell tool exited without reaching EOF within ${POST_EXIT_OUTPUT_GRACE_MS} ms; a background descendant may be holding the output pipe open`,
|
||||
`shell process exited, but stdout/stderr did not reach EOF within ${POST_EXIT_OUTPUT_GRACE_MS} ms; a descendant process may still hold inherited pipe handles open`,
|
||||
)
|
||||
const raw = list.map((item) => item.text).join("")
|
||||
const end = tail(raw, limits.maxLines, limits.maxBytes)
|
||||
|
||||
@@ -1117,7 +1117,7 @@ describe("tool.shell abort", () => {
|
||||
expect(Date.now() - started).toBeLessThan(3_000)
|
||||
expect(result.output).toContain("parent done")
|
||||
expect(result.output).toContain(
|
||||
"shell tool exited without reaching EOF within 500 ms; a background descendant may be holding the output pipe open",
|
||||
"shell process exited, but stdout/stderr did not reach EOF within 500 ms; a descendant process may still hold inherited pipe handles open",
|
||||
)
|
||||
expect(result.metadata.outputIncomplete).toBe(true)
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user