feat(platform): add chat message editing and conversation branching#1271
Conversation
Allow users to edit sent messages and branch conversations from any point in the chat history, creating alternate conversation threads with a branch navigator for switching between them.
…ctions - Fix branch navigator to correctly determine parent thread at each fork point, resolving broken navigation when multiple messages are edited - Only show navigators for direct child branches or sibling branches, preventing unrelated branches from appearing - Persist branch selections to threadMetadata so the last viewed branch is restored on next visit - Preserve scroll position during branch switches by suppressing auto-scroll in onContentChange handler - Use Dialog component for message editing instead of inline textarea - Fix message ordering in branches by using saveMessage loop instead of SDK cloneThread (which processes in DESC order) - Always show edit button regardless of generation status
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
The ChatMessages component now depends on useBranchContext, which requires BranchProvider. Add a vi.mock for the branch context module so existing tests render without the provider wrapper.
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis pull request implements a message editing feature with branching support for chat threads. It introduces frontend components ( Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary
Closes #1164
Test plan
Summary by CodeRabbit