Repository navigation
fix(core): stabilize message queue and thinking timeout - #974
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
WalkthroughChanges队列等待与轮次生命周期
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant ConversationRuntime
participant request_conversation
participant thinking_message_send
participant ChatChain
participant message_delay
ConversationRuntime->>request_conversation: 发送 llm-queue-waiting 计数
request_conversation->>thinking_message_send: setQueueCount(count)
thinking_message_send-->>thinking_message_send: await queueCount
ChatChain->>message_delay: completeMessageTurn()
message_delay->>message_delay: 校验并完成队首轮次
ChatChain->>thinking_message_send: recallThinkingMessage()
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Code Review
This pull request refactors message turn completion and queue count tracking by introducing a completeMessageTurn callback and a Promise-based queueCount mechanism. However, several critical issues were identified in the review. First, the event listeners in message_delay.ts may cause queue corruption by prematurely completing turns without checking the active turn; making the expected parameter required in completeTurn is recommended. Second, using a Promise to store queueCount prevents updating the count on subsequent events, so storing it in a mutable variable is preferred. Finally, potential errors in completeMessageTurn and the external onQueueWaiting callback should be wrapped in try-catch blocks to prevent blocking critical execution paths and cleanup processes.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
This pr stabilizes conversation message turn completion and thinking-message queue waiting to avoid race/crash paths.
New Features
Bug Fixes
ChatChainfinally blocks so queue cleanup always runscompleteMessageTurnto the active turn to avoid completing the wrong queued turnOther Changes
Validation