improvement(chat): show resource-type icons on inline workspace resource links#5669
improvement(chat): show resource-type icons on inline workspace resource links#5669waleedlatif1 wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview For those kinds, styling switches from a dashed underline to an inline-flex row (icon + label, no underline). Reviewed by Cursor Bugbot for commit 0c43b41. Configure here. |
Greptile SummaryThis PR updates inline workspace resource links in chat messages. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (3): Last reviewed commit: "fix(chat): keep dashed-underline afforda..." | Re-trigger Greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 9b97c16. Configure here.
|
@cursor review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0c43b41. Configure here.
| {kind && ( | ||
| <ContextMentionIcon | ||
| context={{ kind, label }} | ||
| className='size-[14px] flex-shrink-0 text-[var(--text-icon)]' |
There was a problem hiding this comment.
File icon ignores path
Medium Severity
Inline file links pass the visible link text into ContextMentionIcon as label, but extension-aware icons come from getDocumentIcon using that label. When the markdown label is a custom title without a file extension while the #wsres-file-… href still carries the VFS path, the chip shows a generic file icon instead of the type-specific glyph the PR describes.
Reviewed by Cursor Bugbot for commit 0c43b41. Configure here.
| 'text-[var(--text-primary)]', | ||
| kind | ||
| ? 'not-prose inline-flex items-center gap-[5px] no-underline' | ||
| : 'underline decoration-dashed underline-offset-4' |
There was a problem hiding this comment.
Icon without valid reference
Low Severity
Resource kind for styling is parsed with a looser #wsres-(\w+)- pattern than the click handler’s #wsres-(\w+)-(.+)$ rule. A malformed link such as #wsres-file- with an empty ref still gets the icon and no dashed underline, but the click path never dispatches wsres-click because the stricter regex does not match.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 0c43b41. Configure here.


Summary
ContextMentionIcon/CHAT_CONTEXT_KIND_REGISTRY, so file references get extension-aware document icons and workflows/tables match their chip glyphswsres-clickdispatch) and primary text color; external links keep the dashed underlineType of Change
Testing
Tested manually; message-content suite passing, typecheck clean
Checklist