fix(acp): deliver final_response after streaming — transform_llm_output hook now visible

When streaming is active, streamed_message=True skipped the final_response
update, causing plugin hooks like transform_llm_output to be silently
invisible. Remove the `not streamed_message` guard so the final response
(possibly transformed by plugins) is always delivered to the ACP client.
This commit is contained in:
kenyonxu 2026-05-20 11:43:43 +08:00 committed by Teknium
parent 197f63f454
commit 7eb6c7f489

View file

@ -1534,7 +1534,9 @@ class HermesACPAgent(acp.Agent):
)
except Exception:
logger.debug("Failed to auto-title ACP session %s", session_id, exc_info=True)
if final_response and conn and not streamed_message:
if final_response and conn:
# Always deliver the final response — plugins may have transformed
# it after streaming finished (e.g. transform_llm_output hook).
update = acp.update_agent_message_text(final_response)
await conn.session_update(session_id, update)