@michengai/dsh-codex-ui 1.1.42 → 1.1.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/CHANGELOG.zh-CN.md +8 -0
- package/lib/client.js +153 -36
- package/lib/session-title-plugin.mjs +4 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.1.43 (2026-10-19)
|
|
4
|
+
|
|
5
|
+
- 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.
|
|
6
|
+
- 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.
|
|
7
|
+
- Render settings navigation icons with standalone mask elements instead of rewriting the host svg, and only decorate buttons with a direct host icon.
|
|
8
|
+
- Add icons and shorter labels to the schedule view tabs.
|
|
9
|
+
- Remove the injected navigation icon stylesheet when the observer is disposed.
|
|
10
|
+
|
|
3
11
|
## 1.1.42 (2026-10-18)
|
|
4
12
|
|
|
5
13
|
- **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,13 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## 1.1.43 (2026-10-19)
|
|
4
|
+
|
|
5
|
+
- 打开已归档或已释放的会话引用前先拦截,点击已归档会话不再导致整页空白或重载循环;归档深链会在重试前清理。
|
|
6
|
+
- 转交官方 `plugins.tab` 与 `plugins.add.actions` 插槽,修复插件市场「发现」页和添加插件操作在插件管理副本中的空白。
|
|
7
|
+
- 设置导航图标改用独立 mask 元素,不再改写宿主 svg,并且只装饰宿主直出的图标。
|
|
8
|
+
- 定时任务二级页签补充图标与更短标签。
|
|
9
|
+
- 卸载设置导航观察时移除注入的样式表。
|
|
10
|
+
|
|
3
11
|
## 1.1.42 (2026-10-18)
|
|
4
12
|
|
|
5
13
|
- **支持 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
|
/** 按用户可见名称和辅助关键词筛选侧栏搜索结果。 */
|
|
@@ -4640,8 +4666,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
4640
4666
|
if (beforeId !== null) run("session-order", () => insertSessionBefore(workspace.workspaceId, drag.sessionId, beforeId));
|
|
4641
4667
|
},
|
|
4642
4668
|
onClick: () => {
|
|
4643
|
-
setUnreadSessionIds((ids) => ids.filter((item) => item !== id));
|
|
4644
|
-
openSession(id);
|
|
4669
|
+
if (openSession(id) !== false) setUnreadSessionIds((ids) => ids.filter((item) => item !== id));
|
|
4645
4670
|
},
|
|
4646
4671
|
onContextMenu: (event) => {
|
|
4647
4672
|
event.preventDefault();
|
|
@@ -5485,8 +5510,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
5485
5510
|
y: menu.y
|
|
5486
5511
|
} : void 0,
|
|
5487
5512
|
onOpen: () => {
|
|
5488
|
-
setUnreadSessionIds((ids) => ids.filter((item) => item !== id));
|
|
5489
|
-
openSession(id);
|
|
5513
|
+
if (openSession(id) !== false) setUnreadSessionIds((ids) => ids.filter((item) => item !== id));
|
|
5490
5514
|
},
|
|
5491
5515
|
onMenuChange: (open) => {
|
|
5492
5516
|
setMenu(open ? {
|
|
@@ -6286,8 +6310,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
6286
6310
|
y: menu.y
|
|
6287
6311
|
} : void 0,
|
|
6288
6312
|
onOpen: () => {
|
|
6289
|
-
flags.setUnreadSessionIds((ids) => ids.filter((item) => item !== id));
|
|
6290
|
-
openSession(id);
|
|
6313
|
+
if (openSession(id) !== false) flags.setUnreadSessionIds((ids) => ids.filter((item) => item !== id));
|
|
6291
6314
|
},
|
|
6292
6315
|
onMenuChange: (open) => {
|
|
6293
6316
|
setMenu(open ? { id } : void 0);
|
|
@@ -6385,12 +6408,30 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
6385
6408
|
value: "runs",
|
|
6386
6409
|
id: "dcu-schedule-tab-runs",
|
|
6387
6410
|
panelId: "dcu-schedule-panel-runs",
|
|
6388
|
-
label:
|
|
6411
|
+
label: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
6412
|
+
style: {
|
|
6413
|
+
display: "inline-flex",
|
|
6414
|
+
alignItems: "center",
|
|
6415
|
+
justifyContent: "center",
|
|
6416
|
+
gap: 5,
|
|
6417
|
+
whiteSpace: "nowrap"
|
|
6418
|
+
},
|
|
6419
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconFlatListOutlineMedium, { size: 14 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: props.t("sidebar.runsTab") })]
|
|
6420
|
+
})
|
|
6389
6421
|
}, {
|
|
6390
6422
|
value: "overview",
|
|
6391
6423
|
id: "dcu-schedule-tab-overview",
|
|
6392
6424
|
panelId: "dcu-schedule-panel-overview",
|
|
6393
|
-
label:
|
|
6425
|
+
label: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
6426
|
+
style: {
|
|
6427
|
+
display: "inline-flex",
|
|
6428
|
+
alignItems: "center",
|
|
6429
|
+
justifyContent: "center",
|
|
6430
|
+
gap: 5,
|
|
6431
|
+
whiteSpace: "nowrap"
|
|
6432
|
+
},
|
|
6433
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconWorkspaceTreeOutlineMedium, { size: 14 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: props.t("sidebar.overviewTab") })]
|
|
6434
|
+
})
|
|
6394
6435
|
}], [props.t]);
|
|
6395
6436
|
if (props.overviewContent === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HoverShell, {
|
|
6396
6437
|
blocked: menu !== void 0,
|
|
@@ -6594,8 +6635,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
6594
6635
|
y: menu.y
|
|
6595
6636
|
} : void 0,
|
|
6596
6637
|
onOpen: () => {
|
|
6597
|
-
flags.setUnreadSessionIds((ids) => ids.filter((item) => item !== id));
|
|
6598
|
-
openSession(id);
|
|
6638
|
+
if (openSession(id) !== false) flags.setUnreadSessionIds((ids) => ids.filter((item) => item !== id));
|
|
6599
6639
|
},
|
|
6600
6640
|
onMenuChange: (open) => {
|
|
6601
6641
|
setMenu(open ? { id } : void 0);
|
|
@@ -7489,7 +7529,7 @@ body[data-we-sidebar-glass] .dcu-expanded-shell,body[data-we-sidebar-glass] .dcu
|
|
|
7489
7529
|
.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
7530
|
.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
7531
|
.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
|
|
7532
|
+
.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
7533
|
.dcu-settings-seat [data-slot="settings.trigger"]{color:var(--dcu-sidebar-navigation)}
|
|
7494
7534
|
.dcu-settings-seat [data-slot="settings.trigger"]>svg{color:var(--dcu-sidebar-icon)}
|
|
7495
7535
|
/* 宿主列负责缩放,宽态内容保持展开宽度,避免中文竖排与工作区逐帧重排。 */
|
|
@@ -7890,19 +7930,56 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
7890
7930
|
value: "tasks",
|
|
7891
7931
|
id: "dcu-tab-tasks",
|
|
7892
7932
|
panelId: "dcu-panel-tasks",
|
|
7893
|
-
label:
|
|
7933
|
+
label: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
7934
|
+
style: {
|
|
7935
|
+
display: "inline-flex",
|
|
7936
|
+
alignItems: "center",
|
|
7937
|
+
justifyContent: "center",
|
|
7938
|
+
gap: 5,
|
|
7939
|
+
whiteSpace: "nowrap"
|
|
7940
|
+
},
|
|
7941
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconFolderCloseMedium, { size: 14 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("sidebar.tasksTab") })]
|
|
7942
|
+
})
|
|
7894
7943
|
}];
|
|
7895
7944
|
if (showChannels) items.push({
|
|
7896
7945
|
value: "channels",
|
|
7897
7946
|
id: "dcu-tab-channels",
|
|
7898
7947
|
panelId: "dcu-panel-channels",
|
|
7899
|
-
label:
|
|
7948
|
+
label: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
7949
|
+
style: {
|
|
7950
|
+
display: "inline-flex",
|
|
7951
|
+
alignItems: "center",
|
|
7952
|
+
justifyContent: "center",
|
|
7953
|
+
gap: 5,
|
|
7954
|
+
whiteSpace: "nowrap"
|
|
7955
|
+
},
|
|
7956
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
7957
|
+
viewBox: "0 0 16 16",
|
|
7958
|
+
width: 14,
|
|
7959
|
+
height: 14,
|
|
7960
|
+
fill: "none",
|
|
7961
|
+
"aria-hidden": "true",
|
|
7962
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
7963
|
+
fill: "currentColor",
|
|
7964
|
+
d: "M2.15 2.9h11.7v8.2H6.42L2.15 13.85V2.9Zm1.4 1.4v6.62l1.78-1.12h7.12V4.3H3.55Z"
|
|
7965
|
+
})
|
|
7966
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("sidebar.channelsTab") })]
|
|
7967
|
+
})
|
|
7900
7968
|
});
|
|
7901
7969
|
if (showSchedule) items.push({
|
|
7902
7970
|
value: "schedule",
|
|
7903
7971
|
id: "dcu-tab-schedule",
|
|
7904
7972
|
panelId: "dcu-panel-schedule",
|
|
7905
|
-
label:
|
|
7973
|
+
label: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
7974
|
+
style: {
|
|
7975
|
+
display: "inline-flex",
|
|
7976
|
+
alignItems: "center",
|
|
7977
|
+
justifyContent: "center",
|
|
7978
|
+
gap: 5,
|
|
7979
|
+
whiteSpace: "nowrap"
|
|
7980
|
+
},
|
|
7981
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ScheduleIcon, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("sidebar.scheduleTab") })]
|
|
7982
|
+
})
|
|
7906
7983
|
});
|
|
7907
7984
|
return items;
|
|
7908
7985
|
}, [
|
|
@@ -9165,8 +9242,8 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
9165
9242
|
"sidebar.tasksTab": "任务",
|
|
9166
9243
|
"sidebar.channelsTab": "频道",
|
|
9167
9244
|
"sidebar.scheduleTab": "定时",
|
|
9168
|
-
"sidebar.runsTab": "
|
|
9169
|
-
"sidebar.overviewTab": "
|
|
9245
|
+
"sidebar.runsTab": "记录",
|
|
9246
|
+
"sidebar.overviewTab": "任务",
|
|
9170
9247
|
"channels.empty": "还没有频道会话。先在设置 → IM助理 里连接渠道。",
|
|
9171
9248
|
"channels.loadError": "无法读取频道会话。",
|
|
9172
9249
|
"channel.dingtalk": "钉钉",
|
|
@@ -9460,8 +9537,8 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
9460
9537
|
"sidebar.tasksTab": "Tasks",
|
|
9461
9538
|
"sidebar.channelsTab": "Channels",
|
|
9462
9539
|
"sidebar.scheduleTab": "Schedule",
|
|
9463
|
-
"sidebar.runsTab": "
|
|
9464
|
-
"sidebar.overviewTab": "
|
|
9540
|
+
"sidebar.runsTab": "Records",
|
|
9541
|
+
"sidebar.overviewTab": "Tasks",
|
|
9465
9542
|
"channels.empty": "No channel conversations yet. Connect a channel in Settings → IM Assistant.",
|
|
9466
9543
|
"channels.loadError": "Could not load channel conversations.",
|
|
9467
9544
|
"channel.dingtalk": "DingTalk",
|
|
@@ -9889,6 +9966,23 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
9889
9966
|
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
9967
|
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
9968
|
};
|
|
9969
|
+
const NAV_ICON_CLASS = "dcu-settings-nav-icon";
|
|
9970
|
+
const NAV_ICON_STYLE_ID = "dcu-settings-nav-icon-style";
|
|
9971
|
+
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}`;
|
|
9972
|
+
/** mask 只取 alpha 通道,因此把 currentColor 固定为黑色即可 */
|
|
9973
|
+
function iconMask(id) {
|
|
9974
|
+
const viewBox = id === "archive" ? "0 0 20 20" : id === "about" ? "0 0 14 14" : "0 0 16 16";
|
|
9975
|
+
const paths = SETTINGS_NAV_ICON_HTML[id].replace(/fill="currentColor"/g, "fill=\"black\"");
|
|
9976
|
+
return `url("data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="${viewBox}">${paths}</svg>`)}")`;
|
|
9977
|
+
}
|
|
9978
|
+
/** 注入导航图标样式;重复安装时复用同一个 style 元素 */
|
|
9979
|
+
function ensureNavIconStyle(doc) {
|
|
9980
|
+
if (doc.getElementById(NAV_ICON_STYLE_ID) !== null) return;
|
|
9981
|
+
const style = doc.createElement("style");
|
|
9982
|
+
style.id = NAV_ICON_STYLE_ID;
|
|
9983
|
+
style.textContent = NAV_ICON_CSS;
|
|
9984
|
+
(doc.head ?? doc.documentElement).appendChild(style);
|
|
9985
|
+
}
|
|
9892
9986
|
const LABEL_ALIASES = [
|
|
9893
9987
|
[["插件市场", "Plugin Market"], "plugins"],
|
|
9894
9988
|
[["内置插件", "Built-in plugins"], "plugins"],
|
|
@@ -9926,13 +10020,20 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
9926
10020
|
changed = true;
|
|
9927
10021
|
}
|
|
9928
10022
|
}
|
|
9929
|
-
|
|
9930
|
-
if (
|
|
9931
|
-
|
|
9932
|
-
|
|
9933
|
-
|
|
9934
|
-
|
|
9935
|
-
|
|
10023
|
+
if (button.querySelector(":scope > svg") === null) return changed;
|
|
10024
|
+
if (button.getAttribute("data-dcu-nav-icon") === id && button.querySelector(`.${NAV_ICON_CLASS}`) !== null) return changed;
|
|
10025
|
+
const doc = button.ownerDocument;
|
|
10026
|
+
if (doc === null) return changed;
|
|
10027
|
+
ensureNavIconStyle(doc);
|
|
10028
|
+
button.setAttribute("data-dcu-nav-icon", id);
|
|
10029
|
+
let icon = button.querySelector(`.${NAV_ICON_CLASS}`);
|
|
10030
|
+
if (icon === null) {
|
|
10031
|
+
icon = doc.createElement("span");
|
|
10032
|
+
icon.className = NAV_ICON_CLASS;
|
|
10033
|
+
icon.setAttribute("aria-hidden", "true");
|
|
10034
|
+
button.prepend(icon);
|
|
10035
|
+
}
|
|
10036
|
+
icon.style.setProperty("--dcu-settings-nav-icon-mask", iconMask(id));
|
|
9936
10037
|
return true;
|
|
9937
10038
|
}
|
|
9938
10039
|
function applySettingsNavIcons(root) {
|
|
@@ -9984,6 +10085,11 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
9984
10085
|
return () => {
|
|
9985
10086
|
observer.disconnect();
|
|
9986
10087
|
if (frame !== void 0) window.cancelAnimationFrame(frame);
|
|
10088
|
+
for (const button of document.querySelectorAll("[data-dcu-nav-icon]")) {
|
|
10089
|
+
button.removeAttribute("data-dcu-nav-icon");
|
|
10090
|
+
button.querySelector(`.${NAV_ICON_CLASS}`)?.remove();
|
|
10091
|
+
}
|
|
10092
|
+
if (document.querySelector("[data-dcu-nav-icon]") === null) document.getElementById(NAV_ICON_STYLE_ID)?.remove();
|
|
9987
10093
|
};
|
|
9988
10094
|
}
|
|
9989
10095
|
//#endregion
|
|
@@ -9999,6 +10105,8 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
9999
10105
|
};
|
|
10000
10106
|
}
|
|
10001
10107
|
const FORWARDED_CONFIG_SLOTS = /* @__PURE__ */ new Set([
|
|
10108
|
+
"plugins.tab",
|
|
10109
|
+
"plugins.add.actions",
|
|
10002
10110
|
"plugins.item",
|
|
10003
10111
|
"plugins.bundle.activation",
|
|
10004
10112
|
"plugins.bundle.config",
|
|
@@ -11905,9 +12013,7 @@ html[data-dsh-native-backdrop=mica] .dcu-settings-page,html[data-dsh-native-back
|
|
|
11905
12013
|
const binding = id === void 0 ? void 0 : ctx.sessions.binding(id);
|
|
11906
12014
|
return prefillNewConversation(binding === void 0 ? void 0 : ctx.conversation.input.for(binding.ctx), text);
|
|
11907
12015
|
},
|
|
11908
|
-
openSession: (sessionId) =>
|
|
11909
|
-
openConversation(ctx, ctx.layout, sessionId);
|
|
11910
|
-
},
|
|
12016
|
+
openSession: (sessionId) => openConversation(ctx, ctx.layout, sessionId),
|
|
11911
12017
|
startSession: (workspaceId) => {
|
|
11912
12018
|
startWorkspaceSession(ctx, workspaceId);
|
|
11913
12019
|
},
|
|
@@ -12044,9 +12150,7 @@ html[data-dsh-native-backdrop=mica] .dcu-settings-page,html[data-dsh-native-back
|
|
|
12044
12150
|
forkSession,
|
|
12045
12151
|
moveSession,
|
|
12046
12152
|
openPath,
|
|
12047
|
-
openSession: (sessionId) =>
|
|
12048
|
-
openConversation(ctx, ctx.layout, sessionId);
|
|
12049
|
-
},
|
|
12153
|
+
openSession: (sessionId) => openConversation(ctx, ctx.layout, sessionId),
|
|
12050
12154
|
renameSession,
|
|
12051
12155
|
renameWorkspace: (workspaceId, title) => ctx.workspaces.rename(workspaceId, title),
|
|
12052
12156
|
insertWorkspaceBefore: (workspaceId, beforeWorkspaceId) => ctx.workspaces.insertBefore(workspaceId, beforeWorkspaceId),
|
|
@@ -12061,11 +12165,24 @@ html[data-dsh-native-backdrop=mica] .dcu-settings-page,html[data-dsh-native-back
|
|
|
12061
12165
|
if (typeof window === "undefined") return () => {};
|
|
12062
12166
|
const sessionId = new URL(window.location.href).searchParams.get("session");
|
|
12063
12167
|
if (sessionId === null || sessionId === "") return () => {};
|
|
12168
|
+
const cleanSessionDeepLink = () => {
|
|
12169
|
+
try {
|
|
12170
|
+
const currentUrl = new URL(window.location.href);
|
|
12171
|
+
currentUrl.searchParams.delete("session");
|
|
12172
|
+
window.history.replaceState(null, "", currentUrl.pathname + currentUrl.search + currentUrl.hash);
|
|
12173
|
+
} catch {}
|
|
12174
|
+
};
|
|
12064
12175
|
let opened = false;
|
|
12065
12176
|
const openDeepLink = () => {
|
|
12066
|
-
if (opened
|
|
12177
|
+
if (opened) return;
|
|
12178
|
+
const decision = deepLinkAction(ctx.sessions.list.getSnapshot().byId, isSessionArchived(ctx, sessionId), sessionId);
|
|
12179
|
+
if (decision === "wait") return;
|
|
12067
12180
|
opened = true;
|
|
12068
|
-
|
|
12181
|
+
if (decision === "clean") {
|
|
12182
|
+
cleanSessionDeepLink();
|
|
12183
|
+
return;
|
|
12184
|
+
}
|
|
12185
|
+
if (!openConversation(ctx, ctx.layout, sessionId)) cleanSessionDeepLink();
|
|
12069
12186
|
};
|
|
12070
12187
|
openDeepLink();
|
|
12071
12188
|
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.43",
|
|
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": {
|