Skip to content

fix(media): prompts carry the earlier context they refer to (#185) - #193

Merged
VickyXAI merged 1 commit into
mainfrom
fix/media-prompt-context
Oct 3, 2026
Merged

VickyXAI merged 1 commit into
mainfrom
fix/media-prompt-context

Conversation

@VickyXAI

@VickyXAI VickyXAI commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Fixes #185.

Image mode wrapped the request as ... from this prompt:, and ImageGen passes its prompt straight to the image model, which can't see the chat. "Turn these numbers into an infographic" reached the model with no numbers, so it made some up.

  • Desktop wrapper (apps/desktop/src/hooks/use-franklin-chat.ts): tells the agent that the media model sees only the prompt, that it should copy any figures, names or text the request refers to into the prompt verbatim, and that it must never invent data. Applies to image, video and music modes.
  • Tool specs: the prompt field of ImageGen, VideoGen and MusicGen now says it must be self-contained.
  • Visibility: each success result includes Prompt sent: …, so the chat shows what the media model actually got.

Tests: three new local tests (spec wording, a mocked-gateway ImageGen run that checks the prompt arrives unchanged and is echoed back, and the desktop wording). npm test gives 794 pass; the desktop tsc --noEmit is clean.

🤖 Generated with Claude Code

…refer to (#185)

Desktop media mode wrapped the user's text as "Generate an image ... from this
prompt:", which reads as "pass this through". ImageGen sends exactly the prompt
it receives, and its spec never said the image model can't see the chat, so
"turn these numbers into an infographic" reached the model with no numbers and
it invented its own.

- Desktop wrapper now tells the agent the media model sees only the prompt, to
  write referenced figures/names/text in verbatim, and never to invent data.
- ImageGen/VideoGen/MusicGen prompt specs say the same.
- Each success result shows "Prompt sent: ..." so the chat shows what the
  media model was actually given.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@VickyXAI
VickyXAI merged commit 7f00724 into main Oct 3, 2026
6 checks passed
@VickyXAI
VickyXAI deleted the fix/media-prompt-context branch October 3, 2026 02:18
@VickyXAI VickyXAI mentioned this pull request Oct 3, 2026
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.

Image generation doesn't carry over context from earlier messages

1 participant