-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix: some gpt-5 stutter #2836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: some gpt-5 stutter #2836
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
Caution Review failedThe pull request is closed. WalkthroughRefactors chat message rendering to use engine-provided messages via a new MessageList, simplifies streaming UI, and adjusts message-content styling. Updates tool-call control flow to push results via a callback. Bumps ai and @ai-sdk/react dependencies in multiple packages. No public UI component signatures changed; one tools API signature updated. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant ChatUI as Chat UI
participant Engine as EditorEngine
participant Tools as handleToolCall
participant ChatStore as chat.addToolResult
User->>ChatUI: Triggers tool call
ChatUI->>Engine: Prepare toolCall
ChatUI->>Tools: handleToolCall(toolCall, Engine, addToolResult)
note right of Tools: Executes async internally
Tools-->>ChatStore: addToolResult({ toolCallId, result | error })
ChatStore-->>ChatUI: State updates (message with tool result)
ChatUI-->>User: Renders updated messages
sequenceDiagram
autonumber
participant Engine as EditorEngine.chat.conversation
participant ChatList as MessageList
participant Stream as StreamMessage
participant View as ChatMessages
Engine-->>View: messages
View->>ChatList: Render with engine messages
alt Waiting (streaming)
Stream-->>View: isWaiting=true, streamMessage
Note over Stream,View: Show single "Thinking ..." indicator
end
ChatList-->>View: Render mapped user/assistant messages
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (9)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| console.error('Error handling tool call', error); | ||
| return 'error handling tool call ' + error; | ||
| } | ||
| executeToolCall(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical bug: executeToolCall() is called without await, causing the function to return undefined instead of the tool result. This breaks the tool execution flow and will cause runtime errors when the result is expected. Change to: return executeToolCall(); or return await executeToolCall();
| executeToolCall(); | |
| return executeToolCall(); |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
Description
Related Issues
Type of Change
Testing
Screenshots (if applicable)
Additional Notes
Important
Fix GPT-5 stutter by updating dependencies and refactoring chat message handling components.
@ai-sdk/reactto2.0.44andaito5.0.44inpackage.jsonandbun.lock.ChatMessagesinindex.tsxto use newMessageListcomponent.useMemoanduseCallbackhooks for message rendering logic.StreamMessagelogic instream-message.tsx.MessageListcomponent inmessage-list.tsxfor rendering chat messages.handleToolCallintools.tsto acceptaddToolResultcallback for tool result handling.This description was created by
for 137e519. You can customize this summary. It will automatically update as commits are pushed.
Summary by CodeRabbit
Refactor
Style
Chores