mirror of https://github.com/openclaw/openclaw.git
* feat(gateway): persist webchat inbound images to disk Images sent via the webchat control UI (chat.send RPC) were parsed into content blocks but never written to disk, unlike WhatsApp and Telegram handlers which call saveMediaBuffer(). This caused: - Images lost after conversation compaction (only existed as ephemeral base64) - Image editing/generation workflows failing for webchat-origin images - Incomplete ~/.openclaw/media/inbound/ directory After parseMessageWithAttachments extracts parsedImages, iterate and persist each via saveMediaBuffer(buffer, mimeType, 'inbound'). Uses fire-and-forget (.catch + warn log) so disk I/O never blocks the chat.send response path. Fixes #47930 * fix(gateway): address PR review comments on webchat image persistence - Move saveMediaBuffer calls after sendPolicy/stop/dedupe checks so rejected or retried requests don't write files to disk (Codex P1) - Await all saves and collect SavedMedia results into persistedImages so the persisted paths are available in scope (Greptile P1) - Preserve Error stack trace in warn log instead of coercing to toString() (Greptile P2) - Switch to Promise.all for concurrent writes * fix(gateway): address remaining review comments on webchat image persistence - Revert to fire-and-forget pattern (no await) to eliminate race window where retried requests miss the in-flight guard during image saves - Remove unused SavedMedia import and persistedImages collection - Use formatForLog for consistent error logging with stack traces - Add NOTE comment about path propagation being a follow-up task Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(gateway): gate image persistence to webchat callers and defer base64 decode * fix: drop unrelated format churn in lifecycle.test.ts * gateway: clarify image persistence scope covers all chat.send callers * fix(gateway): use generic chat.send log prefix for image persistence warnings * fix(gateway): persist chat.send image refs in transcript * fix(gateway): keep chat.send image refs off visible text * fix(gateway): persist chat send media refs on dispatch * fix(gateway): serialize chat send image persistence * fix(gateway): persist chat send media after dispatch * fix: persist chat.send inbound images across follow-ups (#51324) (thanks @fuller-stack-dev) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Ayaan Zaidi <hi@obviy.us> |
||
|---|---|---|
| .. | ||
| acp | ||
| agents | ||
| auto-reply | ||
| bindings | ||
| browser | ||
| canvas-host | ||
| channels | ||
| cli | ||
| commands | ||
| compat | ||
| config | ||
| context-engine | ||
| cron | ||
| daemon | ||
| docs | ||
| gateway | ||
| hooks | ||
| i18n | ||
| image-generation | ||
| infra | ||
| interactive | ||
| line | ||
| link-understanding | ||
| logging | ||
| markdown | ||
| media | ||
| media-understanding | ||
| memory | ||
| node-host | ||
| pairing | ||
| plugin-sdk | ||
| plugins | ||
| process | ||
| providers | ||
| routing | ||
| scripts | ||
| secrets | ||
| security | ||
| sessions | ||
| shared | ||
| terminal | ||
| test-helpers | ||
| test-utils | ||
| tts | ||
| tui | ||
| types | ||
| utils | ||
| web-search | ||
| wizard | ||
| bundled-web-search-registry.ts | ||
| channel-web.ts | ||
| docker-build-cache.test.ts | ||
| docker-image-digests.test.ts | ||
| docker-setup.e2e.test.ts | ||
| dockerfile.test.ts | ||
| entry.test.ts | ||
| entry.ts | ||
| entry.version-fast-path.test.ts | ||
| extensionAPI.test.ts | ||
| extensionAPI.ts | ||
| globals.ts | ||
| index.test.ts | ||
| index.ts | ||
| install-sh-version.test.ts | ||
| library.ts | ||
| logger.test.ts | ||
| logger.ts | ||
| logging.ts | ||
| param-key.ts | ||
| poll-params.test.ts | ||
| poll-params.ts | ||
| polls.test.ts | ||
| polls.ts | ||
| runtime.ts | ||
| utils.test.ts | ||
| utils.ts | ||
| version.test.ts | ||
| version.ts | ||