@michengai/dsh-codex-ui 0.2.106 → 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 +17 -2
- package/CHANGELOG.zh-CN.md +17 -2
- package/lib/client.js +153 -137
- package/lib/index.d.mts +5 -4
- package/lib/index.mjs +29 -19
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,16 +4,31 @@
|
|
|
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
|
+
|
|
7
23
|
## 0.2.106 — 2026-09-07
|
|
8
24
|
|
|
9
25
|
- Added Wallpaper Engine sidebar glass support while keeping settings and search dialogs correctly positioned and clickable.
|
|
10
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.
|
|
11
|
-
- Added visual regression assertions. Glass and billing have been verified separately; combined verification remains pending because the current test profile does not include the wallpaper plugin.
|
|
12
27
|
|
|
13
28
|
## suite-installer-v0.1.23 — 2026-09-07
|
|
14
29
|
|
|
15
30
|
- Updated the bundled Codex UI to `0.2.106`, including sidebar glass support and billing entry styling.
|
|
16
|
-
- Other Suite members remain unchanged.
|
|
31
|
+
- Other Suite members remain unchanged.
|
|
17
32
|
|
|
18
33
|
## 0.2.105 — 2026-09-06
|
|
19
34
|
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -4,16 +4,31 @@
|
|
|
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
|
+
|
|
7
23
|
## 0.2.106 — 2026-09-07
|
|
8
24
|
|
|
9
25
|
- 新增 Wallpaper Engine 侧栏玻璃兼容,并保持设置和搜索弹窗定位、点击正常。
|
|
10
26
|
- 将费用插件入口融入侧栏,统一与设置入口的图标大小、颜色、字号和间距,保留费用详情及收缩态入口。
|
|
11
|
-
- 补充视觉回归断言。玻璃与费用入口已分别验证;当前测试 profile 不含壁纸插件,组合验收仍待完成。
|
|
12
27
|
|
|
13
28
|
## suite-installer-v0.1.23 — 2026-09-07
|
|
14
29
|
|
|
15
30
|
- 更新套件中的 Codex UI 至 `0.2.106`,包含侧栏玻璃兼容和费用入口样式适配。
|
|
16
|
-
-
|
|
31
|
+
- 其他套件成员保持不变。
|
|
17
32
|
|
|
18
33
|
## 0.2.105 — 2026-09-06
|
|
19
34
|
|
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
|
})
|
|
@@ -5999,6 +6005,7 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
5999
6005
|
const stylesheet$2 = `
|
|
6000
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%)}}
|
|
6001
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}
|
|
6002
6009
|
`;
|
|
6003
6010
|
/** 宿主图标库不提供 GitHub 品牌标识,内联后可离线使用并继承当前文字颜色。 */
|
|
6004
6011
|
function GithubMark16() {
|
|
@@ -6187,6 +6194,7 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
6187
6194
|
}
|
|
6188
6195
|
};
|
|
6189
6196
|
const actionableCount = dependencies.filter((dependency) => !dependency.installed || dependency.updateAvailable).length;
|
|
6197
|
+
const selfVersion = dependencies.find((dependency) => dependency.id === "ui")?.version;
|
|
6190
6198
|
const title = (id) => t(`about.dependency.${id}`);
|
|
6191
6199
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
6192
6200
|
ref: root,
|
|
@@ -6196,7 +6204,10 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
6196
6204
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("style", { children: stylesheet$2 }),
|
|
6197
6205
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6198
6206
|
className: "dcu-about-title-row",
|
|
6199
|
-
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", {
|
|
6200
6211
|
className: "dcu-about-links",
|
|
6201
6212
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("a", {
|
|
6202
6213
|
className: "dcu-about-external-link",
|
|
@@ -6957,7 +6968,12 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
6957
6968
|
[["连接器", "Connectors"], "connectors"],
|
|
6958
6969
|
[["定时任务", "Scheduled tasks"], "schedule"],
|
|
6959
6970
|
[["IM助理", "IM Assistant"], "assistant"],
|
|
6960
|
-
[[
|
|
6971
|
+
[[
|
|
6972
|
+
"已归档",
|
|
6973
|
+
"归档会话",
|
|
6974
|
+
"Archived",
|
|
6975
|
+
"Archived sessions"
|
|
6976
|
+
], "archive"],
|
|
6961
6977
|
[["Codex UI"], "about"]
|
|
6962
6978
|
];
|
|
6963
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": {
|