-
Notifications
You must be signed in to change notification settings - Fork 4
[Bug] Editing and resending a modified user message does not trigger a new AI response #3
Description
Description
When a user edits a previously sent message and submits the edited version, the AI does not generate a new response. The edited message appears to update in the chat, but no new stream is initiated, the conversation just stalls.
Steps to Reproduce
- Open the Trace chat panel (schematic)
- Send a message and wait for the AI to finish responding
- Click the edit button on the user message
- Modify the message content
- Submit the edited message
Expected Behavior
The AI assistant's previous response should be removed (or replaced), and a new streaming response should begin using the edited message content - effectively "resending" with the updated prompt.
Actual Behavior
The user message updates visually, but no new AI response is generated. The conversation appears stuck with the old assistant response still visible.
Environment
- Trace Version: 1.2.0
- OS: macOS Sequoia 15.6.1 (24G90)
- Editor: Schematic
Additional Context
The edit flow is handled by SetEditMessageCallback in ai_chat_panel_base.cpp (line ~556) which calls SetEditMessageId on the backend client, then the message is resent via StreamChat. The React side dispatches edit_message from MessageBubble.tsx. The issue may be in how the edited message ID is propagated to the backend, or in the version rollback step that precedes the resend.