dsh-rig 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/lib/client.js +17 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
本项目的所有重要改动都会记在这里。格式参考 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),
|
|
4
4
|
版本号遵循 [SemVer](https://semver.org/lang/zh-CN/)。
|
|
5
5
|
|
|
6
|
+
## [0.4.1] - 2026-11-24
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
|
|
10
|
+
- **「在右侧栏打开」实际打开了系统浏览器**。`browserOpener` 只在 `openLab()`(智能体首次驱动、自动展开那条路)里赋值,
|
|
11
|
+
而用户直接点面板按钮时它还是 `null`,于是走了兜底的 `window.open` —— 两个按钮行为一模一样。
|
|
12
|
+
现在 `apply()` 里就 `inject(['sidebarRight'])` 并接上入口,不等任何事件。
|
|
13
|
+
|
|
6
14
|
## [0.4.0] - 2026-11-24
|
|
7
15
|
|
|
8
16
|
### Added
|
package/lib/client.js
CHANGED
|
@@ -570,6 +570,23 @@ window.__ModuleLoader__.load({
|
|
|
570
570
|
inject: ['slots'],
|
|
571
571
|
apply(ctx) {
|
|
572
572
|
try {
|
|
573
|
+
// 先把「开进右栏浏览器标签」的入口拿到 —— 面板按钮随时可能被点,
|
|
574
|
+
// 不能等到 openLab()(自动展开那条路)才赋值,否则第一次点会静默退回系统浏览器。
|
|
575
|
+
try {
|
|
576
|
+
ctx.inject(['sidebarRight'], (inner) => {
|
|
577
|
+
const nav = inner.sidebarRight
|
|
578
|
+
if (!nav || typeof nav.openTab !== 'function') return
|
|
579
|
+
browserOpener = (url) => {
|
|
580
|
+
try {
|
|
581
|
+
nav.openTab('browser', { params: { url } })
|
|
582
|
+
} catch {
|
|
583
|
+
window.open(url, '_blank', 'noopener,noreferrer')
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
})
|
|
587
|
+
} catch {
|
|
588
|
+
/* 没有 sidebarRight 就退回系统浏览器 */
|
|
589
|
+
}
|
|
573
590
|
// 页级连接先起来:面板没打开时也要能收到 `open-lab`,否则「自动展开」无从触发。
|
|
574
591
|
labStore.configure({ onOpenLab: (sessionId) => autoOpen(ctx, sessionId) })
|
|
575
592
|
labStore.start()
|
package/package.json
CHANGED