Skip to content

fix(gui): open chat links in external system browser (#607) - #642

Open
cagdasyurekli wants to merge 1 commit into
andrewyng:mainfrom
cagdasyurekli:fix/issue-607-markdown-external-links
Open

fix(gui): open chat links in external system browser (#607)#642
cagdasyurekli wants to merge 1 commit into
andrewyng:mainfrom
cagdasyurekli:fix/issue-607-markdown-external-links

Conversation

@cagdasyurekli

Copy link
Copy Markdown

Closes #607

Summary

Fixes an issue where clicking links in chat transcript messages does nothing in the packaged desktop Tauri app because Tauri webview intercepts <a target="_blank">.

Changes

  1. Opener Plugin: Added tauri-plugin-opener dependency to surfaces/gui/src-tauri/Cargo.toml, initialized it in src/lib.rs, and permitted opener:default in capabilities/default.json.
  2. Native Fallback: Added a native open_url command to Tauri's invoke handlers for additional robustness.
  3. Bridge Update: Updated openExternal in surfaces/gui/src/tauri.ts to call opener.openUrl with fallbacks to invoke("open_url") and window.open.
  4. Markdown Links: Added an onClick handler in surfaces/gui/src/components/Markdown.tsx for link elements to prevent default and call openExternal(href).

- Wire tauri-plugin-opener into desktop Cargo.toml, capabilities, and Tauri builder
- Expose native open_url command as fallback in Tauri shell
- Route Markdown component link clicks through openExternal
- Fallback to native open_url and window.open in openExternal
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.

Links in chat/agent messages don't open a browser in the desktop app (Tauri webview intercepts target=_blank; Markdown never calls openExternal)

1 participant