Skip to content

improvement(chat): show resource-type icons on inline workspace resource links#5669

Merged
waleedlatif1 merged 4 commits into
stagingfrom
feat/chat-resource-link-icons
Jul 14, 2026
Merged

improvement(chat): show resource-type icons on inline workspace resource links#5669
waleedlatif1 merged 4 commits into
stagingfrom
feat/chat-resource-link-icons

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Inline workspace-resource references in chat prose (workflows, tables, files) now render the resource-type icon before the name instead of the dashed underline
  • Reuses the exact same icon mapping as the user-input context chips via the shared ContextMentionIcon / CHAT_CONTEXT_KIND_REGISTRY, so file references get extension-aware document icons and workflows/tables match their chip glyphs
  • Links keep their click behavior (wsres-click dispatch) and primary text color; external links keep the dashed underline

Type of Change

  • Improvement

Testing

Tested manually; message-content suite passing, typecheck clean

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 14, 2026 10:46pm

Request Review

@cursor

cursor Bot commented Jul 14, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Presentation-only chat markdown and a small VFS display helper refactor; no auth, data, or API changes.

Overview
Inline #wsres- links in chat markdown (workflows, tables, files) now show the same resource-type icons as context chips via ContextMentionIcon, with no dashed underline for those types; unknown wsres types keep the previous underline styling.

For files, icon choice uses the extension from the link’s VFS path (fileIconLabel + decodeVfsSegmentSafe) when the visible title has no extension. wsres-click behavior is unchanged; the anchor handler is slightly tightened (parse href up front, guard missing type/ref).

decodeVfsSegmentSafe is moved from copilot tool UI code into path-utils and shared by read-tool labels and chat rendering.

Reviewed by Cursor Bugbot for commit 7134521. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates inline workspace-resource links in chat messages. The main changes are:

  • Known workspace resources now show the shared context icon before the link text.
  • Unknown workspace-resource links keep the dashed underline affordance.
  • Safe VFS segment decoding is shared through the VFS path utilities.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/chat-content/chat-content.tsx Renders icons for known inline workspace-resource links and keeps the dashed underline fallback for unknown resource types.
apps/sim/lib/copilot/tools/client/store-utils.ts Uses the shared safe VFS segment decoder for read-target labels.
apps/sim/lib/copilot/vfs/path-utils.ts Exports a safe display decoder for VFS path segments.

Reviews (4): Last reviewed commit: "fix(chat): parse wsres links once, deriv..." | Re-trigger Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 7134521. Configure here.

@waleedlatif1 waleedlatif1 merged commit 82bed77 into staging Jul 14, 2026
13 checks passed
@waleedlatif1 waleedlatif1 deleted the feat/chat-resource-link-icons branch July 14, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant