@michengai/dsh-codex-ui 1.1.42 → 1.1.44
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 +14 -0
- package/CHANGELOG.zh-CN.md +14 -0
- package/lib/client.js +228 -81
- package/lib/session-title-plugin.mjs +4 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.1.44 (2026-10-20)
|
|
4
|
+
|
|
5
|
+
- Keep the settings navigation's Back and Search controls visible while the section list scrolls (#53).
|
|
6
|
+
- Prevent client initialization from failing when mirrored slot registrations have no component (#54).
|
|
7
|
+
- Keep the collapsed-sidebar conversation header clear of macOS window controls and prevent title controls and tabs from overflowing in narrow columns (#55).
|
|
8
|
+
|
|
9
|
+
## 1.1.43 (2026-10-19)
|
|
10
|
+
|
|
11
|
+
- Guard archived and released session references before opening, so clicking an archived conversation no longer blanks the renderer or triggers a reload loop. Archived deep links are cleaned up before they can be retried.
|
|
12
|
+
- Forward the official `plugins.tab` and `plugins.add.actions` slots so the plugin market's Discover page and add-plugin actions render in the copied Plugin manager section.
|
|
13
|
+
- Render settings navigation icons with standalone mask elements instead of rewriting the host svg, and only decorate buttons with a direct host icon.
|
|
14
|
+
- Add icons and shorter labels to the schedule view tabs.
|
|
15
|
+
- Remove the injected navigation icon stylesheet when the observer is disposed.
|
|
16
|
+
|
|
3
17
|
## 1.1.42 (2026-10-18)
|
|
4
18
|
|
|
5
19
|
- **Support DSH 0.2.1-rc.2**: Adapt to the latest official DeepSeek Harness host, pinning dev dependencies to `0.2.1-rc.2` and Cordis to `4.0.5`.
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## 1.1.44 (2026-10-20)
|
|
4
|
+
|
|
5
|
+
- 设置页左栏的「返回应用」与搜索框保持可见,仅设置分区列表滚动(#53)。
|
|
6
|
+
- 修复插槽镜像遇到无组件注册项时导致客户端初始化失败的问题(#54)。
|
|
7
|
+
- 修复 macOS 折叠侧栏下会话顶栏遮挡窗口控制区,以及窄栏中标题控件和页签溢出的问题(#55)。
|
|
8
|
+
|
|
9
|
+
## 1.1.43 (2026-10-19)
|
|
10
|
+
|
|
11
|
+
- 打开已归档或已释放的会话引用前先拦截,点击已归档会话不再导致整页空白或重载循环;归档深链会在重试前清理。
|
|
12
|
+
- 转交官方 `plugins.tab` 与 `plugins.add.actions` 插槽,修复插件市场「发现」页和添加插件操作在插件管理副本中的空白。
|
|
13
|
+
- 设置导航图标改用独立 mask 元素,不再改写宿主 svg,并且只装饰宿主直出的图标。
|
|
14
|
+
- 定时任务二级页签补充图标与更短标签。
|
|
15
|
+
- 卸载设置导航观察时移除注入的样式表。
|
|
16
|
+
|
|
3
17
|
## 1.1.42 (2026-10-18)
|
|
4
18
|
|
|
5
19
|
- **支持 DSH 0.2.1-rc.2**:适配最新 DeepSeek Harness 官方版本,开发依赖钉至 `0.2.1-rc.2`,Cordis 钉至 `4.0.5`。
|
package/lib/client.js
CHANGED
|
@@ -105,18 +105,34 @@ window.__ModuleLoader__.load({
|
|
|
105
105
|
return;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
+
function isSessionArchived(ctx, id) {
|
|
109
|
+
if (id === "") return false;
|
|
110
|
+
const access = hostAccess(ctx);
|
|
111
|
+
let store;
|
|
112
|
+
try {
|
|
113
|
+
store = probeService(access, "workspaces") ?? access.workspaces;
|
|
114
|
+
} catch {
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
return store?.list?.getSnapshot?.()?.archivedSessionIds?.includes(id) ?? false;
|
|
118
|
+
}
|
|
108
119
|
function openHostSession(ctx, id) {
|
|
109
120
|
if (id === "") return false;
|
|
121
|
+
if (isSessionArchived(ctx, id)) return false;
|
|
110
122
|
const access = hostAccess(ctx);
|
|
111
123
|
const uiWorkspace = probeService(access, "uiWorkspace");
|
|
112
|
-
if (typeof uiWorkspace?.openSession === "function") {
|
|
124
|
+
if (typeof uiWorkspace?.openSession === "function") try {
|
|
113
125
|
uiWorkspace.openSession(id);
|
|
114
126
|
return true;
|
|
127
|
+
} catch {
|
|
128
|
+
return false;
|
|
115
129
|
}
|
|
116
130
|
if (typeof access.sessions?.retain === "function") return false;
|
|
117
|
-
if (typeof access.sessions?.open === "function") {
|
|
131
|
+
if (typeof access.sessions?.open === "function") try {
|
|
118
132
|
access.sessions.open(id);
|
|
119
133
|
return true;
|
|
134
|
+
} catch {
|
|
135
|
+
return false;
|
|
120
136
|
}
|
|
121
137
|
return false;
|
|
122
138
|
}
|
|
@@ -185,6 +201,11 @@ window.__ModuleLoader__.load({
|
|
|
185
201
|
if (opened) selectGlobalPanel(layout, null);
|
|
186
202
|
return opened;
|
|
187
203
|
}
|
|
204
|
+
/** 归档判断必须先于 byId:已释放的归档会话不在 byId,直接 wait 会让深链永远清不掉。 */
|
|
205
|
+
function deepLinkAction(byId, archived, sessionId) {
|
|
206
|
+
if (archived) return "clean";
|
|
207
|
+
return byId[sessionId] === void 0 ? "wait" : "open";
|
|
208
|
+
}
|
|
188
209
|
/** 先打开再写草稿,避免 using 释放后 composer 换新 binding。 */
|
|
189
210
|
async function openConversationWithDraft(host, layout, sessions, sessionId, writeDraft) {
|
|
190
211
|
return withSessionBinding(sessions, sessionId, (binding) => {
|
|
@@ -210,7 +231,10 @@ window.__ModuleLoader__.load({
|
|
|
210
231
|
};
|
|
211
232
|
const listeners = /* @__PURE__ */ new Set();
|
|
212
233
|
const target = (direction) => {
|
|
213
|
-
for (let next = index + direction; next >= 0 && next < entries.length; next += direction)
|
|
234
|
+
for (let next = index + direction; next >= 0 && next < entries.length; next += direction) {
|
|
235
|
+
const id = entries[next];
|
|
236
|
+
if (store.getSnapshot().byId?.[id] !== void 0) return next;
|
|
237
|
+
}
|
|
214
238
|
};
|
|
215
239
|
const update = () => {
|
|
216
240
|
const current = currentSessionId(store.getSnapshot());
|
|
@@ -693,6 +717,7 @@ window.__ModuleLoader__.load({
|
|
|
693
717
|
const IconEditOutlineMedium = hostIcon("IconEditOutlineMedium", "IconEditOutline16");
|
|
694
718
|
const IconEllipsisOutlineMedium = hostIcon("IconEllipsisOutlineMedium", "IconEllipsisOutline16");
|
|
695
719
|
const IconEnhanceOutlineMedium = hostIcon("IconEnhanceOutlineMedium", "IconEnhanceOutline16");
|
|
720
|
+
const IconFlatListOutlineMedium = hostIcon("IconFlatListOutlineMedium", "IconFlatListOutline16");
|
|
696
721
|
const IconFolderCloseMedium = hostIcon("IconFolderCloseMedium", "IconFolderClose16");
|
|
697
722
|
const IconFolderOpenMedium = hostIcon("IconFolderOpenMedium", "IconFolderOpen16");
|
|
698
723
|
const IconFolderOpenOutlineMedium = hostIcon("IconFolderOpenOutlineMedium", "IconFolderOpenOutline16");
|
|
@@ -709,6 +734,7 @@ window.__ModuleLoader__.load({
|
|
|
709
734
|
const IconSkillOutlineMedium = hostIcon("IconSkillOutlineMedium", "IconSkillOutline16");
|
|
710
735
|
const IconTrashOutlineMedium = hostIcon("IconTrashOutlineMedium", "IconTrashOutline16");
|
|
711
736
|
const IconUserOutlineMedium = hostIcon("IconUserOutlineMedium", "IconUserOutline16");
|
|
737
|
+
const IconWorkspaceTreeOutlineMedium = hostIcon("IconWorkspaceTreeOutlineMedium", "IconWorkspaceTreeOutline16");
|
|
712
738
|
//#endregion
|
|
713
739
|
//#region src/client/sidebar-search.ts
|
|
714
740
|
/** 按用户可见名称和辅助关键词筛选侧栏搜索结果。 */
|
|
@@ -2532,13 +2558,19 @@ window.__ModuleLoader__.load({
|
|
|
2532
2558
|
const CONVERSATION_HEADER_STYLE = `
|
|
2533
2559
|
header:has([data-dcu-inline-tabs]){box-sizing:border-box;display:flex;flex-wrap:nowrap;align-items:center;gap:10px;min-height:var(--dcu-header-height,34px);padding-top:calc((var(--dcu-header-height,34px) - 28px)/2);padding-bottom:calc((var(--dcu-header-height,34px) - 28px)/2);border-bottom:0}
|
|
2534
2560
|
header:not(:has([data-dcu-inline-tabs])):has([class*="crumbCurrent"]){box-sizing:border-box;display:flex;flex-wrap:nowrap;align-items:center;gap:10px;min-height:var(--dcu-header-height,34px);padding-top:calc((var(--dcu-header-height,34px) - 28px)/2);padding-bottom:calc((var(--dcu-header-height,34px) - 28px)/2);border-bottom:0}
|
|
2561
|
+
/* titleRow 被摊平后不再生成盒子,宿主写在上面的窗口安全区内边距会整体丢失:
|
|
2562
|
+
macOS 折叠时顶栏内容会滑到红绿灯和 shell.leading 的打开/新建按钮下面。
|
|
2563
|
+
这里把等价留白补到 header 上,并用运行时窄轨宽度换算回同一绝对位置。 */
|
|
2564
|
+
header:has([data-dcu-inline-tabs]),
|
|
2565
|
+
header:not(:has([data-dcu-inline-tabs])):has([class*="crumbCurrent"]){padding-left:max(20px,calc(var(--dsh-frame-leading-clearance,0px) - var(--dcu-sidebar-rail-width,0px)))}
|
|
2535
2566
|
header:has([data-dcu-inline-tabs]):after{display:none;content:none}
|
|
2536
2567
|
header:not(:has([data-dcu-inline-tabs])):has([class*="crumbCurrent"]):after{display:none;content:none}
|
|
2537
2568
|
header:has([data-dcu-inline-tabs]) [class*="titleRow"],header:not(:has([data-dcu-inline-tabs])):has([class*="crumbCurrent"]) [class*="titleRow"],header:has([data-dcu-inline-tabs]) [class*="titleCluster"],header:not(:has([data-dcu-inline-tabs])):has([class*="crumbCurrent"]) [class*="titleCluster"]{display:contents}
|
|
2538
|
-
header:has([data-dcu-inline-tabs]) [class*="crumbs"],header:not(:has([data-dcu-inline-tabs])):has([class*="crumbCurrent"]) [class*="crumbs"]{order:1;flex:0
|
|
2569
|
+
header:has([data-dcu-inline-tabs]) [class*="crumbs"],header:not(:has([data-dcu-inline-tabs])):has([class*="crumbCurrent"]) [class*="crumbs"]{order:1;flex:0 999 auto;min-width:24px}
|
|
2570
|
+
header:has([data-dcu-inline-tabs]) [class*="crumbSeg"],header:not(:has([data-dcu-inline-tabs])):has([class*="crumbCurrent"]) [class*="crumbSeg"]{flex:none}
|
|
2539
2571
|
header:has([data-dcu-inline-tabs]) [class*="headerActions"],header:not(:has([data-dcu-inline-tabs])):has([class*="crumbCurrent"]) [class*="headerActions"]{order:2;flex:none}
|
|
2540
2572
|
header:not(:has([data-dcu-inline-tabs])):has([class*="crumbCurrent"]) [class*="headerActions"]{margin-right:auto}
|
|
2541
|
-
header [data-dcu-inline-tabs]{box-sizing:border-box;order:3;flex:
|
|
2573
|
+
header [data-dcu-inline-tabs]{box-sizing:border-box;order:3;flex:0 1 auto;min-width:0;display:flex;align-items:center;gap:0;margin:0 0 0 auto;padding:0;height:28px;position:relative;z-index:1;overflow:hidden;border:1px solid var(--dsw-alias-border-subtle,rgba(255,255,255,.12));border-radius:8px;background:var(--dsw-alias-background-secondary,rgba(255,255,255,.025))}
|
|
2542
2574
|
header:has([data-dcu-inline-tabs]) [class*="headerUtilities"]{order:4;flex:none}
|
|
2543
2575
|
header:not(:has([data-dcu-inline-tabs])):has([class*="crumbCurrent"]) [class*="headerUtilities"]{order:4;flex:none}
|
|
2544
2576
|
/* 新版角落插槽被 display:contents 摊平后,需要独立排序并撤销嵌套布局的边距补偿。 */
|
|
@@ -4640,8 +4672,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
4640
4672
|
if (beforeId !== null) run("session-order", () => insertSessionBefore(workspace.workspaceId, drag.sessionId, beforeId));
|
|
4641
4673
|
},
|
|
4642
4674
|
onClick: () => {
|
|
4643
|
-
setUnreadSessionIds((ids) => ids.filter((item) => item !== id));
|
|
4644
|
-
openSession(id);
|
|
4675
|
+
if (openSession(id) !== false) setUnreadSessionIds((ids) => ids.filter((item) => item !== id));
|
|
4645
4676
|
},
|
|
4646
4677
|
onContextMenu: (event) => {
|
|
4647
4678
|
event.preventDefault();
|
|
@@ -5485,8 +5516,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
5485
5516
|
y: menu.y
|
|
5486
5517
|
} : void 0,
|
|
5487
5518
|
onOpen: () => {
|
|
5488
|
-
setUnreadSessionIds((ids) => ids.filter((item) => item !== id));
|
|
5489
|
-
openSession(id);
|
|
5519
|
+
if (openSession(id) !== false) setUnreadSessionIds((ids) => ids.filter((item) => item !== id));
|
|
5490
5520
|
},
|
|
5491
5521
|
onMenuChange: (open) => {
|
|
5492
5522
|
setMenu(open ? {
|
|
@@ -6286,8 +6316,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
6286
6316
|
y: menu.y
|
|
6287
6317
|
} : void 0,
|
|
6288
6318
|
onOpen: () => {
|
|
6289
|
-
flags.setUnreadSessionIds((ids) => ids.filter((item) => item !== id));
|
|
6290
|
-
openSession(id);
|
|
6319
|
+
if (openSession(id) !== false) flags.setUnreadSessionIds((ids) => ids.filter((item) => item !== id));
|
|
6291
6320
|
},
|
|
6292
6321
|
onMenuChange: (open) => {
|
|
6293
6322
|
setMenu(open ? { id } : void 0);
|
|
@@ -6385,12 +6414,30 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
6385
6414
|
value: "runs",
|
|
6386
6415
|
id: "dcu-schedule-tab-runs",
|
|
6387
6416
|
panelId: "dcu-schedule-panel-runs",
|
|
6388
|
-
label:
|
|
6417
|
+
label: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
6418
|
+
style: {
|
|
6419
|
+
display: "inline-flex",
|
|
6420
|
+
alignItems: "center",
|
|
6421
|
+
justifyContent: "center",
|
|
6422
|
+
gap: 5,
|
|
6423
|
+
whiteSpace: "nowrap"
|
|
6424
|
+
},
|
|
6425
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconFlatListOutlineMedium, { size: 14 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: props.t("sidebar.runsTab") })]
|
|
6426
|
+
})
|
|
6389
6427
|
}, {
|
|
6390
6428
|
value: "overview",
|
|
6391
6429
|
id: "dcu-schedule-tab-overview",
|
|
6392
6430
|
panelId: "dcu-schedule-panel-overview",
|
|
6393
|
-
label:
|
|
6431
|
+
label: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
6432
|
+
style: {
|
|
6433
|
+
display: "inline-flex",
|
|
6434
|
+
alignItems: "center",
|
|
6435
|
+
justifyContent: "center",
|
|
6436
|
+
gap: 5,
|
|
6437
|
+
whiteSpace: "nowrap"
|
|
6438
|
+
},
|
|
6439
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconWorkspaceTreeOutlineMedium, { size: 14 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: props.t("sidebar.overviewTab") })]
|
|
6440
|
+
})
|
|
6394
6441
|
}], [props.t]);
|
|
6395
6442
|
if (props.overviewContent === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HoverShell, {
|
|
6396
6443
|
blocked: menu !== void 0,
|
|
@@ -6594,8 +6641,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
6594
6641
|
y: menu.y
|
|
6595
6642
|
} : void 0,
|
|
6596
6643
|
onOpen: () => {
|
|
6597
|
-
flags.setUnreadSessionIds((ids) => ids.filter((item) => item !== id));
|
|
6598
|
-
openSession(id);
|
|
6644
|
+
if (openSession(id) !== false) flags.setUnreadSessionIds((ids) => ids.filter((item) => item !== id));
|
|
6599
6645
|
},
|
|
6600
6646
|
onMenuChange: (open) => {
|
|
6601
6647
|
setMenu(open ? { id } : void 0);
|
|
@@ -6720,6 +6766,13 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
6720
6766
|
}
|
|
6721
6767
|
const visibleSidebarWidths = /* @__PURE__ */ new WeakMap();
|
|
6722
6768
|
const hostSidebarSnapshots = /* @__PURE__ */ new WeakMap();
|
|
6769
|
+
/** 会话顶栏用它把宿主发布的窗口 chrome 安全区换算回窄轨之外的左内边距。 */
|
|
6770
|
+
const SIDEBAR_RAIL_WIDTH_VAR = "--dcu-sidebar-rail-width";
|
|
6771
|
+
/** 值不变时不再重写 style,避免与宿主重绘叠加时反复触发 style 监听。 */
|
|
6772
|
+
function writeSidebarRailWidth(frame, width) {
|
|
6773
|
+
const value = `${width}px`;
|
|
6774
|
+
if (frame.style.getPropertyValue(SIDEBAR_RAIL_WIDTH_VAR) !== value) frame.style.setProperty(SIDEBAR_RAIL_WIDTH_VAR, value);
|
|
6775
|
+
}
|
|
6723
6776
|
/** 记下插件改写前的宿主列宽。已经带初始化标记的列宽是本插件留下的,不能当成宿主原值。 */
|
|
6724
6777
|
function rememberHostSidebar(frame) {
|
|
6725
6778
|
if (hostSidebarSnapshots.has(frame) || frame.hasAttribute("data-dcu-codex-sidebar-initialized")) return;
|
|
@@ -6734,6 +6787,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
6734
6787
|
function restoreHostSidebar(frame) {
|
|
6735
6788
|
frame.removeAttribute("data-dcu-codex-sidebar-initialized");
|
|
6736
6789
|
frame.style.removeProperty("--dcu-sidebar-expanded-width");
|
|
6790
|
+
frame.style.removeProperty(SIDEBAR_RAIL_WIDTH_VAR);
|
|
6737
6791
|
const html = frame.ownerDocument.documentElement;
|
|
6738
6792
|
const tracks = parseSidebarGrid(frame.style.gridTemplateColumns);
|
|
6739
6793
|
if (frame.hasAttribute("data-sidebar-collapsed")) {
|
|
@@ -6788,6 +6842,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
6788
6842
|
const tracks = parseSidebarGrid(frame.style.gridTemplateColumns);
|
|
6789
6843
|
if (tracks === void 0 || frame.hasAttribute("data-sidebar-collapsed")) return false;
|
|
6790
6844
|
visibleSidebarWidths.set(frame, width);
|
|
6845
|
+
writeSidebarRailWidth(frame, 0);
|
|
6791
6846
|
const next = `${width}px ${tracks.middle} ${tracks.details}`;
|
|
6792
6847
|
const changed = frame.style.gridTemplateColumns !== next;
|
|
6793
6848
|
if (changed) frame.style.gridTemplateColumns = next;
|
|
@@ -6808,6 +6863,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
6808
6863
|
const next = `56px ${tracks.middle} ${tracks.details}`;
|
|
6809
6864
|
const changed = frame.style.gridTemplateColumns !== next;
|
|
6810
6865
|
if (changed) frame.style.gridTemplateColumns = next;
|
|
6866
|
+
writeSidebarRailWidth(frame, 56);
|
|
6811
6867
|
if (frame.ownerDocument.documentElement.hasAttribute("data-windows-titlebar") && frame.style.getPropertyValue("--dsh-windows-sidebar-width") !== `56px`) frame.style.setProperty("--dsh-windows-sidebar-width", `56px`);
|
|
6812
6868
|
return changed;
|
|
6813
6869
|
}
|
|
@@ -6857,7 +6913,11 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
6857
6913
|
if (frame === void 0 || !frame.isConnected) watchFrame(findSidebarFrame(document));
|
|
6858
6914
|
if (frame !== void 0) {
|
|
6859
6915
|
rememberHostSidebar(frame);
|
|
6860
|
-
if (!canApplySlimSidebar(frame))
|
|
6916
|
+
if (!canApplySlimSidebar(frame)) {
|
|
6917
|
+
const rail = frame.hasAttribute("data-sidebar-collapsed") ? parseSidebarGrid(frame.style.gridTemplateColumns)?.sidebar ?? 0 : 0;
|
|
6918
|
+
writeSidebarRailWidth(frame, rail);
|
|
6919
|
+
return;
|
|
6920
|
+
}
|
|
6861
6921
|
if (frame.hasAttribute("data-sidebar-collapsed")) {
|
|
6862
6922
|
applySlimSidebar(frame);
|
|
6863
6923
|
return;
|
|
@@ -7489,7 +7549,7 @@ body[data-we-sidebar-glass] .dcu-expanded-shell,body[data-we-sidebar-glass] .dcu
|
|
|
7489
7549
|
.dcu-menu{padding:0 6px 8px;display:grid;gap:2px}.dcu-menu button,.dcu-footer-link{display:grid;grid-template-columns:20px minmax(0,1fr);column-gap:8px;align-items:center;width:100%;min-height:36px;padding:0 4px;border-radius:8px;color:var(--dcu-sidebar-navigation);font-size:14px;line-height:20px;text-align:left;font-weight:400}
|
|
7490
7550
|
.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)}
|
|
7491
7551
|
.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:20px minmax(0,1fr);min-height:32px;color:var(--dcu-sidebar-secondary);font-size:13px;font-weight:400}
|
|
7492
|
-
.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;margin:2px 8px 8px;padding:0}.dcu-im-tabs .dcu-im-segmented-tabs{width:100%;background:transparent!important;padding:2px!important}.dcu-im-tabs .dcu-im-segmented-tabs>span{inset:2px auto 2px 2px!important;border-radius:6px!important;border:0.5px solid
|
|
7552
|
+
.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;margin:2px 8px 8px;padding:0}.dcu-im-tabs .dcu-im-segmented-tabs{width:100%;background:color-mix(in srgb,var(--dcu-sidebar-primary) 3%,transparent)!important;border-radius:8px!important;border:0.5px solid var(--dcu-sidebar-border)!important;box-sizing:border-box;padding:2px!important}.dcu-im-tabs .dcu-im-segmented-tabs>span{inset:2px auto 2px 2px!important;border-radius:6px!important;border:0.5px solid color-mix(in srgb,var(--dcu-sidebar-primary) 12%,transparent)!important;background:color-mix(in srgb,var(--dcu-sidebar-primary) 8%,transparent)!important;box-shadow:none!important}.dcu-im-tabs .dcu-im-segmented-tabs [role=tab]{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;width:100%!important;height:26px!important;padding:0 6px!important;font-size:13px!important;line-height:18px!important;border-radius:6px!important;color:var(--dcu-sidebar-secondary);text-align:center!important}.dcu-im-tabs .dcu-im-segmented-tabs [role=tab]>*{display:inline-flex!important;align-items:center!important;justify-content:center!important}.dcu-im-tabs .dcu-im-segmented-tabs [role=tab]:hover{color:var(--dcu-sidebar-primary)}.dcu-im-tabs .dcu-im-segmented-tabs [role=tab][aria-selected=true]{color:var(--dcu-sidebar-primary)!important;font-weight:600}.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]:not(.dcu-schedule-segmented-tabs){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;margin:2px 8px 8px;padding:0}.dcu-native-workspaces .dcu-schedule-views [role=tablist],.dcu-schedule-views .dcu-schedule-segmented-tabs{display:grid!important;width:100%;margin:0!important;padding:2px!important;background:color-mix(in srgb,var(--dcu-sidebar-primary) 3%,transparent)!important;border-radius:8px!important;border:0.5px solid var(--dcu-sidebar-border)!important;box-sizing:border-box}.dcu-schedule-views .dcu-schedule-segmented-tabs>span{inset:2px auto 2px 2px!important;border-radius:6px!important;border:0.5px solid color-mix(in srgb,var(--dcu-sidebar-primary) 12%,transparent)!important;background:color-mix(in srgb,var(--dcu-sidebar-primary) 8%,transparent)!important;box-shadow:none!important}.dcu-schedule-views .dcu-schedule-segmented-tabs [role=tab]{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;width:100%!important;height:26px!important;padding:0 6px!important;font-size:13px!important;line-height:18px!important;border-radius:6px!important;color:var(--dcu-sidebar-secondary);font-weight:500;text-align:center!important}.dcu-schedule-views .dcu-schedule-segmented-tabs [role=tab]>*{display:inline-flex!important;align-items:center!important;justify-content:center!important}.dcu-schedule-views .dcu-schedule-segmented-tabs [role=tab]:hover{color:var(--dcu-sidebar-primary)}.dcu-schedule-views .dcu-schedule-segmented-tabs [role=tab][aria-selected=true]{color:var(--dcu-sidebar-primary)!important;font-weight:600}.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 .dsh-st-rail{width:100%;min-width:0;padding:0;scrollbar-gutter:auto}.dcu-schedule-pane .dsh-st-overview{padding:2px 8px 14px;scrollbar-gutter:auto}.dcu-foot{display:grid;width:100%;gap:4px;padding:8px 6px 12px;border-top:1px solid var(--dcu-sidebar-border);transition:opacity 500ms cubic-bezier(.16,1,.3,1),transform 500ms 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>[data-dcu-settings-trigger]{width:100%;min-height:36px;padding-left:4px!important;color:var(--dcu-sidebar-navigation);font:14px/20px var(--dsw-font-family);font-weight:400}.dcu-compact{width:100%;align-items:flex-start;overflow:hidden;padding:calc((var(--dcu-header-height,34px) - 28px)/2) 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>[data-dcu-settings-trigger]{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>[data-dcu-settings-trigger] 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}
|
|
7493
7553
|
.dcu-settings-seat [data-slot="settings.trigger"]{color:var(--dcu-sidebar-navigation)}
|
|
7494
7554
|
.dcu-settings-seat [data-slot="settings.trigger"]>svg{color:var(--dcu-sidebar-icon)}
|
|
7495
7555
|
/* 宿主列负责缩放,宽态内容保持展开宽度,避免中文竖排与工作区逐帧重排。 */
|
|
@@ -7890,19 +7950,56 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
7890
7950
|
value: "tasks",
|
|
7891
7951
|
id: "dcu-tab-tasks",
|
|
7892
7952
|
panelId: "dcu-panel-tasks",
|
|
7893
|
-
label:
|
|
7953
|
+
label: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
7954
|
+
style: {
|
|
7955
|
+
display: "inline-flex",
|
|
7956
|
+
alignItems: "center",
|
|
7957
|
+
justifyContent: "center",
|
|
7958
|
+
gap: 5,
|
|
7959
|
+
whiteSpace: "nowrap"
|
|
7960
|
+
},
|
|
7961
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconFolderCloseMedium, { size: 14 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("sidebar.tasksTab") })]
|
|
7962
|
+
})
|
|
7894
7963
|
}];
|
|
7895
7964
|
if (showChannels) items.push({
|
|
7896
7965
|
value: "channels",
|
|
7897
7966
|
id: "dcu-tab-channels",
|
|
7898
7967
|
panelId: "dcu-panel-channels",
|
|
7899
|
-
label:
|
|
7968
|
+
label: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
7969
|
+
style: {
|
|
7970
|
+
display: "inline-flex",
|
|
7971
|
+
alignItems: "center",
|
|
7972
|
+
justifyContent: "center",
|
|
7973
|
+
gap: 5,
|
|
7974
|
+
whiteSpace: "nowrap"
|
|
7975
|
+
},
|
|
7976
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
7977
|
+
viewBox: "0 0 16 16",
|
|
7978
|
+
width: 14,
|
|
7979
|
+
height: 14,
|
|
7980
|
+
fill: "none",
|
|
7981
|
+
"aria-hidden": "true",
|
|
7982
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
7983
|
+
fill: "currentColor",
|
|
7984
|
+
d: "M2.15 2.9h11.7v8.2H6.42L2.15 13.85V2.9Zm1.4 1.4v6.62l1.78-1.12h7.12V4.3H3.55Z"
|
|
7985
|
+
})
|
|
7986
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("sidebar.channelsTab") })]
|
|
7987
|
+
})
|
|
7900
7988
|
});
|
|
7901
7989
|
if (showSchedule) items.push({
|
|
7902
7990
|
value: "schedule",
|
|
7903
7991
|
id: "dcu-tab-schedule",
|
|
7904
7992
|
panelId: "dcu-panel-schedule",
|
|
7905
|
-
label:
|
|
7993
|
+
label: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
7994
|
+
style: {
|
|
7995
|
+
display: "inline-flex",
|
|
7996
|
+
alignItems: "center",
|
|
7997
|
+
justifyContent: "center",
|
|
7998
|
+
gap: 5,
|
|
7999
|
+
whiteSpace: "nowrap"
|
|
8000
|
+
},
|
|
8001
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ScheduleIcon, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("sidebar.scheduleTab") })]
|
|
8002
|
+
})
|
|
7906
8003
|
});
|
|
7907
8004
|
return items;
|
|
7908
8005
|
}, [
|
|
@@ -9165,8 +9262,8 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
9165
9262
|
"sidebar.tasksTab": "任务",
|
|
9166
9263
|
"sidebar.channelsTab": "频道",
|
|
9167
9264
|
"sidebar.scheduleTab": "定时",
|
|
9168
|
-
"sidebar.runsTab": "
|
|
9169
|
-
"sidebar.overviewTab": "
|
|
9265
|
+
"sidebar.runsTab": "记录",
|
|
9266
|
+
"sidebar.overviewTab": "任务",
|
|
9170
9267
|
"channels.empty": "还没有频道会话。先在设置 → IM助理 里连接渠道。",
|
|
9171
9268
|
"channels.loadError": "无法读取频道会话。",
|
|
9172
9269
|
"channel.dingtalk": "钉钉",
|
|
@@ -9460,8 +9557,8 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
9460
9557
|
"sidebar.tasksTab": "Tasks",
|
|
9461
9558
|
"sidebar.channelsTab": "Channels",
|
|
9462
9559
|
"sidebar.scheduleTab": "Schedule",
|
|
9463
|
-
"sidebar.runsTab": "
|
|
9464
|
-
"sidebar.overviewTab": "
|
|
9560
|
+
"sidebar.runsTab": "Records",
|
|
9561
|
+
"sidebar.overviewTab": "Tasks",
|
|
9465
9562
|
"channels.empty": "No channel conversations yet. Connect a channel in Settings → IM Assistant.",
|
|
9466
9563
|
"channels.loadError": "Could not load channel conversations.",
|
|
9467
9564
|
"channel.dingtalk": "DingTalk",
|
|
@@ -9711,9 +9808,10 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
9711
9808
|
//#region src/client/slot-mirror.tsx
|
|
9712
9809
|
const bridges = /* @__PURE__ */ new WeakMap();
|
|
9713
9810
|
const wrappers = /* @__PURE__ */ new WeakMap();
|
|
9714
|
-
/** Keep a real React component boundary and its hooks; translate only renderer-owned bindings. */
|
|
9715
9811
|
function withSlotAliases(Component, aliases) {
|
|
9812
|
+
if (typeof Component !== "function" && (typeof Component !== "object" || Component === null)) return Component;
|
|
9716
9813
|
const pairs = Object.entries(aliases).sort(([a], [b]) => a.localeCompare(b));
|
|
9814
|
+
if (pairs.length === 0) return Component;
|
|
9717
9815
|
const signature = JSON.stringify(pairs);
|
|
9718
9816
|
let cached = wrappers.get(Component);
|
|
9719
9817
|
if (!cached) wrappers.set(Component, cached = /* @__PURE__ */ new Map());
|
|
@@ -9889,6 +9987,23 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
9889
9987
|
archive: "<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" fill=\"currentColor\" d=\"M15.8659 2.05975C17.2603 2.05995 18.3913 3.19096 18.3914 4.58527V5.4874C18.3914 6.02747 18.2192 6.52672 17.9303 6.93735C17.9336 6.96524 17.9388 6.99318 17.9388 7.02195V12.8884C17.9388 13.6345 17.9395 14.2379 17.8996 14.7254C17.8642 15.1593 17.7936 15.5499 17.6373 15.9141L17.5654 16.0685C17.278 16.6328 16.8405 17.1046 16.3038 17.434L16.0679 17.5661C15.66 17.7739 15.2196 17.8598 14.7237 17.9003C14.2362 17.9401 13.6327 17.9405 12.8867 17.9405H7.11122C6.36511 17.9405 5.76171 17.9401 5.27418 17.9003C4.84051 17.8649 4.44949 17.7952 4.08545 17.6391L3.93104 17.5661C3.36673 17.2785 2.89392 16.8414 2.56465 16.3044L2.43245 16.0685C2.22473 15.6608 2.13878 15.2211 2.09825 14.7254C2.05841 14.2379 2.05912 13.6345 2.05912 12.8884V7.02195C2.05912 6.99284 2.06422 6.96449 2.06758 6.93629C1.77931 6.52592 1.60858 6.02687 1.60858 5.4874V4.58527C1.60876 3.19084 2.73962 2.05975 4.1341 2.05975H15.8659ZM16.4984 7.92936C16.296 7.98169 16.0847 8.01288 15.8659 8.01291H4.1341C3.91478 8.01291 3.70246 7.98194 3.49955 7.92936V12.8884C3.49955 13.6582 3.50053 14.1927 3.53445 14.608C3.56769 15.0146 3.62923 15.244 3.71635 15.415L3.7925 15.5514C3.98339 15.8627 4.25749 16.1165 4.58464 16.2833L4.72529 16.3435C4.88095 16.3993 5.08638 16.4402 5.39158 16.4651C5.80685 16.4991 6.34138 16.5001 7.11122 16.5001H12.8867C13.6564 16.5001 14.1911 16.499 14.6063 16.4651C15.0128 16.432 15.2423 16.3703 15.4133 16.2833L15.5508 16.2061C15.8618 16.0152 16.116 15.7419 16.2827 15.415L16.3429 15.2732C16.3985 15.1177 16.4396 14.9128 16.4645 14.608C16.4985 14.1927 16.4984 13.6583 16.4984 12.8884V7.92936ZM4.1341 3.50019C3.53511 3.50019 3.0492 3.98631 3.04902 4.58527V5.4874C3.04902 6.08649 3.535 6.57248 4.1341 6.57248H15.8659C16.4648 6.57228 16.951 6.08638 16.951 5.4874V4.58527C16.9509 3.98644 16.4647 3.50038 15.8659 3.50019H4.1341Z\"/><path fill=\"currentColor\" d=\"M12.7962 12.5661V11.0832H7.20548V12.5661L12.7962 12.5661Z\"/>",
|
|
9890
9988
|
about: "<path fill=\"currentColor\" d=\"M12.5757 7.00012C12.5757 3.92085 10.0794 1.42463 7.00012 1.42456C3.9208 1.42456 1.42456 3.9208 1.42456 7.00012C1.42463 10.0794 3.92085 12.5757 7.00012 12.5757C10.0793 12.5756 12.5756 10.0793 12.5757 7.00012ZM13.8002 7.00012C13.8001 10.7559 10.7559 13.8001 7.00012 13.8002C3.2443 13.8002 0.199291 10.7559 0.199219 7.00012C0.199219 3.24426 3.24426 0.199219 7.00012 0.199219C10.7559 0.199291 13.8002 3.2443 13.8002 7.00012Z\"/><path fill=\"currentColor\" d=\"M6.18042 8.68184C6.18043 8.09153 6.32893 7.34655 6.92127 6.8481C7.28566 6.54148 7.76104 6.27318 8.0022 6.10811C8.28964 5.91137 8.42234 5.76562 8.48328 5.58944C8.57774 5.31609 8.53121 5.00904 8.34912 4.76741C8.17409 4.53522 7.83879 4.32222 7.28186 4.32222C5.99668 4.32225 5.46969 5.11832 5.46949 5.78939H4.24414C4.24436 4.39942 5.36327 3.09691 7.28186 3.09688C8.17773 3.09688 8.89489 3.45606 9.32752 4.02999C9.75287 4.59438 9.86938 5.32775 9.64026 5.99019C9.44847 6.5444 9.04722 6.87743 8.69434 7.11898C8.29506 7.39226 8.02318 7.52192 7.70996 7.78548C7.51943 7.94582 7.40577 8.24899 7.40577 8.68184V8.75533H6.18042V8.68184Z\"/><path fill=\"currentColor\" d=\"M7.39455 9.44026V10.8109H6.16921V9.44026H7.39455Z\"/>"
|
|
9891
9989
|
};
|
|
9990
|
+
const NAV_ICON_CLASS = "dcu-settings-nav-icon";
|
|
9991
|
+
const NAV_ICON_STYLE_ID = "dcu-settings-nav-icon-style";
|
|
9992
|
+
const NAV_ICON_CSS = `[data-dcu-nav-icon]>svg{display:none!important}.${NAV_ICON_CLASS}{display:inline-block;flex:none;width:16px;height:16px;background:currentColor;-webkit-mask:var(--dcu-settings-nav-icon-mask) center/contain no-repeat;mask:var(--dcu-settings-nav-icon-mask) center/contain no-repeat}`;
|
|
9993
|
+
/** mask 只取 alpha 通道,因此把 currentColor 固定为黑色即可 */
|
|
9994
|
+
function iconMask(id) {
|
|
9995
|
+
const viewBox = id === "archive" ? "0 0 20 20" : id === "about" ? "0 0 14 14" : "0 0 16 16";
|
|
9996
|
+
const paths = SETTINGS_NAV_ICON_HTML[id].replace(/fill="currentColor"/g, "fill=\"black\"");
|
|
9997
|
+
return `url("data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="${viewBox}">${paths}</svg>`)}")`;
|
|
9998
|
+
}
|
|
9999
|
+
/** 注入导航图标样式;重复安装时复用同一个 style 元素 */
|
|
10000
|
+
function ensureNavIconStyle(doc) {
|
|
10001
|
+
if (doc.getElementById(NAV_ICON_STYLE_ID) !== null) return;
|
|
10002
|
+
const style = doc.createElement("style");
|
|
10003
|
+
style.id = NAV_ICON_STYLE_ID;
|
|
10004
|
+
style.textContent = NAV_ICON_CSS;
|
|
10005
|
+
(doc.head ?? doc.documentElement).appendChild(style);
|
|
10006
|
+
}
|
|
9892
10007
|
const LABEL_ALIASES = [
|
|
9893
10008
|
[["插件市场", "Plugin Market"], "plugins"],
|
|
9894
10009
|
[["内置插件", "Built-in plugins"], "plugins"],
|
|
@@ -9926,13 +10041,20 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
9926
10041
|
changed = true;
|
|
9927
10042
|
}
|
|
9928
10043
|
}
|
|
9929
|
-
|
|
9930
|
-
if (
|
|
9931
|
-
|
|
9932
|
-
|
|
9933
|
-
|
|
9934
|
-
|
|
9935
|
-
|
|
10044
|
+
if (button.querySelector(":scope > svg") === null) return changed;
|
|
10045
|
+
if (button.getAttribute("data-dcu-nav-icon") === id && button.querySelector(`.${NAV_ICON_CLASS}`) !== null) return changed;
|
|
10046
|
+
const doc = button.ownerDocument;
|
|
10047
|
+
if (doc === null) return changed;
|
|
10048
|
+
ensureNavIconStyle(doc);
|
|
10049
|
+
button.setAttribute("data-dcu-nav-icon", id);
|
|
10050
|
+
let icon = button.querySelector(`.${NAV_ICON_CLASS}`);
|
|
10051
|
+
if (icon === null) {
|
|
10052
|
+
icon = doc.createElement("span");
|
|
10053
|
+
icon.className = NAV_ICON_CLASS;
|
|
10054
|
+
icon.setAttribute("aria-hidden", "true");
|
|
10055
|
+
button.prepend(icon);
|
|
10056
|
+
}
|
|
10057
|
+
icon.style.setProperty("--dcu-settings-nav-icon-mask", iconMask(id));
|
|
9936
10058
|
return true;
|
|
9937
10059
|
}
|
|
9938
10060
|
function applySettingsNavIcons(root) {
|
|
@@ -9984,6 +10106,11 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
9984
10106
|
return () => {
|
|
9985
10107
|
observer.disconnect();
|
|
9986
10108
|
if (frame !== void 0) window.cancelAnimationFrame(frame);
|
|
10109
|
+
for (const button of document.querySelectorAll("[data-dcu-nav-icon]")) {
|
|
10110
|
+
button.removeAttribute("data-dcu-nav-icon");
|
|
10111
|
+
button.querySelector(`.${NAV_ICON_CLASS}`)?.remove();
|
|
10112
|
+
}
|
|
10113
|
+
if (document.querySelector("[data-dcu-nav-icon]") === null) document.getElementById(NAV_ICON_STYLE_ID)?.remove();
|
|
9987
10114
|
};
|
|
9988
10115
|
}
|
|
9989
10116
|
//#endregion
|
|
@@ -9999,6 +10126,8 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
9999
10126
|
};
|
|
10000
10127
|
}
|
|
10001
10128
|
const FORWARDED_CONFIG_SLOTS = /* @__PURE__ */ new Set([
|
|
10129
|
+
"plugins.tab",
|
|
10130
|
+
"plugins.add.actions",
|
|
10002
10131
|
"plugins.item",
|
|
10003
10132
|
"plugins.bundle.activation",
|
|
10004
10133
|
"plugins.bundle.config",
|
|
@@ -10211,7 +10340,10 @@ body[data-ds-dark-theme] .dcu-settings-page{--sp-bg:#181818;--sp-nav:var(--dcu-s
|
|
|
10211
10340
|
.dcu-settings-page button,.dcu-settings-page input{font:inherit}
|
|
10212
10341
|
.dcu-settings-page button{cursor:pointer}
|
|
10213
10342
|
.dcu-settings-page :focus-visible{outline:2px solid #459cff;outline-offset:3px}
|
|
10214
|
-
.dcu-settings-nav{--sp-text:var(--dcu-sidebar-navigation,#4e5253);--sp-muted:var(--dcu-sidebar-secondary,#676b6c);--sp-hover:var(--dcu-sidebar-hover,#dfe8e5);--sp-active:var(--dcu-sidebar-hover,#dfe8e5);--sp-border:var(--dcu-sidebar-border,rgba(37,46,41,.10));display:flex;flex-direction:column;min-height:0;padding:18px 8px;background:var(--sp-nav);box-shadow:inset -1px 0 var(--sp-border);overflow
|
|
10343
|
+
.dcu-settings-nav{--sp-text:var(--dcu-sidebar-navigation,#4e5253);--sp-muted:var(--dcu-sidebar-secondary,#676b6c);--sp-hover:var(--dcu-sidebar-hover,#dfe8e5);--sp-active:var(--dcu-sidebar-hover,#dfe8e5);--sp-border:var(--dcu-sidebar-border,rgba(37,46,41,.10));display:flex;flex-direction:column;min-height:0;padding:18px 8px;background:var(--sp-nav);box-shadow:inset -1px 0 var(--sp-border);overflow:hidden}
|
|
10344
|
+
/* 返回、插槽头与搜索框常驻,只有分区列表滚动。 */
|
|
10345
|
+
.dcu-settings-nav>*{flex:none}
|
|
10346
|
+
.dcu-settings-nav>.dcu-settings-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--sp-border) transparent}
|
|
10215
10347
|
/* macOS 普通窗口的原生按钮覆盖 Web 内容;沿用宿主标题栏安全区,仅抬高设置导航。 */
|
|
10216
10348
|
html[data-platform=darwin]:not([data-fullscreen]) .dcu-settings-nav{padding-top:calc(var(--dsh-frame-top-clearance,48px) + 8px)}
|
|
10217
10349
|
body[data-ds-dark-theme] .dcu-settings-nav{--sp-text:var(--dcu-sidebar-navigation,#b9bab9);--sp-muted:var(--dcu-sidebar-secondary,#909191);--sp-hover:var(--dcu-sidebar-hover,#303432);--sp-active:var(--dcu-sidebar-hover,#303432);--sp-border:var(--dcu-sidebar-border,rgba(255,255,255,.08))}
|
|
@@ -10313,6 +10445,7 @@ html[data-dsh-native-backdrop=mica] .dcu-settings-page,html[data-dsh-native-back
|
|
|
10313
10445
|
|
|
10314
10446
|
@media(max-width:900px){.dcu-settings-inner{padding:32px 28px}.dcu-settings-heading{align-items:flex-start;flex-direction:column;gap:12px}}
|
|
10315
10447
|
@media(max-width:600px){.dcu-settings-page{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr)}.dcu-settings-nav{padding:8px 12px;max-height:220px;border-right:0;border-bottom:1px solid var(--sp-border)}.dcu-settings-search{margin:6px 0}.dcu-settings-groups{display:flex;gap:8px;overflow-x:auto;flex:none}.dcu-settings-group{display:flex;gap:4px;margin:0;flex:none}.dcu-settings-group-label{display:none}.dcu-settings-link{width:auto;min-height:40px;flex:none}.dcu-settings-link+.dcu-settings-link{margin-top:0}.dcu-settings-inner{padding:32px 16px}.dcu-settings-heading{margin-bottom:28px}.dcu-settings-heading h1,.dcu-settings-inner:is([data-settings-section=models],[data-settings-section=plugins],[data-settings-section=agent-presets]) [class$="_section"]>h2:is([class$="_title"],[class$="_heading"]){font-size:22px}.dcu-settings-card{padding:0 12px}.dcu-settings-row>[data-slot]>*{flex-wrap:wrap;gap:12px!important}.dcu-settings-general-group{margin-bottom:32px}}
|
|
10448
|
+
@media(max-height:180px){.dcu-settings-nav{overflow-y:auto}.dcu-settings-nav>.dcu-settings-scroll{flex:0 0 auto;overflow:visible}}
|
|
10316
10449
|
`;
|
|
10317
10450
|
//#endregion
|
|
10318
10451
|
//#region src/client/settings-focus.ts
|
|
@@ -10624,47 +10757,52 @@ html[data-dsh-native-backdrop=mica] .dcu-settings-page,html[data-dsh-native-back
|
|
|
10624
10757
|
}
|
|
10625
10758
|
})]
|
|
10626
10759
|
}),
|
|
10627
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
10628
|
-
className: "dcu-settings-
|
|
10760
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
10761
|
+
className: "dcu-settings-scroll",
|
|
10629
10762
|
children: [
|
|
10630
|
-
"
|
|
10631
|
-
|
|
10632
|
-
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
|
|
10641
|
-
|
|
10642
|
-
|
|
10643
|
-
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
|
|
10647
|
-
|
|
10648
|
-
|
|
10649
|
-
|
|
10650
|
-
|
|
10651
|
-
|
|
10652
|
-
|
|
10653
|
-
|
|
10654
|
-
|
|
10655
|
-
|
|
10656
|
-
|
|
10657
|
-
|
|
10658
|
-
|
|
10659
|
-
|
|
10660
|
-
|
|
10661
|
-
|
|
10662
|
-
|
|
10663
|
-
|
|
10664
|
-
|
|
10665
|
-
|
|
10666
|
-
|
|
10667
|
-
|
|
10763
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
10764
|
+
className: "dcu-settings-groups",
|
|
10765
|
+
children: [
|
|
10766
|
+
"personal",
|
|
10767
|
+
"integrations",
|
|
10768
|
+
"records"
|
|
10769
|
+
].map((group) => {
|
|
10770
|
+
const entries = visible.filter((row) => settingsGroup(row.id) === group);
|
|
10771
|
+
return entries.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
10772
|
+
className: "dcu-settings-group",
|
|
10773
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
|
|
10774
|
+
className: "dcu-settings-group-label",
|
|
10775
|
+
children: t(groupLabels[group])
|
|
10776
|
+
}), entries.map((row) => {
|
|
10777
|
+
const Icon = sectionIcon(row.id);
|
|
10778
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
10779
|
+
type: "button",
|
|
10780
|
+
className: "dcu-settings-link",
|
|
10781
|
+
"aria-current": row.id === active?.id ? "page" : void 0,
|
|
10782
|
+
onClick: () => {
|
|
10783
|
+
setActiveId(row.id);
|
|
10784
|
+
},
|
|
10785
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
10786
|
+
size: 16,
|
|
10787
|
+
strokeWidth: 1.6,
|
|
10788
|
+
"aria-hidden": "true"
|
|
10789
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: row.id === "general" ? t("settings.general") : row.label })]
|
|
10790
|
+
}, row.id);
|
|
10791
|
+
})]
|
|
10792
|
+
}, group);
|
|
10793
|
+
})
|
|
10794
|
+
}),
|
|
10795
|
+
visible.length > 0 && !visible.some((row) => row.id === active?.id) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
10796
|
+
className: "dcu-settings-empty",
|
|
10797
|
+
role: "status",
|
|
10798
|
+
children: t("settings.filterHint")
|
|
10799
|
+
}),
|
|
10800
|
+
visible.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
10801
|
+
className: "dcu-settings-empty",
|
|
10802
|
+
role: "status",
|
|
10803
|
+
children: t("settings.noResults")
|
|
10804
|
+
})
|
|
10805
|
+
]
|
|
10668
10806
|
})
|
|
10669
10807
|
]
|
|
10670
10808
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -11905,9 +12043,7 @@ html[data-dsh-native-backdrop=mica] .dcu-settings-page,html[data-dsh-native-back
|
|
|
11905
12043
|
const binding = id === void 0 ? void 0 : ctx.sessions.binding(id);
|
|
11906
12044
|
return prefillNewConversation(binding === void 0 ? void 0 : ctx.conversation.input.for(binding.ctx), text);
|
|
11907
12045
|
},
|
|
11908
|
-
openSession: (sessionId) =>
|
|
11909
|
-
openConversation(ctx, ctx.layout, sessionId);
|
|
11910
|
-
},
|
|
12046
|
+
openSession: (sessionId) => openConversation(ctx, ctx.layout, sessionId),
|
|
11911
12047
|
startSession: (workspaceId) => {
|
|
11912
12048
|
startWorkspaceSession(ctx, workspaceId);
|
|
11913
12049
|
},
|
|
@@ -12044,9 +12180,7 @@ html[data-dsh-native-backdrop=mica] .dcu-settings-page,html[data-dsh-native-back
|
|
|
12044
12180
|
forkSession,
|
|
12045
12181
|
moveSession,
|
|
12046
12182
|
openPath,
|
|
12047
|
-
openSession: (sessionId) =>
|
|
12048
|
-
openConversation(ctx, ctx.layout, sessionId);
|
|
12049
|
-
},
|
|
12183
|
+
openSession: (sessionId) => openConversation(ctx, ctx.layout, sessionId),
|
|
12050
12184
|
renameSession,
|
|
12051
12185
|
renameWorkspace: (workspaceId, title) => ctx.workspaces.rename(workspaceId, title),
|
|
12052
12186
|
insertWorkspaceBefore: (workspaceId, beforeWorkspaceId) => ctx.workspaces.insertBefore(workspaceId, beforeWorkspaceId),
|
|
@@ -12061,11 +12195,24 @@ html[data-dsh-native-backdrop=mica] .dcu-settings-page,html[data-dsh-native-back
|
|
|
12061
12195
|
if (typeof window === "undefined") return () => {};
|
|
12062
12196
|
const sessionId = new URL(window.location.href).searchParams.get("session");
|
|
12063
12197
|
if (sessionId === null || sessionId === "") return () => {};
|
|
12198
|
+
const cleanSessionDeepLink = () => {
|
|
12199
|
+
try {
|
|
12200
|
+
const currentUrl = new URL(window.location.href);
|
|
12201
|
+
currentUrl.searchParams.delete("session");
|
|
12202
|
+
window.history.replaceState(null, "", currentUrl.pathname + currentUrl.search + currentUrl.hash);
|
|
12203
|
+
} catch {}
|
|
12204
|
+
};
|
|
12064
12205
|
let opened = false;
|
|
12065
12206
|
const openDeepLink = () => {
|
|
12066
|
-
if (opened
|
|
12207
|
+
if (opened) return;
|
|
12208
|
+
const decision = deepLinkAction(ctx.sessions.list.getSnapshot().byId, isSessionArchived(ctx, sessionId), sessionId);
|
|
12209
|
+
if (decision === "wait") return;
|
|
12067
12210
|
opened = true;
|
|
12068
|
-
|
|
12211
|
+
if (decision === "clean") {
|
|
12212
|
+
cleanSessionDeepLink();
|
|
12213
|
+
return;
|
|
12214
|
+
}
|
|
12215
|
+
if (!openConversation(ctx, ctx.layout, sessionId)) cleanSessionDeepLink();
|
|
12069
12216
|
};
|
|
12070
12217
|
openDeepLink();
|
|
12071
12218
|
return ctx.sessions.list.subscribe(openDeepLink);
|
|
@@ -79,8 +79,8 @@ const zh = {
|
|
|
79
79
|
"sidebar.tasksTab": "任务",
|
|
80
80
|
"sidebar.channelsTab": "频道",
|
|
81
81
|
"sidebar.scheduleTab": "定时",
|
|
82
|
-
"sidebar.runsTab": "
|
|
83
|
-
"sidebar.overviewTab": "
|
|
82
|
+
"sidebar.runsTab": "记录",
|
|
83
|
+
"sidebar.overviewTab": "任务",
|
|
84
84
|
"channels.empty": "还没有频道会话。先在设置 → IM助理 里连接渠道。",
|
|
85
85
|
"channels.loadError": "无法读取频道会话。",
|
|
86
86
|
"channel.dingtalk": "钉钉",
|
|
@@ -374,8 +374,8 @@ const en = {
|
|
|
374
374
|
"sidebar.tasksTab": "Tasks",
|
|
375
375
|
"sidebar.channelsTab": "Channels",
|
|
376
376
|
"sidebar.scheduleTab": "Schedule",
|
|
377
|
-
"sidebar.runsTab": "
|
|
378
|
-
"sidebar.overviewTab": "
|
|
377
|
+
"sidebar.runsTab": "Records",
|
|
378
|
+
"sidebar.overviewTab": "Tasks",
|
|
379
379
|
"channels.empty": "No channel conversations yet. Connect a channel in Settings → IM Assistant.",
|
|
380
380
|
"channels.loadError": "Could not load channel conversations.",
|
|
381
381
|
"channel.dingtalk": "DingTalk",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@michengai/dsh-codex-ui",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.44",
|
|
4
4
|
"description": "DSH Codex UI — 为 DeepSeek Harness Web 提供 Codex 风格侧栏、工作区会话树、全局搜索和轮次导航 · A Codex-style sidebar, workspace session tree, global search, and turn navigation for DSH Web",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"publishConfig": {
|