@michengai/dsh-codex-ui 1.1.43 → 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 +6 -0
- package/CHANGELOG.zh-CN.md +6 -0
- package/lib/client.js +75 -45
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
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
|
+
|
|
3
9
|
## 1.1.43 (2026-10-19)
|
|
4
10
|
|
|
5
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.
|
package/CHANGELOG.zh-CN.md
CHANGED
package/lib/client.js
CHANGED
|
@@ -2558,13 +2558,19 @@ window.__ModuleLoader__.load({
|
|
|
2558
2558
|
const CONVERSATION_HEADER_STYLE = `
|
|
2559
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}
|
|
2560
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)))}
|
|
2561
2566
|
header:has([data-dcu-inline-tabs]):after{display:none;content:none}
|
|
2562
2567
|
header:not(:has([data-dcu-inline-tabs])):has([class*="crumbCurrent"]):after{display:none;content:none}
|
|
2563
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}
|
|
2564
|
-
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}
|
|
2565
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}
|
|
2566
2572
|
header:not(:has([data-dcu-inline-tabs])):has([class*="crumbCurrent"]) [class*="headerActions"]{margin-right:auto}
|
|
2567
|
-
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))}
|
|
2568
2574
|
header:has([data-dcu-inline-tabs]) [class*="headerUtilities"]{order:4;flex:none}
|
|
2569
2575
|
header:not(:has([data-dcu-inline-tabs])):has([class*="crumbCurrent"]) [class*="headerUtilities"]{order:4;flex:none}
|
|
2570
2576
|
/* 新版角落插槽被 display:contents 摊平后,需要独立排序并撤销嵌套布局的边距补偿。 */
|
|
@@ -6760,6 +6766,13 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
6760
6766
|
}
|
|
6761
6767
|
const visibleSidebarWidths = /* @__PURE__ */ new WeakMap();
|
|
6762
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
|
+
}
|
|
6763
6776
|
/** 记下插件改写前的宿主列宽。已经带初始化标记的列宽是本插件留下的,不能当成宿主原值。 */
|
|
6764
6777
|
function rememberHostSidebar(frame) {
|
|
6765
6778
|
if (hostSidebarSnapshots.has(frame) || frame.hasAttribute("data-dcu-codex-sidebar-initialized")) return;
|
|
@@ -6774,6 +6787,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
6774
6787
|
function restoreHostSidebar(frame) {
|
|
6775
6788
|
frame.removeAttribute("data-dcu-codex-sidebar-initialized");
|
|
6776
6789
|
frame.style.removeProperty("--dcu-sidebar-expanded-width");
|
|
6790
|
+
frame.style.removeProperty(SIDEBAR_RAIL_WIDTH_VAR);
|
|
6777
6791
|
const html = frame.ownerDocument.documentElement;
|
|
6778
6792
|
const tracks = parseSidebarGrid(frame.style.gridTemplateColumns);
|
|
6779
6793
|
if (frame.hasAttribute("data-sidebar-collapsed")) {
|
|
@@ -6828,6 +6842,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
6828
6842
|
const tracks = parseSidebarGrid(frame.style.gridTemplateColumns);
|
|
6829
6843
|
if (tracks === void 0 || frame.hasAttribute("data-sidebar-collapsed")) return false;
|
|
6830
6844
|
visibleSidebarWidths.set(frame, width);
|
|
6845
|
+
writeSidebarRailWidth(frame, 0);
|
|
6831
6846
|
const next = `${width}px ${tracks.middle} ${tracks.details}`;
|
|
6832
6847
|
const changed = frame.style.gridTemplateColumns !== next;
|
|
6833
6848
|
if (changed) frame.style.gridTemplateColumns = next;
|
|
@@ -6848,6 +6863,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
6848
6863
|
const next = `56px ${tracks.middle} ${tracks.details}`;
|
|
6849
6864
|
const changed = frame.style.gridTemplateColumns !== next;
|
|
6850
6865
|
if (changed) frame.style.gridTemplateColumns = next;
|
|
6866
|
+
writeSidebarRailWidth(frame, 56);
|
|
6851
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`);
|
|
6852
6868
|
return changed;
|
|
6853
6869
|
}
|
|
@@ -6897,7 +6913,11 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
6897
6913
|
if (frame === void 0 || !frame.isConnected) watchFrame(findSidebarFrame(document));
|
|
6898
6914
|
if (frame !== void 0) {
|
|
6899
6915
|
rememberHostSidebar(frame);
|
|
6900
|
-
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
|
+
}
|
|
6901
6921
|
if (frame.hasAttribute("data-sidebar-collapsed")) {
|
|
6902
6922
|
applySlimSidebar(frame);
|
|
6903
6923
|
return;
|
|
@@ -9788,9 +9808,10 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
9788
9808
|
//#region src/client/slot-mirror.tsx
|
|
9789
9809
|
const bridges = /* @__PURE__ */ new WeakMap();
|
|
9790
9810
|
const wrappers = /* @__PURE__ */ new WeakMap();
|
|
9791
|
-
/** Keep a real React component boundary and its hooks; translate only renderer-owned bindings. */
|
|
9792
9811
|
function withSlotAliases(Component, aliases) {
|
|
9812
|
+
if (typeof Component !== "function" && (typeof Component !== "object" || Component === null)) return Component;
|
|
9793
9813
|
const pairs = Object.entries(aliases).sort(([a], [b]) => a.localeCompare(b));
|
|
9814
|
+
if (pairs.length === 0) return Component;
|
|
9794
9815
|
const signature = JSON.stringify(pairs);
|
|
9795
9816
|
let cached = wrappers.get(Component);
|
|
9796
9817
|
if (!cached) wrappers.set(Component, cached = /* @__PURE__ */ new Map());
|
|
@@ -10319,7 +10340,10 @@ body[data-ds-dark-theme] .dcu-settings-page{--sp-bg:#181818;--sp-nav:var(--dcu-s
|
|
|
10319
10340
|
.dcu-settings-page button,.dcu-settings-page input{font:inherit}
|
|
10320
10341
|
.dcu-settings-page button{cursor:pointer}
|
|
10321
10342
|
.dcu-settings-page :focus-visible{outline:2px solid #459cff;outline-offset:3px}
|
|
10322
|
-
.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}
|
|
10323
10347
|
/* macOS 普通窗口的原生按钮覆盖 Web 内容;沿用宿主标题栏安全区,仅抬高设置导航。 */
|
|
10324
10348
|
html[data-platform=darwin]:not([data-fullscreen]) .dcu-settings-nav{padding-top:calc(var(--dsh-frame-top-clearance,48px) + 8px)}
|
|
10325
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))}
|
|
@@ -10421,6 +10445,7 @@ html[data-dsh-native-backdrop=mica] .dcu-settings-page,html[data-dsh-native-back
|
|
|
10421
10445
|
|
|
10422
10446
|
@media(max-width:900px){.dcu-settings-inner{padding:32px 28px}.dcu-settings-heading{align-items:flex-start;flex-direction:column;gap:12px}}
|
|
10423
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}}
|
|
10424
10449
|
`;
|
|
10425
10450
|
//#endregion
|
|
10426
10451
|
//#region src/client/settings-focus.ts
|
|
@@ -10732,47 +10757,52 @@ html[data-dsh-native-backdrop=mica] .dcu-settings-page,html[data-dsh-native-back
|
|
|
10732
10757
|
}
|
|
10733
10758
|
})]
|
|
10734
10759
|
}),
|
|
10735
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
10736
|
-
className: "dcu-settings-
|
|
10760
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
10761
|
+
className: "dcu-settings-scroll",
|
|
10737
10762
|
children: [
|
|
10738
|
-
"
|
|
10739
|
-
|
|
10740
|
-
|
|
10741
|
-
|
|
10742
|
-
|
|
10743
|
-
|
|
10744
|
-
|
|
10745
|
-
|
|
10746
|
-
|
|
10747
|
-
|
|
10748
|
-
|
|
10749
|
-
|
|
10750
|
-
|
|
10751
|
-
|
|
10752
|
-
|
|
10753
|
-
|
|
10754
|
-
|
|
10755
|
-
|
|
10756
|
-
|
|
10757
|
-
|
|
10758
|
-
|
|
10759
|
-
|
|
10760
|
-
|
|
10761
|
-
|
|
10762
|
-
|
|
10763
|
-
|
|
10764
|
-
|
|
10765
|
-
|
|
10766
|
-
|
|
10767
|
-
|
|
10768
|
-
|
|
10769
|
-
|
|
10770
|
-
|
|
10771
|
-
|
|
10772
|
-
|
|
10773
|
-
|
|
10774
|
-
|
|
10775
|
-
|
|
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
|
+
]
|
|
10776
10806
|
})
|
|
10777
10807
|
]
|
|
10778
10808
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
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": {
|