Skip to content

Conversation

@aparusel
Copy link

Fixes #10901

What does this PR do?

Prevents external http(s) links in AI responses from navigating the app webview. External links now open in the OS default browser so OpenCode’s main UI is never replaced.

How did you verify your code works?

  • Ran the desktop app locally (bun run --cwd packages/desktop tauri dev)
  • Clicked external https links in an assistant message and confirmed they open in the system browser while OpenCode stays on the current view
  • Confirmed same-origin links are not intercepted

Intercept external http(s) anchor clicks and delegate to the OS browser so the main app webview is never replaced by a navigated page.
@github-actions
Copy link
Contributor

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

Based on my search, I found 2 potentially related PRs (excluding the current PR #10903):

  1. feat(desktop): open external links in system browser instead of webview (feat(desktop): open external links in system browser instead of webview #8523)

    • Very similar functionality - handles opening external links in system browser instead of webview
    • This appears to be an earlier attempt at the same feature
  2. feat(desktop): add setting to open links in external browser (feat(desktop): add setting to open links in external browser #10310)

    • Related feature about opening links in external browser
    • May be handling a similar or overlapping concern

These PRs seem to address the same or very similar issues around preventing external links from navigating the webview and opening them in the system browser instead. You may want to check if #8523 and #10310 are already merged or closed, and whether #10903 supersedes or complements them.

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.

Desktop: Clicking external links in AI responses replaces OpenCode UI with chromeless webview

1 participant