mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-07-30 22:23:51 +00:00
Previous approach failed because: 1. PublishOutbound with channel "ws" is silently dropped (no handler) 2. LLM strips image URLs despite instruction text 3. Post-run AddMessage races with frontend loadHistory() New approach: ContentSuffix field on RunRequest is appended to the assistant response inside the agent loop BEFORE saving to session and BEFORE emitting run.completed. This guarantees image markdown is in the session when frontend calls loadHistory(). Only affects WS channel — other channels still use ForwardMedia and their respective outbound handlers.