Files
cc-connect/agent
HanandClaude Opus 4.6 c41e3f4ba3 fix(acp): improve permission prompts and suppress input echo (#497)
* fix(acp): suppress user_message_chunk to avoid echoing user input

ACP sends user_message_chunk during session/load history replay, which
was mapped to EventText and sent back to the user as an echo.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(acp): extract tool rawInput for meaningful permission prompts

ACP toolCall includes a rawInput field with actual tool parameters
(e.g. bash command, file path), but handlePermissionRequest only used
the title, resulting in empty code blocks in permission prompts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(acp): workaround opencode #7370 for empty permission tool input

OpenCode sends rawInput={} in request_permission, with the actual tool
parameters only appearing in a subsequent tool_call_update event. Cache
rawInput from both tool_call and tool_call_update by toolCallId, and
defer permission event emission to allow the cache to populate.

Also improves summarizeACPToolInput: handles execute kind, extracts
command+description as a commented format, and falls back to indented JSON.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 18:55:48 +08:00
..