@michengai/dsh-codex-ui 1.1.26 → 1.1.28

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 CHANGED
@@ -4,6 +4,21 @@
4
4
 
5
5
  This changelog records recent releases of DSH Codex UI. Earlier changes remain available in the [Git history](https://github.com/MichengAI/dsh-codex-ui/commits/main).
6
6
 
7
+ ## Unreleased
8
+
9
+ ## 1.1.28 - 2026-10-05
10
+
11
+ - Restore the official session-search and add-workspace shortcuts when Codex replaces the workspace sidebar (#35). Preserve command IDs and custom key bindings, reuse the host directory picker, and keep both actions available in the collapsed rail.
12
+ - Keep the same 56px icon rail on Desktop and Web when the sidebar collapses, with back/forward session navigation in the Windows caption instead of duplicate sidebar/new-task controls.
13
+
14
+ ## 1.1.27 - 2026-10-05
15
+
16
+ - Retain glass styling for the wallpaper plugin. The wallpaper plugin enables and configures this effect; it does not activate independently in Codex UI.
17
+ - Match the settings navigation width to the expanded main sidebar, including after resizing the sidebar.
18
+ - Align the sidebar and conversation header on a shared 34px control band. Use a 28px expand button at the top of the compact rail, retaining its center alignment during collapse transitions and keeping other rail navigation buttons at 36px.
19
+ - Fix the missing expand button after collapsing the desktop sidebar (#34). Windows retains a titlebar entry through the host overlay, and macOS uses the host window leading slot. Both work on settings pages while preserving the Web icon rail.
20
+ - Supply the required unique ID for the window overlay registration to prevent client activation failure. Add startup and disposal checks using the real host slot registry.
21
+
7
22
  ## 1.1.26 - 2026-10-04
8
23
 
9
24
  - Fix the invisible send arrow when wallpapers or skins make surface color tokens transparent. Preserve the Codex monochrome style: black with a white arrow in light mode, white with a dark arrow in dark mode, with matching hover states.
@@ -4,6 +4,21 @@
4
4
 
5
5
  本日志记录 DSH Codex UI 的最近发布;更早的变更可查看 [Git 提交历史](https://github.com/MichengAI/dsh-codex-ui/commits/main)。
6
6
 
7
+ ## 未发布
8
+
9
+ ## 1.1.28 - 2026-10-05
10
+
11
+ - 修复 Codex 侧栏接管工作区后,官方搜索会话、添加工作区快捷键无响应的问题(#35)。沿用官方命令及自定义键位,复用宿主目录选择器,折叠窄轨下同样可用。
12
+ - Desktop 折叠后保留与 Web 一致的 56px 图标侧栏;Windows 顶部改为会话后退、前进按钮,避免重复显示侧栏切换和新建入口。
13
+
14
+ ## 1.1.27 - 2026-10-05
15
+
16
+ - 保留现有 wallpaper 插件玻璃样式适配;该效果由 wallpaper 插件启用和配置,不在 Codex UI 内独立生效。
17
+ - 设置页导航栏同步主侧栏的展开宽度,修复默认宽度及拖拽调整后两处侧栏不一致的问题。
18
+ - 统一侧栏顶部与会话顶栏的 34px 控件带;折叠窄轨的顶部展开按钮改为 28px,并在折叠过渡中保持中心线对齐,其他窄轨导航按钮仍为 36px。
19
+ - 修复桌面端折叠侧栏后展开按钮不可见的问题(#34):Windows 标题栏通过宿主覆盖层保留展开入口,macOS 使用宿主窗口顶部插槽;设置页也能恢复侧栏,Web 窄轨保持原有行为。
20
+ - 补齐窗口覆盖层注册所需的唯一 ID,避免新增展开入口导致客户端插件激活失败;增加真实宿主注册器的启动与卸载检查。
21
+
7
22
  ## 1.1.26 - 2026-10-04
8
23
 
9
24
  - 修复动态壁纸或皮肤将背景令牌设为透明后,发送键箭头消失的问题。保留 Codex 黑白配色:浅色黑底白箭头,深色白底深色箭头,并同步适配悬停状态。
package/lib/client.js CHANGED
@@ -198,6 +198,167 @@ window.__ModuleLoader__.load({
198
198
  if ("selectPanel" in layout && typeof layout.selectPanel === "function") layout.selectPanel(id);
199
199
  }
200
200
  //#endregion
201
+ //#region src/client/navigation-history.ts
202
+ /** Follow host session selections without navigating the Electron document history. */
203
+ function createNavigationHistory(store, open) {
204
+ let entries = [];
205
+ let index = -1;
206
+ let pending;
207
+ let snapshot = {
208
+ canBack: false,
209
+ canForward: false
210
+ };
211
+ const listeners = /* @__PURE__ */ new Set();
212
+ const target = (direction) => {
213
+ for (let next = index + direction; next >= 0 && next < entries.length; next += direction) if (store.getSnapshot().byId?.[entries[next]] !== void 0) return next;
214
+ };
215
+ const update = () => {
216
+ const current = currentSessionId(store.getSnapshot());
217
+ if (current !== void 0 && pending !== void 0 && entries[pending] === current) {
218
+ index = pending;
219
+ pending = void 0;
220
+ } else if (current !== void 0 && entries[index] !== current) {
221
+ entries = entries.slice(0, index + 1);
222
+ entries.push(current);
223
+ index = entries.length - 1;
224
+ pending = void 0;
225
+ }
226
+ const next = {
227
+ canBack: target(-1) !== void 0,
228
+ canForward: target(1) !== void 0
229
+ };
230
+ if (next.canBack === snapshot.canBack && next.canForward === snapshot.canForward) return;
231
+ snapshot = next;
232
+ for (const listener of listeners) listener();
233
+ };
234
+ const navigate = (direction) => {
235
+ const next = target(direction);
236
+ if (next === void 0) return;
237
+ pending = next;
238
+ try {
239
+ if (!open(entries[next])) pending = void 0;
240
+ } catch (error) {
241
+ pending = void 0;
242
+ throw error;
243
+ }
244
+ update();
245
+ };
246
+ update();
247
+ const unsubscribe = store.subscribe(update);
248
+ return {
249
+ getSnapshot: () => snapshot,
250
+ subscribe: (listener) => {
251
+ listeners.add(listener);
252
+ return () => {
253
+ listeners.delete(listener);
254
+ };
255
+ },
256
+ back: () => {
257
+ navigate(-1);
258
+ },
259
+ forward: () => {
260
+ navigate(1);
261
+ },
262
+ dispose: () => {
263
+ unsubscribe();
264
+ listeners.clear();
265
+ }
266
+ };
267
+ }
268
+ //#endregion
269
+ //#region src/client/workspace-shortcuts.ts
270
+ function hasBindings(value) {
271
+ const state = value.hooks?.workspaceShortcuts;
272
+ return typeof state?.getSnapshot === "function" && typeof state.subscribe === "function" && typeof value.closeAddWorkspace === "function" && typeof value.setDirectoryBusy === "function" && typeof value.createWorkspace === "function";
273
+ }
274
+ /** Read the official, shadowed registration's public injected face; keep its command IDs and key bindings. */
275
+ function createWorkspaceShortcutSource(slots) {
276
+ let entry;
277
+ let bindings;
278
+ let lastSearch = 0;
279
+ let snapshot = {
280
+ searchRequest: 0,
281
+ addRequested: false
282
+ };
283
+ const listeners = /* @__PURE__ */ new Set();
284
+ let offState = () => {};
285
+ const publish = () => {
286
+ const state = bindings?.hooks.workspaceShortcuts.getSnapshot();
287
+ const searchRequest = snapshot.searchRequest + (state !== void 0 && state.searchRequest !== lastSearch ? 1 : 0);
288
+ lastSearch = state?.searchRequest ?? 0;
289
+ const addRequested = state?.addRequested ?? false;
290
+ if (snapshot.bindings === bindings && snapshot.searchRequest === searchRequest && snapshot.addRequested === addRequested) return;
291
+ snapshot = {
292
+ searchRequest,
293
+ addRequested,
294
+ bindings
295
+ };
296
+ for (const listener of listeners) listener();
297
+ };
298
+ const reconcile = () => {
299
+ const next = slots.entries("sidebar.workspaces").find((row) => row.locale === "workspace");
300
+ if (next === entry) return;
301
+ offState();
302
+ entry = next;
303
+ const injected = next?.inject?.();
304
+ bindings = injected && hasBindings(injected) ? injected : void 0;
305
+ lastSearch = bindings?.hooks.workspaceShortcuts.getSnapshot().searchRequest ?? 0;
306
+ offState = bindings?.hooks.workspaceShortcuts.subscribe(publish) ?? (() => {});
307
+ publish();
308
+ };
309
+ reconcile();
310
+ const offSlots = slots.subscribe("sidebar.workspaces", reconcile);
311
+ return {
312
+ getSnapshot: () => snapshot,
313
+ subscribe: (listener) => {
314
+ listeners.add(listener);
315
+ return () => {
316
+ listeners.delete(listener);
317
+ };
318
+ },
319
+ dispose: () => {
320
+ offSlots();
321
+ offState();
322
+ listeners.clear();
323
+ }
324
+ };
325
+ }
326
+ //#endregion
327
+ //#region src/client/workspace-directory-flow.ts
328
+ const WORKSPACE_DIRECTORY_FLOW = "sidebar.codex.directoryFlow";
329
+ /** Give the selected host picker an outlet owned by our sidebar, including while collapsed.
330
+ * Directory pickers have no children; preserve their injected face, locale and store.
331
+ * The registry has erased the original component's types, so only this forwarding boundary
332
+ * uses the erased registration signature. No host implementation or private state is imported.
333
+ */
334
+ function registerWorkspaceDirectoryFlow(ctx) {
335
+ ctx.slots.inject(WORKSPACE_DIRECTORY_FLOW, () => {
336
+ let entry;
337
+ let offEntry = () => {};
338
+ const register = ctx.slots.register.bind(ctx.slots);
339
+ const reconcile = () => {
340
+ const next = ctx.slots.entriesOfSlot("sidebar.workspaces.directoryFlow")[0];
341
+ if (next === entry) return;
342
+ offEntry();
343
+ offEntry = () => {};
344
+ entry = next;
345
+ if (!next || Object.keys(next.children ?? {}).length > 0) return;
346
+ offEntry = register({
347
+ name: WORKSPACE_DIRECTORY_FLOW,
348
+ inject: next.inject,
349
+ store: next.store,
350
+ locale: next.locale
351
+ }, next.component);
352
+ };
353
+ reconcile();
354
+ const off = ctx.slots.subscribe("sidebar.workspaces.directoryFlow", reconcile);
355
+ return () => {
356
+ off();
357
+ offEntry();
358
+ };
359
+ });
360
+ }
361
+ //#endregion
201
362
  //#region node_modules/.pnpm/lucide-react@1.39.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs
202
363
  /**
203
364
  * @license lucide-react v1.39.0 - ISC
@@ -2291,7 +2452,7 @@ window.__ModuleLoader__.load({
2291
2452
  const HEADER_PROJECT_TIP_EVENT = "dcu-header-project-tip";
2292
2453
  const HEADER_SESSION_MENU_EVENT = "dcu-header-session-menu";
2293
2454
  const CONVERSATION_HEADER_STYLE = `
2294
- header:has([data-dcu-inline-tabs]){box-sizing:border-box;display:flex;flex-wrap:nowrap;align-items:center;gap:10px;min-height:34px;padding-top:3px;padding-bottom:3px;border-bottom:0}
2455
+ 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}
2295
2456
  header:has([data-dcu-inline-tabs]):after{display:none;content:none}
2296
2457
  header:has([data-dcu-inline-tabs]) [class*="titleRow"],header:has([data-dcu-inline-tabs]) [class*="titleCluster"]{display:contents}
2297
2458
  header:has([data-dcu-inline-tabs]) [class*="crumbs"]{order:1;flex:0 1 auto;min-width:0}
@@ -6458,6 +6619,14 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
6458
6619
  if (marked !== null) return marked;
6459
6620
  for (const node of root.querySelectorAll("div")) if (parseSidebarGrid(node.style.gridTemplateColumns) !== void 0) return node;
6460
6621
  }
6622
+ /** Settings is portaled to body, so explicitly carry over the expanded width. */
6623
+ function settingsSidebarWidth(root) {
6624
+ const frame = findSidebarFrame(root);
6625
+ const expanded = Number.parseFloat(frame?.style.getPropertyValue("--dcu-sidebar-expanded-width") ?? "");
6626
+ if (Number.isFinite(expanded) && expanded >= 240) return expanded;
6627
+ const width = frame === void 0 ? void 0 : parseSidebarGrid(frame.style.gridTemplateColumns)?.sidebar;
6628
+ return width !== void 0 && width >= 240 ? width : 240;
6629
+ }
6461
6630
  /** 同步侧栏网格和拖拽柄,保证两者始终使用同一个可见宽度。 */
6462
6631
  function applySidebarWidth(frame, width) {
6463
6632
  const tracks = parseSidebarGrid(frame.style.gridTemplateColumns);
@@ -6474,10 +6643,18 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
6474
6643
  }
6475
6644
  /** 自动宽度调整与初始化过渡共用前置条件;手动拖拽不受此限制。 */
6476
6645
  function canApplySlimSidebar(frame) {
6477
- return !frame.hasAttribute("data-dragging") && !frame.hasAttribute("data-sidebar-collapsed") && parseSidebarGrid(frame.style.gridTemplateColumns) !== void 0;
6646
+ return !frame.hasAttribute("data-dragging") && parseSidebarGrid(frame.style.gridTemplateColumns) !== void 0;
6478
6647
  }
6479
6648
  function applySlimSidebar(frame) {
6480
6649
  if (!canApplySlimSidebar(frame)) return false;
6650
+ if (frame.hasAttribute("data-sidebar-collapsed")) {
6651
+ const tracks = parseSidebarGrid(frame.style.gridTemplateColumns);
6652
+ const next = `56px ${tracks.middle} ${tracks.details}`;
6653
+ const changed = frame.style.gridTemplateColumns !== next;
6654
+ if (changed) frame.style.gridTemplateColumns = next;
6655
+ if (frame.ownerDocument.documentElement.hasAttribute("data-windows-titlebar") && frame.style.getPropertyValue("--dsh-windows-sidebar-width") !== `56px`) frame.style.setProperty("--dsh-windows-sidebar-width", `56px`);
6656
+ return changed;
6657
+ }
6481
6658
  const initialized = frame.hasAttribute("data-dcu-codex-sidebar-initialized");
6482
6659
  const changed = applySidebarWidth(frame, initialized ? visibleSidebarWidths.get(frame) ?? 240 : 240);
6483
6660
  if (!initialized) frame.setAttribute("data-dcu-codex-sidebar-initialized", "");
@@ -6524,6 +6701,10 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
6524
6701
  if (frame === void 0 || !frame.isConnected) watchFrame(findSidebarFrame(document));
6525
6702
  if (frame !== void 0) {
6526
6703
  if (!canApplySlimSidebar(frame)) return;
6704
+ if (frame.hasAttribute("data-sidebar-collapsed")) {
6705
+ applySlimSidebar(frame);
6706
+ return;
6707
+ }
6527
6708
  const restoreTransition = frame.hasAttribute("data-dcu-codex-sidebar-initialized") ? void 0 : pauseInitialSidebarTransition(frame);
6528
6709
  const changed = applySlimSidebar(frame);
6529
6710
  if (restoreTransition !== void 0) {
@@ -6554,6 +6735,14 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
6554
6735
  observer.disconnect();
6555
6736
  frameObserver?.disconnect();
6556
6737
  if (pending !== void 0) window.cancelAnimationFrame(pending);
6738
+ const html = document.documentElement;
6739
+ if (frame?.hasAttribute("data-sidebar-collapsed") && (html.hasAttribute("data-windows-titlebar") || html.dataset.platform === "darwin")) {
6740
+ const tracks = parseSidebarGrid(frame.style.gridTemplateColumns);
6741
+ if (tracks?.sidebar === 56) {
6742
+ frame.style.gridTemplateColumns = `0px ${tracks.middle} ${tracks.details}`;
6743
+ if (html.hasAttribute("data-windows-titlebar")) frame.style.setProperty("--dsh-windows-sidebar-width", "0px");
6744
+ }
6745
+ }
6557
6746
  };
6558
6747
  }
6559
6748
  //#endregion
@@ -6806,6 +6995,162 @@ body[data-ds-dark-theme] [data-conversation-scroll] [data-trigger-menu]{backgrou
6806
6995
  };
6807
6996
  }
6808
6997
  //#endregion
6998
+ //#region src/client/DesktopNavigationControls.tsx
6999
+ const DESKTOP_NAVIGATION_CONTROLS_STYLE = `
7000
+ .dcu-desktop-navigation{display:none}
7001
+ html[data-windows-titlebar] .dcu-desktop-navigation{display:flex;position:fixed;left:12px;top:calc((var(--dsh-windows-titlebar-height,40px) - 28px)/2);gap:8px;z-index:30;-webkit-app-region:no-drag}
7002
+ .dcu-desktop-navigation button{appearance:none;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--dsw-alias-label-secondary);cursor:pointer;-webkit-app-region:no-drag}
7003
+ .dcu-desktop-navigation button:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}
7004
+ .dcu-desktop-navigation button:disabled{opacity:.35;cursor:default}
7005
+ .dcu-desktop-navigation button:focus-visible{outline:2px solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}
7006
+ html[data-windows-titlebar]:not([data-fullscreen]):has(.dcu-desktop-navigation){--dsh-windows-menu-start:84px}
7007
+ html[data-windows-titlebar][data-fullscreen] .dcu-desktop-navigation{display:none}
7008
+ `;
7009
+ function DesktopNavigationControls({ history, t }) {
7010
+ const state = (0, react.useSyncExternalStore)(history.subscribe, history.getSnapshot, history.getSnapshot);
7011
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
7012
+ className: "dcu-desktop-navigation",
7013
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("style", { children: DESKTOP_NAVIGATION_CONTROLS_STYLE }), ["back", "forward"].map((direction) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
7014
+ type: "button",
7015
+ "aria-label": t(`navigation.${direction}`),
7016
+ title: t(`navigation.${direction}`),
7017
+ disabled: direction === "back" ? !state.canBack : !state.canForward,
7018
+ onClick: history[direction],
7019
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
7020
+ width: "16",
7021
+ height: "16",
7022
+ viewBox: "0 0 16 16",
7023
+ fill: "none",
7024
+ "aria-hidden": "true",
7025
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
7026
+ d: direction === "back" ? "M13 8H3m0 0 4-4M3 8l4 4" : "M3 8h10m0 0-4-4m4 4-4 4",
7027
+ stroke: "currentColor",
7028
+ strokeWidth: "1.5",
7029
+ strokeLinecap: "round",
7030
+ strokeLinejoin: "round"
7031
+ })
7032
+ })
7033
+ }, direction))]
7034
+ });
7035
+ }
7036
+ //#endregion
7037
+ //#region src/client/WorkspaceShortcutBridge.tsx
7038
+ function WorkspaceShortcutBridge({ source, openSearch, startSession, renderDirectoryFlow, t }) {
7039
+ const { searchRequest, addRequested, bindings } = (0, react.useSyncExternalStore)(source.subscribe, source.getSnapshot, source.getSnapshot);
7040
+ const seenSearch = (0, react.useRef)(searchRequest);
7041
+ const openSearchRef = (0, react.useRef)(openSearch);
7042
+ openSearchRef.current = openSearch;
7043
+ const [busy, setBusy] = (0, react.useState)(false);
7044
+ const [error, setError] = (0, react.useState)();
7045
+ const mounted = (0, react.useRef)(true);
7046
+ const pending = (0, react.useRef)(false);
7047
+ const pickedPath = (0, react.useRef)(void 0);
7048
+ const currentBindings = (0, react.useRef)(bindings);
7049
+ currentBindings.current = bindings;
7050
+ (0, react.useEffect)(() => {
7051
+ mounted.current = true;
7052
+ return () => {
7053
+ mounted.current = false;
7054
+ };
7055
+ }, []);
7056
+ (0, react.useEffect)(() => {
7057
+ pending.current = false;
7058
+ pickedPath.current = void 0;
7059
+ setBusy(false);
7060
+ setError(void 0);
7061
+ }, [bindings]);
7062
+ (0, react.useEffect)(() => {
7063
+ if (searchRequest === seenSearch.current) return;
7064
+ seenSearch.current = searchRequest;
7065
+ bindings?.closeAddWorkspace();
7066
+ openSearchRef.current();
7067
+ }, [searchRequest, bindings]);
7068
+ (0, react.useEffect)(() => {
7069
+ bindings?.setDirectoryBusy(addRequested || busy || error !== void 0);
7070
+ return () => {
7071
+ bindings?.setDirectoryBusy(false);
7072
+ };
7073
+ }, [
7074
+ bindings,
7075
+ addRequested,
7076
+ busy,
7077
+ error
7078
+ ]);
7079
+ const fail = (message) => {
7080
+ bindings?.closeAddWorkspace();
7081
+ setError(message);
7082
+ };
7083
+ const isCurrent = () => mounted.current && source.getSnapshot().bindings === bindings && currentBindings.current === bindings;
7084
+ const pick = (path) => {
7085
+ if (!bindings || pending.current) return;
7086
+ pickedPath.current = path;
7087
+ pending.current = true;
7088
+ setError(void 0);
7089
+ setBusy(true);
7090
+ bindings.createWorkspace({ path }).then((workspace) => {
7091
+ if (!isCurrent()) return;
7092
+ bindings.closeAddWorkspace();
7093
+ startSession(workspace.workspaceId);
7094
+ }).catch((reason) => {
7095
+ if (isCurrent()) fail(reason instanceof Error ? reason.message : String(reason));
7096
+ }).finally(() => {
7097
+ if (isCurrent()) {
7098
+ pending.current = false;
7099
+ setBusy(false);
7100
+ }
7101
+ });
7102
+ };
7103
+ const chooseAgain = () => {
7104
+ setError(void 0);
7105
+ pickedPath.current = void 0;
7106
+ bindings?.setDirectoryBusy(false);
7107
+ bindings?.requestAddWorkspace?.();
7108
+ };
7109
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [renderDirectoryFlow({
7110
+ open: addRequested,
7111
+ busy,
7112
+ onCancel: () => {
7113
+ bindings?.closeAddWorkspace();
7114
+ },
7115
+ onError: (message) => {
7116
+ pickedPath.current = void 0;
7117
+ fail(message);
7118
+ },
7119
+ onPicked: pick
7120
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
7121
+ open: error !== void 0,
7122
+ onClose: () => {
7123
+ setError(void 0);
7124
+ },
7125
+ title: t("workspace.addFailed"),
7126
+ closeLabel: t("sessions.close"),
7127
+ footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
7128
+ pickedPath.current !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
7129
+ disabled: busy,
7130
+ onClick: () => {
7131
+ pick(pickedPath.current);
7132
+ },
7133
+ children: t("workspace.retry")
7134
+ }),
7135
+ bindings?.requestAddWorkspace && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
7136
+ disabled: busy,
7137
+ onClick: chooseAgain,
7138
+ children: t("workspace.chooseAgain")
7139
+ }),
7140
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
7141
+ onClick: () => {
7142
+ setError(void 0);
7143
+ },
7144
+ children: t("sessions.close")
7145
+ })
7146
+ ] }),
7147
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
7148
+ role: "alert",
7149
+ children: error
7150
+ })
7151
+ })] });
7152
+ }
7153
+ //#endregion
6809
7154
  //#region src/client/NewConversationSuggestions.tsx
6810
7155
  const categories = [
6811
7156
  {
@@ -6981,21 +7326,21 @@ body[data-ds-dark-theme] [data-conversation-scroll] [data-trigger-menu]{backgrou
6981
7326
  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}}
6982
7327
  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}
6983
7328
  .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);pointer-events:none}.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}}
6984
- .dcu-root *{box-sizing:border-box}.dcu-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:8px;height:60px;padding:8px 8px 8px 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}
7329
+ .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}
6985
7330
  .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}
6986
7331
  .dcu-icon:hover,.dcu-menu button:hover:not(:disabled),.dcu-footer-link:hover{background:var(--dcu-sidebar-hover);color:var(--dcu-sidebar-primary)}
6987
7332
  .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}
6988
7333
  .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)}
6989
7334
  .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:minmax(0,1fr);min-height:32px;color:var(--dcu-sidebar-secondary);font-size:13px;font-weight:400}.dcu-extension-items .dcu-menu-icon{display:none}
6990
- .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;gap:16px;margin:0 8px 12px;padding:0;border-bottom:1px solid var(--dcu-sidebar-border)}.dcu-im-tab{appearance:none;border:0;background:transparent;color:var(--dcu-sidebar-secondary);padding:8px 0 7px;font:14px/22px var(--dsw-font-family);font-weight:500;cursor:pointer}.dcu-im-tab[data-on=true]{color:var(--dcu-sidebar-primary);font-weight:600;box-shadow:inset 0 -2px 0 currentColor}.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]{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;min-height:30px;margin:0 8px 8px;padding:2px;border:1px solid var(--dcu-sidebar-border);border-radius:8px;background:rgba(255,255,255,.025)}.dcu-schedule-views button{appearance:none;flex:1;min-width:0;height:24px;border:0;border-radius:6px;background:transparent;color:var(--dcu-sidebar-secondary);font:600 12px/18px var(--dsw-font-family);cursor:pointer}.dcu-schedule-views button[aria-selected=true]{background:var(--dcu-sidebar-hover);color:var(--dcu-sidebar-primary);box-shadow:inset 0 0 0 1px var(--dcu-sidebar-border)}.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>[data-slot="sidebar.schedule"]>.dsh-st-rail{width:100%;min-width:0;padding-right:8px;scrollbar-gutter:auto}.dcu-schedule-pane .dsh-st-overview{padding-right:8px}.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>button{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:10px 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>button{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>button 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}
7335
+ .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;gap:16px;margin:0 8px 12px;padding:0;border-bottom:1px solid var(--dcu-sidebar-border)}.dcu-im-tab{appearance:none;border:0;background:transparent;color:var(--dcu-sidebar-secondary);padding:8px 0 7px;font:14px/22px var(--dsw-font-family);font-weight:500;cursor:pointer}.dcu-im-tab[data-on=true]{color:var(--dcu-sidebar-primary);font-weight:600;box-shadow:inset 0 -2px 0 currentColor}.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]{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;min-height:30px;margin:0 8px 8px;padding:2px;border:1px solid var(--dcu-sidebar-border);border-radius:8px;background:rgba(255,255,255,.025)}.dcu-schedule-views button{appearance:none;flex:1;min-width:0;height:24px;border:0;border-radius:6px;background:transparent;color:var(--dcu-sidebar-secondary);font:600 12px/18px var(--dsw-font-family);cursor:pointer}.dcu-schedule-views button[aria-selected=true]{background:var(--dcu-sidebar-hover);color:var(--dcu-sidebar-primary);box-shadow:inset 0 0 0 1px var(--dcu-sidebar-border)}.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>[data-slot="sidebar.schedule"]>.dsh-st-rail{width:100%;min-width:0;padding-right:8px;scrollbar-gutter:auto}.dcu-schedule-pane .dsh-st-overview{padding-right:8px}.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>button{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>button{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>button 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}
6991
7336
  .dcu-settings-seat [data-slot="settings.trigger"]{color:var(--dcu-sidebar-navigation)}
6992
7337
  .dcu-settings-seat [data-slot="settings.trigger"]>svg{color:var(--dcu-sidebar-icon)}
6993
7338
  /* 宿主列负责缩放,宽态内容保持展开宽度,避免中文竖排与工作区逐帧重排。 */
6994
7339
  .dcu-expanded-shell,.dcu-root:not(.dcu-compact)>.dcu-foot{width:var(--dcu-sidebar-expanded-width,240px);flex-shrink:0}
6995
7340
  /* 对齐 Codex 的半秒布局节奏;显式声明避免依赖宿主主题的动画 token。 */
6996
7341
  .dcu-root{position:relative}
6997
- .dcu-root.dcu-collapsing .dcu-compact-shell{position:absolute;left:0;top:10px;bottom:8px;display:flex;flex-direction:column;align-items:center;animation:dcu-sidebar-compact-in 500ms cubic-bezier(.16,1,.3,1)}
6998
- .dcu-root.dcu-collapsing .dcu-compact-shell .dcu-icon{width:36px;height:36px;flex:none}
7342
+ .dcu-root.dcu-collapsing .dcu-compact-shell{position:absolute;left:0;top:calc((var(--dcu-header-height,34px) - 28px)/2);bottom:8px;display:flex;flex-direction:column;align-items:center;animation:dcu-sidebar-compact-in 500ms cubic-bezier(.16,1,.3,1)}
7343
+ .dcu-root.dcu-collapsing .dcu-compact-shell .dcu-icon{width:36px;height:36px;flex:none}.dcu-root .dcu-compact-shell>.dcu-icon,.dcu-root.dcu-collapsing .dcu-compact-shell>.dcu-icon{width:28px;height:28px;flex:none;margin:0;padding:0;border-radius:50%}
6999
7344
  /* 收尾仅移除宽态层,窄轨不重复淡入,否则会在半秒处闪烁。 */
7000
7345
  .dcu-root.dcu-compact .dcu-compact-shell{animation:none}
7001
7346
  [data-dcu-codex-sidebar-initialized]{transition:grid-template-columns 500ms cubic-bezier(.16,1,.3,1)}
@@ -7351,7 +7696,7 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
7351
7696
  });
7352
7697
  });
7353
7698
  /** Codex 风格的 DSH 侧栏,只替换导航外观,项目浏览和设置仍由 DSH 官方组件提供。 */
7354
- function CodexSidebar({ 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 }) {
7699
+ 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 }) {
7355
7700
  const panels = (0, react.useSyncExternalStore)(globalPanels?.subscribe ?? subscribeEmptyCompanionTabs, globalPanels?.getSnapshot ?? getEmptyPanels, globalPanels?.getSnapshot ?? getEmptyPanels);
7356
7701
  const visibleFooterActions = (0, react.useSyncExternalStore)(footerActions?.subscribe ?? subscribeEmptyCompanionTabs, footerActions?.getSnapshot ?? getEmptyFooterActions, footerActions?.getSnapshot ?? getEmptyFooterActions);
7357
7702
  const activePanelId = usePanelInfo((info) => info.activePanelId);
@@ -7372,6 +7717,10 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
7372
7717
  const [collapsing, setCollapsing] = (0, react.useState)(false);
7373
7718
  const settingsSeat = (0, react.useRef)(null);
7374
7719
  const search = (0, react.useRef)(null);
7720
+ const openSearch = () => {
7721
+ workspaceShortcuts?.getSnapshot().bindings?.closeAddWorkspace();
7722
+ search.current?.open();
7723
+ };
7375
7724
  const toggleSidebarRef = (0, react.useRef)(toggleSidebar);
7376
7725
  toggleSidebarRef.current = toggleSidebar;
7377
7726
  const expandSidebar = (0, react.useCallback)(() => {
@@ -7550,6 +7899,10 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
7550
7899
  "aria-label": t("sidebar.label"),
7551
7900
  children: [
7552
7901
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("style", { children: stylesheet$3 }),
7902
+ navigationHistory && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DesktopNavigationControls, {
7903
+ history: navigationHistory,
7904
+ t
7905
+ }),
7553
7906
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("style", { children: NEW_CONVERSATION_STYLE }),
7554
7907
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("style", { children: COMPOSER_TOOL_MENU_STYLE }),
7555
7908
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(NewConversationSuggestions, {
@@ -7582,9 +7935,7 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
7582
7935
  type: "button",
7583
7936
  className: "dcu-icon",
7584
7937
  "aria-label": t("sidebar.search"),
7585
- onClick: () => {
7586
- search.current?.open();
7587
- },
7938
+ onClick: openSearch,
7588
7939
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconSearchOutlineMedium, { size: 16 })
7589
7940
  })]
7590
7941
  })]
@@ -7792,9 +8143,7 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
7792
8143
  type: "button",
7793
8144
  className: "dcu-icon",
7794
8145
  "aria-label": t("sidebar.search"),
7795
- onClick: () => {
7796
- search.current?.open();
7797
- },
8146
+ onClick: openSearch,
7798
8147
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconSearchOutlineMedium, { size: 16 })
7799
8148
  }),
7800
8149
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
@@ -7873,6 +8222,15 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
7873
8222
  t,
7874
8223
  useSessions,
7875
8224
  useWorkspaces
8225
+ }),
8226
+ workspaceShortcuts && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WorkspaceShortcutBridge, {
8227
+ source: workspaceShortcuts,
8228
+ openSearch,
8229
+ startSession: (id) => {
8230
+ startSession(id);
8231
+ },
8232
+ renderDirectoryFlow: (owner) => renderSlot("sidebar.codex.directoryFlow", owner),
8233
+ t
7876
8234
  })
7877
8235
  ]
7878
8236
  });
@@ -8515,6 +8873,11 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
8515
8873
  /** 本插件独占的界面文案命名空间。 */
8516
8874
  const NS = "michengai.codexUi";
8517
8875
  const zh = {
8876
+ "workspace.addFailed": "无法添加工作区",
8877
+ "workspace.retry": "重试",
8878
+ "workspace.chooseAgain": "重新选择",
8879
+ "navigation.back": "后退",
8880
+ "navigation.forward": "前进",
8518
8881
  "home.resizeInput": "拖动调整输入区宽度",
8519
8882
  "home.projectSearch": "搜索项目",
8520
8883
  "home.projectEmpty": "没有匹配的项目",
@@ -8799,6 +9162,11 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
8799
9162
  "meta.locale": "zh-CN"
8800
9163
  };
8801
9164
  const en = {
9165
+ "workspace.addFailed": "Could not add workspace",
9166
+ "workspace.retry": "Retry",
9167
+ "workspace.chooseAgain": "Choose again",
9168
+ "navigation.back": "Back",
9169
+ "navigation.forward": "Forward",
8802
9170
  "home.resizeInput": "Drag to resize the input area",
8803
9171
  "home.projectSearch": "Search projects",
8804
9172
  "home.projectEmpty": "No matching projects",
@@ -9432,7 +9800,7 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
9432
9800
  //#region src/client/settings-page-styles.ts
9433
9801
  /** Codex 设置页的局部 tokens 与布局,不覆盖宿主其他弹窗。 */
9434
9802
  const settingsPageStyles = `
9435
- .dcu-settings-page{--sp-bg:#fff;--sp-nav:var(--dcu-sidebar-background,#eef7f5);--sp-card:#fafafa;--sp-border:#e5e5e5;--sp-text:#303030;--sp-muted:#737373;--sp-hover:#e9e9e9;--sp-active:#e4e4e4;position:fixed;inset:0;z-index:1000;display:grid;grid-template-columns:clamp(240px,var(--dcu-sidebar-expanded-width,275px),min(520px,calc(100vw - 320px))) minmax(0,1fr);background:var(--sp-bg);color:var(--sp-text);font:14px/1.5 var(--dsw-font-family);text-align:left;isolation:isolate}
9803
+ .dcu-settings-page{--sp-bg:#fff;--sp-nav:var(--dcu-sidebar-background,#eef7f5);--sp-card:#fafafa;--sp-border:#e5e5e5;--sp-text:#303030;--sp-muted:#737373;--sp-hover:#e9e9e9;--sp-active:#e4e4e4;position:fixed;inset:0;z-index:1000;display:grid;grid-template-columns:clamp(240px,var(--dcu-sidebar-expanded-width,240px),min(520px,calc(100vw - 320px))) minmax(0,1fr);background:var(--sp-bg);color:var(--sp-text);font:14px/1.5 var(--dsw-font-family);text-align:left;isolation:isolate}
9436
9804
  body[data-ds-dark-theme] .dcu-settings-page{--sp-bg:#181818;--sp-nav:var(--dcu-sidebar-background,#1d2120);--sp-card:#232323;--sp-border:#333;--sp-text:#dedede;--sp-muted:#a1a1a1;--sp-hover:#292c2b;--sp-active:#303332;color-scheme:dark}
9437
9805
  .dcu-settings-page *{box-sizing:border-box}
9438
9806
  .dcu-settings-page button,.dcu-settings-page input{font:inherit}
@@ -9632,6 +10000,9 @@ html[data-dsh-native-backdrop=mica] .dcu-settings-page,html[data-dsh-native-back
9632
10000
  (0, react.useEffect)(() => () => {
9633
10001
  exitAnimation.current?.cancel();
9634
10002
  }, []);
10003
+ (0, react.useLayoutEffect)(() => {
10004
+ if (open && page.current !== null) page.current.style.setProperty("--dcu-sidebar-expanded-width", `${settingsSidebarWidth(document)}px`);
10005
+ }, [open]);
9635
10006
  (0, react.useEffect)(() => {
9636
10007
  if (!onboardingActive) setCompleted(/* @__PURE__ */ new Set());
9637
10008
  }, [onboardingActive]);
@@ -10827,6 +11198,15 @@ html[data-dsh-native-backdrop=mica] .dcu-settings-page,html[data-dsh-native-back
10827
11198
  const companionSlots = createCompanionTabSource(ctx.slots);
10828
11199
  const globalPanels = createGlobalPanelSource(ctx.slots, ctx.locale);
10829
11200
  const footerActions = createFooterActionSource(ctx.slots);
11201
+ const navigationHistory = createNavigationHistory(ctx.sessions.list, (id) => openConversation(ctx, ctx.layout, id));
11202
+ ctx.effect(() => () => {
11203
+ navigationHistory.dispose();
11204
+ }, "michengai-codex-ui: navigation history");
11205
+ const workspaceShortcuts = createWorkspaceShortcutSource(ctx.slots);
11206
+ ctx.effect(() => () => {
11207
+ workspaceShortcuts.dispose();
11208
+ }, "michengai-codex-ui: workspace shortcuts");
11209
+ registerWorkspaceDirectoryFlow(ctx);
10830
11210
  ctx.slots.inject("sidebar", () => ctx.slots.register({
10831
11211
  name: "sidebar",
10832
11212
  registrant: "michengai-codex-ui",
@@ -10840,6 +11220,10 @@ html[data-dsh-native-backdrop=mica] .dcu-settings-page,html[data-dsh-native-back
10840
11220
  kind: "single",
10841
11221
  scope: "root"
10842
11222
  },
11223
+ [WORKSPACE_DIRECTORY_FLOW]: {
11224
+ kind: "single",
11225
+ scope: "root"
11226
+ },
10843
11227
  "sidebar.settings": {
10844
11228
  kind: "single",
10845
11229
  scope: "root"
@@ -10859,6 +11243,8 @@ html[data-dsh-native-backdrop=mica] .dcu-settings-page,html[data-dsh-native-back
10859
11243
  },
10860
11244
  inject: () => ({
10861
11245
  newConversationDraft,
11246
+ navigationHistory,
11247
+ workspaceShortcuts,
10862
11248
  prefillNewConversation: (text) => {
10863
11249
  const id = currentSessionId(ctx.sessions.list.getSnapshot());
10864
11250
  const binding = id === void 0 ? void 0 : ctx.sessions.binding(id);
@@ -1,5 +1,10 @@
1
1
  //#region src/client/locales.ts
2
2
  const zh = {
3
+ "workspace.addFailed": "无法添加工作区",
4
+ "workspace.retry": "重试",
5
+ "workspace.chooseAgain": "重新选择",
6
+ "navigation.back": "后退",
7
+ "navigation.forward": "前进",
3
8
  "home.resizeInput": "拖动调整输入区宽度",
4
9
  "home.projectSearch": "搜索项目",
5
10
  "home.projectEmpty": "没有匹配的项目",
@@ -284,6 +289,11 @@ const zh = {
284
289
  "meta.locale": "zh-CN"
285
290
  };
286
291
  const en = {
292
+ "workspace.addFailed": "Could not add workspace",
293
+ "workspace.retry": "Retry",
294
+ "workspace.chooseAgain": "Choose again",
295
+ "navigation.back": "Back",
296
+ "navigation.forward": "Forward",
287
297
  "home.resizeInput": "Drag to resize the input area",
288
298
  "home.projectSearch": "Search projects",
289
299
  "home.projectEmpty": "No matching projects",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@michengai/dsh-codex-ui",
3
- "version": "1.1.26",
3
+ "version": "1.1.28",
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": {
@@ -69,7 +69,7 @@
69
69
  "test": "pnpm run typecheck && vitest run && tsdown && node tests/run-assertions.mjs && pnpm run test:layout",
70
70
  "test:host": "node scripts/verify-settings-exit.mjs",
71
71
  "test:settings-backdrop": "node scripts/verify-settings-backdrop.mjs",
72
- "test:layout": "node scripts/verify-workspace-drop-layout.mjs --run && node scripts/verify-sidebar-transition.mjs && node scripts/verify-composer-style.mjs && node scripts/verify-new-conversation.mjs && node scripts/verify-composer-tools.mjs && node scripts/verify-hero-width.mjs && node scripts/verify-settings-backdrop.mjs && node scripts/verify-upstream-style-regressions.mjs",
72
+ "test:layout": "node scripts/verify-workspace-drop-layout.mjs --run && node scripts/verify-sidebar-transition.mjs && node scripts/verify-sidebar-expand-control.mjs && node scripts/verify-composer-style.mjs && node scripts/verify-new-conversation.mjs && node scripts/verify-composer-tools.mjs && node scripts/verify-hero-width.mjs && node scripts/verify-settings-backdrop.mjs && node scripts/verify-upstream-style-regressions.mjs",
73
73
  "test:compat": "node scripts/run-compat-host.mjs"
74
74
  },
75
75
  "peerDependencies": {