mirror of
https://gitee.com/zhangsken/opencode.git
synced 2026-10-16 10:30:01 +08:00
fix(core): restore the shell no-output placeholder (#51187)
This commit is contained in:
@@ -240,10 +240,8 @@ const layer = () =>
|
||||
if (page.output.endsWith("\n")) lines.pop()
|
||||
const truncated = latest.size > maxBytes || lines.length > maxLines
|
||||
const text = lines.length > maxLines ? lines.slice(-maxLines).join("\n") : page.output
|
||||
const notice = truncated
|
||||
? `${text ? "\n\n" : ""}[full output saved to ${info.file}]`
|
||||
: ""
|
||||
return { output: `${text}${notice}`, truncated }
|
||||
const notice = truncated ? `\n\n[full output saved to ${info.file}]` : ""
|
||||
return { output: `${text || "(no output)"}${notice}`, truncated }
|
||||
}).pipe(Effect.catchTag("Shell.NotFoundError", () => Effect.succeed(undefined)))
|
||||
return { info, capture }
|
||||
})
|
||||
|
||||
@@ -1555,7 +1555,7 @@ describe("ShellTool", () => {
|
||||
{
|
||||
id: settled.metadata?.shellID,
|
||||
status: "completed",
|
||||
output: "Exited with code 7",
|
||||
output: "(no output)\n\nExited with code 7",
|
||||
},
|
||||
])
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user