Skip to content

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

Open
LectWolf wants to merge 1 commit into
vastsa:mainfrom
LectWolf:fix/honor-link-open-target
Open

LectWolf wants to merge 1 commit into
vastsa:mainfrom
LectWolf:fix/honor-link-open-target

Conversation

@LectWolf

Copy link
Copy Markdown

问题

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

改动

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

验证

  • node --test apps/desktop/test/open-http-url.test.mjs — 6/6
  • 现有 tool-row-file-refs 补了 openHttpUrl mock,保证 hook 仍能加载
  • 本机点过扩展主页/仓库:两个设置选项行为已分开

未跑 verify:ui:*。不含字体选择器改动。

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.
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.

1 participant