Skip to content

fix forked prompt attachments losing file parts#17815

Merged
kitlangton merged 4 commits intodevfrom
fix/rehydrated-prompt-parts
Mar 19, 2026
Merged

fix forked prompt attachments losing file parts#17815
kitlangton merged 4 commits intodevfrom
fix/rehydrated-prompt-parts

Conversation

@kitlangton
Copy link
Contributor

@kitlangton kitlangton commented Mar 16, 2026

Summary

  • fix a TUI bug where forking or reusing a prompt with a file or image attachment could silently lose that attachment on the new message
  • strip persisted part ids when rehydrating saved file parts into prompt state so forked prompts do not keep pointing at the old message row
  • assign fresh part ids on submit and cover the stale-id path with a focused regression test

Testing

  • bun run test test/cli/cmd/tui/prompt-part.test.ts
  • bun run test test/session/prompt.test.ts
  • bun typecheck

@kitlangton kitlangton changed the title fix tui rehydrated prompt part ids fix forked prompt attachments losing file parts Mar 16, 2026
@kitlangton kitlangton marked this pull request as ready for review March 16, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant