@michengai/dsh-codex-ui 0.2.105 → 0.2.107
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 +26 -0
- package/CHANGELOG.zh-CN.md +26 -0
- package/lib/client.js +175 -137
- package/lib/index.d.mts +5 -4
- package/lib/index.mjs +29 -19
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,32 @@
|
|
|
4
4
|
|
|
5
5
|
This changelog records recent releases of DSH Codex UI and its one-click installer. Earlier changes remain available in the [Git history](https://github.com/MichengAI/dsh-codex-ui/commits/main).
|
|
6
6
|
|
|
7
|
+
## suite-installer-v0.1.25 - 2026-09-07
|
|
8
|
+
|
|
9
|
+
- Updated the bundled Codex UI to `0.2.107` and refreshed direct member versions from the official npm registry for reproducible installation.
|
|
10
|
+
|
|
11
|
+
## 0.2.107 - 2026-09-07
|
|
12
|
+
|
|
13
|
+
- Displayed the running Codex UI version beside the About title and aligned Channel and Schedule session-group layout with Tasks.
|
|
14
|
+
- Restricted dependency update requests to loopback same-origin callers and avoided redundant Desktop reload IPC while preserving independent Web reloads.
|
|
15
|
+
- Standardized the package contract on Node.js 22.19.0+ and pnpm 11.22.0.
|
|
16
|
+
|
|
17
|
+
## suite-installer-v0.1.24 — 2026-09-07
|
|
18
|
+
|
|
19
|
+
- Added BTW side questions and Simplify code cleanup to the Suite, installing all eight companion plugins together.
|
|
20
|
+
- Refreshed and pinned member versions from the official npm registry for reproducible installations.
|
|
21
|
+
- Requires Node.js 22.19.0 or later to support Simplify.
|
|
22
|
+
|
|
23
|
+
## 0.2.106 — 2026-09-07
|
|
24
|
+
|
|
25
|
+
- Added Wallpaper Engine sidebar glass support while keeping settings and search dialogs correctly positioned and clickable.
|
|
26
|
+
- Integrated the billing plugin entry into the sidebar, aligning icon size, colors, typography, and spacing with Settings while preserving billing details and the collapsed entry.
|
|
27
|
+
|
|
28
|
+
## suite-installer-v0.1.23 — 2026-09-07
|
|
29
|
+
|
|
30
|
+
- Updated the bundled Codex UI to `0.2.106`, including sidebar glass support and billing entry styling.
|
|
31
|
+
- Other Suite members remain unchanged.
|
|
32
|
+
|
|
7
33
|
## 0.2.105 — 2026-09-06
|
|
8
34
|
|
|
9
35
|
- Added Simplify directly below BTW on the About page, with version status, install, update, and bulk-update support.
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -4,6 +4,32 @@
|
|
|
4
4
|
|
|
5
5
|
本日志记录 DSH Codex UI 及其一键安装器的最近发布;更早的变更可查看 [Git 提交历史](https://github.com/MichengAI/dsh-codex-ui/commits/main)。
|
|
6
6
|
|
|
7
|
+
## suite-installer-v0.1.25 - 2026-09-07
|
|
8
|
+
|
|
9
|
+
- 将套件中的 Codex UI 更新至 `0.2.107`,并从官方 npm 刷新直装成员版本,保证安装可复现。
|
|
10
|
+
|
|
11
|
+
## 0.2.107 - 2026-09-07
|
|
12
|
+
|
|
13
|
+
- 在 Codex UI 大标题旁显示当前运行版本,并将频道、定时的会话分组布局与任务页对齐。
|
|
14
|
+
- 将依赖更新请求限制为本机同源调用,并避免 Desktop 重复发送重载 IPC,同时保留独立 Web 的重载能力。
|
|
15
|
+
- 统一包契约为 Node.js 22.19.0+ 与 pnpm 11.22.0。
|
|
16
|
+
|
|
17
|
+
## suite-installer-v0.1.24 — 2026-09-07
|
|
18
|
+
|
|
19
|
+
- 套件新增 BTW 旁问和 Simplify 代码简化,一次安装八个配套插件。
|
|
20
|
+
- 从官方 npm 刷新并锁定成员版本,保证安装结果可复现。
|
|
21
|
+
- 为支持 Simplify,要求 Node.js 22.19.0 或更高版本。
|
|
22
|
+
|
|
23
|
+
## 0.2.106 — 2026-09-07
|
|
24
|
+
|
|
25
|
+
- 新增 Wallpaper Engine 侧栏玻璃兼容,并保持设置和搜索弹窗定位、点击正常。
|
|
26
|
+
- 将费用插件入口融入侧栏,统一与设置入口的图标大小、颜色、字号和间距,保留费用详情及收缩态入口。
|
|
27
|
+
|
|
28
|
+
## suite-installer-v0.1.23 — 2026-09-07
|
|
29
|
+
|
|
30
|
+
- 更新套件中的 Codex UI 至 `0.2.106`,包含侧栏玻璃兼容和费用入口样式适配。
|
|
31
|
+
- 其他套件成员保持不变。
|
|
32
|
+
|
|
7
33
|
## 0.2.105 — 2026-09-06
|
|
8
34
|
|
|
9
35
|
- 关于页在 BTW 下方新增 Simplify,支持查看版本状态、安装、更新和批量更新。
|
package/lib/client.js
CHANGED
|
@@ -4478,77 +4478,80 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
4478
4478
|
[group.id]: !isExpanded
|
|
4479
4479
|
}));
|
|
4480
4480
|
}
|
|
4481
|
-
}), isExpanded &&
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
pendingInteraction,
|
|
4501
|
-
t,
|
|
4502
|
-
menuItems: sessionMenuItems(t, {
|
|
4481
|
+
}), isExpanded && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4482
|
+
className: "dcu-wb-project-body",
|
|
4483
|
+
children: group.sessions.map((session) => {
|
|
4484
|
+
const id = session.sessionId;
|
|
4485
|
+
const title = session.title;
|
|
4486
|
+
const selected = sessions.current === id;
|
|
4487
|
+
const running = session.running || sessions.byId[id]?.running === true;
|
|
4488
|
+
const updatedAt = session.updatedAt ?? sessions.byId[id]?.updatedAt;
|
|
4489
|
+
const unread = flags.unreadSessionIds.includes(id);
|
|
4490
|
+
const pendingInteraction = pendingInteractionForSession(id, pendingInteractions, sessions.byId[id]?.pendingInteraction);
|
|
4491
|
+
const moveTargets = moveSession === void 0 || workspaces === void 0 ? void 0 : sessionMoveTargets(workspaces.items, id).map((target) => ({
|
|
4492
|
+
...target,
|
|
4493
|
+
id: moveSessionActionId(target.id)
|
|
4494
|
+
}));
|
|
4495
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SessionRow, {
|
|
4496
|
+
id,
|
|
4497
|
+
title,
|
|
4498
|
+
selected,
|
|
4499
|
+
menuOpen: menu?.id === id,
|
|
4503
4500
|
unread,
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
return;
|
|
4501
|
+
running,
|
|
4502
|
+
pendingInteraction,
|
|
4503
|
+
t,
|
|
4504
|
+
menuItems: sessionMenuItems(t, {
|
|
4505
|
+
unread,
|
|
4506
|
+
moveTargets
|
|
4507
|
+
}),
|
|
4508
|
+
menuPoint: menu?.id === id && menu.x !== void 0 && menu.y !== void 0 ? {
|
|
4509
|
+
x: menu.x,
|
|
4510
|
+
y: menu.y
|
|
4511
|
+
} : void 0,
|
|
4512
|
+
onOpen: () => {
|
|
4513
|
+
flags.setUnreadSessionIds((ids) => ids.filter((item) => item !== id));
|
|
4514
|
+
openSession(id);
|
|
4515
|
+
},
|
|
4516
|
+
onMenuChange: (open) => {
|
|
4517
|
+
setMenu(open ? { id } : void 0);
|
|
4518
|
+
},
|
|
4519
|
+
onArchive: () => {
|
|
4520
|
+
run("archive", () => archiveSession(id));
|
|
4521
|
+
},
|
|
4522
|
+
onHover: (event) => {
|
|
4523
|
+
const box = hoverCardAnchor(event.currentTarget.getBoundingClientRect());
|
|
4524
|
+
showTip({
|
|
4525
|
+
title,
|
|
4526
|
+
project: label,
|
|
4527
|
+
time: updatedAt === void 0 ? void 0 : formatHoverTime(updatedAt, t),
|
|
4528
|
+
left: box.left,
|
|
4529
|
+
top: box.top
|
|
4530
|
+
});
|
|
4531
|
+
},
|
|
4532
|
+
onLeave: hideTip,
|
|
4533
|
+
onContextMenu: (event) => {
|
|
4534
|
+
event.preventDefault();
|
|
4535
|
+
event.stopPropagation();
|
|
4536
|
+
dismissTip();
|
|
4537
|
+
setMenu({
|
|
4538
|
+
id,
|
|
4539
|
+
x: event.clientX,
|
|
4540
|
+
y: event.clientY
|
|
4541
|
+
});
|
|
4542
|
+
},
|
|
4543
|
+
onSelectAction: (action) => {
|
|
4544
|
+
if (busy !== void 0) return;
|
|
4545
|
+
const targetWorkspaceId = parseMoveSessionActionId(action);
|
|
4546
|
+
if (targetWorkspaceId !== void 0 && moveSession !== void 0) {
|
|
4547
|
+
setMenu(void 0);
|
|
4548
|
+
run("session-move", () => moveSession(id, targetWorkspaceId));
|
|
4549
|
+
return;
|
|
4550
|
+
}
|
|
4551
|
+
dialogs.handleAction(action, id, title);
|
|
4548
4552
|
}
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
}, id);
|
|
4553
|
+
}, id);
|
|
4554
|
+
})
|
|
4552
4555
|
})]
|
|
4553
4556
|
}, group.id);
|
|
4554
4557
|
})
|
|
@@ -4780,74 +4783,77 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
4780
4783
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEllipsisOutline16, { size: 16 })
|
|
4781
4784
|
})
|
|
4782
4785
|
})
|
|
4783
|
-
}), isExpanded &&
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
pendingInteraction,
|
|
4800
|
-
t,
|
|
4801
|
-
menuItems: sessionMenuItems(t, {
|
|
4786
|
+
}), isExpanded && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4787
|
+
className: "dcu-wb-project-body",
|
|
4788
|
+
children: group.sessions.map((session) => {
|
|
4789
|
+
const id = session.id;
|
|
4790
|
+
const title = session.title;
|
|
4791
|
+
const unread = flags.unreadSessionIds.includes(id);
|
|
4792
|
+
const pendingInteraction = pendingInteractionForSession(id, pendingInteractions, sessions.byId[id]?.pendingInteraction);
|
|
4793
|
+
const moveTargets = moveSession === void 0 ? void 0 : sessionMoveTargets(workspaces.items ?? [], id).map((target) => ({
|
|
4794
|
+
...target,
|
|
4795
|
+
id: moveSessionActionId(target.id)
|
|
4796
|
+
}));
|
|
4797
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SessionRow, {
|
|
4798
|
+
id,
|
|
4799
|
+
title,
|
|
4800
|
+
selected: sessions.current === id,
|
|
4801
|
+
menuOpen: menu?.id === id,
|
|
4802
4802
|
unread,
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
return;
|
|
4803
|
+
running: session.running,
|
|
4804
|
+
pendingInteraction,
|
|
4805
|
+
t,
|
|
4806
|
+
menuItems: sessionMenuItems(t, {
|
|
4807
|
+
unread,
|
|
4808
|
+
moveTargets
|
|
4809
|
+
}),
|
|
4810
|
+
menuPoint: menu?.id === id && menu.x !== void 0 && menu.y !== void 0 ? {
|
|
4811
|
+
x: menu.x,
|
|
4812
|
+
y: menu.y
|
|
4813
|
+
} : void 0,
|
|
4814
|
+
onOpen: () => {
|
|
4815
|
+
flags.setUnreadSessionIds((ids) => ids.filter((item) => item !== id));
|
|
4816
|
+
openSession(id);
|
|
4817
|
+
},
|
|
4818
|
+
onMenuChange: (open) => {
|
|
4819
|
+
setMenu(open ? { id } : void 0);
|
|
4820
|
+
},
|
|
4821
|
+
onArchive: () => {
|
|
4822
|
+
run("archive", () => archiveSession(id));
|
|
4823
|
+
},
|
|
4824
|
+
onHover: (event) => {
|
|
4825
|
+
const box = hoverCardAnchor(event.currentTarget.getBoundingClientRect());
|
|
4826
|
+
showTip({
|
|
4827
|
+
title,
|
|
4828
|
+
project: group.label,
|
|
4829
|
+
time: session.updatedAt === void 0 ? void 0 : formatHoverTime(session.updatedAt, t),
|
|
4830
|
+
left: box.left,
|
|
4831
|
+
top: box.top
|
|
4832
|
+
});
|
|
4833
|
+
},
|
|
4834
|
+
onLeave: hideTip,
|
|
4835
|
+
onContextMenu: (event) => {
|
|
4836
|
+
event.preventDefault();
|
|
4837
|
+
event.stopPropagation();
|
|
4838
|
+
dismissTip();
|
|
4839
|
+
setMenu({
|
|
4840
|
+
id,
|
|
4841
|
+
x: event.clientX,
|
|
4842
|
+
y: event.clientY
|
|
4843
|
+
});
|
|
4844
|
+
},
|
|
4845
|
+
onSelectAction: (action) => {
|
|
4846
|
+
if (busy !== void 0) return;
|
|
4847
|
+
const targetWorkspaceId = parseMoveSessionActionId(action);
|
|
4848
|
+
if (targetWorkspaceId !== void 0 && moveSession !== void 0) {
|
|
4849
|
+
setMenu(void 0);
|
|
4850
|
+
run("session-move", () => moveSession(id, targetWorkspaceId));
|
|
4851
|
+
return;
|
|
4852
|
+
}
|
|
4853
|
+
dialogs.handleAction(action, id, title);
|
|
4847
4854
|
}
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
}, id);
|
|
4855
|
+
}, id);
|
|
4856
|
+
})
|
|
4851
4857
|
})]
|
|
4852
4858
|
}, group.id);
|
|
4853
4859
|
})
|
|
@@ -5104,6 +5110,9 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
5104
5110
|
}
|
|
5105
5111
|
const stylesheet$3 = `
|
|
5106
5112
|
.dcu-root{--dcu-font:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei UI",sans-serif;--dcu-sidebar-primary:#393d3e;--dcu-sidebar-secondary:#676b6c;--dcu-sidebar-tertiary:#9a9f9f;--dcu-sidebar-navigation:#4e5253;--dcu-sidebar-icon:#4e5253;--dcu-sidebar-hover:#dfe8e5;--dcu-sidebar-border:rgba(37,46,41,.10);--dcu-tip-bg:#ffffff;--dcu-tip-shadow:0 10px 32px rgba(31,39,36,.22);width:100%;height:100%;min-width:0;box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden;background:#eef7f5;color:var(--dcu-sidebar-primary);font:14px/20px var(--dcu-font)}body[data-ds-dark-theme] .dcu-root{background:#1d2120;--dcu-sidebar-primary:#b9bab9;--dcu-sidebar-secondary:#909191;--dcu-sidebar-tertiary:#666867;--dcu-sidebar-navigation:#b9bab9;--dcu-sidebar-icon:#afafaf;--dcu-sidebar-hover:#303432;--dcu-sidebar-border:rgba(255,255,255,.08);--dcu-tip-bg:#2a2a2a;--dcu-tip-shadow:0 10px 30px rgba(0,0,0,.28)}
|
|
5113
|
+
/* 滤镜只作用于背景,避免为设置和搜索等 fixed 后代创建侧栏包含块。 */
|
|
5114
|
+
body[data-we-sidebar-glass] .dcu-root{position:relative;background:transparent}body[data-we-sidebar-glass] .dcu-root::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background-color:color-mix(in srgb,var(--we-sidebar-color,#fff) calc(var(--we-sidebar-alpha,.15)*.66*100%),transparent);background-image:linear-gradient(180deg,rgba(255,255,255,calc(var(--we-sidebar-sheen,1)*.14)),rgba(255,255,255,calc(var(--we-sidebar-sheen,1)*.04)) 38%,rgba(255,255,255,calc(var(--we-sidebar-sheen,1)*.01)));-webkit-backdrop-filter:blur(var(--we-sidebar-blur,16px)) saturate(var(--we-sidebar-saturate,1.8)) brightness(var(--we-glass-brightness,1.04)) contrast(1.01);backdrop-filter:blur(var(--we-sidebar-blur,16px)) saturate(var(--we-sidebar-saturate,1.8)) brightness(var(--we-glass-brightness,1.04)) contrast(1.01);box-shadow:inset 0 1px 0 rgba(255,255,255,calc(var(--we-sidebar-sheen,1)*.32)),inset 0 -1px 0 rgba(255,255,255,calc(var(--we-sidebar-sheen,1)*.08)),inset 0 0 0 .5px rgba(255,255,255,calc(var(--we-sidebar-sheen,1)*.06))}body[data-ds-dark-theme][data-we-sidebar-glass] .dcu-root::before{background-color:color-mix(in srgb,var(--we-sidebar-color,#fff) calc(var(--we-sidebar-alpha,.15)*.33*100%),transparent)}body[data-we-appwindow][data-we-sidebar-glass] .dcu-root::before{-webkit-backdrop-filter:none;backdrop-filter:none}@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){body[data-we-sidebar-glass] .dcu-root{background:#eef7f5}body[data-ds-dark-theme][data-we-sidebar-glass] .dcu-root{background:#1d2120}body[data-we-sidebar-glass] .dcu-root::before{display:none}}
|
|
5115
|
+
body[data-we-sidebar-glass] .dcu-expanded-shell,body[data-we-sidebar-glass] .dcu-compact-shell,body[data-we-sidebar-glass] .dcu-foot{position:relative}
|
|
5107
5116
|
.dcu-expanded-shell{display:flex;width:100%;min-height:0;flex:1 1 0;overflow:hidden;flex-direction:column;transform-origin:left center;transition:opacity 140ms ease-out,transform 180ms cubic-bezier(.16,1,.3,1);animation:dcu-sidebar-expanded-in 180ms cubic-bezier(.16,1,.3,1)}.dcu-compact-shell{display:none;width:56px}.dcu-root.dcu-collapsing .dcu-expanded-shell{opacity:0;transform:translateX(-6px);pointer-events:none}.dcu-root.dcu-compact .dcu-expanded-shell{display:none}.dcu-root.dcu-compact .dcu-compact-shell{display:flex;min-height:0;flex:1;flex-direction:column;align-items:center;animation:dcu-sidebar-compact-in 140ms ease-out}@keyframes dcu-sidebar-expanded-in{from{opacity:0;transform:translateX(-6px)}to{opacity:1;transform:none}}@keyframes dcu-sidebar-compact-in{from{opacity:0;transform:translateX(-4px)}to{opacity:1;transform:none}}
|
|
5108
5117
|
.dcu-root *{box-sizing:border-box}.dcu-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:8px;height:60px;padding:8px 8px 8px 12px}.dcu-brand{border:0;background:transparent;color:inherit;padding:0;display:flex;align-items:center;min-width:0;overflow:hidden}.dcu-brand svg{display:block;width:auto;max-width:100%;height:24px;min-width:0}.dcu-head-actions{display:grid;grid-auto-flow:column;grid-auto-columns:28px;align-items:center;column-gap:8px;height:28px}
|
|
5109
5118
|
.dcu-icon,.dcu-menu button,.dcu-footer-link{appearance:none;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer}.dcu-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:8px;color:var(--dcu-sidebar-icon)}.dcu-head .dcu-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;margin:0;padding:0;border-radius:50%;line-height:0}.dcu-head .dcu-icon svg{display:block;width:16px;height:16px}
|
|
@@ -5112,6 +5121,25 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
5112
5121
|
.dcu-menu-icon{display:grid;place-items:center start;width:20px;height:20px}.dcu-menu-icon svg,.dcu-footer-link svg{display:block;width:16px;height:16px;color:var(--dcu-sidebar-icon)}.dcu-menu button:disabled{color:var(--dcu-sidebar-secondary);cursor:default;opacity:1}.dcu-menu button:disabled svg{color:var(--dcu-sidebar-secondary)}
|
|
5113
5122
|
.dcu-extensions-group{display:grid}.dcu-extension-leading{position:relative;display:block;width:16px;height:16px}.dcu-extension-leading svg{position:absolute;inset:0;transition:opacity 140ms ease-out,transform 220ms cubic-bezier(.16,1,.3,1)}.dcu-extension-default-icon{opacity:1}.dcu-extension-state-arrow{opacity:0;transform:rotate(0)}.dcu-extensions-group:hover .dcu-extension-default-icon,.dcu-extensions-toggle:focus-visible .dcu-extension-default-icon{opacity:0}.dcu-extensions-group:hover .dcu-extension-state-arrow,.dcu-extensions-toggle:focus-visible .dcu-extension-state-arrow{opacity:1}.dcu-extensions-toggle[aria-expanded=true] .dcu-extension-state-arrow{transform:rotate(90deg)}.dcu-extension-panel{display:grid;grid-template-rows:1fr;opacity:1;transition:grid-template-rows 220ms cubic-bezier(.16,1,.3,1),opacity 160ms ease-out}.dcu-extension-panel[data-open=false]{grid-template-rows:0fr;opacity:0;pointer-events:none}.dcu-extension-panel-inner{position:relative;min-height:0;overflow:hidden}.dcu-extension-items{position:relative;display:grid;gap:1px;margin:1px 0 4px 28px}.dcu-extension-items::before{content:"";position:absolute;left:-16px;top:0;bottom:4px;width:1px;background:var(--dcu-sidebar-border)}.dcu-extension-items button{grid-template-columns:minmax(0,1fr);min-height:32px;color:var(--dcu-sidebar-secondary);font-size:13px;font-weight:400}.dcu-extension-items .dcu-menu-icon{display:none}
|
|
5114
5123
|
.dcu-workspaces{display:flex;min-height:0;flex:1;flex-direction:column;margin-top:2px;padding-top:8px;border-top:1px solid var(--dcu-sidebar-border)}.dcu-workspaces.dcu-workspaces-tabs{padding-top:0;border-top:0}.dcu-im-tabs{display:flex;gap:16px;margin:0 8px 12px;padding:0;border-bottom:1px solid var(--dcu-sidebar-border)}.dcu-im-tab{appearance:none;border:0;background:transparent;color:var(--dcu-sidebar-secondary);padding:8px 0 7px;font:14px/22px var(--dcu-font);font-weight:500;cursor:pointer}.dcu-im-tab[data-on=true]{color:var(--dcu-sidebar-primary);font-weight:600;box-shadow:inset 0 -2px 0 currentColor}.dcu-native-workspaces{display:flex;min-height:0;flex:1}.dcu-native-workspaces>*{min-width:0;flex:1}.dcu-native-workspaces .ima-tabs,.dcu-native-workspaces [role=tablist]{display:none!important}.dcu-schedule-browser{display:flex;min-height:0;flex:1;flex-direction:column}.dcu-native-workspaces .dcu-schedule-views{display:flex!important;flex:none;min-height:30px;margin:0 8px 8px;padding:2px;border:1px solid var(--dcu-sidebar-border);border-radius:8px;background:rgba(255,255,255,.025)}.dcu-schedule-views button{appearance:none;flex:1;min-width:0;height:24px;border:0;border-radius:6px;background:transparent;color:var(--dcu-sidebar-secondary);font:600 12px/18px var(--dcu-font);cursor:pointer}.dcu-schedule-views button[aria-selected=true]{background:var(--dcu-sidebar-hover);color:var(--dcu-sidebar-primary);box-shadow:inset 0 0 0 1px var(--dcu-sidebar-border)}.dcu-schedule-pane{display:flex;min-height:0;flex:1}.dcu-schedule-pane>*{min-width:0;flex:1}.dcu-schedule-pane>[data-slot="sidebar.schedule"]{display:flex!important;width:100%;min-width:0;flex:1}.dcu-schedule-pane>[data-slot="sidebar.schedule"]>.dsh-st-rail{width:100%;min-width:0;padding-right:8px;scrollbar-gutter:auto}.dcu-schedule-pane .dsh-st-overview{padding-right:8px}.dcu-foot{display:grid;width:100%;gap:4px;padding:8px 6px 12px;border-top:1px solid var(--dcu-sidebar-border);transition:opacity 120ms ease-out,transform 160ms cubic-bezier(.16,1,.3,1)}.dcu-root.dcu-collapsing>.dcu-foot{opacity:0;transform:translateX(-4px);pointer-events:none}.dcu-footer-actions:empty,.dcu-settings-seat:empty{display:none}.dcu-settings-seat>button{width:100%;min-height:36px;padding-left:4px!important;color:var(--dcu-sidebar-navigation);font:14px/20px var(--dcu-font);font-weight:400}.dcu-compact{width:100%;align-items:flex-start;overflow:hidden;padding:10px 0 8px}.dcu-compact-nav{display:flex;flex:1;min-height:0;flex-direction:column;align-items:center;gap:2px;overflow:auto;padding:6px 0}.dcu-compact .dcu-icon{width:36px;height:36px;flex:none}.dcu-compact .dcu-foot{width:36px;margin-top:auto;margin-left:10px;padding:8px 0;border-top:0}.dcu-compact .dcu-settings-seat{width:36px;overflow:hidden}.dcu-compact .dcu-settings-seat>button{display:grid;place-items:center;width:36px;min-height:36px;padding:0!important;font-size:0!important;line-height:0}.dcu-compact .dcu-settings-seat>button svg{width:16px;height:16px}.dcu-compact .dcu-footer-link{display:flex;justify-content:center;width:36px;padding:0;font-size:0}.dcu-compact .dcu-footer-link svg{width:16px;height:16px}
|
|
5124
|
+
/* 仅适配费用插件入口;通过标记及入口结构定位,保留原生统计、浮层和容器查询。 */
|
|
5125
|
+
.dcu-footer-actions [data-testid="billing-trigger"]{box-sizing:border-box;width:100%;min-width:0;min-height:52px;padding:8px 6px;gap:8px;border:0;border-radius:6px;background:transparent;color:var(--dcu-sidebar-primary);font-family:var(--dcu-font);box-shadow:none;transform:none;transition:background-color 120ms ease-out,color 120ms ease-out}
|
|
5126
|
+
.dcu-footer-actions :is([data-testid="billing-trigger"],[data-testid="billing-rail-button"]):hover{border-color:transparent;background:var(--dcu-sidebar-hover);box-shadow:none;transform:none}
|
|
5127
|
+
.dcu-footer-actions :is([data-testid="billing-trigger"],[data-testid="billing-rail-button"]):focus-visible{background:var(--dcu-sidebar-hover);outline:2px solid var(--dcu-sidebar-icon);outline-offset:-2px;box-shadow:none;transform:none}
|
|
5128
|
+
.dcu-footer-actions [data-testid="billing-trigger-icon"]{flex:none;width:16px;height:20px;border:0;border-radius:0;background:transparent;color:var(--dcu-sidebar-icon);opacity:1}
|
|
5129
|
+
/* 费用图形仅占 24px 画布中的 16px;补偿内部留白,使可见宽度与设置图标一致。 */
|
|
5130
|
+
.dcu-footer-actions [data-testid="billing-trigger-icon"] svg{flex:none;width:24px;height:24px;stroke-width:1.5px}
|
|
5131
|
+
.dcu-footer-actions [data-testid="billing-trigger-icon"]+span{min-width:0;gap:2px;margin-left:4px}
|
|
5132
|
+
.dcu-footer-actions [data-testid="billing-trigger-icon"]+span>span:first-child{gap:4px;min-width:0}
|
|
5133
|
+
.dcu-footer-actions [data-testid="billing-trigger-icon"]+span>span:first-child>span{color:var(--dcu-sidebar-navigation);font-size:12px;line-height:20px;letter-spacing:0}
|
|
5134
|
+
.dcu-footer-actions [data-testid="billing-trigger-icon"]+span>span:first-child>span:last-child{color:var(--dcu-sidebar-navigation);font-size:16px;font-weight:600;line-height:20px;letter-spacing:0;font-variant-numeric:tabular-nums}
|
|
5135
|
+
.dcu-footer-actions [data-testid="billing-trigger-today"]{color:var(--dcu-sidebar-navigation);font-size:12px;line-height:16px}
|
|
5136
|
+
.dcu-footer-actions [data-testid="billing-trigger-spark"]>span{background:var(--dcu-sidebar-secondary)}
|
|
5137
|
+
.dcu-footer-actions [data-testid="billing-rail-button"]{box-sizing:border-box;display:grid;place-items:center;width:36px;height:36px;min-width:0;padding:0;border:0;border-radius:8px;background:transparent;color:var(--dcu-sidebar-icon);box-shadow:none;transform:none;transition:background-color 120ms ease-out,color 120ms ease-out}
|
|
5138
|
+
.dcu-footer-actions [data-testid="billing-rail-button"] svg{flex:none;width:24px;height:24px;stroke-width:1.5px}
|
|
5139
|
+
.dcu-settings-seat [data-slot="settings.trigger"]{color:var(--dcu-sidebar-navigation)}
|
|
5140
|
+
.dcu-settings-seat [data-slot="settings.trigger"]>svg{color:var(--dcu-sidebar-icon)}
|
|
5141
|
+
.dcu-root:not(.dcu-compact) .dcu-settings-seat [data-slot="settings.trigger"]>span{margin-left:4px}
|
|
5142
|
+
@media (prefers-reduced-motion:reduce){.dcu-footer-actions :is([data-testid="billing-trigger"],[data-testid="billing-rail-button"]){transition:none}}
|
|
5115
5143
|
.dcu-expanded-shell,.dcu-foot{width:100%}
|
|
5116
5144
|
.dcu-native-workspaces{flex-direction:column}.dcu-native-workspaces>[data-mcp-connector-top-mount=true]{flex:none}.dcu-root .mcpConnectorLauncher,.dcu-root [data-mcp-connector-top-mount=true]{display:none!important}
|
|
5117
5145
|
.dcu-dependency-notice{margin:0 10px 8px;border:1px solid var(--dcu-sidebar-border);border-radius:8px;padding:8px;color:var(--dcu-sidebar-secondary);font-size:12px;line-height:18px}
|
|
@@ -5977,6 +6005,7 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
5977
6005
|
const stylesheet$2 = `
|
|
5978
6006
|
.dcu-about{color:var(--dsw-alias-label-primary)}.dcu-about h2{margin:0;font-size:20px;line-height:28px}.dcu-about-intro{margin:6px 0 22px;color:var(--dsw-alias-label-secondary);font-size:13px;line-height:20px}.dcu-about h3{margin:24px 0 8px;font-size:14px;line-height:20px}.dcu-about-features{margin:0;padding-left:20px;color:var(--dsw-alias-label-secondary);font-size:13px;line-height:24px}.dcu-about-dependencies-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:24px}.dcu-about-dependencies-heading h3{margin:0}.dcu-about-dependencies-heading+.dcu-about-intro{margin-bottom:14px}.dcu-about-dependencies{overflow:hidden;border:1px solid var(--dsw-alias-border-l2);border-radius:10px}.dcu-about-dependency{display:flex;align-items:center;gap:12px;min-height:64px;padding:12px;border-bottom:1px solid var(--dsw-alias-border-l2)}.dcu-about-dependency:last-child{border-bottom:0}.dcu-about-copy{min-width:0;flex:1}.dcu-about-name{font-size:13px;line-height:20px;font-weight:600}.dcu-about-package{overflow:hidden;margin-top:2px;color:var(--dsw-alias-label-tertiary);font-size:12px;text-overflow:ellipsis;white-space:nowrap}.dcu-about-status{display:flex;align-items:center;gap:5px;font-size:12px}.dcu-about-status[data-installed=true]{color:var(--dsw-alias-state-success-primary)}.dcu-about-status[data-installed=false]{color:var(--dsw-alias-state-error-primary)}.dcu-about-status[data-update=true]{color:var(--dsw-alias-state-warning-primary)}.dcu-about-install{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:32px;border:1px solid var(--dsw-alias-border-l2);border-radius:7px;padding:6px 9px;background:transparent;color:var(--dsw-alias-label-primary);font:inherit;font-size:12px;cursor:pointer}.dcu-about-install:hover:not(:disabled){background:var(--dsw-specific-menu-item-hover)}.dcu-about-install:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.dcu-about-install:disabled{cursor:wait;opacity:.65}.dcu-about-update-all{min-width:92px}.dcu-about-message{margin:10px 0 0;border-radius:8px;padding:9px 10px;background:color-mix(in srgb,var(--dsw-alias-state-business-primary) 12%,transparent);color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}.dcu-about-message[data-error=true]{background:color-mix(in srgb,var(--dsw-alias-state-error-primary) 12%,transparent);color:var(--dsw-alias-state-error-primary)}.dcu-about-progress{display:grid;grid-template-columns:auto 1fr auto;gap:8px 10px;align-items:center;margin-top:10px;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;padding:9px 10px}.dcu-about-progress code{min-width:0;color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dcu-about-progress-pct{color:var(--dsw-alias-label-tertiary);font-size:12px;font-variant-numeric:tabular-nums}.dcu-about-progress-bar{grid-column:1/-1;height:4px;overflow:hidden;border-radius:99px;background:var(--dsw-alias-border-l2)}.dcu-about-progress-fill{height:100%;background:var(--dsw-alias-state-business-primary);transition:width .2s ease}.dcu-about-progress-fill[data-wave=true]{width:28%;animation:dcu-about-progress-wave 1.2s ease-in-out infinite}@keyframes dcu-about-progress-wave{0%{transform:translateX(-60%)}100%{transform:translateX(280%)}}
|
|
5979
6007
|
.dcu-about-title-row{display:flex;align-items:center;gap:8px;min-width:0}.dcu-about-links{display:flex;align-items:center;gap:4px}.dcu-about-external-link{display:inline-flex;align-items:center;gap:5px;min-height:28px;padding:0 8px;color:var(--dsw-alias-label-secondary);background:transparent;border:1px solid var(--dsw-alias-border-l2);border-radius:7px;font-size:12px;font-weight:500;line-height:18px;text-decoration:none;white-space:nowrap}.dcu-about-external-link:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.dcu-about-external-link:focus-visible{outline:2px solid var(--dsw-alias-state-success-primary);outline-offset:2px}.dcu-about-external-link svg{flex:none}@media(max-width:720px){.dcu-about-title-row{flex-wrap:wrap}}
|
|
6008
|
+
.dcu-about-version{margin-left:8px;color:var(--dsw-alias-label-tertiary);font-family:inherit;font-size:12px;font-weight:500;line-height:18px;letter-spacing:0;white-space:nowrap;vertical-align:baseline}
|
|
5980
6009
|
`;
|
|
5981
6010
|
/** 宿主图标库不提供 GitHub 品牌标识,内联后可离线使用并继承当前文字颜色。 */
|
|
5982
6011
|
function GithubMark16() {
|
|
@@ -6165,6 +6194,7 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
6165
6194
|
}
|
|
6166
6195
|
};
|
|
6167
6196
|
const actionableCount = dependencies.filter((dependency) => !dependency.installed || dependency.updateAvailable).length;
|
|
6197
|
+
const selfVersion = dependencies.find((dependency) => dependency.id === "ui")?.version;
|
|
6168
6198
|
const title = (id) => t(`about.dependency.${id}`);
|
|
6169
6199
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
6170
6200
|
ref: root,
|
|
@@ -6174,7 +6204,10 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
6174
6204
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("style", { children: stylesheet$2 }),
|
|
6175
6205
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6176
6206
|
className: "dcu-about-title-row",
|
|
6177
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.
|
|
6207
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("h2", { children: [t("about.title"), selfVersion === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
6208
|
+
className: "dcu-about-version",
|
|
6209
|
+
children: ["v", selfVersion]
|
|
6210
|
+
})] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6178
6211
|
className: "dcu-about-links",
|
|
6179
6212
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("a", {
|
|
6180
6213
|
className: "dcu-about-external-link",
|
|
@@ -6935,7 +6968,12 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
6935
6968
|
[["连接器", "Connectors"], "connectors"],
|
|
6936
6969
|
[["定时任务", "Scheduled tasks"], "schedule"],
|
|
6937
6970
|
[["IM助理", "IM Assistant"], "assistant"],
|
|
6938
|
-
[[
|
|
6971
|
+
[[
|
|
6972
|
+
"已归档",
|
|
6973
|
+
"归档会话",
|
|
6974
|
+
"Archived",
|
|
6975
|
+
"Archived sessions"
|
|
6976
|
+
], "archive"],
|
|
6939
6977
|
[["Codex UI"], "about"]
|
|
6940
6978
|
];
|
|
6941
6979
|
/** 按设置导航可见文案解析侧栏同款图标;插件市场复用插件图标。 */
|
package/lib/index.d.mts
CHANGED
|
@@ -4,13 +4,14 @@ type HostRequest = {
|
|
|
4
4
|
method?: string;
|
|
5
5
|
url?: string;
|
|
6
6
|
headers?: Record<string, string | string[] | undefined>;
|
|
7
|
+
socket?: {
|
|
8
|
+
remoteAddress?: string;
|
|
9
|
+
};
|
|
7
10
|
[Symbol.asyncIterator]?: () => AsyncIterator<Uint8Array | string>;
|
|
8
11
|
};
|
|
9
12
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* 且无法被页面伪造)再按 Origin 与 Host 的比对阻断;无这些头的
|
|
13
|
-
* 非浏览器客户端(curl、CLI)仍然放行。
|
|
13
|
+
* 依赖安装会改写用户配置并拉起子进程,只允许回环地址上的同源浏览器请求。
|
|
14
|
+
* Origin、Host 和 Sec-Fetch-Site 都可被非浏览器客户端伪造,不能单独作为授权依据。
|
|
14
15
|
*/
|
|
15
16
|
declare function crossSiteRequest(request: HostRequest): boolean;
|
|
16
17
|
/** 把安装错误收成可给浏览器看的文案:我们自己的中文说明保留,带本地路径的底层错误脱敏。 */
|
package/lib/index.mjs
CHANGED
|
@@ -350,6 +350,10 @@ function requestDesktopHotUpdate(send = process.send) {
|
|
|
350
350
|
send(APPLY_PLUGIN_UPDATES_IPC);
|
|
351
351
|
return true;
|
|
352
352
|
}
|
|
353
|
+
/** Desktop 的包管理服务会自行安排重载;只有独立 Web 子进程需要通知父进程。 */
|
|
354
|
+
function canRequestParentReload(runtime, send = process.send) {
|
|
355
|
+
return runtime.environmentKind === "cli" && typeof send === "function";
|
|
356
|
+
}
|
|
353
357
|
async function recordPendingUpdate(packageName, version, runtime) {
|
|
354
358
|
const pendingPath = resolve(profileDirectory(runtime), PROFILE_PENDING_UPDATES_FILE);
|
|
355
359
|
let packages = [];
|
|
@@ -1554,29 +1558,31 @@ const explorerEndpoint = "/api/michengai/codex-ui/open-in-explorer";
|
|
|
1554
1558
|
const preferencesEndpoint = "/api/michengai/codex-ui/preferences";
|
|
1555
1559
|
const sessionMoveEndpoint = "/api/michengai/codex-ui/session-move";
|
|
1556
1560
|
const maxPreferencesBodyBytes = 32768;
|
|
1561
|
+
function isLoopbackAddress(value) {
|
|
1562
|
+
const address = value?.toLowerCase().replace(/^\[|\]$/g, "");
|
|
1563
|
+
return address === "localhost" || address === "localhost." || address === "::1" || address?.startsWith("127.") === true || address?.startsWith("::ffff:127.") === true;
|
|
1564
|
+
}
|
|
1557
1565
|
function headerValue(headers, name) {
|
|
1558
1566
|
const value = headers[name];
|
|
1559
1567
|
if (typeof value === "string") return value;
|
|
1560
1568
|
if (Array.isArray(value)) return value[0];
|
|
1561
1569
|
}
|
|
1562
1570
|
/**
|
|
1563
|
-
*
|
|
1564
|
-
*
|
|
1565
|
-
* 且无法被页面伪造)再按 Origin 与 Host 的比对阻断;无这些头的
|
|
1566
|
-
* 非浏览器客户端(curl、CLI)仍然放行。
|
|
1571
|
+
* 依赖安装会改写用户配置并拉起子进程,只允许回环地址上的同源浏览器请求。
|
|
1572
|
+
* Origin、Host 和 Sec-Fetch-Site 都可被非浏览器客户端伪造,不能单独作为授权依据。
|
|
1567
1573
|
*/
|
|
1568
1574
|
function crossSiteRequest(request) {
|
|
1575
|
+
if (!isLoopbackAddress(request.socket?.remoteAddress)) return true;
|
|
1569
1576
|
const headers = request.headers;
|
|
1570
|
-
if (headers === void 0) return
|
|
1577
|
+
if (headers === void 0) return true;
|
|
1571
1578
|
const site = headerValue(headers, "sec-fetch-site");
|
|
1572
|
-
if (site
|
|
1573
|
-
if (site !== void 0) return true;
|
|
1579
|
+
if (site !== void 0 && site !== "same-origin") return true;
|
|
1574
1580
|
const origin = headerValue(headers, "origin");
|
|
1575
|
-
if (origin === void 0) return false;
|
|
1576
1581
|
const host = headerValue(headers, "host");
|
|
1577
|
-
if (host === void 0) return true;
|
|
1582
|
+
if (origin === void 0 || host === void 0) return true;
|
|
1578
1583
|
try {
|
|
1579
|
-
|
|
1584
|
+
const url = new URL(origin);
|
|
1585
|
+
return url.protocol !== "http:" && url.protocol !== "https:" || !isLoopbackAddress(url.hostname) || url.host !== host;
|
|
1580
1586
|
} catch {
|
|
1581
1587
|
return true;
|
|
1582
1588
|
}
|
|
@@ -1724,16 +1730,18 @@ function apply(ctx) {
|
|
|
1724
1730
|
"content-type": "application/json; charset=utf-8",
|
|
1725
1731
|
"cache-control": "no-store"
|
|
1726
1732
|
});
|
|
1727
|
-
response.end(JSON.stringify({ error: "
|
|
1733
|
+
response.end(JSON.stringify({ error: "已拒绝非本机同源请求。" }));
|
|
1728
1734
|
return;
|
|
1729
1735
|
}
|
|
1730
1736
|
if (url.searchParams.get("action") === "update-all") {
|
|
1731
|
-
const
|
|
1737
|
+
const runtime = resolveDependencyRuntime(ctx);
|
|
1738
|
+
const notifyParent = canRequestParentReload(runtime);
|
|
1739
|
+
const autoReload = runtime.environmentKind === "desktop" || notifyParent;
|
|
1732
1740
|
let restartAfterResponse = false;
|
|
1733
1741
|
const { dependencies, updatedCount } = await updateAllDependencies(() => {
|
|
1734
|
-
restartAfterResponse =
|
|
1742
|
+
restartAfterResponse = notifyParent;
|
|
1735
1743
|
return restartAfterResponse;
|
|
1736
|
-
},
|
|
1744
|
+
}, runtime);
|
|
1737
1745
|
response.writeHead(200, {
|
|
1738
1746
|
"content-type": "application/json; charset=utf-8",
|
|
1739
1747
|
"cache-control": "no-store"
|
|
@@ -1741,19 +1749,21 @@ function apply(ctx) {
|
|
|
1741
1749
|
response.end(JSON.stringify({
|
|
1742
1750
|
dependencies,
|
|
1743
1751
|
restartRequired: updatedCount > 0,
|
|
1744
|
-
autoReload
|
|
1752
|
+
autoReload
|
|
1745
1753
|
}));
|
|
1746
1754
|
if (restartAfterResponse) setTimeout(() => {
|
|
1747
1755
|
requestDesktopHotUpdate();
|
|
1748
1756
|
}, 150).unref?.();
|
|
1749
1757
|
return;
|
|
1750
1758
|
}
|
|
1751
|
-
const
|
|
1759
|
+
const runtime = resolveDependencyRuntime(ctx);
|
|
1760
|
+
const notifyParent = canRequestParentReload(runtime);
|
|
1761
|
+
const autoReload = runtime.environmentKind === "desktop" || notifyParent;
|
|
1752
1762
|
let restartAfterResponse = false;
|
|
1753
1763
|
const dependencies = await installDependency(url.searchParams.get("dependency"), () => {
|
|
1754
|
-
restartAfterResponse =
|
|
1764
|
+
restartAfterResponse = notifyParent;
|
|
1755
1765
|
return restartAfterResponse;
|
|
1756
|
-
},
|
|
1766
|
+
}, runtime);
|
|
1757
1767
|
response.writeHead(200, {
|
|
1758
1768
|
"content-type": "application/json; charset=utf-8",
|
|
1759
1769
|
"cache-control": "no-store"
|
|
@@ -1761,7 +1771,7 @@ function apply(ctx) {
|
|
|
1761
1771
|
response.end(JSON.stringify({
|
|
1762
1772
|
dependencies,
|
|
1763
1773
|
restartRequired: true,
|
|
1764
|
-
autoReload
|
|
1774
|
+
autoReload
|
|
1765
1775
|
}));
|
|
1766
1776
|
if (restartAfterResponse) setTimeout(() => {
|
|
1767
1777
|
requestDesktopHotUpdate();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@michengai/dsh-codex-ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.107",
|
|
4
4
|
"description": "以 Codex 风格重构 DSH Web 侧栏的独立客户端插件",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"publishConfig": {
|
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
"homepage": "https://github.com/MichengAI/dsh-codex-ui#readme",
|
|
18
18
|
"type": "module",
|
|
19
19
|
"packageManager": "pnpm@11.22.0",
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": "^22.19.0 || >=24.0.0"
|
|
22
|
+
},
|
|
20
23
|
"main": "lib/index.mjs",
|
|
21
24
|
"types": "lib/index.d.mts",
|
|
22
25
|
"exports": {
|