Repository navigation
Let users allow extra URL schemes for links in chat (zotero:, obsidian:, cursor:, …) #21233
Replies: 3 comments
|
Note Written by Claude (Claude Code, Opus 5.5) for @noelcserepy. Another case: The Linear desktop app (1.32.4, macOS) registers Today's workaround is Linear's "open links in desktop app" setting with plain A user setting as proposed here would cover this with no Linear-specific code. +1 to the optional first-use confirmation. Environment: T3 Code Nightly 0.1.1-nightly.20261020.3411, macOS 26.6.2. |
|
Thanks for all the work on T3 Code. I’d appreciate the general, user-controlled approach proposed here. Beyond common apps like Obsidian and Slack, there’s a long tail of specialist apps and private tools whose links would be useful in chat. Supporting each through a separate carve-out seems difficult to keep up with. Spark is one example from my own workflow: its private email links open the correct message when launched directly on macOS, but are inert in T3 chat. HTTPS fallbacks work, though they add a browser step. Other users will have similar needs for different apps. An assisted source investigation found separate checks in Markdown rendering, desktop external opening, and mobile link handling, so a renderer-only change wouldn’t cover every client. Perhaps a small initial version could offer:
Would this direction fit your plans? I’d be happy to contribute synthetic reproduction cases and help test macOS/iOS behavior if useful. Thanks again for considering it. |
|
Another case for the user-configurable list: I use a small app I built myself, Sidecar, which registers No hard-coded list will ever include a private tool like this, so the narrow fixes (#23486 for editors, #31386 for Obsidian) can't cover it. I'd be happy with either:
Opt-in per user seems like the right default, since agent output can contain links an attacker planted. Platform: macOS 26.6.2, T3 Code Nightly desktop 0.1.8-nightly.20261106.4275 |
Uh oh!
There was an error while loading. Please reload this page.
Note
Written by Claude (Claude Code, Opus 5.5) for @kevinbpatel. Claude looked into why a link in chat wouldn't open, read the shipped client bundle and
main@3ff5b3c, and drafted this. Kevin asked for it to be posted.Problem
Agents often write links to desktop apps: a reference manager item, a note, an editor location, a task, a ticket. Users can't add a URL scheme to what T3 Code will open, so all of these links do nothing.
Two layers filter links, and both use a fixed list:
markdownUrlTransforminapps/web/src/components/ChatMarkdown.tsxallows T3's own hrefs (citations, context, thread links, file paths), then calls react-markdown'sdefaultUrlTransform. That allows onlyhttp,https,irc,ircs,mailtoandxmpp. Any other scheme gets an emptyhref. The text still looks like a link, but clicking it does nothing and shows no error.parseSafeExternalUrlinapps/desktop/src/electron/ElectronShell.tspasses onlyhttp:/https:and the remote editor links (vscode://vscode-remote/ssh-remote+…,zed://ssh/…,jetbrains://gateway/…) toshell.openExternal.The OS handlers work. The same URL opens the right app from a shell (
open/xdg-open), a browser or a terminal.Prior requests
The same root cause keeps coming back, each time for different apps:
linear:,slack:,notion:,obsidian:cursor://andvscode://file links do nothingA built-in list will always miss some app: Zotero (
zotero://select/…,zotero://open-pdf/…), DEVONthink (x-devonthink-item://), Things (things:///), Bear, Logseq, OmniFocus, Raycast, internal company tools, and so on. A built-in list also makes maintainers decide which apps qualify.Proposal
Add a user setting for extra URL schemes that links in chat may open, for example Settings → Integrations → "Allowed link schemes", with a list such as
zotero, obsidian, things.href. The desktop shell hands the URL toshell.openExternal. Mobile passes it to the native URL handler. Links open on the client device, which already happens for http links.javascript,data,vbscript,file,blob,about,chrome,devtools, and probablysmb/ms-*on Windows. Raw HTML should stay sanitized as it is now.zotero: links are blocked. Allow?), so the click isn't silently dropped.That resolves #16822 and the cases behind #15722 without a hard-coded list of apps. A small built-in default set could still ship if maintainers want one.
Current workaround
Point the link at a small http page that redirects to the custom scheme (
location.href = "zotero://…"). T3 opens it in the system browser, which then hands off to the app. This works, but each user has to run a small server that every machine they click from can reach, and it adds a browser tab and a confirmation prompt on every click.Environment
T3 Code nightly 0.1.1-nightly.20261018.3315. Server on Linux, desktop client on macOS, Claude Code provider.
🤖 Generated with Claude Code
All reactions