Feature Request: Make Links Clickable (Ctrl+Left Click to Open) #824

Open
opened 2026-02-16 17:28:28 -05:00 by yindo · 4 comments
Owner

Originally created by @jay-tau on GitHub (Jul 20, 2025).

Originally assigned to: @kommander on GitHub.

It would be very helpful if links (URLs) displayed in opencode were clickable, so that pressing Ctrl+left click on a link would open it in the default browser.

This is a common feature in many editors and terminal applications, and would improve usability when working with URLs in the interface.

Thank you!

Originally created by @jay-tau on GitHub (Jul 20, 2025). Originally assigned to: @kommander on GitHub. It would be very helpful if links (URLs) displayed in opencode were clickable, so that pressing Ctrl+left click on a link would open it in the default browser. This is a common feature in many editors and terminal applications, and would improve usability when working with URLs in the interface. Thank you!
yindo added the opentuidiscussion labels 2026-02-16 17:28:28 -05:00
Author
Owner

@kommander commented on GitHub (Nov 16, 2025):

Yes, opentui needs to support that. Will be possible soon.

@kommander commented on GitHub (Nov 16, 2025): Yes, opentui needs to support that. Will be possible soon.
Author
Owner

@thehamsti commented on GitHub (Dec 19, 2025):

It would have to be a OpenTUI library change. (I actually made a POC to see even if it was possible) This is what i found.

OpenTUI Changes:

  1. Add URL matching in the tree-sitter-styled-text.
  2. Register links in a registry to map screen positions to link IDs
  3. On option+leftclick TextBufferRenderable to lookup if theres a link at that position with callback with url

OpenCode Changes:

  1. Open the passed back URL

Here are links to the forked branch POC. I can clean it up if you want me to proceed with the strategy and make a PR, or if you guys were planning on a different way 👍🏼

https://github.com/sst/opencode/compare/dev...thehamsti:opencode:feature/clickable_links?expand=1 https://github.com/sst/opentui/compare/main...thehamsti:opentui:feature/osc8-hyperlinks?expand=1

@thehamsti commented on GitHub (Dec 19, 2025): It would have to be a OpenTUI library change. (I actually made a POC to see even if it was possible) This is what i found. OpenTUI Changes: 1. Add URL matching in the tree-sitter-styled-text. 2. Register links in a registry to map screen positions to link IDs 3. On option+leftclick TextBufferRenderable to lookup if theres a link at that position with callback with url OpenCode Changes: 1. Open the passed back URL Here are links to the forked branch POC. I can clean it up if you want me to proceed with the strategy and make a PR, or if you guys were planning on a different way 👍🏼 https://github.com/sst/opencode/compare/dev...thehamsti:opencode:feature/clickable_links?expand=1 https://github.com/sst/opentui/compare/main...thehamsti:opentui:feature/osc8-hyperlinks?expand=1
Author
Owner

@zeke commented on GitHub (Jan 13, 2026):

Just wanted to add another voice here - this would be really useful. I'm using Ghostty which has OSC 8 hyperlink support, so native terminal hyperlinks would work great.

Currently links in assistant message output are styled but not interactive. Would love to see OSC 8 escape sequences for terminals that support them.

Happy to help test if there's a branch working on this.

@zeke commented on GitHub (Jan 13, 2026): Just wanted to add another voice here - this would be really useful. I'm using Ghostty which has OSC 8 hyperlink support, so native terminal hyperlinks would work great. Currently links in assistant message output are styled but not interactive. Would love to see OSC 8 escape sequences for terminals that support them. Happy to help test if there's a branch working on this.
Author
Owner

@doanbactam commented on GitHub (Jan 14, 2026):

Sometimes, when you toggle a terminal, it will run in the background and the previous terminal will disappear.

@doanbactam commented on GitHub (Jan 14, 2026): Sometimes, when you toggle a terminal, it will run in the background and the previous terminal will disappear.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#824