Skip to content

fix(desktop): 对话与插件里的 HTTP 链接跟随「链接打开位置」 - #578

Merged
vastsa merged 3 commits into
mainfrom
merge/pr-566-link-open
Sep 18, 2026
Merged

vastsa merged 3 commits into
mainfrom
merge/pr-566-link-open

Conversation

@vastsa

@vastsa vastsa commented Sep 18, 2026

Copy link
Copy Markdown
Owner

Lands #566 onto current main.

问题

设置 → AI → 链接打开位置 只部分生效:对话里部分 HTTP 点击各写一套,扩展详情的主页 / 源码 / 仓库一律进工作区浏览器。插件详情又是全屏遮罩,工作区在遮罩后面打开,看起来像没反应。

改动

  • 抽出 openHttpUrl:对话 Markdown(链接、行内 URL、远程图)、预览目标、插件主页/仓库都走同一套。
  • 系统默认浏览器:走 browserOpenExternal。
  • 工作区浏览器:有会话时打开工作区;若当前在插件/设置页,先回到对话,避免被遮罩挡住。
  • 没有会话时工作区开不了,回退到系统浏览器。
  • 工作区 HTML 预览、BrowserPreview、右键「在工作区打开」仍直接走工作区,不读这项设置。

Main 在 #566 之后合入了 hosted-search citation badge(#570),本 PR 保留 citation 渲染,其余 HTTP 点击走共享 opener。

验证

  • node --test apps/desktop/test/open-http-url.test.mjs — 6/6
  • tool-row-file-refs / markdown-link-menu 一并绿

Closes #566

LectWolf and others added 3 commits September 18, 2026 06:26
Chat markdown, transcript previews, and plugin homepage/repo buttons each
opened HTTP URLs their own way, so the setting only partly applied and
plugin links vanished behind the detail overlay. Share one opener that
follows Link open destination, returns to chat when the work panel would
be covered, and falls back to the OS browser without a session.
Honor link-open destination for chat and plugin HTTP links (#566).

Keep hosted-search citation badges from main while routing remaining
HTTP clicks through the shared opener.
Copilot AI lite review requested due to automatic review settings September 18, 2026 08:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vastsa
vastsa merged commit 52eb48f into main Sep 18, 2026
1 of 4 checks passed
@vastsa
vastsa deleted the merge/pr-566-link-open branch September 21, 2026 11:16

This branch was successfully deployed

1 active deployment
Preview — a8af7427 Deployed Sep 18, 2026 by vercel[bot]
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.

3 participants