@huanlin/dsh-plugin-ya-workspace-sidebar 0.2.0 → 0.3.1
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/README.md +3 -3
- package/lib/client.js +134 -8
- package/lib/client.js.map +1 -1
- package/lib/index.js +72 -3
- package/lib/types/client/locales.d.ts +14 -2
- package/lib/types/client/model.d.ts +0 -2
- package/lib/types/client/settings.d.ts +20 -0
- package/lib/types/client/styles.d.ts +1 -1
- package/lib/types/index.d.ts +2 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://dshfind.com/zh/plugins/huanlinoto/dsh-plugin-ya-workspace-sidebar"><img src="https://dshfind.com/api/card/huanlinoto/dsh-plugin-ya-workspace-sidebar?lang=zh" alt="dsh-plugin-ya-workspace-sidebar card"></a>
|
|
3
|
+
</p>
|
|
4
4
|
|
|
5
5
|
# ya-workspace-sidebar
|
|
6
6
|
|
package/lib/client.js
CHANGED
|
@@ -15,7 +15,6 @@ window.__ModuleLoader__.load({
|
|
|
15
15
|
recent: "最近会话",
|
|
16
16
|
ungrouped: "未分组",
|
|
17
17
|
newSession: "新会话",
|
|
18
|
-
untitled: "未命名会话",
|
|
19
18
|
addWorkspace: "添加工作区",
|
|
20
19
|
addWorkspaceMenu: "添加工作区…",
|
|
21
20
|
search: "搜索会话",
|
|
@@ -34,6 +33,13 @@ window.__ModuleLoader__.load({
|
|
|
34
33
|
deleteDescription: "将把“{name}”从工作区列表中移除。文件夹与会话记录会保留。",
|
|
35
34
|
fork: "分叉会话",
|
|
36
35
|
archive: "归档会话",
|
|
36
|
+
archiveMode: "归档模式",
|
|
37
|
+
deleteMode: "删除模式",
|
|
38
|
+
deleteSession: "删除会话",
|
|
39
|
+
deleteSessionTitle: "删除会话",
|
|
40
|
+
deleteSessionConfirm: "确定要删除此会话吗?删除后将从列表中移除,此操作不可撤销。",
|
|
41
|
+
toggleActionMode: "切换归档/删除模式",
|
|
42
|
+
actionModeLabel: "会话操作",
|
|
37
43
|
cancel: "取消",
|
|
38
44
|
confirm: "确认",
|
|
39
45
|
retry: "重新选择",
|
|
@@ -63,7 +69,6 @@ window.__ModuleLoader__.load({
|
|
|
63
69
|
recent: "Recent Sessions",
|
|
64
70
|
ungrouped: "Ungrouped",
|
|
65
71
|
newSession: "New Session",
|
|
66
|
-
untitled: "Untitled session",
|
|
67
72
|
addWorkspace: "Add workspace",
|
|
68
73
|
addWorkspaceMenu: "Add workspace…",
|
|
69
74
|
search: "Search sessions",
|
|
@@ -82,6 +87,13 @@ window.__ModuleLoader__.load({
|
|
|
82
87
|
deleteDescription: "This removes “{name}” from the workspace list. The folder and session logs remain.",
|
|
83
88
|
fork: "Fork session",
|
|
84
89
|
archive: "Archive session",
|
|
90
|
+
archiveMode: "Archive mode",
|
|
91
|
+
deleteMode: "Delete mode",
|
|
92
|
+
deleteSession: "Delete session",
|
|
93
|
+
deleteSessionTitle: "Delete session",
|
|
94
|
+
deleteSessionConfirm: "Are you sure you want to delete this session? It will be removed from the list. This cannot be undone.",
|
|
95
|
+
toggleActionMode: "Toggle archive/delete mode",
|
|
96
|
+
actionModeLabel: "Session action",
|
|
85
97
|
cancel: "Cancel",
|
|
86
98
|
confirm: "Confirm",
|
|
87
99
|
retry: "Choose again",
|
|
@@ -159,6 +171,8 @@ button.ya-crumb:hover { background:var(--dsw-alias-interactive-bg-hover); color:
|
|
|
159
171
|
.ya-rail .ya-search { justify-content:center; }
|
|
160
172
|
.ya-rail .ya-search-icon { cursor:pointer; color:var(--dsw-alias-label-primary); }
|
|
161
173
|
.ya-picker-error { color:var(--dsw-alias-status-error); white-space:pre-wrap; }
|
|
174
|
+
.ya-action-mode-toggle.ya-action-mode-delete { color:var(--dsw-alias-state-error-primary); }
|
|
175
|
+
.ya-action-mode-toggle.ya-action-mode-delete:hover { background:var(--dsw-alias-interactive-bg-hover-danger); }
|
|
162
176
|
@keyframes ya-slide-in-forward { from { opacity:0; transform:translateX(10px); } to { opacity:1; transform:translateX(0); } }
|
|
163
177
|
@keyframes ya-slide-in-backward { from { opacity:0; transform:translateX(-10px); } to { opacity:1; transform:translateX(0); } }
|
|
164
178
|
.ya-level-enter-forward { animation:ya-slide-in-forward 180ms ease-out; }
|
|
@@ -314,7 +328,6 @@ button.ya-crumb:hover { background:var(--dsw-alias-interactive-bg-hover); color:
|
|
|
314
328
|
return {
|
|
315
329
|
id: summary.id,
|
|
316
330
|
title: summary.blank ? "New Session" : summary.displayTitle,
|
|
317
|
-
hasTitle: summary.title !== void 0,
|
|
318
331
|
blank: summary.blank,
|
|
319
332
|
running: summary.running,
|
|
320
333
|
...summary.pendingInteraction === void 0 ? {} : { pendingInteraction: summary.pendingInteraction },
|
|
@@ -458,6 +471,43 @@ button.ya-crumb:hover { background:var(--dsw-alias-interactive-bg-hover); color:
|
|
|
458
471
|
return rows.filter((row) => `${row.title}\n${row.workspaceTitle}`.toLocaleLowerCase().includes(normalized));
|
|
459
472
|
}
|
|
460
473
|
//#endregion
|
|
474
|
+
//#region src/client/settings.ts
|
|
475
|
+
const STORAGE_KEY = "ya-workspace-sidebar:action-mode";
|
|
476
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
477
|
+
let currentMode = loadMode();
|
|
478
|
+
/** Read the stored preference, falling back to `archive` on any failure. */
|
|
479
|
+
function loadMode() {
|
|
480
|
+
try {
|
|
481
|
+
return window.localStorage.getItem(STORAGE_KEY) === "delete" ? "delete" : "archive";
|
|
482
|
+
} catch {
|
|
483
|
+
return "archive";
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
/** Persist the preference; silently ignores quota or privacy-mode failures. */
|
|
487
|
+
function persistMode(mode) {
|
|
488
|
+
try {
|
|
489
|
+
window.localStorage.setItem(STORAGE_KEY, mode);
|
|
490
|
+
} catch {}
|
|
491
|
+
}
|
|
492
|
+
/** Current action mode snapshot. */
|
|
493
|
+
function getActionMode() {
|
|
494
|
+
return currentMode;
|
|
495
|
+
}
|
|
496
|
+
/** Switch the action mode and notify subscribers. */
|
|
497
|
+
function setActionMode(mode) {
|
|
498
|
+
if (mode === currentMode) return;
|
|
499
|
+
currentMode = mode;
|
|
500
|
+
persistMode(mode);
|
|
501
|
+
for (const listener of [...listeners]) listener();
|
|
502
|
+
}
|
|
503
|
+
/** Subscribe to action mode changes; returns an unsubscribe disposer. */
|
|
504
|
+
function subscribeActionMode(listener) {
|
|
505
|
+
listeners.add(listener);
|
|
506
|
+
return () => {
|
|
507
|
+
listeners.delete(listener);
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
//#endregion
|
|
461
511
|
//#region src/client/WorkspaceSidebar.tsx
|
|
462
512
|
/** Two-level workspace/session browser with a persistent global recent block. */
|
|
463
513
|
const SEARCH_DEBOUNCE_MS = 250;
|
|
@@ -499,9 +549,12 @@ button.ya-crumb:hover { background:var(--dsw-alias-interactive-bg-hover); color:
|
|
|
499
549
|
if (row.completed) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: "done" });
|
|
500
550
|
return null;
|
|
501
551
|
}
|
|
502
|
-
function SessionItem({ row, current, now, open, rename, fork, archive, t, context }) {
|
|
552
|
+
function SessionItem({ row, current, now, open, rename, fork, archive, t, context, actionMode }) {
|
|
503
553
|
const [menuOpen, setMenuOpen] = (0, react.useState)(false);
|
|
504
|
-
const title = row.blank ? t("newSession") : row.
|
|
554
|
+
const title = row.blank ? t("newSession") : row.title;
|
|
555
|
+
const isDelete = actionMode === "delete";
|
|
556
|
+
const actionLabel = isDelete ? t("deleteSession") : t("archive");
|
|
557
|
+
const actionIcon = isDelete ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconTrashOutline16, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconArchiveOutline20, { size: 16 });
|
|
505
558
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
506
559
|
className: `ya-row${row.id === current ? " ya-selected" : ""}${menuOpen ? " ya-menu-open" : ""}`,
|
|
507
560
|
role: "treeitem",
|
|
@@ -550,8 +603,9 @@ button.ya-crumb:hover { background:var(--dsw-alias-interactive-bg-hover); color:
|
|
|
550
603
|
},
|
|
551
604
|
{
|
|
552
605
|
id: "archive",
|
|
553
|
-
label:
|
|
554
|
-
icon:
|
|
606
|
+
label: actionLabel,
|
|
607
|
+
icon: actionIcon,
|
|
608
|
+
danger: isDelete
|
|
555
609
|
}
|
|
556
610
|
],
|
|
557
611
|
onSelect: (id) => {
|
|
@@ -772,6 +826,9 @@ button.ya-crumb:hover { background:var(--dsw-alias-interactive-bg-hover); color:
|
|
|
772
826
|
const [renameError, setRenameError] = (0, react.useState)(null);
|
|
773
827
|
const [busy, setBusy] = (0, react.useState)(false);
|
|
774
828
|
const [deleteTarget, setDeleteTarget] = (0, react.useState)(null);
|
|
829
|
+
const [actionMode, setActionModeState] = (0, react.useState)(() => getActionMode());
|
|
830
|
+
const [sessionDeleteTarget, setSessionDeleteTarget] = (0, react.useState)(null);
|
|
831
|
+
(0, react.useEffect)(() => subscribeActionMode(() => setActionModeState(getActionMode())), []);
|
|
775
832
|
const beginWorkspaceRename = (row) => {
|
|
776
833
|
setWorkspaceRename(row);
|
|
777
834
|
setRenameDraft(row.title);
|
|
@@ -814,10 +871,39 @@ button.ya-crumb:hover { background:var(--dsw-alias-interactive-bg-hover); color:
|
|
|
814
871
|
});
|
|
815
872
|
};
|
|
816
873
|
const archive = (id) => {
|
|
874
|
+
if (actionMode === "delete") {
|
|
875
|
+
const row = allRows.find((candidate) => candidate.id === id) ?? levelRows.find((candidate) => candidate.id === id) ?? levelGroups.flatMap((g) => g.rows).find((candidate) => candidate.id === id) ?? recent.find((candidate) => candidate.id === id);
|
|
876
|
+
setSessionDeleteTarget(row ?? {
|
|
877
|
+
id,
|
|
878
|
+
title: "",
|
|
879
|
+
blank: false,
|
|
880
|
+
running: false,
|
|
881
|
+
completed: false,
|
|
882
|
+
updatedAt: 0,
|
|
883
|
+
workspaceKey: "__ya_ungrouped__",
|
|
884
|
+
workspaceTitle: ""
|
|
885
|
+
});
|
|
886
|
+
setRenameError(null);
|
|
887
|
+
return;
|
|
888
|
+
}
|
|
817
889
|
archiveSession(id).catch((reason) => {
|
|
818
890
|
console.warn("session archive rejected:", reason);
|
|
819
891
|
});
|
|
820
892
|
};
|
|
893
|
+
const confirmSessionDelete = () => {
|
|
894
|
+
if (sessionDeleteTarget === null || busy) return;
|
|
895
|
+
setBusy(true);
|
|
896
|
+
archiveSession(sessionDeleteTarget.id).then(() => {
|
|
897
|
+
setSessionDeleteTarget(null);
|
|
898
|
+
}).catch((reason) => {
|
|
899
|
+
setRenameError(reason instanceof Error ? reason.message : String(reason));
|
|
900
|
+
}).finally(() => {
|
|
901
|
+
setBusy(false);
|
|
902
|
+
});
|
|
903
|
+
};
|
|
904
|
+
const toggleActionMode = () => {
|
|
905
|
+
setActionMode(actionMode === "archive" ? "delete" : "archive");
|
|
906
|
+
};
|
|
821
907
|
const fork = (id) => {
|
|
822
908
|
forkSession(id);
|
|
823
909
|
};
|
|
@@ -830,7 +916,8 @@ button.ya-crumb:hover { background:var(--dsw-alias-interactive-bg-hover); color:
|
|
|
830
916
|
fork,
|
|
831
917
|
archive,
|
|
832
918
|
t,
|
|
833
|
-
context
|
|
919
|
+
context,
|
|
920
|
+
actionMode
|
|
834
921
|
}, row.id);
|
|
835
922
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
836
923
|
"data-ya-workspace-sidebar": true,
|
|
@@ -843,6 +930,18 @@ button.ya-crumb:hover { background:var(--dsw-alias-interactive-bg-hover); color:
|
|
|
843
930
|
className: "ya-section-title",
|
|
844
931
|
children: t("workspaces")
|
|
845
932
|
}),
|
|
933
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
934
|
+
type: "button",
|
|
935
|
+
className: `ya-icon-button ya-action-mode-toggle${actionMode === "delete" ? " ya-action-mode-delete" : ""}`,
|
|
936
|
+
"aria-label": t("toggleActionMode"),
|
|
937
|
+
"aria-pressed": actionMode === "delete",
|
|
938
|
+
title: actionMode === "delete" ? t("deleteMode") : t("archiveMode"),
|
|
939
|
+
onClick: (event) => {
|
|
940
|
+
event.stopPropagation();
|
|
941
|
+
toggleActionMode();
|
|
942
|
+
},
|
|
943
|
+
children: actionMode === "delete" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconTrashOutline16, { size: wide ? 16 : 18 }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconArchiveOutline20, { size: wide ? 16 : 18 })
|
|
944
|
+
}),
|
|
846
945
|
directoryFlowAvailable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
847
946
|
ref: pickerAnchor,
|
|
848
947
|
type: "button",
|
|
@@ -1084,6 +1183,33 @@ button.ya-crumb:hover { background:var(--dsw-alias-interactive-bg-hover); color:
|
|
|
1084
1183
|
role: "alert",
|
|
1085
1184
|
children: renameError
|
|
1086
1185
|
})
|
|
1186
|
+
}),
|
|
1187
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
1188
|
+
open: sessionDeleteTarget !== null,
|
|
1189
|
+
onClose: () => {
|
|
1190
|
+
if (!busy) setSessionDeleteTarget(null);
|
|
1191
|
+
},
|
|
1192
|
+
closeLabel: t("cancel"),
|
|
1193
|
+
title: t("deleteSessionTitle"),
|
|
1194
|
+
description: t("deleteSessionConfirm"),
|
|
1195
|
+
footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
1196
|
+
variant: "outline",
|
|
1197
|
+
disabled: busy,
|
|
1198
|
+
onClick: () => {
|
|
1199
|
+
setSessionDeleteTarget(null);
|
|
1200
|
+
},
|
|
1201
|
+
children: t("cancel")
|
|
1202
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
1203
|
+
variant: "outline",
|
|
1204
|
+
disabled: busy,
|
|
1205
|
+
onClick: confirmSessionDelete,
|
|
1206
|
+
children: t("deleteSession")
|
|
1207
|
+
})] }),
|
|
1208
|
+
children: renameError !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1209
|
+
className: "ya-error",
|
|
1210
|
+
role: "alert",
|
|
1211
|
+
children: renameError
|
|
1212
|
+
})
|
|
1087
1213
|
})
|
|
1088
1214
|
]
|
|
1089
1215
|
});
|
package/lib/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","names":["useState","useCallback","IconPlusOutline16","IconFolderClose16","Menu","Modal","Button","StateDot","useState","Menu","IconEditOutline16","IconBranchOutline16","IconArchiveOutline20","IconEllipsisOutline16","IconFolderClose16","IconTrashOutline16","IconPlusOutline16","IconChevronRightOutline14","useMemo","useRef","IconProjectAddOutline16","IconSearchOutline16","IconCloseFill14","Modal","Button"],"sources":["../src/client/locales.ts","../src/client/styles.ts","../src/client/WorkspacePicker.tsx","../src/client/model.ts","../src/client/WorkspaceSidebar.tsx","../src/client/index.ts"],"sourcesContent":["/** Product copy for the replacement workspace browser. */\nexport const zh = {\n workspaces: '工作区',\n sessions: '会话',\n recent: '最近会话',\n ungrouped: '未分组',\n newSession: '新会话',\n untitled: '未命名会话',\n addWorkspace: '添加工作区',\n addWorkspaceMenu: '添加工作区…',\n search: '搜索会话',\n searchPlaceholder: '搜索名称、关键词…',\n clearSearch: '清除搜索',\n searching: '正在搜索会话历史…',\n searchUnavailable: '内容搜索暂不可用,仅显示名称匹配。',\n noMatches: '无匹配会话',\n noSessions: '暂无会话',\n noWorkspaces: '暂无工作区',\n loading: '正在加载工作区…',\n rename: '重命名',\n renameWorkspace: '重命名工作区',\n renameSession: '重命名会话',\n deleteWorkspace: '删除工作区',\n deleteDescription: '将把“{name}”从工作区列表中移除。文件夹与会话记录会保留。',\n fork: '分叉会话',\n archive: '归档会话',\n cancel: '取消',\n confirm: '确认',\n retry: '重新选择',\n folderError: '无法打开文件夹',\n workspaceName: '工作区名称',\n sessionName: '会话名称',\n count: '{n} 个会话',\n now: '刚刚',\n minutes: '{n}分钟',\n hours: '{n}小时',\n days: '{n}天',\n months: '{n}个月',\n years: '{n}年',\n running: '进行中',\n waiting: '等待交互',\n completed: '已完成',\n collapse: '折叠',\n expand: '展开',\n today: '今天',\n yesterday: '昨天',\n date: '{m}月{d}日',\n dateYear: '{y}年{m}月{d}日',\n} satisfies Record<string, string>\n\nexport type YaWorkspaceKey = keyof typeof zh\n\nexport const en = {\n workspaces: 'Workspaces',\n sessions: 'Sessions',\n recent: 'Recent Sessions',\n ungrouped: 'Ungrouped',\n newSession: 'New Session',\n untitled: 'Untitled session',\n addWorkspace: 'Add workspace',\n addWorkspaceMenu: 'Add workspace…',\n search: 'Search sessions',\n searchPlaceholder: 'Search name, keywords...',\n clearSearch: 'Clear search',\n searching: 'Searching session history…',\n searchUnavailable: 'Content search is unavailable. Showing name matches.',\n noMatches: 'No matching sessions',\n noSessions: 'No sessions yet',\n noWorkspaces: 'No workspaces yet',\n loading: 'Loading workspaces…',\n rename: 'Rename',\n renameWorkspace: 'Rename workspace',\n renameSession: 'Rename session',\n deleteWorkspace: 'Delete workspace',\n deleteDescription: 'This removes “{name}” from the workspace list. The folder and session logs remain.',\n fork: 'Fork session',\n archive: 'Archive session',\n cancel: 'Cancel',\n confirm: 'Confirm',\n retry: 'Choose again',\n folderError: 'Couldn’t open folder',\n workspaceName: 'Workspace name',\n sessionName: 'Session name',\n count: '{n} sessions',\n now: 'now',\n minutes: '{n}min',\n hours: '{n}h',\n days: '{n}d',\n months: '{n}mo',\n years: '{n}y',\n running: 'Running',\n waiting: 'Waiting for interaction',\n completed: 'Completed',\n collapse: 'Collapse',\n expand: 'Expand',\n today: 'Today',\n yesterday: 'Yesterday',\n date: '{m}/{d}',\n dateYear: '{m}/{d}/{y}',\n} satisfies Record<YaWorkspaceKey, string>\n\nexport const NS = 'ya-workspace-sidebar'\n","/** One scoped stylesheet injected for the lifetime of the client activation. */\nexport const CSS = `\n[data-ya-workspace-sidebar] { flex:1; min-height:0; display:flex; flex-direction:column; box-sizing:border-box; padding-right:var(--dsh-sidebar-inline-padding); color:var(--dsw-alias-label-primary); }\n[data-ya-workspace-sidebar].ya-rail { padding-right:0; }\n.ya-section-header { flex:none; height:36px; display:flex; align-items:center; justify-content:flex-end; gap:4px; padding-left:12px; margin-bottom:4px; box-sizing:border-box; color:var(--dsw-alias-label-tertiary); }\n.ya-section-title { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }\n.ya-icon-button { flex:none; width:28px; height:28px; border:0; border-radius:50%; padding:0; display:inline-flex; align-items:center; justify-content:center; color:var(--dsw-alias-label-secondary); background:transparent; cursor:pointer; }\n.ya-icon-button:hover { background:var(--dsw-alias-interactive-bg-hover); }\n.ya-search { flex:none; height:38px; margin:0 2px 10px; padding:0 14px; display:flex; align-items:center; gap:8px; box-sizing:border-box; border:1px solid var(--dsw-alias-border-l2); border-radius:24px; background:var(--dsw-static-neutral-bluish-75); color:var(--dsw-alias-label-caption); }\nbody[data-ds-dark-theme] .ya-search { background:var(--dsw-static-neutral-bluish-900); }\n.ya-search-input { flex:1; min-width:0; border:0; outline:0; background:transparent; color:var(--dsw-alias-label-primary); font:inherit; font-size:14px; }\n.ya-search-input::placeholder { color:var(--dsw-alias-label-tertiary); }\n.ya-search-icon { flex:none; display:inline-flex; border:0; padding:0; color:inherit; background:transparent; }\n.ya-body { flex:1; min-height:0; display:flex; flex-direction:column; overflow:hidden; margin-right:calc(-1 * var(--dsh-sidebar-inline-padding)); padding-right:var(--dsh-sidebar-inline-padding); }\n.ya-recent { flex:none; padding-bottom:8px; border-bottom:1px solid var(--dsw-alias-border-l2); }\n.ya-recent-collapsed { padding-bottom:0; border-bottom-color:transparent; }\n.ya-recent-list-wrap { display:grid; grid-template-rows:1fr; transition:grid-template-rows 220ms ease-out; }\n.ya-recent-collapsed .ya-recent-list-wrap { grid-template-rows:0fr; }\n.ya-recent-list { display:flex; flex-direction:column; overflow:hidden; min-height:0; }\n.ya-block-label { height:26px; display:flex; align-items:center; gap:2px; padding:0 8px; color:var(--dsw-alias-label-tertiary); font-size:12px; font-weight:600; letter-spacing:.02em; text-transform:uppercase; }\n.ya-block-label-toggle { flex:none; width:20px; height:20px; margin-left:auto; border:0; border-radius:6px; padding:0; display:inline-flex; align-items:center; justify-content:center; background:transparent; color:var(--dsw-alias-label-tertiary); cursor:pointer; transition:transform 180ms ease-out; }\n.ya-block-label-toggle:hover { background:var(--dsw-alias-interactive-bg-hover); color:var(--dsw-alias-label-secondary); }\n.ya-block-label-toggle.ya-collapsed { transform:rotate(-90deg); }\n.ya-date-group-label { height:26px; display:flex; align-items:center; padding:0 8px; color:var(--dsw-alias-label-tertiary); font-size:12px; font-weight:600; letter-spacing:.02em; }\n.ya-breadcrumb { flex:none; height:34px; display:flex; align-items:center; gap:2px; padding:0 6px; color:var(--dsw-alias-label-tertiary); font-size:13px; }\n.ya-crumb { border:0; padding:4px 3px; border-radius:6px; background:transparent; color:inherit; font:inherit; cursor:default; min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }\nbutton.ya-crumb:hover { background:var(--dsw-alias-interactive-bg-hover); color:var(--dsw-alias-label-primary); cursor:pointer; }\n.ya-scroll { flex:1; min-height:0; overflow-y:auto; padding-bottom:12px; }\n.ya-row { position:relative; min-height:34px; display:flex; align-items:center; gap:6px; margin:1px 0; padding:0 7px; border-radius:9px; box-sizing:border-box; color:var(--dsw-alias-label-primary); cursor:pointer; user-select:none; }\n.ya-row:hover, .ya-row.ya-menu-open { background:var(--dsw-alias-interactive-bg-hover); }\n.ya-row.ya-selected { background:var(--dsw-alias-interactive-bg-selected); }\n.ya-workspace-row { min-height:40px; }\n.ya-row-main { flex:1; min-width:0; display:flex; flex-direction:column; justify-content:center; }\n.ya-row-line { display:flex; align-items:center; min-width:0; gap:6px; }\n.ya-row-title { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; line-height:18px; }\n.ya-row-meta { flex:none; color:var(--dsw-alias-label-tertiary); font-size:11px; white-space:nowrap; }\n.ya-workspace-path { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--dsw-alias-label-tertiary); font-size:11px; line-height:15px; }\n.ya-row-actions { flex:none; display:flex; align-items:center; gap:2px; opacity:0; pointer-events:none; transition:opacity 120ms ease-out; }\n.ya-row:hover .ya-row-actions, .ya-menu-open .ya-row-actions { opacity:1; pointer-events:auto; }\n.ya-status-slot { flex:none; width:16px; height:16px; display:inline-flex; align-items:center; justify-content:center; color:var(--dsw-alias-label-tertiary); }\n.ya-recent .ya-row { min-height:31px; }\n.ya-search-workspace { color:var(--dsw-alias-label-tertiary); font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n.ya-empty, .ya-status { padding:18px 10px; color:var(--dsw-alias-label-tertiary); text-align:center; font-size:13px; }\n.ya-warning { color:var(--dsw-alias-status-warning); }\n.ya-rename-input { width:100%; height:38px; box-sizing:border-box; border:1px solid var(--dsw-alias-border-l2); border-radius:9px; padding:0 11px; background:transparent; color:var(--dsw-alias-label-primary); outline:none; }\n.ya-error { margin-top:8px; color:var(--dsw-alias-status-error); font-size:12px; }\n.ya-rail .ya-section-header { padding-left:0; margin-bottom:12px; }\n.ya-rail .ya-icon-button, .ya-rail .ya-search { width:36px; height:36px; padding:0; margin:0 0 12px; border-color:transparent; background:transparent; }\n.ya-rail .ya-search { justify-content:center; }\n.ya-rail .ya-search-icon { cursor:pointer; color:var(--dsw-alias-label-primary); }\n.ya-picker-error { color:var(--dsw-alias-status-error); white-space:pre-wrap; }\n@keyframes ya-slide-in-forward { from { opacity:0; transform:translateX(10px); } to { opacity:1; transform:translateX(0); } }\n@keyframes ya-slide-in-backward { from { opacity:0; transform:translateX(-10px); } to { opacity:1; transform:translateX(0); } }\n.ya-level-enter-forward { animation:ya-slide-in-forward 180ms ease-out; }\n.ya-level-enter-backward { animation:ya-slide-in-backward 180ms ease-out; }\n`\n\n/** Install the stylesheet and return its disposer. */\nexport function installStyles(): () => void {\n const style = document.createElement('style')\n style.setAttribute('data-ya-workspace-sidebar-style', '')\n style.textContent = CSS\n document.head.appendChild(style)\n return () => { style.remove() }\n}\n","/** Existing-workspace menu plus composed directory-adoption flow. */\nimport type { ReactNode, RefObject } from 'react'\nimport { useCallback, useEffect, useState } from 'react'\nimport {\n Button, IconFolderClose16, IconPlusOutline16, Menu, Modal, type MenuEntry,\n} from '@deepseek-ai/dsh-client-ui-primitives'\nimport type {\n WorkspaceId, WorkspaceListState, WorkspaceView,\n} from '@deepseek-ai/dsh-client-runtime/client'\nimport type { SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { DirectoryFlowOwnerProps, PickerProps } from './contract.ts'\n\nconst ADD = '::ya-add-workspace'\n\ninterface FlowProps {\n t: PickerProps['t']\n open: boolean\n anchorRef?: RefObject<HTMLElement | null>\n useWorkspaces: <S>(selector: (state: WorkspaceListState) => S) => S\n createWorkspace: (input: { path: string }) => Promise<WorkspaceView>\n useDirectoryFlow: SnapshotSelectorHook<boolean>\n renderDirectoryFlow: (owner: DirectoryFlowOwnerProps) => ReactNode\n onPick: (workspaceId: WorkspaceId) => void\n onClose: () => void\n addOnly?: boolean\n side?: 'bottom' | 'top' | 'right'\n selectedId?: WorkspaceId\n}\n\n/** Render the workspace target menu and directory picking conversation. */\nexport function WorkspacePickFlow({\n t, open, anchorRef, useWorkspaces, createWorkspace, useDirectoryFlow,\n renderDirectoryFlow, onPick, onClose, addOnly = false, side = 'bottom', selectedId,\n}: FlowProps) {\n const snapshot = useWorkspaces(state => state)\n const flowAvailable = useDirectoryFlow(value => value)\n const [flowOpen, setFlowOpen] = useState(false)\n const [busy, setBusy] = useState(false)\n const [error, setError] = useState<string | null>(null)\n const getAnchorRect = useCallback(\n () => anchorRef?.current?.getBoundingClientRect() ?? null,\n [anchorRef],\n )\n useEffect(() => {\n if (flowOpen && !flowAvailable) setFlowOpen(false)\n }, [flowAvailable, flowOpen])\n\n const openFlow = useCallback(() => {\n onClose()\n setError(null)\n setFlowOpen(true)\n }, [onClose])\n const addEntries: MenuEntry[] = flowAvailable\n ? [{ id: ADD, label: t('addWorkspaceMenu'), icon: <IconPlusOutline16 size={16} />, disabled: flowOpen || busy }]\n : []\n const pinnedAdd = !addOnly && snapshot.items.length > 0\n const items: MenuEntry[] = pinnedAdd\n ? snapshot.items.map(workspace => ({\n id: workspace.workspaceId,\n label: workspace.title,\n icon: <IconFolderClose16 size={16} />,\n disabled: flowOpen || busy,\n }))\n : addEntries\n const settled = addOnly || snapshot.phase === 'ready'\n const onlyAdd = !pinnedAdd && settled && addEntries.length === 1\n useEffect(() => {\n if (open && onlyAdd && !flowOpen && !busy) openFlow()\n }, [busy, flowOpen, onlyAdd, open, openFlow])\n\n const owner: DirectoryFlowOwnerProps = {\n open: flowOpen,\n busy,\n onPicked: (path) => {\n setBusy(true)\n createWorkspace({ path }).then(workspace => {\n setFlowOpen(false)\n onPick(workspace.workspaceId)\n }).catch((reason: unknown) => {\n setFlowOpen(false)\n setError(reason instanceof Error ? reason.message : String(reason))\n }).finally(() => { setBusy(false) })\n },\n onCancel: () => { setFlowOpen(false) },\n onError: (message) => { setFlowOpen(false); setError(message) },\n }\n\n return (\n <>\n <Menu\n open={open && !onlyAdd && items.length > 0}\n anchor={null}\n items={items}\n {...pinnedAdd ? { footer: addEntries } : {}}\n selectedId={selectedId}\n onSelect={(id) => { if (id === ADD) openFlow(); else onPick(id as WorkspaceId) }}\n onClose={onClose}\n side={side}\n portal\n getAnchorRect={getAnchorRect}\n />\n {open && !onlyAdd && snapshot.phase === 'pending' && <div className=\"ya-status\">{t('loading')}</div>}\n {renderDirectoryFlow(owner)}\n <Modal\n open={error !== null}\n onClose={() => { setError(null) }}\n closeLabel={t('cancel')}\n title={t('folderError')}\n footer={(\n <>\n <Button variant=\"outline\" onClick={() => { setError(null) }}>{t('cancel')}</Button>\n <Button variant=\"primary\" disabled={!flowAvailable} onClick={openFlow}>{t('retry')}</Button>\n </>\n )}\n >\n <div className=\"ya-picker-error\" role=\"alert\">{error}</div>\n </Modal>\n </>\n )\n}\n\n/** Fill the conversation hero's workspace picker seat. */\nexport function WorkspacePicker({\n open, anchorRef, useWorkspaces, selectedId, onPick, onClose,\n createWorkspace, useDirectoryFlow, renderSlot, t,\n}: PickerProps) {\n return (\n <WorkspacePickFlow\n t={t}\n open={open}\n anchorRef={anchorRef}\n useWorkspaces={useWorkspaces}\n selectedId={selectedId}\n onPick={onPick}\n onClose={onClose}\n createWorkspace={createWorkspace}\n useDirectoryFlow={useDirectoryFlow}\n renderDirectoryFlow={owner => renderSlot('conversation.hero.workspace.directoryFlow', owner)}\n />\n )\n}\n","/** Pure sidebar projections shared by the browser and unit tests. */\nimport type {\n SessionId, SessionListState, SessionSummary, WorkspaceId, WorkspaceView,\n} from '@deepseek-ai/dsh-client-runtime/client'\n\n/** Navigation key for sessions not accounted to a real workspace. */\nexport const UNGROUPED = '__ya_ungrouped__' as const\n\n/** One sidebar session row. */\nexport interface SessionRow {\n id: SessionId\n title: string\n /** Whether the session has a durable log-backed title (summary.title !== undefined). */\n hasTitle: boolean\n blank: boolean\n running: boolean\n pendingInteraction?: SessionSummary['pendingInteraction']\n completed: boolean\n updatedAt: number\n workspaceKey: WorkspaceId | typeof UNGROUPED\n workspaceTitle: string\n}\n\n/** One date-bucketed group of session rows for the real-workspace level. */\nexport interface SessionDateGroup {\n /** Local calendar date `YYYY-MM-DD`, stable key. */\n dateKey: string\n /** Days between today's local date and this group's local date (0=today, 1=yesterday, …). */\n dayOffset: number\n rows: SessionRow[]\n}\n\n/** One first-level workspace row. */\nexport interface WorkspaceRow {\n key: WorkspaceId | typeof UNGROUPED\n title: string\n path?: string\n createdAt?: string\n count: number\n real: boolean\n}\n\nfunction visible(summary: SessionSummary, current: SessionId | undefined, archived: ReadonlySet<SessionId>): boolean {\n return summary.origin !== 'subagent'\n && !archived.has(summary.id)\n && (!summary.blank || summary.id === current)\n}\n\nfunction rowOf(\n summary: SessionSummary,\n workspaceKey: WorkspaceId | typeof UNGROUPED,\n workspaceTitle: string,\n): SessionRow {\n return {\n id: summary.id,\n title: summary.blank ? 'New Session' : summary.displayTitle,\n hasTitle: summary.title !== undefined,\n blank: summary.blank,\n running: summary.running,\n ...(summary.pendingInteraction === undefined ? {} : { pendingInteraction: summary.pendingInteraction }),\n completed: summary.completed === true,\n updatedAt: summary.updatedAt,\n workspaceKey,\n workspaceTitle,\n }\n}\n\nfunction ownerIndex(workspaces: readonly WorkspaceView[]): Map<SessionId, WorkspaceView> {\n const result = new Map<SessionId, WorkspaceView>()\n for (const workspace of workspaces) {\n for (const sessionId of workspace.sessionIds) result.set(sessionId, workspace)\n }\n return result\n}\n\n/** Resolve the first/second-level destination for one session. */\nexport function workspaceKeyForSession(\n sessionId: SessionId | undefined,\n workspaces: readonly WorkspaceView[],\n): WorkspaceId | typeof UNGROUPED | null {\n if (sessionId === undefined) return null\n return ownerIndex(workspaces).get(sessionId)?.workspaceId ?? UNGROUPED\n}\n\n/** Derive global recent sessions, newest first. */\nexport function deriveRecent(\n list: SessionListState,\n workspaces: readonly WorkspaceView[],\n archivedSessionIds: readonly SessionId[],\n limit = 5,\n): SessionRow[] {\n const archived = new Set(archivedSessionIds)\n const owners = ownerIndex(workspaces)\n return list.ids\n .map(id => list.byId[id])\n .filter((summary): summary is SessionSummary => summary !== undefined && visible(summary, list.current, archived))\n .sort((a, b) => b.updatedAt - a.updatedAt || String(a.id).localeCompare(String(b.id)))\n .slice(0, limit)\n .map((summary) => {\n const workspace = owners.get(summary.id)\n return rowOf(summary, workspace?.workspaceId ?? UNGROUPED, workspace?.title ?? 'Ungrouped')\n })\n}\n\n/** Derive first-level real workspaces plus the virtual Ungrouped row. */\nexport function deriveWorkspaces(\n list: SessionListState,\n workspaces: readonly WorkspaceView[],\n archivedSessionIds: readonly SessionId[],\n): WorkspaceRow[] {\n const archived = new Set(archivedSessionIds)\n const accounted = new Set<SessionId>()\n const result = workspaces.map((workspace): WorkspaceRow => {\n let count = 0\n for (const id of workspace.sessionIds) {\n accounted.add(id)\n const summary = list.byId[id]\n if (summary !== undefined && visible(summary, list.current, archived)) count++\n }\n return {\n key: workspace.workspaceId,\n title: workspace.title,\n path: workspace.path,\n createdAt: workspace.createdAt,\n count,\n real: true,\n }\n })\n let ungrouped = 0\n for (const id of list.ids) {\n const summary = list.byId[id]\n if (summary !== undefined && !accounted.has(id) && visible(summary, list.current, archived)) ungrouped++\n }\n result.push({ key: UNGROUPED, title: 'Ungrouped', count: ungrouped, real: false })\n return result\n}\n\n/** Derive the selected workspace's sessions in its canonical order. */\nexport function deriveWorkspaceSessions(\n key: WorkspaceId | typeof UNGROUPED,\n list: SessionListState,\n workspaces: readonly WorkspaceView[],\n archivedSessionIds: readonly SessionId[],\n): SessionRow[] {\n const archived = new Set(archivedSessionIds)\n if (key === UNGROUPED) {\n const accounted = new Set(workspaces.flatMap(workspace => workspace.sessionIds))\n return list.ids\n .map(id => list.byId[id])\n .filter((summary): summary is SessionSummary => summary !== undefined\n && !accounted.has(summary.id)\n && visible(summary, list.current, archived))\n .sort((a, b) => b.updatedAt - a.updatedAt || String(a.id).localeCompare(String(b.id)))\n .map(summary => rowOf(summary, UNGROUPED, 'Ungrouped'))\n }\n const workspace = workspaces.find(item => item.workspaceId === key)\n if (workspace === undefined) return []\n return workspace.sessionIds\n .map(id => list.byId[id])\n .filter((summary): summary is SessionSummary => summary !== undefined && visible(summary, list.current, archived))\n .map(summary => rowOf(summary, workspace.workspaceId, workspace.title))\n}\n\n/** Format a local calendar date as `YYYY-MM-DD` (locale-agnostic, no padding surprises). */\nfunction localDateKey(year: number, month: number, day: number): string {\n const mm = month < 9 ? `0${month + 1}` : `${month + 1}`\n const dd = day < 10 ? `0${day}` : `${day}`\n return `${year}-${mm}-${dd}`\n}\n\n/** Whole-day difference between two local calendar dates (a - b) using UTC midnight. */\nfunction dayDiff(a: { year: number; month: number; day: number }, b: { year: number; month: number; day: number }): number {\n const msA = Date.UTC(a.year, a.month, a.day)\n const msB = Date.UTC(b.year, b.month, b.day)\n return Math.round((msA - msB) / 86_400_000)\n}\n\n/**\n * Derive the selected real workspace's sessions grouped by local calendar date.\n *\n * - Only real workspaces: `Ungrouped` falls back to {@link deriveWorkspaceSessions}.\n * - Groups are ordered by date descending; rows within a group by `updatedAt` descending.\n * - {@link visible} filter is reused (archived / subagent / blank visibility).\n * - Future timestamps clamp to today's bucket (`dayOffset` 0).\n * - `now` is the reference timestamp for \"today\"; pass `Date.now()` in production.\n */\nexport function deriveWorkspaceSessionGroups(\n key: WorkspaceId | typeof UNGROUPED,\n list: SessionListState,\n workspaces: readonly WorkspaceView[],\n archivedSessionIds: readonly SessionId[],\n now: number,\n): SessionDateGroup[] {\n if (key === UNGROUPED) return []\n const workspace = workspaces.find(item => item.workspaceId === key)\n if (workspace === undefined) return []\n const archived = new Set(archivedSessionIds)\n const rows = workspace.sessionIds\n .map(id => list.byId[id])\n .filter((summary): summary is SessionSummary => summary !== undefined && visible(summary, list.current, archived))\n .map(summary => rowOf(summary, workspace.workspaceId, workspace.title))\n if (rows.length === 0) return []\n\n const nowDate = new Date(now)\n const today = { year: nowDate.getFullYear(), month: nowDate.getMonth(), day: nowDate.getDate() }\n\n const buckets = new Map<string, { dayOffset: number; rows: SessionRow[] }>()\n for (const row of rows) {\n const ts = Math.min(row.updatedAt, now)\n const d = new Date(ts)\n const date = { year: d.getFullYear(), month: d.getMonth(), day: d.getDate() }\n const dateKey = localDateKey(date.year, date.month, date.day)\n let bucket = buckets.get(dateKey)\n if (bucket === undefined) {\n // dayOffset = today - date (positive for past dates). Future timestamps were\n // clamped to `now` above, so `date` never exceeds today; Math.max guards rounding noise.\n const offset = Math.max(0, dayDiff(today, date))\n bucket = { dayOffset: offset, rows: [] }\n buckets.set(dateKey, bucket)\n }\n bucket.rows.push(row)\n }\n\n const groups: SessionDateGroup[] = []\n for (const [dateKey, bucket] of buckets) {\n bucket.rows.sort((a, b) => b.updatedAt - a.updatedAt || String(a.id).localeCompare(String(b.id)))\n groups.push({ dateKey, dayOffset: bucket.dayOffset, rows: bucket.rows })\n }\n // Sort groups by date descending: newest date first = smallest dayOffset first.\n groups.sort((a, b) => a.dayOffset - b.dayOffset || a.dateKey.localeCompare(b.dateKey))\n return groups\n}\n\n/** Case-insensitive local title/workspace matching used beside Host content search. */\nexport function localMatches(rows: readonly SessionRow[], query: string): SessionRow[] {\n const normalized = query.trim().toLocaleLowerCase()\n if (normalized === '') return []\n return rows.filter(row => `${row.title}\\n${row.workspaceTitle}`.toLocaleLowerCase().includes(normalized))\n}\n","/** Two-level workspace/session browser with a persistent global recent block. */\nimport { useEffect, useMemo, useRef, useState } from 'react'\nimport {\n Button, IconArchiveOutline20, IconBranchOutline16, IconChevronRightOutline14,\n IconCloseFill14, IconEditOutline16, IconEllipsisOutline16, IconFolderClose16,\n IconPlusOutline16, IconProjectAddOutline16, IconSearchOutline16, IconTrashOutline16,\n Menu, Modal, StateDot,\n} from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { SessionId, WorkspaceId } from '@deepseek-ai/dsh-client-runtime/client'\nimport type { SidebarProps } from './contract.ts'\nimport {\n deriveRecent, deriveWorkspaceSessionGroups, deriveWorkspaceSessions, deriveWorkspaces,\n localMatches, UNGROUPED, workspaceKeyForSession, type SessionDateGroup, type SessionRow,\n type WorkspaceRow,\n} from './model.ts'\nimport { WorkspacePickFlow } from './WorkspacePicker.tsx'\n\nconst SEARCH_DEBOUNCE_MS = 250\nconst SEARCH_MAX = 500\n\nfunction sanitized(value: string): string {\n return value.replaceAll('\\0', '').slice(0, SEARCH_MAX)\n}\n\nfunction relativeTime(updatedAt: number, now: number, t: SidebarProps['t']): string {\n const diff = Math.max(0, now - updatedAt)\n const minute = 60_000\n if (diff < minute) return t('now')\n if (diff < 60 * minute) return t('minutes', { n: Math.floor(diff / minute) })\n if (diff < 24 * 60 * minute) return t('hours', { n: Math.floor(diff / (60 * minute)) })\n if (diff < 30 * 24 * 60 * minute) return t('days', { n: Math.floor(diff / (24 * 60 * minute)) })\n if (diff < 365 * 24 * 60 * minute) return t('months', { n: Math.floor(diff / (30 * 24 * 60 * minute)) })\n return t('years', { n: Math.floor(diff / (365 * 24 * 60 * minute)) })\n}\n\n/** Format a date group's localized title from its dayOffset and `YYYY-MM-DD` key. */\nfunction dateGroupLabel(group: SessionDateGroup, now: number, t: SidebarProps['t']): string {\n if (group.dayOffset === 0) return t('today')\n if (group.dayOffset === 1) return t('yesterday')\n const parts = group.dateKey.split('-')\n const year = Number(parts[0])\n const month = Number(parts[1])\n const day = Number(parts[2])\n const nowDate = new Date(now)\n if (year === nowDate.getFullYear()) return t('date', { m: month, d: day })\n return t('dateYear', { y: year, m: month, d: day })\n}\n\nfunction SessionStatus({ row }: { row: SessionRow }) {\n if (row.pendingInteraction !== undefined) return <StateDot state=\"warning\" />\n if (row.running) return <StateDot state=\"ongoing\" />\n if (row.completed) return <StateDot state=\"done\" />\n return null\n}\n\ninterface SessionRowProps {\n row: SessionRow\n current: SessionId | undefined\n now: number\n open: (id: SessionId) => void\n rename: (row: SessionRow) => void\n fork: (id: SessionId) => void\n archive: (id: SessionId) => void\n t: SidebarProps['t']\n context?: boolean\n}\n\nfunction SessionItem({ row, current, now, open, rename, fork, archive, t, context }: SessionRowProps) {\n const [menuOpen, setMenuOpen] = useState(false)\n const title = row.blank ? t('newSession') : row.hasTitle ? row.title : t('untitled')\n return (\n <div\n className={`ya-row${row.id === current ? ' ya-selected' : ''}${menuOpen ? ' ya-menu-open' : ''}`}\n role=\"treeitem\"\n aria-selected={row.id === current}\n onClick={() => { open(row.id) }}\n >\n <span className=\"ya-status-slot\"><SessionStatus row={row} /></span>\n <span className=\"ya-row-main\">\n <span className=\"ya-row-line\">\n <span className=\"ya-row-title\">{title}</span>\n {!row.blank && <span className=\"ya-row-meta ya-row-time\">{relativeTime(row.updatedAt, now, t)}</span>}\n </span>\n {context === true && <span className=\"ya-search-workspace\">{row.workspaceTitle}</span>}\n </span>\n {!row.blank && (\n <span className=\"ya-row-actions\">\n <Menu\n open={menuOpen}\n onClose={() => { setMenuOpen(false) }}\n items={[\n { id: 'rename', label: t('rename'), icon: <IconEditOutline16 /> },\n { id: 'fork', label: t('fork'), icon: <IconBranchOutline16 /> },\n { id: 'archive', label: t('archive'), icon: <IconArchiveOutline20 size={16} /> },\n ]}\n onSelect={(id) => {\n setMenuOpen(false)\n if (id === 'rename') rename(row)\n if (id === 'fork') fork(row.id)\n if (id === 'archive') archive(row.id)\n }}\n portal\n closeOnPointerLeave\n anchor={(\n <button\n type=\"button\"\n className=\"ya-icon-button\"\n aria-label={`${title} actions`}\n onClick={(event) => { event.stopPropagation(); setMenuOpen(value => !value) }}\n >\n <IconEllipsisOutline16 />\n </button>\n )}\n />\n </span>\n )}\n </div>\n )\n}\n\nfunction WorkspaceItem({ row, enter, create, rename, remove, t }: {\n row: WorkspaceRow\n enter: () => void\n create: () => void\n rename: () => void\n remove: () => void\n t: SidebarProps['t']\n}) {\n const [menuOpen, setMenuOpen] = useState(false)\n return (\n <div className={`ya-row ya-workspace-row${menuOpen ? ' ya-menu-open' : ''}`} role=\"treeitem\" onClick={enter} title={row.path}>\n <span className=\"ya-status-slot\"><IconFolderClose16 /></span>\n <span className=\"ya-row-main\">\n <span className=\"ya-row-line\">\n <span className=\"ya-row-title\">{row.real ? row.title : t('ungrouped')}</span>\n <span className=\"ya-row-meta\">{t('count', { n: row.count })}</span>\n </span>\n {row.path !== undefined && <span className=\"ya-workspace-path\">{row.path}</span>}\n </span>\n <span className=\"ya-row-actions\">\n {row.real && (\n <Menu\n open={menuOpen}\n onClose={() => { setMenuOpen(false) }}\n items={[\n { id: 'rename', label: t('rename'), icon: <IconEditOutline16 /> },\n { id: 'delete', label: t('deleteWorkspace'), icon: <IconTrashOutline16 />, danger: true },\n ]}\n onSelect={(id) => { setMenuOpen(false); if (id === 'rename') rename(); if (id === 'delete') remove() }}\n portal\n closeOnPointerLeave\n anchor={(\n <button type=\"button\" className=\"ya-icon-button\" onClick={(event) => { event.stopPropagation(); setMenuOpen(value => !value) }}>\n <IconEllipsisOutline16 />\n </button>\n )}\n />\n )}\n {row.real && (\n <button type=\"button\" className=\"ya-icon-button\" onClick={(event) => { event.stopPropagation(); create() }}>\n <IconPlusOutline16 />\n </button>\n )}\n </span>\n <IconChevronRightOutline14 />\n </div>\n )\n}\n\ninterface RemoteState {\n query: string\n status: 'idle' | 'loading' | 'ready' | 'error'\n items: readonly { sessionId: SessionId; snippet: string }[]\n hasMore: boolean\n}\n\n/** Fill `sidebar.workspaces` with the replacement browser. */\nexport function WorkspaceSidebar(props: SidebarProps) {\n const {\n wide, expandSidebar, useSessions, useWorkspaces, startSession, open, searchSessions,\n searchResultLimit, renameSession, forkSession, renameWorkspace, deleteWorkspace,\n archiveSession, createWorkspace, useDirectoryFlow, renderSlot, t,\n } = props\n const sessions = useSessions(state => state)\n const workspaceState = useWorkspaces(state => state)\n const workspaces = workspaceState.items\n const archived = workspaceState.archivedSessionIds\n const directoryFlowAvailable = useDirectoryFlow(value => value)\n const allRows = useMemo(\n () => deriveRecent(sessions, workspaces, archived, Number.MAX_SAFE_INTEGER),\n [archived, sessions, workspaces],\n )\n const recent = allRows.slice(0, 5)\n const workspaceRows = useMemo(\n () => deriveWorkspaces(sessions, workspaces, archived),\n [archived, sessions, workspaces],\n )\n const [selectedKey, setSelectedKey] = useState<WorkspaceId | typeof UNGROUPED | null>(null)\n const [direction, setDirection] = useState<'forward' | 'backward'>('forward')\n const [hasMounted, setHasMounted] = useState(false)\n useEffect(() => { setHasMounted(true) }, [])\n const observedCurrent = useRef<SessionId | undefined>(undefined)\n const initialized = useRef(false)\n useEffect(() => {\n if (initialized.current && observedCurrent.current === sessions.current) return\n initialized.current = true\n observedCurrent.current = sessions.current\n if (sessions.current !== undefined) { setDirection('forward'); setSelectedKey(workspaceKeyForSession(sessions.current, workspaces)) }\n }, [sessions.current, workspaces])\n useEffect(() => {\n if (selectedKey !== null && selectedKey !== UNGROUPED\n && !workspaces.some(workspace => workspace.workspaceId === selectedKey)) setSelectedKey(UNGROUPED)\n }, [selectedKey, workspaces])\n const selectedWorkspace = selectedKey === null || selectedKey === UNGROUPED\n ? undefined\n : workspaces.find(workspace => workspace.workspaceId === selectedKey)\n const now = Date.now()\n // Real workspace level renders date-bucketed groups; Ungrouped keeps the flat recency view.\n const levelGroups = useMemo(\n () => selectedKey !== null && selectedKey !== UNGROUPED\n ? deriveWorkspaceSessionGroups(selectedKey, sessions, workspaces, archived, now)\n : [],\n [archived, sessions, workspaces, selectedKey, now],\n )\n const levelRows = selectedKey === UNGROUPED\n ? deriveWorkspaceSessions(UNGROUPED, sessions, workspaces, archived)\n : []\n const levelEmpty = selectedKey === UNGROUPED ? levelRows.length === 0 : levelGroups.every(g => g.rows.length === 0)\n\n const [query, setQuery] = useState('')\n const normalizedQuery = sanitized(query).trim()\n const [remote, setRemote] = useState<RemoteState>({ query: '', status: 'idle', items: [], hasMore: false })\n useEffect(() => {\n if (normalizedQuery === '') {\n setRemote({ query: '', status: 'idle', items: [], hasMore: false })\n return\n }\n const controller = new AbortController()\n setRemote({ query: normalizedQuery, status: 'loading', items: [], hasMore: false })\n const timer = window.setTimeout(() => {\n searchSessions(normalizedQuery, controller.signal).then(result => {\n if (!controller.signal.aborted) setRemote({ query: normalizedQuery, status: 'ready', items: result.items, hasMore: result.hasMore })\n }).catch(() => {\n if (!controller.signal.aborted) setRemote({ query: normalizedQuery, status: 'error', items: [], hasMore: false })\n })\n }, SEARCH_DEBOUNCE_MS)\n return () => { window.clearTimeout(timer); controller.abort() }\n }, [normalizedQuery, searchSessions])\n const searchRows = useMemo(() => {\n if (normalizedQuery === '') return []\n const byId = new Map(localMatches(allRows, normalizedQuery).map(row => [row.id, row]))\n if (remote.query === normalizedQuery) {\n for (const item of remote.items) {\n const row = allRows.find(candidate => candidate.id === item.sessionId)\n if (row !== undefined) byId.set(row.id, row)\n }\n }\n return [...byId.values()].slice(0, searchResultLimit)\n }, [allRows, normalizedQuery, remote, searchResultLimit])\n\n const [pickerOpen, setPickerOpen] = useState(false)\n const pickerAnchor = useRef<HTMLButtonElement>(null)\n const [recentCollapsed, setRecentCollapsed] = useState(false)\n const [workspaceRename, setWorkspaceRename] = useState<WorkspaceRow | null>(null)\n const [sessionRename, setSessionRename] = useState<SessionRow | null>(null)\n const [renameDraft, setRenameDraft] = useState('')\n const [renameError, setRenameError] = useState<string | null>(null)\n const [busy, setBusy] = useState(false)\n const [deleteTarget, setDeleteTarget] = useState<WorkspaceRow | null>(null)\n\n const beginWorkspaceRename = (row: WorkspaceRow) => { setWorkspaceRename(row); setRenameDraft(row.title); setRenameError(null) }\n const beginSessionRename = (row: SessionRow) => { setSessionRename(row); setRenameDraft(row.title); setRenameError(null) }\n const closeRename = () => { if (!busy) { setWorkspaceRename(null); setSessionRename(null); setRenameError(null) } }\n const commitRename = () => {\n const title = renameDraft.trim()\n if (title === '' || busy) return\n setBusy(true)\n const task = workspaceRename !== null && workspaceRename.key !== UNGROUPED\n ? renameWorkspace(workspaceRename.key, title)\n : sessionRename !== null ? renameSession(sessionRename.id, title) : Promise.resolve()\n task.then(() => { setWorkspaceRename(null); setSessionRename(null) })\n .catch((reason: unknown) => { setRenameError(reason instanceof Error ? reason.message : String(reason)) })\n .finally(() => { setBusy(false) })\n }\n const confirmDelete = () => {\n if (deleteTarget === null || deleteTarget.key === UNGROUPED || busy) return\n setBusy(true)\n deleteWorkspace(deleteTarget.key).then(() => { setDeleteTarget(null) })\n .catch((reason: unknown) => { setRenameError(reason instanceof Error ? reason.message : String(reason)) })\n .finally(() => { setBusy(false) })\n }\n const archive = (id: SessionId) => { archiveSession(id).catch(reason => { console.warn('session archive rejected:', reason) }) }\n const fork = (id: SessionId) => { forkSession(id) }\n\n const sessionItem = (row: SessionRow, context = false) => (\n <SessionItem\n key={row.id}\n row={row}\n current={sessions.current}\n now={now}\n open={open}\n rename={beginSessionRename}\n fork={fork}\n archive={archive}\n t={t}\n context={context}\n />\n )\n\n return (\n <div data-ya-workspace-sidebar className={wide ? '' : 'ya-rail'}>\n <div className=\"ya-section-header\">\n {wide && <span className=\"ya-section-title\">{t('workspaces')}</span>}\n {directoryFlowAvailable && (\n <button ref={pickerAnchor} type=\"button\" className=\"ya-icon-button\" aria-label={t('addWorkspace')} onClick={() => { setPickerOpen(value => !value) }}>\n <IconProjectAddOutline16 size={wide ? 16 : 18} />\n </button>\n )}\n <WorkspacePickFlow\n t={t}\n open={pickerOpen}\n anchorRef={pickerAnchor}\n useWorkspaces={useWorkspaces}\n createWorkspace={createWorkspace}\n useDirectoryFlow={useDirectoryFlow}\n renderDirectoryFlow={owner => renderSlot('sidebar.workspaces.directoryFlow', owner)}\n addOnly\n side=\"right\"\n onPick={(workspaceId) => { setPickerOpen(false); startSession(workspaceId) }}\n onClose={() => { setPickerOpen(false) }}\n />\n </div>\n\n <div className=\"ya-search\" onClick={() => { if (!wide) expandSidebar() }}>\n <button type=\"button\" className=\"ya-search-icon\" aria-label={t('search')}><IconSearchOutline16 size={wide ? 14 : 18} /></button>\n {wide && <input className=\"ya-search-input\" value={query} maxLength={SEARCH_MAX} placeholder={t('searchPlaceholder')} onChange={event => { setQuery(sanitized(event.target.value)) }} />}\n {wide && query !== '' && <button type=\"button\" className=\"ya-icon-button\" aria-label={t('clearSearch')} onClick={() => { setQuery('') }}><IconCloseFill14 /></button>}\n </div>\n\n {wide && (\n <div className=\"ya-body\">\n {normalizedQuery !== '' ? (\n <div className=\"ya-scroll\" role=\"tree\" aria-label={t('search')}>\n {searchRows.map(row => sessionItem(row, true))}\n {remote.status === 'loading' && <div className=\"ya-status\">{t('searching')}</div>}\n {remote.status === 'error' && <div className=\"ya-status ya-warning\">{t('searchUnavailable')}</div>}\n {remote.status !== 'loading' && searchRows.length === 0 && <div className=\"ya-empty\">{t('noMatches')}</div>}\n </div>\n ) : (\n <>\n <div className={`ya-recent${recentCollapsed ? ' ya-recent-collapsed' : ''}`}>\n <div className=\"ya-block-label\">\n <span>{t('recent')}</span>\n {recent.length > 0 && (\n <button\n type=\"button\"\n className={`ya-block-label-toggle${recentCollapsed ? ' ya-collapsed' : ''}`}\n aria-label={recentCollapsed ? t('expand') : t('collapse')}\n aria-expanded={!recentCollapsed}\n onClick={(event) => { event.stopPropagation(); setRecentCollapsed(value => !value) }}\n >\n <IconChevronRightOutline14 />\n </button>\n )}\n </div>\n <div className=\"ya-recent-list-wrap\">\n {recent.length === 0\n ? <div className=\"ya-empty\">{t('noSessions')}</div>\n : <div className=\"ya-recent-list\">{recent.map(row => sessionItem(row, true))}</div>\n }\n </div>\n </div>\n <div className=\"ya-breadcrumb\">\n {selectedKey === null ? (\n <span className=\"ya-crumb\">{t('workspaces')}</span>\n ) : (\n <>\n <button type=\"button\" className=\"ya-crumb\" onClick={() => { setDirection('backward'); setSelectedKey(null) }}>{t('workspaces')}</button>\n <IconChevronRightOutline14 />\n <span className=\"ya-crumb\">{selectedKey === UNGROUPED ? t('ungrouped') : selectedWorkspace?.title}</span>\n {selectedKey !== UNGROUPED && (\n <button type=\"button\" className=\"ya-icon-button\" aria-label={t('newSession')} onClick={() => { startSession(selectedKey) }}><IconPlusOutline16 /></button>\n )}\n </>\n )}\n </div>\n <div className=\"ya-scroll\" role=\"tree\" aria-label={selectedKey === null ? t('workspaces') : t('sessions')}>\n <div key={selectedKey ?? 'root'} className={hasMounted ? `ya-level-enter-${direction}` : undefined}>\n {selectedKey === null\n ? workspaceRows.map(row => (\n <WorkspaceItem\n key={row.key}\n row={row}\n enter={() => { setDirection('forward'); setSelectedKey(row.key) }}\n create={() => { if (row.key !== UNGROUPED) startSession(row.key) }}\n rename={() => { beginWorkspaceRename(row) }}\n remove={() => { setDeleteTarget(row); setRenameError(null) }}\n t={t}\n />\n ))\n : selectedKey === UNGROUPED\n ? levelRows.map(row => sessionItem(row, false))\n : levelGroups.flatMap(group => [\n <div key={`group-${group.dateKey}`} className=\"ya-date-group-label\" role=\"separator\">\n {dateGroupLabel(group, now, t)}\n </div>,\n ...group.rows.map(row => sessionItem(row, false)),\n ])}\n {selectedKey === null && workspaceRows.length === 0 && <div className=\"ya-empty\">{t('noWorkspaces')}</div>}\n {selectedKey !== null && levelEmpty && <div className=\"ya-empty\">{t('noSessions')}</div>}\n </div>\n </div>\n </>\n )}\n </div>\n )}\n\n <Modal\n open={workspaceRename !== null || sessionRename !== null}\n onClose={closeRename}\n closeLabel={t('cancel')}\n title={workspaceRename !== null ? t('renameWorkspace') : t('renameSession')}\n footer={(\n <>\n <Button variant=\"outline\" disabled={busy} onClick={closeRename}>{t('cancel')}</Button>\n <Button variant=\"primary\" disabled={busy || renameDraft.trim() === ''} onClick={commitRename}>{t('rename')}</Button>\n </>\n )}\n >\n <input className=\"ya-rename-input\" value={renameDraft} autoFocus disabled={busy} aria-label={workspaceRename !== null ? t('workspaceName') : t('sessionName')} onChange={event => { setRenameDraft(event.target.value); setRenameError(null) }} />\n {renameError !== null && <div className=\"ya-error\" role=\"alert\">{renameError}</div>}\n </Modal>\n\n <Modal\n open={deleteTarget !== null}\n onClose={() => { if (!busy) setDeleteTarget(null) }}\n closeLabel={t('cancel')}\n title={t('deleteWorkspace')}\n description={deleteTarget === null ? undefined : t('deleteDescription', { name: deleteTarget.title })}\n footer={(\n <>\n <Button variant=\"outline\" disabled={busy} onClick={() => { setDeleteTarget(null) }}>{t('cancel')}</Button>\n <Button variant=\"outline\" disabled={busy} onClick={confirmDelete}>{t('deleteWorkspace')}</Button>\n </>\n )}\n >\n {renameError !== null && <div className=\"ya-error\" role=\"alert\">{renameError}</div>}\n </Modal>\n </div>\n )\n}\n","/** Client assembly for the replacement workspace sidebar and hero picker. */\nimport type { HostObservable } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { ClientContext } from '@deepseek-ai/dsh-client-runtime/client'\nimport type {} from '@deepseek-ai/dsh-client-locale/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-sidebar/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-conversation/client'\nimport type { PickerInjected, SidebarInjected } from './contract.ts'\nimport { en, NS, zh } from './locales.ts'\nimport { installStyles } from './styles.ts'\nimport { WorkspacePicker } from './WorkspacePicker.tsx'\nimport { WorkspaceSidebar } from './WorkspaceSidebar.tsx'\n\n/** Services required by both replacement client entries. */\nexport const inject = ['slots', 'sessions', 'workspaces', 'locale']\n\n/** Register the sidebar browser and conversation hero picker. */\nexport function apply(ctx: ClientContext): void {\n ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'ya-workspace-sidebar: dictionaries')\n ctx.effect(installStyles, 'ya-workspace-sidebar: styles')\n\n const flowSource = (\n name: 'sidebar.workspaces.directoryFlow' | 'conversation.hero.workspace.directoryFlow',\n ): HostObservable<boolean> => ({\n getSnapshot: () => ctx.slots.entries(name).length > 0,\n subscribe: listener => ctx.slots.subscribe(name, listener),\n })\n const sidebarFlow = flowSource('sidebar.workspaces.directoryFlow')\n const pickerFlow = flowSource('conversation.hero.workspace.directoryFlow')\n const createWorkspace = (input: { path: string }) => ctx.workspaces.create(input)\n\n const searchSessions: SidebarInjected['searchSessions'] = async (query, signal) => {\n const result = await ctx.sessions.search(query, signal)\n if (!result.ok) throw new Error(result.error.message)\n return result.value\n }\n const sidebarInjected = (): SidebarInjected => ({\n startSession: workspaceId => { ctx.workspaces.startSession(workspaceId) },\n open: sessionId => { ctx.sessions.open(sessionId) },\n searchSessions,\n searchResultLimit: ctx.sessions.searchResultLimit,\n renameSession: async (sessionId, title) => {\n const session = ctx.sessions.binding(sessionId)?.session\n if (session === undefined) throw new Error(`unknown session \"${sessionId}\"`)\n const result = await session.rename(title)\n if (!result.ok) throw new Error(result.error.message)\n },\n forkSession: sessionId => {\n ctx.sessions.fork({ sessionId, increaseTitle: true })\n .then(childId => { ctx.sessions.open(childId) })\n .catch(() => {})\n },\n renameWorkspace: async (workspaceId, title) => { await ctx.workspaces.rename(workspaceId, title) },\n deleteWorkspace: async workspaceId => { await ctx.workspaces.delete(workspaceId) },\n archiveSession: async sessionId => { await ctx.workspaces.archiveSession(sessionId) },\n insertSessionBefore: async (workspaceId, sessionId, beforeSessionId) => {\n await ctx.workspaces.insertSessionBefore(workspaceId, sessionId, beforeSessionId)\n },\n createWorkspace,\n hooks: { directoryFlow: sidebarFlow },\n })\n const pickerInjected = (): PickerInjected => ({\n createWorkspace,\n hooks: { directoryFlow: pickerFlow },\n })\n\n ctx.slots.inject('sidebar.workspaces', () => ctx.slots.register({\n name: 'sidebar.workspaces',\n children: { 'sidebar.workspaces.directoryFlow': { kind: 'single', scope: 'root' } },\n inject: sidebarInjected,\n locale: NS,\n }, WorkspaceSidebar))\n\n ctx.slots.inject('conversation.hero.workspace', () => ctx.slots.register({\n name: 'conversation.hero.workspace',\n children: { 'conversation.hero.workspace.directoryFlow': { kind: 'single', scope: 'root' } },\n inject: pickerInjected,\n locale: NS,\n }, WorkspacePicker))\n}\n"],"mappings":";;;;;;;;;;;EACA,MAAa,KAAK;GAChB,YAAY;GACZ,UAAU;GACV,QAAQ;GACR,WAAW;GACX,YAAY;GACZ,UAAU;GACV,cAAc;GACd,kBAAkB;GAClB,QAAQ;GACR,mBAAmB;GACnB,aAAa;GACb,WAAW;GACX,mBAAmB;GACnB,WAAW;GACX,YAAY;GACZ,cAAc;GACd,SAAS;GACT,QAAQ;GACR,iBAAiB;GACjB,eAAe;GACf,iBAAiB;GACjB,mBAAmB;GACnB,MAAM;GACN,SAAS;GACT,QAAQ;GACR,SAAS;GACT,OAAO;GACP,aAAa;GACb,eAAe;GACf,aAAa;GAC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AAQ;GACV,GAAG,eAAe,CAAC;EACrB"}
|
|
1
|
+
{"version":3,"file":"client.js","names":["useState","useCallback","IconPlusOutline16","IconFolderClose16","Menu","Modal","Button","StateDot","useState","IconTrashOutline16","IconArchiveOutline20","Menu","IconEditOutline16","IconBranchOutline16","IconEllipsisOutline16","IconFolderClose16","IconPlusOutline16","IconChevronRightOutline14","useMemo","useRef","IconProjectAddOutline16","IconSearchOutline16","IconCloseFill14","Modal","Button"],"sources":["../src/client/locales.ts","../src/client/styles.ts","../src/client/WorkspacePicker.tsx","../src/client/model.ts","../src/client/settings.ts","../src/client/WorkspaceSidebar.tsx","../src/client/index.ts"],"sourcesContent":["/** Product copy for the replacement workspace browser. */\nexport const zh = {\n workspaces: '工作区',\n sessions: '会话',\n recent: '最近会话',\n ungrouped: '未分组',\n newSession: '新会话',\n addWorkspace: '添加工作区',\n addWorkspaceMenu: '添加工作区…',\n search: '搜索会话',\n searchPlaceholder: '搜索名称、关键词…',\n clearSearch: '清除搜索',\n searching: '正在搜索会话历史…',\n searchUnavailable: '内容搜索暂不可用,仅显示名称匹配。',\n noMatches: '无匹配会话',\n noSessions: '暂无会话',\n noWorkspaces: '暂无工作区',\n loading: '正在加载工作区…',\n rename: '重命名',\n renameWorkspace: '重命名工作区',\n renameSession: '重命名会话',\n deleteWorkspace: '删除工作区',\n deleteDescription: '将把“{name}”从工作区列表中移除。文件夹与会话记录会保留。',\n fork: '分叉会话',\n archive: '归档会话',\n archiveMode: '归档模式',\n deleteMode: '删除模式',\n deleteSession: '删除会话',\n deleteSessionTitle: '删除会话',\n deleteSessionConfirm: '确定要删除此会话吗?删除后将从列表中移除,此操作不可撤销。',\n toggleActionMode: '切换归档/删除模式',\n actionModeLabel: '会话操作',\n cancel: '取消',\n confirm: '确认',\n retry: '重新选择',\n folderError: '无法打开文件夹',\n workspaceName: '工作区名称',\n sessionName: '会话名称',\n count: '{n} 个会话',\n now: '刚刚',\n minutes: '{n}分钟',\n hours: '{n}小时',\n days: '{n}天',\n months: '{n}个月',\n years: '{n}年',\n running: '进行中',\n waiting: '等待交互',\n completed: '已完成',\n collapse: '折叠',\n expand: '展开',\n today: '今天',\n yesterday: '昨天',\n date: '{m}月{d}日',\n dateYear: '{y}年{m}月{d}日',\n} satisfies Record<string, string>\n\nexport type YaWorkspaceKey = keyof typeof zh\n\nexport const en = {\n workspaces: 'Workspaces',\n sessions: 'Sessions',\n recent: 'Recent Sessions',\n ungrouped: 'Ungrouped',\n newSession: 'New Session',\n addWorkspace: 'Add workspace',\n addWorkspaceMenu: 'Add workspace…',\n search: 'Search sessions',\n searchPlaceholder: 'Search name, keywords...',\n clearSearch: 'Clear search',\n searching: 'Searching session history…',\n searchUnavailable: 'Content search is unavailable. Showing name matches.',\n noMatches: 'No matching sessions',\n noSessions: 'No sessions yet',\n noWorkspaces: 'No workspaces yet',\n loading: 'Loading workspaces…',\n rename: 'Rename',\n renameWorkspace: 'Rename workspace',\n renameSession: 'Rename session',\n deleteWorkspace: 'Delete workspace',\n deleteDescription: 'This removes “{name}” from the workspace list. The folder and session logs remain.',\n fork: 'Fork session',\n archive: 'Archive session',\n archiveMode: 'Archive mode',\n deleteMode: 'Delete mode',\n deleteSession: 'Delete session',\n deleteSessionTitle: 'Delete session',\n deleteSessionConfirm: 'Are you sure you want to delete this session? It will be removed from the list. This cannot be undone.',\n toggleActionMode: 'Toggle archive/delete mode',\n actionModeLabel: 'Session action',\n cancel: 'Cancel',\n confirm: 'Confirm',\n retry: 'Choose again',\n folderError: 'Couldn’t open folder',\n workspaceName: 'Workspace name',\n sessionName: 'Session name',\n count: '{n} sessions',\n now: 'now',\n minutes: '{n}min',\n hours: '{n}h',\n days: '{n}d',\n months: '{n}mo',\n years: '{n}y',\n running: 'Running',\n waiting: 'Waiting for interaction',\n completed: 'Completed',\n collapse: 'Collapse',\n expand: 'Expand',\n today: 'Today',\n yesterday: 'Yesterday',\n date: '{m}/{d}',\n dateYear: '{m}/{d}/{y}',\n} satisfies Record<YaWorkspaceKey, string>\n\nexport const NS = 'ya-workspace-sidebar'\n","/** One scoped stylesheet injected for the lifetime of the client activation. */\nexport const CSS = `\n[data-ya-workspace-sidebar] { flex:1; min-height:0; display:flex; flex-direction:column; box-sizing:border-box; padding-right:var(--dsh-sidebar-inline-padding); color:var(--dsw-alias-label-primary); }\n[data-ya-workspace-sidebar].ya-rail { padding-right:0; }\n.ya-section-header { flex:none; height:36px; display:flex; align-items:center; justify-content:flex-end; gap:4px; padding-left:12px; margin-bottom:4px; box-sizing:border-box; color:var(--dsw-alias-label-tertiary); }\n.ya-section-title { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }\n.ya-icon-button { flex:none; width:28px; height:28px; border:0; border-radius:50%; padding:0; display:inline-flex; align-items:center; justify-content:center; color:var(--dsw-alias-label-secondary); background:transparent; cursor:pointer; }\n.ya-icon-button:hover { background:var(--dsw-alias-interactive-bg-hover); }\n.ya-search { flex:none; height:38px; margin:0 2px 10px; padding:0 14px; display:flex; align-items:center; gap:8px; box-sizing:border-box; border:1px solid var(--dsw-alias-border-l2); border-radius:24px; background:var(--dsw-static-neutral-bluish-75); color:var(--dsw-alias-label-caption); }\nbody[data-ds-dark-theme] .ya-search { background:var(--dsw-static-neutral-bluish-900); }\n.ya-search-input { flex:1; min-width:0; border:0; outline:0; background:transparent; color:var(--dsw-alias-label-primary); font:inherit; font-size:14px; }\n.ya-search-input::placeholder { color:var(--dsw-alias-label-tertiary); }\n.ya-search-icon { flex:none; display:inline-flex; border:0; padding:0; color:inherit; background:transparent; }\n.ya-body { flex:1; min-height:0; display:flex; flex-direction:column; overflow:hidden; margin-right:calc(-1 * var(--dsh-sidebar-inline-padding)); padding-right:var(--dsh-sidebar-inline-padding); }\n.ya-recent { flex:none; padding-bottom:8px; border-bottom:1px solid var(--dsw-alias-border-l2); }\n.ya-recent-collapsed { padding-bottom:0; border-bottom-color:transparent; }\n.ya-recent-list-wrap { display:grid; grid-template-rows:1fr; transition:grid-template-rows 220ms ease-out; }\n.ya-recent-collapsed .ya-recent-list-wrap { grid-template-rows:0fr; }\n.ya-recent-list { display:flex; flex-direction:column; overflow:hidden; min-height:0; }\n.ya-block-label { height:26px; display:flex; align-items:center; gap:2px; padding:0 8px; color:var(--dsw-alias-label-tertiary); font-size:12px; font-weight:600; letter-spacing:.02em; text-transform:uppercase; }\n.ya-block-label-toggle { flex:none; width:20px; height:20px; margin-left:auto; border:0; border-radius:6px; padding:0; display:inline-flex; align-items:center; justify-content:center; background:transparent; color:var(--dsw-alias-label-tertiary); cursor:pointer; transition:transform 180ms ease-out; }\n.ya-block-label-toggle:hover { background:var(--dsw-alias-interactive-bg-hover); color:var(--dsw-alias-label-secondary); }\n.ya-block-label-toggle.ya-collapsed { transform:rotate(-90deg); }\n.ya-date-group-label { height:26px; display:flex; align-items:center; padding:0 8px; color:var(--dsw-alias-label-tertiary); font-size:12px; font-weight:600; letter-spacing:.02em; }\n.ya-breadcrumb { flex:none; height:34px; display:flex; align-items:center; gap:2px; padding:0 6px; color:var(--dsw-alias-label-tertiary); font-size:13px; }\n.ya-crumb { border:0; padding:4px 3px; border-radius:6px; background:transparent; color:inherit; font:inherit; cursor:default; min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }\nbutton.ya-crumb:hover { background:var(--dsw-alias-interactive-bg-hover); color:var(--dsw-alias-label-primary); cursor:pointer; }\n.ya-scroll { flex:1; min-height:0; overflow-y:auto; padding-bottom:12px; }\n.ya-row { position:relative; min-height:34px; display:flex; align-items:center; gap:6px; margin:1px 0; padding:0 7px; border-radius:9px; box-sizing:border-box; color:var(--dsw-alias-label-primary); cursor:pointer; user-select:none; }\n.ya-row:hover, .ya-row.ya-menu-open { background:var(--dsw-alias-interactive-bg-hover); }\n.ya-row.ya-selected { background:var(--dsw-alias-interactive-bg-selected); }\n.ya-workspace-row { min-height:40px; }\n.ya-row-main { flex:1; min-width:0; display:flex; flex-direction:column; justify-content:center; }\n.ya-row-line { display:flex; align-items:center; min-width:0; gap:6px; }\n.ya-row-title { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; line-height:18px; }\n.ya-row-meta { flex:none; color:var(--dsw-alias-label-tertiary); font-size:11px; white-space:nowrap; }\n.ya-workspace-path { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--dsw-alias-label-tertiary); font-size:11px; line-height:15px; }\n.ya-row-actions { flex:none; display:flex; align-items:center; gap:2px; opacity:0; pointer-events:none; transition:opacity 120ms ease-out; }\n.ya-row:hover .ya-row-actions, .ya-menu-open .ya-row-actions { opacity:1; pointer-events:auto; }\n.ya-status-slot { flex:none; width:16px; height:16px; display:inline-flex; align-items:center; justify-content:center; color:var(--dsw-alias-label-tertiary); }\n.ya-recent .ya-row { min-height:31px; }\n.ya-search-workspace { color:var(--dsw-alias-label-tertiary); font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n.ya-empty, .ya-status { padding:18px 10px; color:var(--dsw-alias-label-tertiary); text-align:center; font-size:13px; }\n.ya-warning { color:var(--dsw-alias-status-warning); }\n.ya-rename-input { width:100%; height:38px; box-sizing:border-box; border:1px solid var(--dsw-alias-border-l2); border-radius:9px; padding:0 11px; background:transparent; color:var(--dsw-alias-label-primary); outline:none; }\n.ya-error { margin-top:8px; color:var(--dsw-alias-status-error); font-size:12px; }\n.ya-rail .ya-section-header { padding-left:0; margin-bottom:12px; }\n.ya-rail .ya-icon-button, .ya-rail .ya-search { width:36px; height:36px; padding:0; margin:0 0 12px; border-color:transparent; background:transparent; }\n.ya-rail .ya-search { justify-content:center; }\n.ya-rail .ya-search-icon { cursor:pointer; color:var(--dsw-alias-label-primary); }\n.ya-picker-error { color:var(--dsw-alias-status-error); white-space:pre-wrap; }\n.ya-action-mode-toggle.ya-action-mode-delete { color:var(--dsw-alias-state-error-primary); }\n.ya-action-mode-toggle.ya-action-mode-delete:hover { background:var(--dsw-alias-interactive-bg-hover-danger); }\n@keyframes ya-slide-in-forward { from { opacity:0; transform:translateX(10px); } to { opacity:1; transform:translateX(0); } }\n@keyframes ya-slide-in-backward { from { opacity:0; transform:translateX(-10px); } to { opacity:1; transform:translateX(0); } }\n.ya-level-enter-forward { animation:ya-slide-in-forward 180ms ease-out; }\n.ya-level-enter-backward { animation:ya-slide-in-backward 180ms ease-out; }\n`\n\n/** Install the stylesheet and return its disposer. */\nexport function installStyles(): () => void {\n const style = document.createElement('style')\n style.setAttribute('data-ya-workspace-sidebar-style', '')\n style.textContent = CSS\n document.head.appendChild(style)\n return () => { style.remove() }\n}\n","/** Existing-workspace menu plus composed directory-adoption flow. */\nimport type { ReactNode, RefObject } from 'react'\nimport { useCallback, useEffect, useState } from 'react'\nimport {\n Button, IconFolderClose16, IconPlusOutline16, Menu, Modal, type MenuEntry,\n} from '@deepseek-ai/dsh-client-ui-primitives'\nimport type {\n WorkspaceId, WorkspaceListState, WorkspaceView,\n} from '@deepseek-ai/dsh-client-runtime/client'\nimport type { SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { DirectoryFlowOwnerProps, PickerProps } from './contract.ts'\n\nconst ADD = '::ya-add-workspace'\n\ninterface FlowProps {\n t: PickerProps['t']\n open: boolean\n anchorRef?: RefObject<HTMLElement | null>\n useWorkspaces: <S>(selector: (state: WorkspaceListState) => S) => S\n createWorkspace: (input: { path: string }) => Promise<WorkspaceView>\n useDirectoryFlow: SnapshotSelectorHook<boolean>\n renderDirectoryFlow: (owner: DirectoryFlowOwnerProps) => ReactNode\n onPick: (workspaceId: WorkspaceId) => void\n onClose: () => void\n addOnly?: boolean\n side?: 'bottom' | 'top' | 'right'\n selectedId?: WorkspaceId\n}\n\n/** Render the workspace target menu and directory picking conversation. */\nexport function WorkspacePickFlow({\n t, open, anchorRef, useWorkspaces, createWorkspace, useDirectoryFlow,\n renderDirectoryFlow, onPick, onClose, addOnly = false, side = 'bottom', selectedId,\n}: FlowProps) {\n const snapshot = useWorkspaces(state => state)\n const flowAvailable = useDirectoryFlow(value => value)\n const [flowOpen, setFlowOpen] = useState(false)\n const [busy, setBusy] = useState(false)\n const [error, setError] = useState<string | null>(null)\n const getAnchorRect = useCallback(\n () => anchorRef?.current?.getBoundingClientRect() ?? null,\n [anchorRef],\n )\n useEffect(() => {\n if (flowOpen && !flowAvailable) setFlowOpen(false)\n }, [flowAvailable, flowOpen])\n\n const openFlow = useCallback(() => {\n onClose()\n setError(null)\n setFlowOpen(true)\n }, [onClose])\n const addEntries: MenuEntry[] = flowAvailable\n ? [{ id: ADD, label: t('addWorkspaceMenu'), icon: <IconPlusOutline16 size={16} />, disabled: flowOpen || busy }]\n : []\n const pinnedAdd = !addOnly && snapshot.items.length > 0\n const items: MenuEntry[] = pinnedAdd\n ? snapshot.items.map(workspace => ({\n id: workspace.workspaceId,\n label: workspace.title,\n icon: <IconFolderClose16 size={16} />,\n disabled: flowOpen || busy,\n }))\n : addEntries\n const settled = addOnly || snapshot.phase === 'ready'\n const onlyAdd = !pinnedAdd && settled && addEntries.length === 1\n useEffect(() => {\n if (open && onlyAdd && !flowOpen && !busy) openFlow()\n }, [busy, flowOpen, onlyAdd, open, openFlow])\n\n const owner: DirectoryFlowOwnerProps = {\n open: flowOpen,\n busy,\n onPicked: (path) => {\n setBusy(true)\n createWorkspace({ path }).then(workspace => {\n setFlowOpen(false)\n onPick(workspace.workspaceId)\n }).catch((reason: unknown) => {\n setFlowOpen(false)\n setError(reason instanceof Error ? reason.message : String(reason))\n }).finally(() => { setBusy(false) })\n },\n onCancel: () => { setFlowOpen(false) },\n onError: (message) => { setFlowOpen(false); setError(message) },\n }\n\n return (\n <>\n <Menu\n open={open && !onlyAdd && items.length > 0}\n anchor={null}\n items={items}\n {...pinnedAdd ? { footer: addEntries } : {}}\n selectedId={selectedId}\n onSelect={(id) => { if (id === ADD) openFlow(); else onPick(id as WorkspaceId) }}\n onClose={onClose}\n side={side}\n portal\n getAnchorRect={getAnchorRect}\n />\n {open && !onlyAdd && snapshot.phase === 'pending' && <div className=\"ya-status\">{t('loading')}</div>}\n {renderDirectoryFlow(owner)}\n <Modal\n open={error !== null}\n onClose={() => { setError(null) }}\n closeLabel={t('cancel')}\n title={t('folderError')}\n footer={(\n <>\n <Button variant=\"outline\" onClick={() => { setError(null) }}>{t('cancel')}</Button>\n <Button variant=\"primary\" disabled={!flowAvailable} onClick={openFlow}>{t('retry')}</Button>\n </>\n )}\n >\n <div className=\"ya-picker-error\" role=\"alert\">{error}</div>\n </Modal>\n </>\n )\n}\n\n/** Fill the conversation hero's workspace picker seat. */\nexport function WorkspacePicker({\n open, anchorRef, useWorkspaces, selectedId, onPick, onClose,\n createWorkspace, useDirectoryFlow, renderSlot, t,\n}: PickerProps) {\n return (\n <WorkspacePickFlow\n t={t}\n open={open}\n anchorRef={anchorRef}\n useWorkspaces={useWorkspaces}\n selectedId={selectedId}\n onPick={onPick}\n onClose={onClose}\n createWorkspace={createWorkspace}\n useDirectoryFlow={useDirectoryFlow}\n renderDirectoryFlow={owner => renderSlot('conversation.hero.workspace.directoryFlow', owner)}\n />\n )\n}\n","/** Pure sidebar projections shared by the browser and unit tests. */\nimport type {\n SessionId, SessionListState, SessionSummary, WorkspaceId, WorkspaceView,\n} from '@deepseek-ai/dsh-client-runtime/client'\n\n/** Navigation key for sessions not accounted to a real workspace. */\nexport const UNGROUPED = '__ya_ungrouped__' as const\n\n/** One sidebar session row. */\nexport interface SessionRow {\n id: SessionId\n title: string\n blank: boolean\n running: boolean\n pendingInteraction?: SessionSummary['pendingInteraction']\n completed: boolean\n updatedAt: number\n workspaceKey: WorkspaceId | typeof UNGROUPED\n workspaceTitle: string\n}\n\n/** One date-bucketed group of session rows for the real-workspace level. */\nexport interface SessionDateGroup {\n /** Local calendar date `YYYY-MM-DD`, stable key. */\n dateKey: string\n /** Days between today's local date and this group's local date (0=today, 1=yesterday, …). */\n dayOffset: number\n rows: SessionRow[]\n}\n\n/** One first-level workspace row. */\nexport interface WorkspaceRow {\n key: WorkspaceId | typeof UNGROUPED\n title: string\n path?: string\n createdAt?: string\n count: number\n real: boolean\n}\n\nfunction visible(summary: SessionSummary, current: SessionId | undefined, archived: ReadonlySet<SessionId>): boolean {\n return summary.origin !== 'subagent'\n && !archived.has(summary.id)\n && (!summary.blank || summary.id === current)\n}\n\nfunction rowOf(\n summary: SessionSummary,\n workspaceKey: WorkspaceId | typeof UNGROUPED,\n workspaceTitle: string,\n): SessionRow {\n return {\n id: summary.id,\n title: summary.blank ? 'New Session' : summary.displayTitle,\n blank: summary.blank,\n running: summary.running,\n ...(summary.pendingInteraction === undefined ? {} : { pendingInteraction: summary.pendingInteraction }),\n completed: summary.completed === true,\n updatedAt: summary.updatedAt,\n workspaceKey,\n workspaceTitle,\n }\n}\n\nfunction ownerIndex(workspaces: readonly WorkspaceView[]): Map<SessionId, WorkspaceView> {\n const result = new Map<SessionId, WorkspaceView>()\n for (const workspace of workspaces) {\n for (const sessionId of workspace.sessionIds) result.set(sessionId, workspace)\n }\n return result\n}\n\n/** Resolve the first/second-level destination for one session. */\nexport function workspaceKeyForSession(\n sessionId: SessionId | undefined,\n workspaces: readonly WorkspaceView[],\n): WorkspaceId | typeof UNGROUPED | null {\n if (sessionId === undefined) return null\n return ownerIndex(workspaces).get(sessionId)?.workspaceId ?? UNGROUPED\n}\n\n/** Derive global recent sessions, newest first. */\nexport function deriveRecent(\n list: SessionListState,\n workspaces: readonly WorkspaceView[],\n archivedSessionIds: readonly SessionId[],\n limit = 5,\n): SessionRow[] {\n const archived = new Set(archivedSessionIds)\n const owners = ownerIndex(workspaces)\n return list.ids\n .map(id => list.byId[id])\n .filter((summary): summary is SessionSummary => summary !== undefined && visible(summary, list.current, archived))\n .sort((a, b) => b.updatedAt - a.updatedAt || String(a.id).localeCompare(String(b.id)))\n .slice(0, limit)\n .map((summary) => {\n const workspace = owners.get(summary.id)\n return rowOf(summary, workspace?.workspaceId ?? UNGROUPED, workspace?.title ?? 'Ungrouped')\n })\n}\n\n/** Derive first-level real workspaces plus the virtual Ungrouped row. */\nexport function deriveWorkspaces(\n list: SessionListState,\n workspaces: readonly WorkspaceView[],\n archivedSessionIds: readonly SessionId[],\n): WorkspaceRow[] {\n const archived = new Set(archivedSessionIds)\n const accounted = new Set<SessionId>()\n const result = workspaces.map((workspace): WorkspaceRow => {\n let count = 0\n for (const id of workspace.sessionIds) {\n accounted.add(id)\n const summary = list.byId[id]\n if (summary !== undefined && visible(summary, list.current, archived)) count++\n }\n return {\n key: workspace.workspaceId,\n title: workspace.title,\n path: workspace.path,\n createdAt: workspace.createdAt,\n count,\n real: true,\n }\n })\n let ungrouped = 0\n for (const id of list.ids) {\n const summary = list.byId[id]\n if (summary !== undefined && !accounted.has(id) && visible(summary, list.current, archived)) ungrouped++\n }\n result.push({ key: UNGROUPED, title: 'Ungrouped', count: ungrouped, real: false })\n return result\n}\n\n/** Derive the selected workspace's sessions in its canonical order. */\nexport function deriveWorkspaceSessions(\n key: WorkspaceId | typeof UNGROUPED,\n list: SessionListState,\n workspaces: readonly WorkspaceView[],\n archivedSessionIds: readonly SessionId[],\n): SessionRow[] {\n const archived = new Set(archivedSessionIds)\n if (key === UNGROUPED) {\n const accounted = new Set(workspaces.flatMap(workspace => workspace.sessionIds))\n return list.ids\n .map(id => list.byId[id])\n .filter((summary): summary is SessionSummary => summary !== undefined\n && !accounted.has(summary.id)\n && visible(summary, list.current, archived))\n .sort((a, b) => b.updatedAt - a.updatedAt || String(a.id).localeCompare(String(b.id)))\n .map(summary => rowOf(summary, UNGROUPED, 'Ungrouped'))\n }\n const workspace = workspaces.find(item => item.workspaceId === key)\n if (workspace === undefined) return []\n return workspace.sessionIds\n .map(id => list.byId[id])\n .filter((summary): summary is SessionSummary => summary !== undefined && visible(summary, list.current, archived))\n .map(summary => rowOf(summary, workspace.workspaceId, workspace.title))\n}\n\n/** Format a local calendar date as `YYYY-MM-DD` (locale-agnostic, no padding surprises). */\nfunction localDateKey(year: number, month: number, day: number): string {\n const mm = month < 9 ? `0${month + 1}` : `${month + 1}`\n const dd = day < 10 ? `0${day}` : `${day}`\n return `${year}-${mm}-${dd}`\n}\n\n/** Whole-day difference between two local calendar dates (a - b) using UTC midnight. */\nfunction dayDiff(a: { year: number; month: number; day: number }, b: { year: number; month: number; day: number }): number {\n const msA = Date.UTC(a.year, a.month, a.day)\n const msB = Date.UTC(b.year, b.month, b.day)\n return Math.round((msA - msB) / 86_400_000)\n}\n\n/**\n * Derive the selected real workspace's sessions grouped by local calendar date.\n *\n * - Only real workspaces: `Ungrouped` falls back to {@link deriveWorkspaceSessions}.\n * - Groups are ordered by date descending; rows within a group by `updatedAt` descending.\n * - {@link visible} filter is reused (archived / subagent / blank visibility).\n * - Future timestamps clamp to today's bucket (`dayOffset` 0).\n * - `now` is the reference timestamp for \"today\"; pass `Date.now()` in production.\n */\nexport function deriveWorkspaceSessionGroups(\n key: WorkspaceId | typeof UNGROUPED,\n list: SessionListState,\n workspaces: readonly WorkspaceView[],\n archivedSessionIds: readonly SessionId[],\n now: number,\n): SessionDateGroup[] {\n if (key === UNGROUPED) return []\n const workspace = workspaces.find(item => item.workspaceId === key)\n if (workspace === undefined) return []\n const archived = new Set(archivedSessionIds)\n const rows = workspace.sessionIds\n .map(id => list.byId[id])\n .filter((summary): summary is SessionSummary => summary !== undefined && visible(summary, list.current, archived))\n .map(summary => rowOf(summary, workspace.workspaceId, workspace.title))\n if (rows.length === 0) return []\n\n const nowDate = new Date(now)\n const today = { year: nowDate.getFullYear(), month: nowDate.getMonth(), day: nowDate.getDate() }\n\n const buckets = new Map<string, { dayOffset: number; rows: SessionRow[] }>()\n for (const row of rows) {\n const ts = Math.min(row.updatedAt, now)\n const d = new Date(ts)\n const date = { year: d.getFullYear(), month: d.getMonth(), day: d.getDate() }\n const dateKey = localDateKey(date.year, date.month, date.day)\n let bucket = buckets.get(dateKey)\n if (bucket === undefined) {\n // dayOffset = today - date (positive for past dates). Future timestamps were\n // clamped to `now` above, so `date` never exceeds today; Math.max guards rounding noise.\n const offset = Math.max(0, dayDiff(today, date))\n bucket = { dayOffset: offset, rows: [] }\n buckets.set(dateKey, bucket)\n }\n bucket.rows.push(row)\n }\n\n const groups: SessionDateGroup[] = []\n for (const [dateKey, bucket] of buckets) {\n bucket.rows.sort((a, b) => b.updatedAt - a.updatedAt || String(a.id).localeCompare(String(b.id)))\n groups.push({ dateKey, dayOffset: bucket.dayOffset, rows: bucket.rows })\n }\n // Sort groups by date descending: newest date first = smallest dayOffset first.\n groups.sort((a, b) => a.dayOffset - b.dayOffset || a.dateKey.localeCompare(b.dateKey))\n return groups\n}\n\n/** Case-insensitive local title/workspace matching used beside Host content search. */\nexport function localMatches(rows: readonly SessionRow[], query: string): SessionRow[] {\n const normalized = query.trim().toLocaleLowerCase()\n if (normalized === '') return []\n return rows.filter(row => `${row.title}\\n${row.workspaceTitle}`.toLocaleLowerCase().includes(normalized))\n}\n","/**\n * Browser-local preference controlling whether the session row's destructive\n * action presents as Archive (default) or Delete. Delete mode renders the\n * row action red with a trash icon and gates the call behind a confirmation\n * modal; the underlying Host verb remains `archiveSession` (the only\n * session-level destructive API exposed by `ctx.workspaces`), which hides\n * the session from grouping surfaces while preserving its log.\n *\n * The preference is persisted to `localStorage` so it survives reloads and\n * remounts without host-side plumbing. Cross-device sync is intentionally\n * out of scope: this is a per-browser UX preference, not a deployment knob.\n */\n\n/** How the session row's destructive action presents and behaves. */\nexport type SessionActionMode = 'archive' | 'delete'\n\nconst STORAGE_KEY = 'ya-workspace-sidebar:action-mode'\n\nconst listeners = new Set<() => void>()\nlet currentMode: SessionActionMode = loadMode()\n\n/** Read the stored preference, falling back to `archive` on any failure. */\nfunction loadMode(): SessionActionMode {\n try {\n const value = window.localStorage.getItem(STORAGE_KEY)\n return value === 'delete' ? 'delete' : 'archive'\n } catch {\n return 'archive'\n }\n}\n\n/** Persist the preference; silently ignores quota or privacy-mode failures. */\nfunction persistMode(mode: SessionActionMode): void {\n try {\n window.localStorage.setItem(STORAGE_KEY, mode)\n } catch {\n // localStorage may be unavailable (private mode, quota exceeded); the\n // in-memory value still drives the current session.\n }\n}\n\n/** Current action mode snapshot. */\nexport function getActionMode(): SessionActionMode {\n return currentMode\n}\n\n/** Switch the action mode and notify subscribers. */\nexport function setActionMode(mode: SessionActionMode): void {\n if (mode === currentMode) return\n currentMode = mode\n persistMode(mode)\n for (const listener of [...listeners]) listener()\n}\n\n/** Subscribe to action mode changes; returns an unsubscribe disposer. */\nexport function subscribeActionMode(listener: () => void): () => void {\n listeners.add(listener)\n return () => { listeners.delete(listener) }\n}\n","/** Two-level workspace/session browser with a persistent global recent block. */\nimport { useEffect, useMemo, useRef, useState } from 'react'\nimport {\n Button, IconArchiveOutline20, IconBranchOutline16, IconChevronRightOutline14,\n IconCloseFill14, IconEditOutline16, IconEllipsisOutline16, IconFolderClose16,\n IconPlusOutline16, IconProjectAddOutline16, IconSearchOutline16, IconTrashOutline16,\n Menu, Modal, StateDot,\n} from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { SessionId, WorkspaceId } from '@deepseek-ai/dsh-client-runtime/client'\nimport type { SidebarProps } from './contract.ts'\nimport {\n deriveRecent, deriveWorkspaceSessionGroups, deriveWorkspaceSessions, deriveWorkspaces,\n localMatches, UNGROUPED, workspaceKeyForSession, type SessionDateGroup, type SessionRow,\n type WorkspaceRow,\n} from './model.ts'\nimport type { SessionActionMode } from './settings.ts'\nimport { getActionMode, setActionMode, subscribeActionMode } from './settings.ts'\nimport { WorkspacePickFlow } from './WorkspacePicker.tsx'\n\nconst SEARCH_DEBOUNCE_MS = 250\nconst SEARCH_MAX = 500\n\nfunction sanitized(value: string): string {\n return value.replaceAll('\\0', '').slice(0, SEARCH_MAX)\n}\n\nfunction relativeTime(updatedAt: number, now: number, t: SidebarProps['t']): string {\n const diff = Math.max(0, now - updatedAt)\n const minute = 60_000\n if (diff < minute) return t('now')\n if (diff < 60 * minute) return t('minutes', { n: Math.floor(diff / minute) })\n if (diff < 24 * 60 * minute) return t('hours', { n: Math.floor(diff / (60 * minute)) })\n if (diff < 30 * 24 * 60 * minute) return t('days', { n: Math.floor(diff / (24 * 60 * minute)) })\n if (diff < 365 * 24 * 60 * minute) return t('months', { n: Math.floor(diff / (30 * 24 * 60 * minute)) })\n return t('years', { n: Math.floor(diff / (365 * 24 * 60 * minute)) })\n}\n\n/** Format a date group's localized title from its dayOffset and `YYYY-MM-DD` key. */\nfunction dateGroupLabel(group: SessionDateGroup, now: number, t: SidebarProps['t']): string {\n if (group.dayOffset === 0) return t('today')\n if (group.dayOffset === 1) return t('yesterday')\n const parts = group.dateKey.split('-')\n const year = Number(parts[0])\n const month = Number(parts[1])\n const day = Number(parts[2])\n const nowDate = new Date(now)\n if (year === nowDate.getFullYear()) return t('date', { m: month, d: day })\n return t('dateYear', { y: year, m: month, d: day })\n}\n\nfunction SessionStatus({ row }: { row: SessionRow }) {\n if (row.pendingInteraction !== undefined) return <StateDot state=\"warning\" />\n if (row.running) return <StateDot state=\"ongoing\" />\n if (row.completed) return <StateDot state=\"done\" />\n return null\n}\n\ninterface SessionRowProps {\n row: SessionRow\n current: SessionId | undefined\n now: number\n open: (id: SessionId) => void\n rename: (row: SessionRow) => void\n fork: (id: SessionId) => void\n archive: (id: SessionId) => void\n t: SidebarProps['t']\n context?: boolean\n actionMode: SessionActionMode\n}\n\nfunction SessionItem({ row, current, now, open, rename, fork, archive, t, context, actionMode }: SessionRowProps) {\n const [menuOpen, setMenuOpen] = useState(false)\n const title = row.blank ? t('newSession') : row.title\n const isDelete = actionMode === 'delete'\n const actionLabel = isDelete ? t('deleteSession') : t('archive')\n const actionIcon = isDelete ? <IconTrashOutline16 /> : <IconArchiveOutline20 size={16} />\n return (\n <div\n className={`ya-row${row.id === current ? ' ya-selected' : ''}${menuOpen ? ' ya-menu-open' : ''}`}\n role=\"treeitem\"\n aria-selected={row.id === current}\n onClick={() => { open(row.id) }}\n >\n <span className=\"ya-status-slot\"><SessionStatus row={row} /></span>\n <span className=\"ya-row-main\">\n <span className=\"ya-row-line\">\n <span className=\"ya-row-title\">{title}</span>\n {!row.blank && <span className=\"ya-row-meta ya-row-time\">{relativeTime(row.updatedAt, now, t)}</span>}\n </span>\n {context === true && <span className=\"ya-search-workspace\">{row.workspaceTitle}</span>}\n </span>\n {!row.blank && (\n <span className=\"ya-row-actions\">\n <Menu\n open={menuOpen}\n onClose={() => { setMenuOpen(false) }}\n items={[\n { id: 'rename', label: t('rename'), icon: <IconEditOutline16 /> },\n { id: 'fork', label: t('fork'), icon: <IconBranchOutline16 /> },\n { id: 'archive', label: actionLabel, icon: actionIcon, danger: isDelete },\n ]}\n onSelect={(id) => {\n setMenuOpen(false)\n if (id === 'rename') rename(row)\n if (id === 'fork') fork(row.id)\n if (id === 'archive') archive(row.id)\n }}\n portal\n closeOnPointerLeave\n anchor={(\n <button\n type=\"button\"\n className=\"ya-icon-button\"\n aria-label={`${title} actions`}\n onClick={(event) => { event.stopPropagation(); setMenuOpen(value => !value) }}\n >\n <IconEllipsisOutline16 />\n </button>\n )}\n />\n </span>\n )}\n </div>\n )\n}\n\nfunction WorkspaceItem({ row, enter, create, rename, remove, t }: {\n row: WorkspaceRow\n enter: () => void\n create: () => void\n rename: () => void\n remove: () => void\n t: SidebarProps['t']\n}) {\n const [menuOpen, setMenuOpen] = useState(false)\n return (\n <div className={`ya-row ya-workspace-row${menuOpen ? ' ya-menu-open' : ''}`} role=\"treeitem\" onClick={enter} title={row.path}>\n <span className=\"ya-status-slot\"><IconFolderClose16 /></span>\n <span className=\"ya-row-main\">\n <span className=\"ya-row-line\">\n <span className=\"ya-row-title\">{row.real ? row.title : t('ungrouped')}</span>\n <span className=\"ya-row-meta\">{t('count', { n: row.count })}</span>\n </span>\n {row.path !== undefined && <span className=\"ya-workspace-path\">{row.path}</span>}\n </span>\n <span className=\"ya-row-actions\">\n {row.real && (\n <Menu\n open={menuOpen}\n onClose={() => { setMenuOpen(false) }}\n items={[\n { id: 'rename', label: t('rename'), icon: <IconEditOutline16 /> },\n { id: 'delete', label: t('deleteWorkspace'), icon: <IconTrashOutline16 />, danger: true },\n ]}\n onSelect={(id) => { setMenuOpen(false); if (id === 'rename') rename(); if (id === 'delete') remove() }}\n portal\n closeOnPointerLeave\n anchor={(\n <button type=\"button\" className=\"ya-icon-button\" onClick={(event) => { event.stopPropagation(); setMenuOpen(value => !value) }}>\n <IconEllipsisOutline16 />\n </button>\n )}\n />\n )}\n {row.real && (\n <button type=\"button\" className=\"ya-icon-button\" onClick={(event) => { event.stopPropagation(); create() }}>\n <IconPlusOutline16 />\n </button>\n )}\n </span>\n <IconChevronRightOutline14 />\n </div>\n )\n}\n\ninterface RemoteState {\n query: string\n status: 'idle' | 'loading' | 'ready' | 'error'\n items: readonly { sessionId: SessionId; snippet: string }[]\n hasMore: boolean\n}\n\n/** Fill `sidebar.workspaces` with the replacement browser. */\nexport function WorkspaceSidebar(props: SidebarProps) {\n const {\n wide, expandSidebar, useSessions, useWorkspaces, startSession, open, searchSessions,\n searchResultLimit, renameSession, forkSession, renameWorkspace, deleteWorkspace,\n archiveSession, createWorkspace, useDirectoryFlow, renderSlot, t,\n } = props\n const sessions = useSessions(state => state)\n const workspaceState = useWorkspaces(state => state)\n const workspaces = workspaceState.items\n const archived = workspaceState.archivedSessionIds\n const directoryFlowAvailable = useDirectoryFlow(value => value)\n const allRows = useMemo(\n () => deriveRecent(sessions, workspaces, archived, Number.MAX_SAFE_INTEGER),\n [archived, sessions, workspaces],\n )\n const recent = allRows.slice(0, 5)\n const workspaceRows = useMemo(\n () => deriveWorkspaces(sessions, workspaces, archived),\n [archived, sessions, workspaces],\n )\n const [selectedKey, setSelectedKey] = useState<WorkspaceId | typeof UNGROUPED | null>(null)\n const [direction, setDirection] = useState<'forward' | 'backward'>('forward')\n const [hasMounted, setHasMounted] = useState(false)\n useEffect(() => { setHasMounted(true) }, [])\n const observedCurrent = useRef<SessionId | undefined>(undefined)\n const initialized = useRef(false)\n useEffect(() => {\n if (initialized.current && observedCurrent.current === sessions.current) return\n initialized.current = true\n observedCurrent.current = sessions.current\n if (sessions.current !== undefined) { setDirection('forward'); setSelectedKey(workspaceKeyForSession(sessions.current, workspaces)) }\n }, [sessions.current, workspaces])\n useEffect(() => {\n if (selectedKey !== null && selectedKey !== UNGROUPED\n && !workspaces.some(workspace => workspace.workspaceId === selectedKey)) setSelectedKey(UNGROUPED)\n }, [selectedKey, workspaces])\n const selectedWorkspace = selectedKey === null || selectedKey === UNGROUPED\n ? undefined\n : workspaces.find(workspace => workspace.workspaceId === selectedKey)\n const now = Date.now()\n // Real workspace level renders date-bucketed groups; Ungrouped keeps the flat recency view.\n const levelGroups = useMemo(\n () => selectedKey !== null && selectedKey !== UNGROUPED\n ? deriveWorkspaceSessionGroups(selectedKey, sessions, workspaces, archived, now)\n : [],\n [archived, sessions, workspaces, selectedKey, now],\n )\n const levelRows = selectedKey === UNGROUPED\n ? deriveWorkspaceSessions(UNGROUPED, sessions, workspaces, archived)\n : []\n const levelEmpty = selectedKey === UNGROUPED ? levelRows.length === 0 : levelGroups.every(g => g.rows.length === 0)\n\n const [query, setQuery] = useState('')\n const normalizedQuery = sanitized(query).trim()\n const [remote, setRemote] = useState<RemoteState>({ query: '', status: 'idle', items: [], hasMore: false })\n useEffect(() => {\n if (normalizedQuery === '') {\n setRemote({ query: '', status: 'idle', items: [], hasMore: false })\n return\n }\n const controller = new AbortController()\n setRemote({ query: normalizedQuery, status: 'loading', items: [], hasMore: false })\n const timer = window.setTimeout(() => {\n searchSessions(normalizedQuery, controller.signal).then(result => {\n if (!controller.signal.aborted) setRemote({ query: normalizedQuery, status: 'ready', items: result.items, hasMore: result.hasMore })\n }).catch(() => {\n if (!controller.signal.aborted) setRemote({ query: normalizedQuery, status: 'error', items: [], hasMore: false })\n })\n }, SEARCH_DEBOUNCE_MS)\n return () => { window.clearTimeout(timer); controller.abort() }\n }, [normalizedQuery, searchSessions])\n const searchRows = useMemo(() => {\n if (normalizedQuery === '') return []\n const byId = new Map(localMatches(allRows, normalizedQuery).map(row => [row.id, row]))\n if (remote.query === normalizedQuery) {\n for (const item of remote.items) {\n const row = allRows.find(candidate => candidate.id === item.sessionId)\n if (row !== undefined) byId.set(row.id, row)\n }\n }\n return [...byId.values()].slice(0, searchResultLimit)\n }, [allRows, normalizedQuery, remote, searchResultLimit])\n\n const [pickerOpen, setPickerOpen] = useState(false)\n const pickerAnchor = useRef<HTMLButtonElement>(null)\n const [recentCollapsed, setRecentCollapsed] = useState(false)\n const [workspaceRename, setWorkspaceRename] = useState<WorkspaceRow | null>(null)\n const [sessionRename, setSessionRename] = useState<SessionRow | null>(null)\n const [renameDraft, setRenameDraft] = useState('')\n const [renameError, setRenameError] = useState<string | null>(null)\n const [busy, setBusy] = useState(false)\n const [deleteTarget, setDeleteTarget] = useState<WorkspaceRow | null>(null)\n const [actionMode, setActionModeState] = useState<SessionActionMode>(() => getActionMode())\n const [sessionDeleteTarget, setSessionDeleteTarget] = useState<SessionRow | null>(null)\n\n useEffect(() => subscribeActionMode(() => setActionModeState(getActionMode())), [])\n\n const beginWorkspaceRename = (row: WorkspaceRow) => { setWorkspaceRename(row); setRenameDraft(row.title); setRenameError(null) }\n const beginSessionRename = (row: SessionRow) => { setSessionRename(row); setRenameDraft(row.title); setRenameError(null) }\n const closeRename = () => { if (!busy) { setWorkspaceRename(null); setSessionRename(null); setRenameError(null) } }\n const commitRename = () => {\n const title = renameDraft.trim()\n if (title === '' || busy) return\n setBusy(true)\n const task = workspaceRename !== null && workspaceRename.key !== UNGROUPED\n ? renameWorkspace(workspaceRename.key, title)\n : sessionRename !== null ? renameSession(sessionRename.id, title) : Promise.resolve()\n task.then(() => { setWorkspaceRename(null); setSessionRename(null) })\n .catch((reason: unknown) => { setRenameError(reason instanceof Error ? reason.message : String(reason)) })\n .finally(() => { setBusy(false) })\n }\n const confirmDelete = () => {\n if (deleteTarget === null || deleteTarget.key === UNGROUPED || busy) return\n setBusy(true)\n deleteWorkspace(deleteTarget.key).then(() => { setDeleteTarget(null) })\n .catch((reason: unknown) => { setRenameError(reason instanceof Error ? reason.message : String(reason)) })\n .finally(() => { setBusy(false) })\n }\n const archive = (id: SessionId) => {\n if (actionMode === 'delete') {\n const row = allRows.find(candidate => candidate.id === id)\n ?? levelRows.find(candidate => candidate.id === id)\n ?? levelGroups.flatMap(g => g.rows).find(candidate => candidate.id === id)\n ?? recent.find(candidate => candidate.id === id)\n setSessionDeleteTarget(row ?? { id, title: '', blank: false, running: false, completed: false, updatedAt: 0, workspaceKey: UNGROUPED, workspaceTitle: '' })\n setRenameError(null)\n return\n }\n archiveSession(id).catch(reason => { console.warn('session archive rejected:', reason) })\n }\n const confirmSessionDelete = () => {\n if (sessionDeleteTarget === null || busy) return\n setBusy(true)\n archiveSession(sessionDeleteTarget.id).then(() => { setSessionDeleteTarget(null) })\n .catch((reason: unknown) => { setRenameError(reason instanceof Error ? reason.message : String(reason)) })\n .finally(() => { setBusy(false) })\n }\n const toggleActionMode = () => { setActionMode(actionMode === 'archive' ? 'delete' : 'archive') }\n const fork = (id: SessionId) => { forkSession(id) }\n\n const sessionItem = (row: SessionRow, context = false) => (\n <SessionItem\n key={row.id}\n row={row}\n current={sessions.current}\n now={now}\n open={open}\n rename={beginSessionRename}\n fork={fork}\n archive={archive}\n t={t}\n context={context}\n actionMode={actionMode}\n />\n )\n\n return (\n <div data-ya-workspace-sidebar className={wide ? '' : 'ya-rail'}>\n <div className=\"ya-section-header\">\n {wide && <span className=\"ya-section-title\">{t('workspaces')}</span>}\n <button\n type=\"button\"\n className={`ya-icon-button ya-action-mode-toggle${actionMode === 'delete' ? ' ya-action-mode-delete' : ''}`}\n aria-label={t('toggleActionMode')}\n aria-pressed={actionMode === 'delete'}\n title={actionMode === 'delete' ? t('deleteMode') : t('archiveMode')}\n onClick={(event) => { event.stopPropagation(); toggleActionMode() }}\n >\n {actionMode === 'delete' ? <IconTrashOutline16 size={wide ? 16 : 18} /> : <IconArchiveOutline20 size={wide ? 16 : 18} />}\n </button>\n {directoryFlowAvailable && (\n <button ref={pickerAnchor} type=\"button\" className=\"ya-icon-button\" aria-label={t('addWorkspace')} onClick={() => { setPickerOpen(value => !value) }}>\n <IconProjectAddOutline16 size={wide ? 16 : 18} />\n </button>\n )}\n <WorkspacePickFlow\n t={t}\n open={pickerOpen}\n anchorRef={pickerAnchor}\n useWorkspaces={useWorkspaces}\n createWorkspace={createWorkspace}\n useDirectoryFlow={useDirectoryFlow}\n renderDirectoryFlow={owner => renderSlot('sidebar.workspaces.directoryFlow', owner)}\n addOnly\n side=\"right\"\n onPick={(workspaceId) => { setPickerOpen(false); startSession(workspaceId) }}\n onClose={() => { setPickerOpen(false) }}\n />\n </div>\n\n <div className=\"ya-search\" onClick={() => { if (!wide) expandSidebar() }}>\n <button type=\"button\" className=\"ya-search-icon\" aria-label={t('search')}><IconSearchOutline16 size={wide ? 14 : 18} /></button>\n {wide && <input className=\"ya-search-input\" value={query} maxLength={SEARCH_MAX} placeholder={t('searchPlaceholder')} onChange={event => { setQuery(sanitized(event.target.value)) }} />}\n {wide && query !== '' && <button type=\"button\" className=\"ya-icon-button\" aria-label={t('clearSearch')} onClick={() => { setQuery('') }}><IconCloseFill14 /></button>}\n </div>\n\n {wide && (\n <div className=\"ya-body\">\n {normalizedQuery !== '' ? (\n <div className=\"ya-scroll\" role=\"tree\" aria-label={t('search')}>\n {searchRows.map(row => sessionItem(row, true))}\n {remote.status === 'loading' && <div className=\"ya-status\">{t('searching')}</div>}\n {remote.status === 'error' && <div className=\"ya-status ya-warning\">{t('searchUnavailable')}</div>}\n {remote.status !== 'loading' && searchRows.length === 0 && <div className=\"ya-empty\">{t('noMatches')}</div>}\n </div>\n ) : (\n <>\n <div className={`ya-recent${recentCollapsed ? ' ya-recent-collapsed' : ''}`}>\n <div className=\"ya-block-label\">\n <span>{t('recent')}</span>\n {recent.length > 0 && (\n <button\n type=\"button\"\n className={`ya-block-label-toggle${recentCollapsed ? ' ya-collapsed' : ''}`}\n aria-label={recentCollapsed ? t('expand') : t('collapse')}\n aria-expanded={!recentCollapsed}\n onClick={(event) => { event.stopPropagation(); setRecentCollapsed(value => !value) }}\n >\n <IconChevronRightOutline14 />\n </button>\n )}\n </div>\n <div className=\"ya-recent-list-wrap\">\n {recent.length === 0\n ? <div className=\"ya-empty\">{t('noSessions')}</div>\n : <div className=\"ya-recent-list\">{recent.map(row => sessionItem(row, true))}</div>\n }\n </div>\n </div>\n <div className=\"ya-breadcrumb\">\n {selectedKey === null ? (\n <span className=\"ya-crumb\">{t('workspaces')}</span>\n ) : (\n <>\n <button type=\"button\" className=\"ya-crumb\" onClick={() => { setDirection('backward'); setSelectedKey(null) }}>{t('workspaces')}</button>\n <IconChevronRightOutline14 />\n <span className=\"ya-crumb\">{selectedKey === UNGROUPED ? t('ungrouped') : selectedWorkspace?.title}</span>\n {selectedKey !== UNGROUPED && (\n <button type=\"button\" className=\"ya-icon-button\" aria-label={t('newSession')} onClick={() => { startSession(selectedKey) }}><IconPlusOutline16 /></button>\n )}\n </>\n )}\n </div>\n <div className=\"ya-scroll\" role=\"tree\" aria-label={selectedKey === null ? t('workspaces') : t('sessions')}>\n <div key={selectedKey ?? 'root'} className={hasMounted ? `ya-level-enter-${direction}` : undefined}>\n {selectedKey === null\n ? workspaceRows.map(row => (\n <WorkspaceItem\n key={row.key}\n row={row}\n enter={() => { setDirection('forward'); setSelectedKey(row.key) }}\n create={() => { if (row.key !== UNGROUPED) startSession(row.key) }}\n rename={() => { beginWorkspaceRename(row) }}\n remove={() => { setDeleteTarget(row); setRenameError(null) }}\n t={t}\n />\n ))\n : selectedKey === UNGROUPED\n ? levelRows.map(row => sessionItem(row, false))\n : levelGroups.flatMap(group => [\n <div key={`group-${group.dateKey}`} className=\"ya-date-group-label\" role=\"separator\">\n {dateGroupLabel(group, now, t)}\n </div>,\n ...group.rows.map(row => sessionItem(row, false)),\n ])}\n {selectedKey === null && workspaceRows.length === 0 && <div className=\"ya-empty\">{t('noWorkspaces')}</div>}\n {selectedKey !== null && levelEmpty && <div className=\"ya-empty\">{t('noSessions')}</div>}\n </div>\n </div>\n </>\n )}\n </div>\n )}\n\n <Modal\n open={workspaceRename !== null || sessionRename !== null}\n onClose={closeRename}\n closeLabel={t('cancel')}\n title={workspaceRename !== null ? t('renameWorkspace') : t('renameSession')}\n footer={(\n <>\n <Button variant=\"outline\" disabled={busy} onClick={closeRename}>{t('cancel')}</Button>\n <Button variant=\"primary\" disabled={busy || renameDraft.trim() === ''} onClick={commitRename}>{t('rename')}</Button>\n </>\n )}\n >\n <input className=\"ya-rename-input\" value={renameDraft} autoFocus disabled={busy} aria-label={workspaceRename !== null ? t('workspaceName') : t('sessionName')} onChange={event => { setRenameDraft(event.target.value); setRenameError(null) }} />\n {renameError !== null && <div className=\"ya-error\" role=\"alert\">{renameError}</div>}\n </Modal>\n\n <Modal\n open={deleteTarget !== null}\n onClose={() => { if (!busy) setDeleteTarget(null) }}\n closeLabel={t('cancel')}\n title={t('deleteWorkspace')}\n description={deleteTarget === null ? undefined : t('deleteDescription', { name: deleteTarget.title })}\n footer={(\n <>\n <Button variant=\"outline\" disabled={busy} onClick={() => { setDeleteTarget(null) }}>{t('cancel')}</Button>\n <Button variant=\"outline\" disabled={busy} onClick={confirmDelete}>{t('deleteWorkspace')}</Button>\n </>\n )}\n >\n {renameError !== null && <div className=\"ya-error\" role=\"alert\">{renameError}</div>}\n </Modal>\n\n <Modal\n open={sessionDeleteTarget !== null}\n onClose={() => { if (!busy) setSessionDeleteTarget(null) }}\n closeLabel={t('cancel')}\n title={t('deleteSessionTitle')}\n description={t('deleteSessionConfirm')}\n footer={(\n <>\n <Button variant=\"outline\" disabled={busy} onClick={() => { setSessionDeleteTarget(null) }}>{t('cancel')}</Button>\n <Button variant=\"outline\" disabled={busy} onClick={confirmSessionDelete}>{t('deleteSession')}</Button>\n </>\n )}\n >\n {renameError !== null && <div className=\"ya-error\" role=\"alert\">{renameError}</div>}\n </Modal>\n </div>\n )\n}\n","/** Client assembly for the replacement workspace sidebar and hero picker. */\nimport type { HostObservable } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { ClientContext } from '@deepseek-ai/dsh-client-runtime/client'\nimport type {} from '@deepseek-ai/dsh-client-locale/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-sidebar/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-conversation/client'\nimport type { PickerInjected, SidebarInjected } from './contract.ts'\nimport { en, NS, zh } from './locales.ts'\nimport { installStyles } from './styles.ts'\nimport { WorkspacePicker } from './WorkspacePicker.tsx'\nimport { WorkspaceSidebar } from './WorkspaceSidebar.tsx'\n\n/** Services required by both replacement client entries. */\nexport const inject = ['slots', 'sessions', 'workspaces', 'locale']\n\n/** Register the sidebar browser and conversation hero picker. */\nexport function apply(ctx: ClientContext): void {\n ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'ya-workspace-sidebar: dictionaries')\n ctx.effect(installStyles, 'ya-workspace-sidebar: styles')\n\n const flowSource = (\n name: 'sidebar.workspaces.directoryFlow' | 'conversation.hero.workspace.directoryFlow',\n ): HostObservable<boolean> => ({\n getSnapshot: () => ctx.slots.entries(name).length > 0,\n subscribe: listener => ctx.slots.subscribe(name, listener),\n })\n const sidebarFlow = flowSource('sidebar.workspaces.directoryFlow')\n const pickerFlow = flowSource('conversation.hero.workspace.directoryFlow')\n const createWorkspace = (input: { path: string }) => ctx.workspaces.create(input)\n\n const searchSessions: SidebarInjected['searchSessions'] = async (query, signal) => {\n const result = await ctx.sessions.search(query, signal)\n if (!result.ok) throw new Error(result.error.message)\n return result.value\n }\n const sidebarInjected = (): SidebarInjected => ({\n startSession: workspaceId => { ctx.workspaces.startSession(workspaceId) },\n open: sessionId => { ctx.sessions.open(sessionId) },\n searchSessions,\n searchResultLimit: ctx.sessions.searchResultLimit,\n renameSession: async (sessionId, title) => {\n const session = ctx.sessions.binding(sessionId)?.session\n if (session === undefined) throw new Error(`unknown session \"${sessionId}\"`)\n const result = await session.rename(title)\n if (!result.ok) throw new Error(result.error.message)\n },\n forkSession: sessionId => {\n ctx.sessions.fork({ sessionId, increaseTitle: true })\n .then(childId => { ctx.sessions.open(childId) })\n .catch(() => {})\n },\n renameWorkspace: async (workspaceId, title) => { await ctx.workspaces.rename(workspaceId, title) },\n deleteWorkspace: async workspaceId => { await ctx.workspaces.delete(workspaceId) },\n archiveSession: async sessionId => { await ctx.workspaces.archiveSession(sessionId) },\n insertSessionBefore: async (workspaceId, sessionId, beforeSessionId) => {\n await ctx.workspaces.insertSessionBefore(workspaceId, sessionId, beforeSessionId)\n },\n createWorkspace,\n hooks: { directoryFlow: sidebarFlow },\n })\n const pickerInjected = (): PickerInjected => ({\n createWorkspace,\n hooks: { directoryFlow: pickerFlow },\n })\n\n ctx.slots.inject('sidebar.workspaces', () => ctx.slots.register({\n name: 'sidebar.workspaces',\n children: { 'sidebar.workspaces.directoryFlow': { kind: 'single', scope: 'root' } },\n inject: sidebarInjected,\n locale: NS,\n }, WorkspaceSidebar))\n\n ctx.slots.inject('conversation.hero.workspace', () => ctx.slots.register({\n name: 'conversation.hero.workspace',\n children: { 'conversation.hero.workspace.directoryFlow': { kind: 'single', scope: 'root' } },\n inject: pickerInjected,\n locale: NS,\n }, WorkspacePicker))\n}\n"],"mappings":";;;;;;;;;;;EACA,MAAa,KAAK;GAChB,YAAY;GACZ,UAAU;GACV,QAAQ;GACR,WAAW;GACX,YAAY;GACZ,cAAc;GACd,kBAAkB;GAClB,QAAQ;GACR,mBAAmB;GACnB,aAAa;GACb,WAAW;GACX,mBAAmB;GACnB,WAAW;GACX,YAAY;GACZ,cAAc;GACd,SAAS;GACT,QAAQ;GACR,iBAAiB;GACjB,eAAe;GACf,iBAAiB;GACjB,mBAAmB;GACnB,MAAM;GACN,SAAS;GACT,aAAa;GACb,YAAY;GACZ,eAAe;GACf,oBAAoB;GACpB,sBAAsB;GACtB,kBAAkB;GAClB,iBAAiB;GACjB,QAAQ;GACR,SAAS;GACT,OAAO;GACP,aAAa;GACb,eAAe;GACf,aAAa;GACb,OAAO;GACP,KAAK;GACL,SAAS;GACT,OAAO;GACP,MAAM;GACN,QAAQ;GACR,OAAO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Ae;IAClF;IACA;IACA,OAAO,EAAE,eAAe,YAAY;GACtC;GACA,MAAM,wBAAwC;IAC5C;IACA,OAAO,EAAE,eAAe,WAAW;GACrC;GAEA,IAAI,MAAM,OAAO,4BAA4B,IAAI,MAAM,SAAS;IAC9D,MAAM;IACN,UAAU,EAAE,oCAAoC;KAAE,MAAM;KAAU,OAAO;IAAO,EAAE;IAClF,QAAQ;IACR,QAAQ;GACV,GAAG,gBAAgB,CAAC;GAEpB,IAAI,MAAM,OAAO,qCAAqC,IAAI,MAAM,SAAS;IACvE,MAAM;IACN,UAAU,EAAE,6CAA6C;KAAE,MAAM;KAAU,OAAO;IAAO,EAAE;IAC3F,QAAQ;IACR,QAAQ;GACV,GAAG,eAAe,CAAC;EACrB"}
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,76 @@
|
|
|
1
|
+
import { readFileSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { homedir } from "node:os";
|
|
3
|
+
import { join } from "node:path";
|
|
1
4
|
//#region src/index.ts
|
|
2
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Host half for the browser-only ya-workspace-sidebar plugin.
|
|
7
|
+
*
|
|
8
|
+
* The projection cache's write-behind is broken: `cache.write(session)`
|
|
9
|
+
* calls `sessionProjections.checkpoint(session)` which can return
|
|
10
|
+
* non-JSON-serializable values (live LLM state) during a turn, causing
|
|
11
|
+
* `put()` to throw `TypeError: projection checkpoint is not losslessly
|
|
12
|
+
* JSON-serializable`. Both the `turn/end` mandatory write and the throttle
|
|
13
|
+
* writes fail silently (fail-soft), so titles are never durably checkpointed
|
|
14
|
+
* and are lost on host restart.
|
|
15
|
+
*
|
|
16
|
+
* This listener works around the host bug by writing a title-only row
|
|
17
|
+
* directly to the cache file when a `session/title` event lands. The row
|
|
18
|
+
* format matches what `cachedSnapshot` reads: `{ identity, rows: { title } }`.
|
|
19
|
+
* The write is debounced and fail-soft to avoid blocking the event loop or
|
|
20
|
+
* corrupting the file on concurrent writes.
|
|
21
|
+
*/
|
|
3
22
|
const name = "ya-workspace-sidebar";
|
|
4
|
-
|
|
5
|
-
function apply() {
|
|
23
|
+
const CACHE_PATH = join(homedir(), ".dsh", "storages", "session_projcache.json");
|
|
24
|
+
function apply(ctx) {
|
|
25
|
+
let pending = /* @__PURE__ */ new Map();
|
|
26
|
+
let timer;
|
|
27
|
+
function flush() {
|
|
28
|
+
timer = void 0;
|
|
29
|
+
const batch = pending;
|
|
30
|
+
pending = /* @__PURE__ */ new Map();
|
|
31
|
+
if (batch.size === 0) return;
|
|
32
|
+
try {
|
|
33
|
+
const cache = JSON.parse(readFileSync(CACHE_PATH, "utf8"));
|
|
34
|
+
const sessions = cache.tables?.sessions ?? {};
|
|
35
|
+
for (const [id, payload] of batch) {
|
|
36
|
+
const identity = { createdAt: payload.createdAt };
|
|
37
|
+
if (payload.cwd !== void 0) identity.cwd = payload.cwd;
|
|
38
|
+
const existing = sessions[id];
|
|
39
|
+
if (existing === void 0) sessions[id] = {
|
|
40
|
+
identity,
|
|
41
|
+
rows: { title: {
|
|
42
|
+
ver: 1,
|
|
43
|
+
seq: payload.seq,
|
|
44
|
+
val: payload.title
|
|
45
|
+
} }
|
|
46
|
+
};
|
|
47
|
+
else {
|
|
48
|
+
existing.identity = identity;
|
|
49
|
+
if (existing.rows === void 0) existing.rows = {};
|
|
50
|
+
if (existing.rows.title === void 0 || existing.rows.title.seq <= payload.seq) existing.rows.title = {
|
|
51
|
+
ver: 1,
|
|
52
|
+
seq: payload.seq,
|
|
53
|
+
val: payload.title
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
cache.tables.sessions = sessions;
|
|
58
|
+
writeFileSync(CACHE_PATH, JSON.stringify(cache, null, 2) + "\n", "utf8");
|
|
59
|
+
} catch (error) {
|
|
60
|
+
ctx.logger.warn(`ya-workspace-sidebar: title cache flush failed: ${String(error)}`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
ctx.events.on("session/event", (session, event) => {
|
|
64
|
+
if (event.type !== "session/title") return;
|
|
65
|
+
if (event.data?.title === void 0) return;
|
|
66
|
+
pending.set(session.id, {
|
|
67
|
+
seq: event.seq,
|
|
68
|
+
title: event.data.title,
|
|
69
|
+
createdAt: session.header.createdAt,
|
|
70
|
+
cwd: session.header.cwd
|
|
71
|
+
});
|
|
72
|
+
if (timer === void 0) timer = setTimeout(flush, 2e3);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
6
75
|
//#endregion
|
|
7
76
|
export { apply, name };
|
|
@@ -5,7 +5,6 @@ export declare const zh: {
|
|
|
5
5
|
recent: string;
|
|
6
6
|
ungrouped: string;
|
|
7
7
|
newSession: string;
|
|
8
|
-
untitled: string;
|
|
9
8
|
addWorkspace: string;
|
|
10
9
|
addWorkspaceMenu: string;
|
|
11
10
|
search: string;
|
|
@@ -24,6 +23,13 @@ export declare const zh: {
|
|
|
24
23
|
deleteDescription: string;
|
|
25
24
|
fork: string;
|
|
26
25
|
archive: string;
|
|
26
|
+
archiveMode: string;
|
|
27
|
+
deleteMode: string;
|
|
28
|
+
deleteSession: string;
|
|
29
|
+
deleteSessionTitle: string;
|
|
30
|
+
deleteSessionConfirm: string;
|
|
31
|
+
toggleActionMode: string;
|
|
32
|
+
actionModeLabel: string;
|
|
27
33
|
cancel: string;
|
|
28
34
|
confirm: string;
|
|
29
35
|
retry: string;
|
|
@@ -54,7 +60,6 @@ export declare const en: {
|
|
|
54
60
|
recent: string;
|
|
55
61
|
ungrouped: string;
|
|
56
62
|
newSession: string;
|
|
57
|
-
untitled: string;
|
|
58
63
|
addWorkspace: string;
|
|
59
64
|
addWorkspaceMenu: string;
|
|
60
65
|
search: string;
|
|
@@ -73,6 +78,13 @@ export declare const en: {
|
|
|
73
78
|
deleteDescription: string;
|
|
74
79
|
fork: string;
|
|
75
80
|
archive: string;
|
|
81
|
+
archiveMode: string;
|
|
82
|
+
deleteMode: string;
|
|
83
|
+
deleteSession: string;
|
|
84
|
+
deleteSessionTitle: string;
|
|
85
|
+
deleteSessionConfirm: string;
|
|
86
|
+
toggleActionMode: string;
|
|
87
|
+
actionModeLabel: string;
|
|
76
88
|
cancel: string;
|
|
77
89
|
confirm: string;
|
|
78
90
|
retry: string;
|
|
@@ -6,8 +6,6 @@ export declare const UNGROUPED: "__ya_ungrouped__";
|
|
|
6
6
|
export interface SessionRow {
|
|
7
7
|
id: SessionId;
|
|
8
8
|
title: string;
|
|
9
|
-
/** Whether the session has a durable log-backed title (summary.title !== undefined). */
|
|
10
|
-
hasTitle: boolean;
|
|
11
9
|
blank: boolean;
|
|
12
10
|
running: boolean;
|
|
13
11
|
pendingInteraction?: SessionSummary['pendingInteraction'];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser-local preference controlling whether the session row's destructive
|
|
3
|
+
* action presents as Archive (default) or Delete. Delete mode renders the
|
|
4
|
+
* row action red with a trash icon and gates the call behind a confirmation
|
|
5
|
+
* modal; the underlying Host verb remains `archiveSession` (the only
|
|
6
|
+
* session-level destructive API exposed by `ctx.workspaces`), which hides
|
|
7
|
+
* the session from grouping surfaces while preserving its log.
|
|
8
|
+
*
|
|
9
|
+
* The preference is persisted to `localStorage` so it survives reloads and
|
|
10
|
+
* remounts without host-side plumbing. Cross-device sync is intentionally
|
|
11
|
+
* out of scope: this is a per-browser UX preference, not a deployment knob.
|
|
12
|
+
*/
|
|
13
|
+
/** How the session row's destructive action presents and behaves. */
|
|
14
|
+
export type SessionActionMode = 'archive' | 'delete';
|
|
15
|
+
/** Current action mode snapshot. */
|
|
16
|
+
export declare function getActionMode(): SessionActionMode;
|
|
17
|
+
/** Switch the action mode and notify subscribers. */
|
|
18
|
+
export declare function setActionMode(mode: SessionActionMode): void;
|
|
19
|
+
/** Subscribe to action mode changes; returns an unsubscribe disposer. */
|
|
20
|
+
export declare function subscribeActionMode(listener: () => void): () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/** One scoped stylesheet injected for the lifetime of the client activation. */
|
|
2
|
-
export declare const CSS = "\n[data-ya-workspace-sidebar] { flex:1; min-height:0; display:flex; flex-direction:column; box-sizing:border-box; padding-right:var(--dsh-sidebar-inline-padding); color:var(--dsw-alias-label-primary); }\n[data-ya-workspace-sidebar].ya-rail { padding-right:0; }\n.ya-section-header { flex:none; height:36px; display:flex; align-items:center; justify-content:flex-end; gap:4px; padding-left:12px; margin-bottom:4px; box-sizing:border-box; color:var(--dsw-alias-label-tertiary); }\n.ya-section-title { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }\n.ya-icon-button { flex:none; width:28px; height:28px; border:0; border-radius:50%; padding:0; display:inline-flex; align-items:center; justify-content:center; color:var(--dsw-alias-label-secondary); background:transparent; cursor:pointer; }\n.ya-icon-button:hover { background:var(--dsw-alias-interactive-bg-hover); }\n.ya-search { flex:none; height:38px; margin:0 2px 10px; padding:0 14px; display:flex; align-items:center; gap:8px; box-sizing:border-box; border:1px solid var(--dsw-alias-border-l2); border-radius:24px; background:var(--dsw-static-neutral-bluish-75); color:var(--dsw-alias-label-caption); }\nbody[data-ds-dark-theme] .ya-search { background:var(--dsw-static-neutral-bluish-900); }\n.ya-search-input { flex:1; min-width:0; border:0; outline:0; background:transparent; color:var(--dsw-alias-label-primary); font:inherit; font-size:14px; }\n.ya-search-input::placeholder { color:var(--dsw-alias-label-tertiary); }\n.ya-search-icon { flex:none; display:inline-flex; border:0; padding:0; color:inherit; background:transparent; }\n.ya-body { flex:1; min-height:0; display:flex; flex-direction:column; overflow:hidden; margin-right:calc(-1 * var(--dsh-sidebar-inline-padding)); padding-right:var(--dsh-sidebar-inline-padding); }\n.ya-recent { flex:none; padding-bottom:8px; border-bottom:1px solid var(--dsw-alias-border-l2); }\n.ya-recent-collapsed { padding-bottom:0; border-bottom-color:transparent; }\n.ya-recent-list-wrap { display:grid; grid-template-rows:1fr; transition:grid-template-rows 220ms ease-out; }\n.ya-recent-collapsed .ya-recent-list-wrap { grid-template-rows:0fr; }\n.ya-recent-list { display:flex; flex-direction:column; overflow:hidden; min-height:0; }\n.ya-block-label { height:26px; display:flex; align-items:center; gap:2px; padding:0 8px; color:var(--dsw-alias-label-tertiary); font-size:12px; font-weight:600; letter-spacing:.02em; text-transform:uppercase; }\n.ya-block-label-toggle { flex:none; width:20px; height:20px; margin-left:auto; border:0; border-radius:6px; padding:0; display:inline-flex; align-items:center; justify-content:center; background:transparent; color:var(--dsw-alias-label-tertiary); cursor:pointer; transition:transform 180ms ease-out; }\n.ya-block-label-toggle:hover { background:var(--dsw-alias-interactive-bg-hover); color:var(--dsw-alias-label-secondary); }\n.ya-block-label-toggle.ya-collapsed { transform:rotate(-90deg); }\n.ya-date-group-label { height:26px; display:flex; align-items:center; padding:0 8px; color:var(--dsw-alias-label-tertiary); font-size:12px; font-weight:600; letter-spacing:.02em; }\n.ya-breadcrumb { flex:none; height:34px; display:flex; align-items:center; gap:2px; padding:0 6px; color:var(--dsw-alias-label-tertiary); font-size:13px; }\n.ya-crumb { border:0; padding:4px 3px; border-radius:6px; background:transparent; color:inherit; font:inherit; cursor:default; min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }\nbutton.ya-crumb:hover { background:var(--dsw-alias-interactive-bg-hover); color:var(--dsw-alias-label-primary); cursor:pointer; }\n.ya-scroll { flex:1; min-height:0; overflow-y:auto; padding-bottom:12px; }\n.ya-row { position:relative; min-height:34px; display:flex; align-items:center; gap:6px; margin:1px 0; padding:0 7px; border-radius:9px; box-sizing:border-box; color:var(--dsw-alias-label-primary); cursor:pointer; user-select:none; }\n.ya-row:hover, .ya-row.ya-menu-open { background:var(--dsw-alias-interactive-bg-hover); }\n.ya-row.ya-selected { background:var(--dsw-alias-interactive-bg-selected); }\n.ya-workspace-row { min-height:40px; }\n.ya-row-main { flex:1; min-width:0; display:flex; flex-direction:column; justify-content:center; }\n.ya-row-line { display:flex; align-items:center; min-width:0; gap:6px; }\n.ya-row-title { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; line-height:18px; }\n.ya-row-meta { flex:none; color:var(--dsw-alias-label-tertiary); font-size:11px; white-space:nowrap; }\n.ya-workspace-path { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--dsw-alias-label-tertiary); font-size:11px; line-height:15px; }\n.ya-row-actions { flex:none; display:flex; align-items:center; gap:2px; opacity:0; pointer-events:none; transition:opacity 120ms ease-out; }\n.ya-row:hover .ya-row-actions, .ya-menu-open .ya-row-actions { opacity:1; pointer-events:auto; }\n.ya-status-slot { flex:none; width:16px; height:16px; display:inline-flex; align-items:center; justify-content:center; color:var(--dsw-alias-label-tertiary); }\n.ya-recent .ya-row { min-height:31px; }\n.ya-search-workspace { color:var(--dsw-alias-label-tertiary); font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n.ya-empty, .ya-status { padding:18px 10px; color:var(--dsw-alias-label-tertiary); text-align:center; font-size:13px; }\n.ya-warning { color:var(--dsw-alias-status-warning); }\n.ya-rename-input { width:100%; height:38px; box-sizing:border-box; border:1px solid var(--dsw-alias-border-l2); border-radius:9px; padding:0 11px; background:transparent; color:var(--dsw-alias-label-primary); outline:none; }\n.ya-error { margin-top:8px; color:var(--dsw-alias-status-error); font-size:12px; }\n.ya-rail .ya-section-header { padding-left:0; margin-bottom:12px; }\n.ya-rail .ya-icon-button, .ya-rail .ya-search { width:36px; height:36px; padding:0; margin:0 0 12px; border-color:transparent; background:transparent; }\n.ya-rail .ya-search { justify-content:center; }\n.ya-rail .ya-search-icon { cursor:pointer; color:var(--dsw-alias-label-primary); }\n.ya-picker-error { color:var(--dsw-alias-status-error); white-space:pre-wrap; }\n@keyframes ya-slide-in-forward { from { opacity:0; transform:translateX(10px); } to { opacity:1; transform:translateX(0); } }\n@keyframes ya-slide-in-backward { from { opacity:0; transform:translateX(-10px); } to { opacity:1; transform:translateX(0); } }\n.ya-level-enter-forward { animation:ya-slide-in-forward 180ms ease-out; }\n.ya-level-enter-backward { animation:ya-slide-in-backward 180ms ease-out; }\n";
|
|
2
|
+
export declare const CSS = "\n[data-ya-workspace-sidebar] { flex:1; min-height:0; display:flex; flex-direction:column; box-sizing:border-box; padding-right:var(--dsh-sidebar-inline-padding); color:var(--dsw-alias-label-primary); }\n[data-ya-workspace-sidebar].ya-rail { padding-right:0; }\n.ya-section-header { flex:none; height:36px; display:flex; align-items:center; justify-content:flex-end; gap:4px; padding-left:12px; margin-bottom:4px; box-sizing:border-box; color:var(--dsw-alias-label-tertiary); }\n.ya-section-title { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }\n.ya-icon-button { flex:none; width:28px; height:28px; border:0; border-radius:50%; padding:0; display:inline-flex; align-items:center; justify-content:center; color:var(--dsw-alias-label-secondary); background:transparent; cursor:pointer; }\n.ya-icon-button:hover { background:var(--dsw-alias-interactive-bg-hover); }\n.ya-search { flex:none; height:38px; margin:0 2px 10px; padding:0 14px; display:flex; align-items:center; gap:8px; box-sizing:border-box; border:1px solid var(--dsw-alias-border-l2); border-radius:24px; background:var(--dsw-static-neutral-bluish-75); color:var(--dsw-alias-label-caption); }\nbody[data-ds-dark-theme] .ya-search { background:var(--dsw-static-neutral-bluish-900); }\n.ya-search-input { flex:1; min-width:0; border:0; outline:0; background:transparent; color:var(--dsw-alias-label-primary); font:inherit; font-size:14px; }\n.ya-search-input::placeholder { color:var(--dsw-alias-label-tertiary); }\n.ya-search-icon { flex:none; display:inline-flex; border:0; padding:0; color:inherit; background:transparent; }\n.ya-body { flex:1; min-height:0; display:flex; flex-direction:column; overflow:hidden; margin-right:calc(-1 * var(--dsh-sidebar-inline-padding)); padding-right:var(--dsh-sidebar-inline-padding); }\n.ya-recent { flex:none; padding-bottom:8px; border-bottom:1px solid var(--dsw-alias-border-l2); }\n.ya-recent-collapsed { padding-bottom:0; border-bottom-color:transparent; }\n.ya-recent-list-wrap { display:grid; grid-template-rows:1fr; transition:grid-template-rows 220ms ease-out; }\n.ya-recent-collapsed .ya-recent-list-wrap { grid-template-rows:0fr; }\n.ya-recent-list { display:flex; flex-direction:column; overflow:hidden; min-height:0; }\n.ya-block-label { height:26px; display:flex; align-items:center; gap:2px; padding:0 8px; color:var(--dsw-alias-label-tertiary); font-size:12px; font-weight:600; letter-spacing:.02em; text-transform:uppercase; }\n.ya-block-label-toggle { flex:none; width:20px; height:20px; margin-left:auto; border:0; border-radius:6px; padding:0; display:inline-flex; align-items:center; justify-content:center; background:transparent; color:var(--dsw-alias-label-tertiary); cursor:pointer; transition:transform 180ms ease-out; }\n.ya-block-label-toggle:hover { background:var(--dsw-alias-interactive-bg-hover); color:var(--dsw-alias-label-secondary); }\n.ya-block-label-toggle.ya-collapsed { transform:rotate(-90deg); }\n.ya-date-group-label { height:26px; display:flex; align-items:center; padding:0 8px; color:var(--dsw-alias-label-tertiary); font-size:12px; font-weight:600; letter-spacing:.02em; }\n.ya-breadcrumb { flex:none; height:34px; display:flex; align-items:center; gap:2px; padding:0 6px; color:var(--dsw-alias-label-tertiary); font-size:13px; }\n.ya-crumb { border:0; padding:4px 3px; border-radius:6px; background:transparent; color:inherit; font:inherit; cursor:default; min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }\nbutton.ya-crumb:hover { background:var(--dsw-alias-interactive-bg-hover); color:var(--dsw-alias-label-primary); cursor:pointer; }\n.ya-scroll { flex:1; min-height:0; overflow-y:auto; padding-bottom:12px; }\n.ya-row { position:relative; min-height:34px; display:flex; align-items:center; gap:6px; margin:1px 0; padding:0 7px; border-radius:9px; box-sizing:border-box; color:var(--dsw-alias-label-primary); cursor:pointer; user-select:none; }\n.ya-row:hover, .ya-row.ya-menu-open { background:var(--dsw-alias-interactive-bg-hover); }\n.ya-row.ya-selected { background:var(--dsw-alias-interactive-bg-selected); }\n.ya-workspace-row { min-height:40px; }\n.ya-row-main { flex:1; min-width:0; display:flex; flex-direction:column; justify-content:center; }\n.ya-row-line { display:flex; align-items:center; min-width:0; gap:6px; }\n.ya-row-title { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; line-height:18px; }\n.ya-row-meta { flex:none; color:var(--dsw-alias-label-tertiary); font-size:11px; white-space:nowrap; }\n.ya-workspace-path { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--dsw-alias-label-tertiary); font-size:11px; line-height:15px; }\n.ya-row-actions { flex:none; display:flex; align-items:center; gap:2px; opacity:0; pointer-events:none; transition:opacity 120ms ease-out; }\n.ya-row:hover .ya-row-actions, .ya-menu-open .ya-row-actions { opacity:1; pointer-events:auto; }\n.ya-status-slot { flex:none; width:16px; height:16px; display:inline-flex; align-items:center; justify-content:center; color:var(--dsw-alias-label-tertiary); }\n.ya-recent .ya-row { min-height:31px; }\n.ya-search-workspace { color:var(--dsw-alias-label-tertiary); font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n.ya-empty, .ya-status { padding:18px 10px; color:var(--dsw-alias-label-tertiary); text-align:center; font-size:13px; }\n.ya-warning { color:var(--dsw-alias-status-warning); }\n.ya-rename-input { width:100%; height:38px; box-sizing:border-box; border:1px solid var(--dsw-alias-border-l2); border-radius:9px; padding:0 11px; background:transparent; color:var(--dsw-alias-label-primary); outline:none; }\n.ya-error { margin-top:8px; color:var(--dsw-alias-status-error); font-size:12px; }\n.ya-rail .ya-section-header { padding-left:0; margin-bottom:12px; }\n.ya-rail .ya-icon-button, .ya-rail .ya-search { width:36px; height:36px; padding:0; margin:0 0 12px; border-color:transparent; background:transparent; }\n.ya-rail .ya-search { justify-content:center; }\n.ya-rail .ya-search-icon { cursor:pointer; color:var(--dsw-alias-label-primary); }\n.ya-picker-error { color:var(--dsw-alias-status-error); white-space:pre-wrap; }\n.ya-action-mode-toggle.ya-action-mode-delete { color:var(--dsw-alias-state-error-primary); }\n.ya-action-mode-toggle.ya-action-mode-delete:hover { background:var(--dsw-alias-interactive-bg-hover-danger); }\n@keyframes ya-slide-in-forward { from { opacity:0; transform:translateX(10px); } to { opacity:1; transform:translateX(0); } }\n@keyframes ya-slide-in-backward { from { opacity:0; transform:translateX(-10px); } to { opacity:1; transform:translateX(0); } }\n.ya-level-enter-forward { animation:ya-slide-in-forward 180ms ease-out; }\n.ya-level-enter-backward { animation:ya-slide-in-backward 180ms ease-out; }\n";
|
|
3
3
|
/** Install the stylesheet and return its disposer. */
|
|
4
4
|
export declare function installStyles(): () => void;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Context } from 'cordis';
|
|
2
2
|
export declare const name = "ya-workspace-sidebar";
|
|
3
|
-
|
|
4
|
-
export declare function apply(): void;
|
|
3
|
+
export declare function apply(ctx: Context): void;
|