@michengai/dsh-codex-ui 1.1.46 → 1.1.47
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 +96 -54
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.1.47 (2026-10-22)
|
|
4
|
+
|
|
5
|
+
- Prevent interaction lockup during sidebar collapse by removing blocking `pointer-events: none` and settling state on `transitionend` with a timeout fallback (#57).
|
|
6
|
+
- Support async `startSession` return handling and add a pending state guard to prevent silent no-ops when host RPC is busy during streaming (#57).
|
|
7
|
+
- Optimize streaming performance: lazily mount and subscribe search store snapshots only when the search modal is open, wrap `SessionRow` and `GroupHead` in `React.memo` to isolate tree item re-renders, and throttle tool menu DOM geometry syncs into animation frames (#57).
|
|
8
|
+
|
|
3
9
|
## 1.1.46 (2026-10-21)
|
|
4
10
|
|
|
5
11
|
- Restore window dragging on the Settings page in the Windows desktop app: the full-screen Settings overlay now reserves the native caption band and declares it as a drag region again (#56).
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## 1.1.47 (2026-10-22)
|
|
4
|
+
|
|
5
|
+
- 修复侧栏折叠动画窗口期交互锁死:移除展开壳上的 `pointer-events: none` 阻断,改由 `transitionend` 驱动收敛并配合超时兜底,避免主线程流式长任务排队导致整栏无法点击(#57)。
|
|
6
|
+
- 增强「新建任务」健壮性:适配 `startSession` 异步返回值与异常捕获,增加 pending 状态守卫,避免宿主并发繁忙或挂起时静默失效(#57)。
|
|
7
|
+
- 优化流式输出期间渲染性能:搜索弹窗改为按需挂载,未打开时不订阅 store 快照,切断高频全量搜索索引重建;会话行与分组头使用 `React.memo` 隔离局部重绘;工具菜单 DOM 几何测量合并到 `requestAnimationFrame`(#57)。
|
|
8
|
+
|
|
3
9
|
## 1.1.46 (2026-10-21)
|
|
4
10
|
|
|
5
11
|
- 修复 Windows 桌面端设置页无法拖动窗口:全屏设置浮层重新预留原生标题栏区域,并把该区域声明为窗口拖动区(#56)。
|
package/lib/client.js
CHANGED
|
@@ -1949,7 +1949,7 @@ window.__ModuleLoader__.load({
|
|
|
1949
1949
|
})
|
|
1950
1950
|
});
|
|
1951
1951
|
}
|
|
1952
|
-
function SessionRow({ id, title, selected, menuOpen, unread, running, pendingInteraction, t, menuItems, onOpen, onMenuChange, onSelectAction, onArchive, onHover, onLeave, onContextMenu, menuPoint, subtitle, flat, draggable, dropActive, onDragStart, onDragEnd, onDragOver, onDrop, time }) {
|
|
1952
|
+
const SessionRow = (0, react.memo)(function SessionRow({ id, title, selected, menuOpen, unread, running, pendingInteraction, t, menuItems, onOpen, onMenuChange, onSelectAction, onArchive, onHover, onLeave, onContextMenu, menuPoint, subtitle, flat, draggable, dropActive, onDragStart, onDragEnd, onDragOver, onDrop, time }) {
|
|
1953
1953
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1954
1954
|
"data-dcu-session": id,
|
|
1955
1955
|
className: `dcu-wb-session${selected ? " dcu-wb-selected" : ""}${menuOpen ? " dcu-wb-menu-open" : ""}${dropActive === true ? " dcu-wb-drop" : ""}${flat === true ? " dcu-wb-session-flat" : ""}`,
|
|
@@ -2018,8 +2018,8 @@ window.__ModuleLoader__.load({
|
|
|
2018
2018
|
})
|
|
2019
2019
|
]
|
|
2020
2020
|
});
|
|
2021
|
-
}
|
|
2022
|
-
function GroupHead({ expanded, title, icon, onToggle, actions, menuOpen }) {
|
|
2021
|
+
});
|
|
2022
|
+
const GroupHead = (0, react.memo)(function GroupHead({ expanded, title, icon, onToggle, actions, menuOpen }) {
|
|
2023
2023
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2024
2024
|
className: `dcu-wb-project-head${menuOpen === true ? " dcu-wb-menu-open" : ""}`,
|
|
2025
2025
|
role: "treeitem",
|
|
@@ -2047,7 +2047,7 @@ window.__ModuleLoader__.load({
|
|
|
2047
2047
|
})
|
|
2048
2048
|
]
|
|
2049
2049
|
});
|
|
2050
|
-
}
|
|
2050
|
+
});
|
|
2051
2051
|
//#endregion
|
|
2052
2052
|
//#region src/client/session-pending.ts
|
|
2053
2053
|
const EMPTY_PENDING_INTERACTIONS = /* @__PURE__ */ new Map();
|
|
@@ -7167,7 +7167,9 @@ body[data-ds-dark-theme] [data-conversation-scroll] [data-trigger-menu]{backgrou
|
|
|
7167
7167
|
]) menu.style.removeProperty(property);
|
|
7168
7168
|
});
|
|
7169
7169
|
}
|
|
7170
|
-
|
|
7170
|
+
let syncFrame;
|
|
7171
|
+
function syncNow() {
|
|
7172
|
+
syncFrame = void 0;
|
|
7171
7173
|
for (const [menu, dispose] of mounted) if (!menu.isConnected) {
|
|
7172
7174
|
dispose();
|
|
7173
7175
|
mounted.delete(menu);
|
|
@@ -7182,7 +7184,18 @@ body[data-ds-dark-theme] [data-conversation-scroll] [data-trigger-menu]{backgrou
|
|
|
7182
7184
|
break;
|
|
7183
7185
|
}
|
|
7184
7186
|
}
|
|
7185
|
-
|
|
7187
|
+
function scheduleSync() {
|
|
7188
|
+
if (anchor === void 0 || now() > pendingUntil) {
|
|
7189
|
+
for (const [menu, dispose] of mounted) if (!menu.isConnected) {
|
|
7190
|
+
dispose();
|
|
7191
|
+
mounted.delete(menu);
|
|
7192
|
+
}
|
|
7193
|
+
return;
|
|
7194
|
+
}
|
|
7195
|
+
if (syncFrame !== void 0) return;
|
|
7196
|
+
syncFrame = window.requestAnimationFrame(syncNow);
|
|
7197
|
+
}
|
|
7198
|
+
const observer = new MutationObserver(scheduleSync);
|
|
7186
7199
|
observer.observe(document.body, {
|
|
7187
7200
|
childList: true,
|
|
7188
7201
|
subtree: true
|
|
@@ -7197,6 +7210,7 @@ body[data-ds-dark-theme] [data-conversation-scroll] [data-trigger-menu]{backgrou
|
|
|
7197
7210
|
].includes(event.key)) capture(event);
|
|
7198
7211
|
}
|
|
7199
7212
|
return () => {
|
|
7213
|
+
if (syncFrame !== void 0) window.cancelAnimationFrame(syncFrame);
|
|
7200
7214
|
observer.disconnect();
|
|
7201
7215
|
document.removeEventListener("pointerdown", capture, true);
|
|
7202
7216
|
document.removeEventListener("keydown", captureKey, true);
|
|
@@ -7245,11 +7259,10 @@ html[data-windows-titlebar][data-fullscreen] .dcu-desktop-navigation{display:non
|
|
|
7245
7259
|
}
|
|
7246
7260
|
//#endregion
|
|
7247
7261
|
//#region src/client/sidebar-session.ts
|
|
7248
|
-
/**
|
|
7262
|
+
/** 先切回任务页签再创建,避免新建后仍停在频道或日程。支持同步与异步返回值。 */
|
|
7249
7263
|
function beginSidebarSession(setTab, startSession, workspaceId) {
|
|
7250
7264
|
setTab("tasks");
|
|
7251
|
-
|
|
7252
|
-
else startSession(workspaceId);
|
|
7265
|
+
return workspaceId === void 0 ? startSession() : startSession(workspaceId);
|
|
7253
7266
|
}
|
|
7254
7267
|
//#endregion
|
|
7255
7268
|
//#region src/client/WorkspaceShortcutBridge.tsx
|
|
@@ -7542,7 +7555,7 @@ html[data-windows-titlebar][data-fullscreen] .dcu-desktop-navigation{display:non
|
|
|
7542
7555
|
/* 滤镜只作用于背景,避免为设置和搜索等 fixed 后代创建侧栏包含块。 */
|
|
7543
7556
|
body[data-we-sidebar-glass] .dcu-root{position:relative;background:transparent}body[data-we-sidebar-glass] .dcu-root::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background-color:color-mix(in srgb,var(--we-sidebar-color,#fff) calc(var(--we-sidebar-alpha,.15)*.66*100%),transparent);background-image:linear-gradient(180deg,rgba(255,255,255,calc(var(--we-sidebar-sheen,1)*.14)),rgba(255,255,255,calc(var(--we-sidebar-sheen,1)*.04)) 38%,rgba(255,255,255,calc(var(--we-sidebar-sheen,1)*.01)));-webkit-backdrop-filter:blur(var(--we-sidebar-blur,16px)) saturate(var(--we-sidebar-saturate,1.8)) brightness(var(--we-glass-brightness,1.04)) contrast(1.01);backdrop-filter:blur(var(--we-sidebar-blur,16px)) saturate(var(--we-sidebar-saturate,1.8)) brightness(var(--we-glass-brightness,1.04)) contrast(1.01);box-shadow:inset 0 1px 0 rgba(255,255,255,calc(var(--we-sidebar-sheen,1)*.32)),inset 0 -1px 0 rgba(255,255,255,calc(var(--we-sidebar-sheen,1)*.08)),inset 0 0 0 .5px rgba(255,255,255,calc(var(--we-sidebar-sheen,1)*.06))}body[data-ds-dark-theme][data-we-sidebar-glass] .dcu-root::before{background-color:color-mix(in srgb,var(--we-sidebar-color,#fff) calc(var(--we-sidebar-alpha,.15)*.33*100%),transparent)}body[data-we-appwindow][data-we-sidebar-glass] .dcu-root::before{-webkit-backdrop-filter:none;backdrop-filter:none}@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){body[data-we-sidebar-glass] .dcu-root{background:#eef7f5}body[data-ds-dark-theme][data-we-sidebar-glass] .dcu-root{background:#1d2120}body[data-we-sidebar-glass] .dcu-root::before{display:none}}
|
|
7544
7557
|
body[data-we-sidebar-glass] .dcu-expanded-shell,body[data-we-sidebar-glass] .dcu-compact-shell,body[data-we-sidebar-glass] .dcu-foot{position:relative}
|
|
7545
|
-
.dcu-expanded-shell{display:flex;width:100%;min-height:0;flex:1 1 0;overflow:hidden;flex-direction:column;transform-origin:left center;transition:opacity 500ms cubic-bezier(.16,1,.3,1),transform 500ms cubic-bezier(.16,1,.3,1);animation:dcu-sidebar-expanded-in 500ms cubic-bezier(.16,1,.3,1)}.dcu-compact-shell{display:none;width:56px}.dcu-root.dcu-collapsing .dcu-expanded-shell{opacity:0;transform:translateX(-6px)
|
|
7558
|
+
.dcu-expanded-shell{display:flex;width:100%;min-height:0;flex:1 1 0;overflow:hidden;flex-direction:column;transform-origin:left center;transition:opacity 500ms cubic-bezier(.16,1,.3,1),transform 500ms cubic-bezier(.16,1,.3,1);animation:dcu-sidebar-expanded-in 500ms cubic-bezier(.16,1,.3,1)}.dcu-compact-shell{display:none;width:56px}.dcu-root.dcu-collapsing .dcu-expanded-shell{opacity:0;transform:translateX(-6px)}.dcu-root.dcu-compact .dcu-expanded-shell{display:none}.dcu-root.dcu-compact .dcu-compact-shell{display:flex;min-height:0;flex:1;flex-direction:column;align-items:center;animation:dcu-sidebar-compact-in 140ms ease-out}@keyframes dcu-sidebar-expanded-in{from{opacity:0;transform:translateX(-6px)}to{opacity:1;transform:none}}@keyframes dcu-sidebar-compact-in{from{opacity:0;transform:translateX(-4px)}to{opacity:1;transform:none}}
|
|
7546
7559
|
.dcu-root *{box-sizing:border-box}.dcu-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:8px;flex:none;height:var(--dcu-header-height,34px);padding:calc((var(--dcu-header-height,34px) - 28px)/2) 8px calc((var(--dcu-header-height,34px) - 28px)/2) 12px}.dcu-brand{border:0;background:transparent;color:inherit;padding:0;display:flex;align-items:center;min-width:0;overflow:hidden}.dcu-brand svg{display:block;width:auto;max-width:100%;height:24px;min-width:0}.dcu-head-actions{display:grid;grid-auto-flow:column;grid-auto-columns:28px;align-items:center;column-gap:8px;height:28px}
|
|
7547
7560
|
.dcu-icon,.dcu-menu button,.dcu-footer-link{appearance:none;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer}.dcu-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:8px;color:var(--dcu-sidebar-icon)}.dcu-head .dcu-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;margin:0;padding:0;border-radius:50%;line-height:0}.dcu-head .dcu-icon svg{display:block;width:16px;height:16px}
|
|
7548
7561
|
.dcu-icon:hover,.dcu-menu button:hover:not(:disabled),.dcu-footer-link:hover{background:var(--dcu-sidebar-hover);color:var(--dcu-sidebar-primary)}
|
|
@@ -7639,22 +7652,12 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
7639
7652
|
})
|
|
7640
7653
|
});
|
|
7641
7654
|
}
|
|
7642
|
-
|
|
7643
|
-
const SidebarSearch = (0, react.forwardRef)(function SidebarSearch({ imSettingsAvailable, openPlugins, openSession, startSession, t, useSessions, useWorkspaces, settingsSeat }, ref) {
|
|
7644
|
-
const [open, setOpen] = (0, react.useState)(false);
|
|
7655
|
+
function SidebarSearchModal({ imSettingsAvailable, openPlugins, openSession, startSession, t, useSessions, useWorkspaces, settingsSeat, onClose }) {
|
|
7645
7656
|
const [query, setQuery] = (0, react.useState)("");
|
|
7646
7657
|
const [activeIndex, setActiveIndex] = (0, react.useState)(0);
|
|
7647
7658
|
const deferredQuery = (0, react.useDeferredValue)(query);
|
|
7648
7659
|
const sessions = useSessions((state) => state);
|
|
7649
7660
|
const workspaces = useWorkspaces((state) => state);
|
|
7650
|
-
const close = (0, react.useCallback)(() => {
|
|
7651
|
-
setOpen(false);
|
|
7652
|
-
setQuery("");
|
|
7653
|
-
setActiveIndex(0);
|
|
7654
|
-
}, []);
|
|
7655
|
-
(0, react.useImperativeHandle)(ref, () => ({ open: () => {
|
|
7656
|
-
setOpen(true);
|
|
7657
|
-
} }), []);
|
|
7658
7661
|
const selectSection = (0, react.useCallback)((label) => {
|
|
7659
7662
|
openSettingsSection(settingsSeat.current, label);
|
|
7660
7663
|
}, [settingsSeat]);
|
|
@@ -7692,7 +7695,7 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
7692
7695
|
keywords: `${session.cwd ?? ""} ${session.id}`,
|
|
7693
7696
|
detail: workspaceTitles.get(String(session.id)) ?? session.cwd,
|
|
7694
7697
|
run: () => {
|
|
7695
|
-
|
|
7698
|
+
onClose();
|
|
7696
7699
|
openSession(session.id);
|
|
7697
7700
|
}
|
|
7698
7701
|
}));
|
|
@@ -7703,7 +7706,7 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
7703
7706
|
label: t("search.settings"),
|
|
7704
7707
|
keywords: t("search.settings"),
|
|
7705
7708
|
run: () => {
|
|
7706
|
-
|
|
7709
|
+
onClose();
|
|
7707
7710
|
openSettings();
|
|
7708
7711
|
}
|
|
7709
7712
|
},
|
|
@@ -7713,7 +7716,7 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
7713
7716
|
label: t("sidebar.experts"),
|
|
7714
7717
|
keywords: t("search.settings"),
|
|
7715
7718
|
run: () => {
|
|
7716
|
-
|
|
7719
|
+
onClose();
|
|
7717
7720
|
selectExternalSection(t("sidebar.experts"));
|
|
7718
7721
|
}
|
|
7719
7722
|
},
|
|
@@ -7723,7 +7726,7 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
7723
7726
|
label: t("sidebar.skills"),
|
|
7724
7727
|
keywords: t("search.settings"),
|
|
7725
7728
|
run: () => {
|
|
7726
|
-
|
|
7729
|
+
onClose();
|
|
7727
7730
|
selectExternalSection(t("sidebar.skills"));
|
|
7728
7731
|
}
|
|
7729
7732
|
},
|
|
@@ -7733,7 +7736,7 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
7733
7736
|
label: t("sidebar.plugins"),
|
|
7734
7737
|
keywords: t("search.settings"),
|
|
7735
7738
|
run: () => {
|
|
7736
|
-
|
|
7739
|
+
onClose();
|
|
7737
7740
|
openPlugins();
|
|
7738
7741
|
}
|
|
7739
7742
|
},
|
|
@@ -7743,7 +7746,7 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
7743
7746
|
label: t("settings.pluginConfig"),
|
|
7744
7747
|
keywords: t("search.settings"),
|
|
7745
7748
|
run: () => {
|
|
7746
|
-
|
|
7749
|
+
onClose();
|
|
7747
7750
|
openSettingsSection(settingsSeat.current, t("settings.pluginConfig"));
|
|
7748
7751
|
}
|
|
7749
7752
|
},
|
|
@@ -7753,7 +7756,7 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
7753
7756
|
label: t("sidebar.connectors"),
|
|
7754
7757
|
keywords: t("search.settings"),
|
|
7755
7758
|
run: () => {
|
|
7756
|
-
|
|
7759
|
+
onClose();
|
|
7757
7760
|
selectSection(t("sidebar.connectors"));
|
|
7758
7761
|
}
|
|
7759
7762
|
},
|
|
@@ -7763,7 +7766,7 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
7763
7766
|
label: t("sidebar.schedule"),
|
|
7764
7767
|
keywords: t("search.settings"),
|
|
7765
7768
|
run: () => {
|
|
7766
|
-
|
|
7769
|
+
onClose();
|
|
7767
7770
|
selectExternalSection(t("sidebar.schedule"));
|
|
7768
7771
|
}
|
|
7769
7772
|
},
|
|
@@ -7773,7 +7776,7 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
7773
7776
|
label: t("sidebar.assistant"),
|
|
7774
7777
|
keywords: t("search.settings"),
|
|
7775
7778
|
run: () => {
|
|
7776
|
-
|
|
7779
|
+
onClose();
|
|
7777
7780
|
openImSettings();
|
|
7778
7781
|
}
|
|
7779
7782
|
},
|
|
@@ -7783,7 +7786,7 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
7783
7786
|
label: t("about.nav"),
|
|
7784
7787
|
keywords: t("search.settings"),
|
|
7785
7788
|
run: () => {
|
|
7786
|
-
|
|
7789
|
+
onClose();
|
|
7787
7790
|
selectSection(t("about.nav"));
|
|
7788
7791
|
}
|
|
7789
7792
|
}
|
|
@@ -7797,13 +7800,14 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
7797
7800
|
label: t("sidebar.newTask"),
|
|
7798
7801
|
keywords: t("search.actions"),
|
|
7799
7802
|
run: () => {
|
|
7800
|
-
|
|
7803
|
+
onClose();
|
|
7801
7804
|
startSession();
|
|
7802
7805
|
}
|
|
7803
7806
|
}
|
|
7804
7807
|
];
|
|
7805
7808
|
}, [
|
|
7806
|
-
|
|
7809
|
+
imSettingsAvailable,
|
|
7810
|
+
onClose,
|
|
7807
7811
|
openImSettings,
|
|
7808
7812
|
openPlugins,
|
|
7809
7813
|
openSession,
|
|
@@ -7820,13 +7824,12 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
7820
7824
|
const results = (0, react.useMemo)(() => filterSidebarSearchItems(entries, deferredQuery).slice(0, 12), [deferredQuery, entries]);
|
|
7821
7825
|
(0, react.useEffect)(() => {
|
|
7822
7826
|
setActiveIndex(0);
|
|
7823
|
-
}, [query
|
|
7827
|
+
}, [query]);
|
|
7824
7828
|
(0, react.useEffect)(() => {
|
|
7825
|
-
if (!open) return;
|
|
7826
7829
|
const onKeyDown = (event) => {
|
|
7827
7830
|
if (event.key === "Escape") {
|
|
7828
7831
|
event.preventDefault();
|
|
7829
|
-
|
|
7832
|
+
onClose();
|
|
7830
7833
|
return;
|
|
7831
7834
|
}
|
|
7832
7835
|
if (event.key === "ArrowDown") {
|
|
@@ -7853,15 +7856,13 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
7853
7856
|
};
|
|
7854
7857
|
}, [
|
|
7855
7858
|
activeIndex,
|
|
7856
|
-
|
|
7857
|
-
open,
|
|
7859
|
+
onClose,
|
|
7858
7860
|
results
|
|
7859
7861
|
]);
|
|
7860
|
-
if (!open) return null;
|
|
7861
7862
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7862
7863
|
className: "dcu-search-scrim",
|
|
7863
7864
|
onMouseDown: (event) => {
|
|
7864
|
-
if (event.target === event.currentTarget)
|
|
7865
|
+
if (event.target === event.currentTarget) onClose();
|
|
7865
7866
|
},
|
|
7866
7867
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
7867
7868
|
className: "dcu-search-dialog",
|
|
@@ -7917,6 +7918,21 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
7917
7918
|
})]
|
|
7918
7919
|
})
|
|
7919
7920
|
});
|
|
7921
|
+
}
|
|
7922
|
+
/** 搜索状态与大侧栏隔离:未打开时不订阅 store 快照,避免后台流式高频引发无谓的搜索索引重构。 */
|
|
7923
|
+
const SidebarSearch = (0, react.forwardRef)(function SidebarSearch(props, ref) {
|
|
7924
|
+
const [open, setOpen] = (0, react.useState)(false);
|
|
7925
|
+
const close = (0, react.useCallback)(() => {
|
|
7926
|
+
setOpen(false);
|
|
7927
|
+
}, []);
|
|
7928
|
+
(0, react.useImperativeHandle)(ref, () => ({ open: () => {
|
|
7929
|
+
setOpen(true);
|
|
7930
|
+
} }), []);
|
|
7931
|
+
if (!open) return null;
|
|
7932
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarSearchModal, {
|
|
7933
|
+
...props,
|
|
7934
|
+
onClose: close
|
|
7935
|
+
});
|
|
7920
7936
|
});
|
|
7921
7937
|
/** Codex 风格的 DSH 侧栏,只替换导航外观,项目浏览和设置仍由 DSH 官方组件提供。 */
|
|
7922
7938
|
function CodexSidebar({ workspaceShortcuts, navigationHistory, globalPanels, footerActions, selectPanel, usePanelInfo = useLegacyPanelInfo, collapsed, width, openSession, startSession, toggleSidebar, archiveSession, canDeleteSession, deleteSession, forkSession, moveSession, renameSession, openPath, companionSlots, renderSlot, t, useSessions, useSessionPendingInteraction, useSessionStatus, useWorkspaces, prefillNewConversation, newConversationDraft }) {
|
|
@@ -7940,9 +7956,18 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
7940
7956
|
}, []);
|
|
7941
7957
|
const [extensionsOpen, setExtensionsOpen] = (0, react.useState)(readExtensionsOpen);
|
|
7942
7958
|
const [imTab, setImTab] = (0, react.useState)("tasks");
|
|
7943
|
-
const
|
|
7944
|
-
|
|
7945
|
-
|
|
7959
|
+
const [startingSession, setStartingSession] = (0, react.useState)(false);
|
|
7960
|
+
const beginSession = (0, react.useCallback)(async (workspaceId) => {
|
|
7961
|
+
if (startingSession) return;
|
|
7962
|
+
setStartingSession(true);
|
|
7963
|
+
try {
|
|
7964
|
+
await Promise.resolve(beginSidebarSession(setImTab, startSession, workspaceId));
|
|
7965
|
+
} catch (error) {
|
|
7966
|
+
console.warn("新建任务失败:", error);
|
|
7967
|
+
} finally {
|
|
7968
|
+
setStartingSession(false);
|
|
7969
|
+
}
|
|
7970
|
+
}, [startSession, startingSession]);
|
|
7946
7971
|
const companionTabs = (0, react.useSyncExternalStore)(companionSlots?.subscribe ?? subscribeEmptyCompanionTabs, companionSlots?.getSnapshot ?? getEmptyCompanionTabs, companionSlots?.getSnapshot ?? getEmptyCompanionTabs);
|
|
7947
7972
|
const showChannels = companionTabs.channels;
|
|
7948
7973
|
const showSchedule = companionTabs.schedule;
|
|
@@ -8128,11 +8153,16 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
8128
8153
|
return;
|
|
8129
8154
|
}
|
|
8130
8155
|
setCollapsing(true);
|
|
8131
|
-
|
|
8156
|
+
let done = false;
|
|
8157
|
+
const finish = () => {
|
|
8158
|
+
if (done) return;
|
|
8159
|
+
done = true;
|
|
8132
8160
|
setVisualCompact(true);
|
|
8133
8161
|
setCollapsing(false);
|
|
8134
|
-
}
|
|
8162
|
+
};
|
|
8163
|
+
const timer = window.setTimeout(finish, SIDEBAR_COLLAPSE_SETTLE_MS);
|
|
8135
8164
|
return () => {
|
|
8165
|
+
done = true;
|
|
8136
8166
|
window.clearTimeout(timer);
|
|
8137
8167
|
};
|
|
8138
8168
|
}, [compact, visualCompact]);
|
|
@@ -8193,6 +8223,12 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
8193
8223
|
}),
|
|
8194
8224
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8195
8225
|
className: "dcu-expanded-shell",
|
|
8226
|
+
onTransitionEnd: (event) => {
|
|
8227
|
+
if (event.target === event.currentTarget && (event.propertyName === "opacity" || event.propertyName === "transform")) {
|
|
8228
|
+
setVisualCompact(true);
|
|
8229
|
+
setCollapsing(false);
|
|
8230
|
+
}
|
|
8231
|
+
},
|
|
8196
8232
|
children: [
|
|
8197
8233
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", {
|
|
8198
8234
|
className: "dcu-head",
|
|
@@ -11918,17 +11954,23 @@ html[data-dsh-native-backdrop=mica] .dcu-settings-page,html[data-dsh-native-back
|
|
|
11918
11954
|
}
|
|
11919
11955
|
}
|
|
11920
11956
|
/** Archive Manager replaces the official ui-workspace row with this optional service. */
|
|
11921
|
-
function startWorkspaceSession(ctx, workspaceId) {
|
|
11957
|
+
async function startWorkspaceSession(ctx, workspaceId) {
|
|
11922
11958
|
const uiWorkspace = probeService(ctx, "uiWorkspace");
|
|
11923
|
-
|
|
11924
|
-
uiWorkspace
|
|
11925
|
-
|
|
11926
|
-
|
|
11927
|
-
|
|
11928
|
-
ctx.workspaces
|
|
11929
|
-
|
|
11959
|
+
try {
|
|
11960
|
+
if (hasStartSession(uiWorkspace)) {
|
|
11961
|
+
await Promise.resolve(uiWorkspace.startSession(workspaceId));
|
|
11962
|
+
return true;
|
|
11963
|
+
}
|
|
11964
|
+
if (hasStartSession(ctx.workspaces)) {
|
|
11965
|
+
await Promise.resolve(ctx.workspaces.startSession(workspaceId));
|
|
11966
|
+
return true;
|
|
11967
|
+
}
|
|
11968
|
+
console.warn("DSH 工作空间服务尚未就绪,无法新建会话。");
|
|
11969
|
+
return false;
|
|
11970
|
+
} catch (error) {
|
|
11971
|
+
console.warn("新建会话失败:", error);
|
|
11972
|
+
return false;
|
|
11930
11973
|
}
|
|
11931
|
-
console.warn("DSH 工作空间服务尚未就绪,无法新建会话。");
|
|
11932
11974
|
}
|
|
11933
11975
|
/** 替换 DSH 的官方 sidebar 插槽,不修改 DSH 源码或会话数据。 */
|
|
11934
11976
|
function apply(ctx) {
|
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.47",
|
|
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": {
|