Skip to content

Conversation

@turculaurentiu91
Copy link
Contributor

@turculaurentiu91 turculaurentiu91 commented Jan 8, 2026

Summary

  • External links in markdown content (AI responses) now open in the system's default browser instead of inside the Tauri webview

Problem

When clicking links in AI-generated markdown output in the desktop app, such as GitHub PR links, they were opening inside the Tauri webview rather than in the system's default browser. This happened because target="_blank" links bypass Tauri's on_navigation handler.

Solution

  • Changed the markdown link renderer to use class="external-link"
  • Added a global click listener in the desktop entry point that intercepts clicks on .external-link anchors and opens them via platform.openLink() (which uses Tauri's shell plugin)

This keeps the fix isolated to the desktop package while reusing the existing openLink platform API.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@turculaurentiu91 turculaurentiu91 force-pushed the fix/desktop-external-links branch from bb74146 to 33e491f Compare January 8, 2026 18:21
@adamdotdevin adamdotdevin merged commit 779610d into anomalyco:dev Jan 15, 2026
paralin added a commit to paralin/opencode that referenced this pull request Jan 15, 2026
jerome-benoit added a commit to jerome-benoit/opencode that referenced this pull request Jan 15, 2026
Fixes typecheck error introduced in anomalyco#7360 where platform.openLink() was
referenced before platform was defined. Move platform and serverPassword
creation outside render() so they're available to the click event listener.
Eric-Guo pushed a commit to Eric-Guo/opencode that referenced this pull request Jan 15, 2026
Fixes typecheck error introduced in anomalyco#7360 where platform.openLink() was
referenced before platform was defined. Move platform and serverPassword
creation outside render() so they're available to the click event listener.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants