Skip to content

fix(web): show attachments in session-start framed messages - #11

Open
Antisophy wants to merge 1 commit into
CyberShadow:masterfrom
Antisophy:fix/framed-message-attachments
Open

fix(web): show attachments in session-start framed messages#11
Antisophy wants to merge 1 commit into
CyberShadow:masterfrom
Antisophy:fix/framed-message-attachments

Conversation

@Antisophy

Copy link
Copy Markdown
Contributor

A task's first message renders through the session-start framing (the label header, the body variable, and the "Full message" expander). That renderer extracted only the text blocks from the message content, so image blocks were dropped from the display.

The visible effect: an attachment on a task's first message appears briefly (the optimistic plain user message renders it) and then vanishes when the framed canonical message replaces it on history replay. The attachment itself is fine throughout: the backend keeps image blocks beside the rendered prompt and the model receives them; only the framed rendering lost them.

The fix renders the image blocks in both framed branches, above the prompt text in each (below the label header), using the same markup and ordering as the plain user message: attachments first, then text. Display-only, so previously affected messages recover on their next history load with no re-send.

A regression test renders a framed message carrying an image block and asserts both that the attachment appears and that it appears above the body text.

nix flake check: full set built; four integration checks failed under parallel load and passed serially (a disjoint set from other recent runs of the suite, so load-related rather than related to this change).

The first message of a task renders through the SystemUserMessage
framing (session-start label, body variable, "Full message" expander),
which extracted only the text blocks from the message content. Image
blocks were dropped, so an attachment on the first message appeared
while the optimistic plain user message was showing, then vanished when
the framed canonical message replaced it on replay. The image itself was
fine: the backend keeps attachment blocks beside the rendered prompt and
the model receives them; only the framed rendering lost them.

Render the image blocks in both framed branches, above the prompt text
in each (below the label header), with the same markup and ordering the
plain user message uses: attachments first, then text.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant