fix(thinkingPlugin): update thinking condition to use length check - #384
Conversation
WalkthroughThe thinking plugin now marks any non-empty ChangesThinking Content Detection
Estimated code review effort: 1 (Trivial) | ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/kit/src/message/plugins/thinkingPlugin.ts`:
- Line 16: Align the predicate used by thinkingPlugin and defaultRenderers so
whitespace-only reasoning_content is treated consistently. Update the thinking
state check around reasoning_content to use the same trimmed-content semantics
as the Reasoning.vue renderer, or reuse a shared predicate if one exists, while
preserving behavior for non-empty reasoning content.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: c4609f7f-8de8-4ae8-b284-61683ba0ff5a
📒 Files selected for processing (1)
packages/kit/src/message/plugins/thinkingPlugin.ts
📦 Package Previewpnpm add https://pkg.pr.new/@opentiny/tiny-robot@fb7dac8 pnpm add https://pkg.pr.new/@opentiny/tiny-robot-kit@fb7dac8 pnpm add https://pkg.pr.new/@opentiny/tiny-robot-svgs@fb7dac8 commit: fb7dac8 |
🧹 Preview Cleaned UpThe preview deployment has been removed. |

问题:在某些场景出现 "正在思考->已思考->正在思考" 状态频繁转换
reasoning_content 在传输过程中可能是长度大于0的空白字符串
Summary by CodeRabbit