opencode
opencode copied to clipboard
fix(tui): make auth URLs clickable regardless of line wrapping
Summary
- Add new
Linkcomponent that opens URLs in browser when clicked - Fix OAuth authorization URLs that wrap across multiple lines being only partially clickable
- Works in all terminal emulators (not dependent on OSC 8 support)
Problem
When connecting to a provider (e.g., Anthropic Claude Pro/Max), the OAuth URL displayed in the dialog often wraps across multiple lines. Previously, only the first line was clickable, making it impossible to open the full URL.
Solution
Created a Link component that uses onMouseUp handler with the open package to open the URL in the default browser when any part of the link text is clicked.
Test plan
- [x] Run
bun run devand use/connect→ anthropic → Claude Pro/Max - [x] Verify clicking anywhere on the wrapped URL opens the complete URL in browser
- [x] TypeScript compiles without errors
- [x] Build succeeds
🤖 Generated with Claude Code