fix: ensure last message is sent successfully - #1524
Conversation
WalkthroughThe update revises the logic for sending the last streamed response in a relay helper. Instead of always suppressing the last response when usage inclusion is disabled, the code now checks if any choice in the response contains non-empty content or reasoning content, and sends the response if such content is present. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Poem
Note 🔌 MCP (Model Context Protocol) integration is now available in Early Access!Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (2)📓 Common learnings📚 Learning: 2025-06-21T03:37:41.726ZApplied to files:
🔇 Additional comments (2)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Please merge this PR @Calcium-Ion, |
fix: ensure last message is sent successfully
修复gemini丢失消息的问题

gemini会在最后一条统计信息中夹带内容
Summary by CodeRabbit