Files
hapi/cli/src/agent/backends/acp
Junmo KimandGitHub 0b82bd7658 fix(acp): use content as tool output when rawOutput has only metadata (#2299)
* refactor(acp): extract tool result output selection

* fix(acp): use content as tool output when rawOutput has only metadata

OpenCode v2 sends the real tool output in the ACP content array and puts
only metadata in rawOutput. rawOutput won unconditionally, so every tool
result card showed just the metadata or no output.

When rawOutput is an object whose only key is metadata and content
normalizes, report the normalized content as the output and keep the
metadata next to it. rawOutput that carries a body is left untouched.

* fix(web): render OpenCode lowercase tool names with their dedicated result views

OpenCode reports built-in tools by lowercase id (bash, glob, grep, ...),
but the result view registry is keyed by Claude-style names. Only read had
an alias, so the rest fell back to the generic markdown view: shell output
lost its line breaks and file names rendered like links.

Resolve a small set of OpenCode ids to the matching registered view after
the exact-name lookup, so exact names keep their current views. Tools whose
dedicated view reads Claude-shaped fields (skill, todowrite, patch,
question) stay on the generic view.
2026-11-07 08:12:56 +08:00
..