β¨ feat(chat-input): improve mention menu skill and tool icons#13722
Conversation
- Add MentionItemIcon with SkillAvatar, McpIcon, and Avatar fallbacks - Strip placeholder avatars ending with _AVATAR - Tweak mention item icon frame (overflow, border-radius) Made-with: Cursor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## canary #13722 +/- ##
=========================================
Coverage 66.55% 66.55%
=========================================
Files 2023 2023
Lines 170857 170857
Branches 20591 17330 -3261
=========================================
Hits 113708 113708
Misses 57025 57025
Partials 124 124
Flags with carried forward coverage won't be shown. Click here to find out more.
π New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Updates the ChatInput mention menu to render skill/tool icons more consistently by introducing a dedicated icon component, handling placeholder avatar strings (e.g. MCP_AVATAR) so they donβt appear as raw text, and ensuring icon frames stay clipped within the menu layout.
Changes:
- Replace inline skill/tool avatar rendering with a new
MentionItemIconcomponent that normalizes placeholder avatar values and provides category-based fallbacks. - Improve mention menu icon frame styling to prevent overflow and keep icons clipped with consistent rounding.
- Remove now-unneeded React
createElementusage from mention category generation.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/features/ChatInput/InputEditor/useMentionCategories.tsx |
Switches skill/tool item icon rendering to MentionItemIcon and removes the old inline avatar renderer. |
src/features/ChatInput/InputEditor/MentionMenu/style.ts |
Adds overflow clipping and rounding to the icon container to prevent layout breakage from fallback content. |
src/features/ChatInput/InputEditor/MentionItemIcon.tsx |
New component that normalizes placeholder avatar strings and provides skill/tool fallback icons or an Avatar when available. |
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
π» Change Type
π Related Issue
N/A
π Description of Change
MCP_AVATARso they no longer leak into the UI as raw textπ§ͺ How to Test
πΈ Screenshots / Videos
π Additional Information