From 14f1e49b8608572220b8b313608333f8ba8e4eb3 Mon Sep 17 00:00:00 2001 From: Simon Klee Date: Mon, 5 Jan 2026 21:58:46 +0100 Subject: [PATCH] fix(tui): use OSC 8 hyperlinks for multiline link support Use element to generate OSC 8 terminal hyperlinks which correctly span multiple lines when text wraps. Keep onMouseUp as fallback for terminals without OSC 8 support. Fixes #6639 --- packages/opencode/src/cli/cmd/tui/ui/link.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/opencode/src/cli/cmd/tui/ui/link.tsx b/packages/opencode/src/cli/cmd/tui/ui/link.tsx index 3b328e478d6..dc05fab6a9e 100644 --- a/packages/opencode/src/cli/cmd/tui/ui/link.tsx +++ b/packages/opencode/src/cli/cmd/tui/ui/link.tsx @@ -8,21 +8,18 @@ export interface LinkProps { fg?: RGBA } -/** - * Link component that renders clickable hyperlinks. - * Clicking anywhere on the link text opens the URL in the default browser. - */ export function Link(props: LinkProps) { const displayText = props.children ?? props.href return ( { open(props.href).catch(() => {}) }} > - {displayText} + + {displayText} + ) }