You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6f6b649
Browse filesBrowse the repository at this point in the historyBrowse files
fix(gateway): images sent to Claude CLI sessions show as raw cache-path links in chat history (#130463)
* fix(gateway): strip CLI-injected image mentions from imported Claude CLI user rows
The CLI runner appends @<.openclaw-cli-images path> mention lines to prompts
for backends that read images from disk. Claude Code records that mutated
prompt as its user message, so the transcript importer re-surfaced it as a
duplicate user row that failed text dedupe against the local row carrying the
media facts — showing inbound images as raw path links instead of previews.
Strip trailing image cache mention lines from imported user rows (string and
text-block content) and drop rows left empty, so imported rows dedupe into the
local row that already renders the thumbnail.
* fix(gateway): preserve orphaned mention-only Claude CLI image turns via merge-time correlation
Address ClawSweeper P1: the importer no longer drops image-only user rows at
parse time, where it cannot know whether a local media-bearing counterpart
survives. Mention-only rows keep their original content and are tagged with
__openclaw.cliImageMentionOnly; mergeImportedChatHistoryMessages suppresses a
tagged row only when a local user row carrying image media facts falls within
the existing dedupe timestamp window. With local history reset or lost, the
imported turn is retained instead of silently disappearing.
* chore(gateway): replace new type assertions with record narrowing for safety ratchet
The assertion-safety ratchet flags uncommented non-const assertions beyond
each file's baseline. Narrow imported block and metadata access through
asOptionalRecord instead of inline casts; the one remaining cast into
normalizeMediaFacts carries its SAFETY invariant.
* fix(gateway): require image history timestamp correlation
* fix(gateway): consume image history matches once
* fix(gateway): preserve orphaned CLI image captions
* fix(gateway): retain ambiguous CLI image turns
* fix(gateway): correlate Claude image turns exactly
* test(gateway): document legacy image row retention
0 commit comments