mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-24 04:47:03 +00:00
* 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.