Agent chat file references ignore editor color theme

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

File name references in the agent chat panel (e.g. core/deal_pipeline.py, jobs/deal_scorecards/score_deals.py) and citation link elements in plan.md previews are rendered in a hardcoded blue color (#0223bf) that does not respect the active editor color theme or workbench.colorCustomizations settings.

Root cause: Cursor defines its own CSS variable --cursor-text-link independently instead of deriving it from the standard VS Code token --vscode-textLink-foreground. Setting “textLink.foreground” in workbench.colorCustomizations correctly updates --vscode-textLink-foreground, but --cursor-text-link ignores it.

DevTools verification:
getComputedStyle(el).getPropertyValue(‘–cursor-text-link’) → ‘#0223bf’ (hardcoded)
getComputedStyle(el).getPropertyValue(‘–vscode-textLink-foreground’) → ‘#c3a26b’ (from theme)

In workbench.desktop.main.js, most usages are color: var(–cursor-text-link) directly, while only one instance correctly uses color: var(–vscode-textLink-foreground, var(–cursor-text-link)) with a proper fallback. The affected CSS class is .md-clickable-code.md-inline-path-filename-like.

Steps to Reproduce

STEPS TO REPRODUCE:

Set a custom link color in settings.json, e.g. “textLink.foreground”: “#C3A26B” inside workbench.colorCustomizations
Open an agent chat session and make changes to files
Observe that file name references in the agent chat panel remain blue (#0223bf) instead of using the custom link color
Same issue with file links in .plan.md previews (a.ui-citation-link elements)

Expected Behavior

–cursor-text-link should derive its value from --vscode-textLink-foreground so file references in agent chat respect the user’s color theme. The fix is straightforward: replace var(–cursor-text-link) with var(–vscode-textLink-foreground, var(–cursor-text-link)) in workbench.desktop.main.js, which already exists in one place but is missing from the rest.

Operating System

MacOS

Version Information

Version: 3.0.9
VSCode Version: 1.105.1
Commit: 93e276db8a03af947eafb2d10241e2de17806c20
Date: 2026-04-03T02:06:46.446Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.3.0

Additional Information

Temporary workaround via DevTools confirms the fix is purely CSS:
document.querySelectorAll(‘.md-clickable-code’).forEach(e => e.style.color = ‘#C3A26B’)
Permanent workaround: patching the JS bundle with sed to replace all var(–cursor-text-link) with var(–vscode-textLink-foreground, var(–cursor-text-link)).

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hi @Silver,

This is confirmed — great root cause analysis. The --cursor-text-link CSS variable is generated from Cursor’s own semantic token system and doesn’t fall back to --vscode-textLink-foreground, so workbench.colorCustomizationstextLink.foreground has no effect on agent chat file references.

This was reported from a different angle in this related thread (Dark High Contrast theme producing unreadable link colors), and our team has a bug report open for it. Your finding that only one instance in the codebase uses the correct fallback pattern while the rest don’t is especially helpful for scoping the fix.

No timeline on the fix yet, but your workaround (patching var(--cursor-text-link)var(--vscode-textLink-foreground, var(--cursor-text-link))) is the right approach in the meantime.