fix(Sender): apply formatResult to content slots - #1981
Conversation
|
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 (4)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughSender 的 content slot 增加 ChangesSender content slot 格式化支持
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 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.
Code Review
This pull request introduces support for applying a formatResult function to content slot configurations within the sender component. Specifically, the useSlotConfigState hook has been updated to format the text content when a formatResult function is defined for a content slot, and corresponding unit tests have been added to verify this behavior. There are no review comments, and I have no feedback to provide.
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.
12d8ad7 to
1e4a0d5
Compare
🤔 This is a ...
🔗 Related Issues
Fixes #1956
💡 Background and Solution
Sender slot mode already supports
formatResult, but content slots returned editable DOM text directly when collecting the final value, soformatResultwas skipped for content slots.This change applies
formatResultto content slot text when generatinggetValue().valueand the returned slot config value.📝 Change Log
formatResultwhen producing the final value.formatResult。Summary by CodeRabbit
content词槽支持通过formatResult处理编辑后的文本,并返回格式化结果。formatResult在content词槽中的使用方式。