dsh-plugin-standalone-session 0.1.1 → 0.2.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 CHANGED
@@ -14,7 +14,7 @@ DeepSeek Harness 的独立会话:**不隶属于任何工作区**,但完整
14
14
 
15
15
  - 侧边栏顶部点击 **新建独立会话**,直接创建并打开会话。
16
16
  - 上一次由该入口创建的空白会话会复用,避免连点产生大量空会话;管理面板空状态可强制新建。
17
- - 侧边栏底部 **管理独立会话**:点击行打开,`⋯` 菜单重命名/删除。
17
+ - 侧边栏底部 **管理独立会话**:点击行打开,`⋯` 菜单重命名/删除,支持多选批量删除。
18
18
  - 原生输入区可用:模型选择、附件、`/` 指令、发送。
19
19
  - 重启 DSH 后仍保持独立状态。
20
20
  - 不替换原生新建会话、工作区浏览器、会话菜单或聊天 UI。
@@ -55,7 +55,7 @@ dsh plugin --profile web add /absolute/path/to/dsh-plugin-standalone-session-0.1
55
55
  - **命令**:输入 `/`,选择 `独立会话:新建` / `独立会话:管理`。
56
56
  - **删除**:使用 DSH 原生归档,不是物理删除;已删除会话可在归档视图中恢复。
57
57
 
58
- 管理面板点击整行打开会话;行尾 `⋯` 提供重命名和删除。删除最后一条后会停留在空状态,不会跳回新会话页。
58
+ 管理面板点击整行打开会话;行尾 `⋯` 提供重命名和删除。点击右上角 `选择` 进入批量模式,可全选/半选后一次删除;部分失败会保留失败项。删除最后一条后会停留在空状态,不会跳回新会话页。
59
59
 
60
60
  ## 与普通会话的区别
61
61
 
@@ -102,7 +102,7 @@ dsh plugin --profile web add /absolute/path/to/dsh-plugin-standalone-session-0.1
102
102
 
103
103
  ```bash
104
104
  npm ci
105
- npm run check # typecheck + build + 51 个单元测试
105
+ npm run check # typecheck + build + 59 个单元测试
106
106
  npm test
107
107
  ```
108
108
 
package/lib/client.js CHANGED
@@ -311,6 +311,20 @@ async function renameStandalone(ctx, sessionId, title) {
311
311
  async function archiveStandalone(ctx, sessionId) {
312
312
  await ctx.workspaces.archiveSession(sessionId, { stopActivity: true });
313
313
  }
314
+ async function archiveStandalones(ctx, sessionIds, onProgress) {
315
+ const archived = [];
316
+ const failed = [];
317
+ for (const [index, sessionId] of sessionIds.entries()) {
318
+ try {
319
+ await archiveStandalone(ctx, sessionId);
320
+ archived.push(sessionId);
321
+ } catch (reason) {
322
+ failed.push({ sessionId, message: messageOf(reason) });
323
+ }
324
+ onProgress?.(index + 1, sessionIds.length);
325
+ }
326
+ return { archived, failed };
327
+ }
314
328
  function messageOf(error) {
315
329
  return error instanceof Error ? error.message : String(error);
316
330
  }
@@ -462,6 +476,20 @@ var zh = {
462
476
  "panel.deleteTitle": "\u5220\u9664\u72EC\u7ACB\u4F1A\u8BDD\uFF1F",
463
477
  "panel.deleteBody": "\u4F1A\u8BDD\u5C06\u4ECE\u5217\u8868\u548C\u539F\u751F\u4F1A\u8BDD\u89C6\u56FE\u4E2D\u79FB\u9664\uFF08DSH \u4EE5\u5F52\u6863\u5B9E\u73B0\u5220\u9664\uFF09\uFF0C\u4F46\u4ECD\u53EF\u5728\u5F52\u6863\u89C6\u56FE\u4E2D\u6062\u590D\u3002\u7A7A\u767D\u4F1A\u8BDD\u7684\u4E34\u65F6\u76EE\u5F55\u4F1A\u88AB\u6E05\u7406\uFF1B\u5DF2\u7ECF\u4EA7\u751F\u8FC7\u6D88\u606F\u7684\u4F1A\u8BDD\u4F1A\u4FDD\u7559\u5176\u76EE\u5F55\u3002",
464
478
  "panel.deleteConfirm": "\u5220\u9664",
479
+ "panel.select": "\u9009\u62E9",
480
+ "panel.selectToolbar": "\u6279\u91CF\u9009\u62E9",
481
+ "panel.selectAll": "\u5168\u9009",
482
+ "panel.selectAllLabel": "\u5168\u9009\u72EC\u7ACB\u4F1A\u8BDD",
483
+ "panel.selectionHint": "\u70B9\u51FB\u4F1A\u8BDD\u884C\u9009\u62E9\uFF0C\u6216\u4F7F\u7528\u5168\u9009\u3002",
484
+ "panel.selectedCount": "\u5DF2\u9009 {n} / {total}",
485
+ "panel.selectRow": "\u9009\u62E9\u201C{title}\u201D",
486
+ "panel.batchDelete": "\u5220\u9664",
487
+ "panel.batchDeleteTitle": "\u5220\u9664 {n} \u4E2A\u72EC\u7ACB\u4F1A\u8BDD\uFF1F",
488
+ "panel.batchDeleteBody": "\u5C06\u5F52\u6863\u8FD9 {n} \u4E2A\u4F1A\u8BDD\uFF0C\u53EF\u5728\u5F52\u6863\u89C6\u56FE\u4E2D\u6062\u590D\u3002",
489
+ "panel.batchDeleteRunning": "\u5176\u4E2D {n} \u4E2A\u6B63\u5728\u8FD0\u884C\uFF0C\u5F52\u6863\u4F1A\u505C\u6B62\u5B83\u4EEC\u3002",
490
+ "panel.batchDeleteDirs": "\u7A7A\u767D\u4E14\u76EE\u5F55\u4E3A\u7A7A\u7684\u4F1A\u8BDD\u4F1A\u6E05\u7406\u5DE5\u4F5C\u76EE\u5F55\uFF1B\u5DF2\u6709\u6D88\u606F\u6216\u76EE\u5F55\u975E\u7A7A\u7684\u4F1A\u8BDD\u4F1A\u4FDD\u7559\u76EE\u5F55\u3002",
491
+ "panel.batchDeleting": "\u5F52\u6863\u4E2D {done}/{total}\u2026",
492
+ "panel.batchPartial": "{n} \u4E2A\u4F1A\u8BDD\u5F52\u6863\u5931\u8D25\uFF0C\u5DF2\u4FDD\u7559\u9009\u4E2D\u72B6\u6001\u3002",
465
493
  "panel.deleteKeepDir": "\u8BE5\u4F1A\u8BDD\u5DF2\u6709\u6D88\u606F\uFF0C\u76EE\u5F55\u4F1A\u88AB\u4FDD\u7559\u3002",
466
494
  "panel.cancel": "\u53D6\u6D88",
467
495
  "panel.renameTitle": "\u91CD\u547D\u540D\u72EC\u7ACB\u4F1A\u8BDD",
@@ -524,6 +552,20 @@ var en = {
524
552
  "panel.deleteTitle": "Delete standalone session?",
525
553
  "panel.deleteBody": "The session leaves the list and the native session view (DSH implements deletion as archive), and remains recoverable from the archived view. The directory of an unused session is removed; a session that already carried messages keeps its directory.",
526
554
  "panel.deleteConfirm": "Delete",
555
+ "panel.select": "Select",
556
+ "panel.selectToolbar": "Bulk selection",
557
+ "panel.selectAll": "Select all",
558
+ "panel.selectAllLabel": "Select all standalone sessions",
559
+ "panel.selectionHint": "Select rows, or use Select all.",
560
+ "panel.selectedCount": "{n} / {total} selected",
561
+ "panel.selectRow": 'Select "{title}"',
562
+ "panel.batchDelete": "Delete",
563
+ "panel.batchDeleteTitle": "Delete {n} standalone session(s)?",
564
+ "panel.batchDeleteBody": "The {n} selected session(s) will be archived and can be restored from the archived view.",
565
+ "panel.batchDeleteRunning": "{n} session(s) are running; archiving will stop them.",
566
+ "panel.batchDeleteDirs": "Blank sessions with empty directories lose their working directory; sessions with messages or non-empty directories keep theirs.",
567
+ "panel.batchDeleting": "Archiving {done}/{total}\u2026",
568
+ "panel.batchPartial": "Failed to archive {n} session(s); selection was kept.",
527
569
  "panel.deleteKeepDir": "This session already carried messages; its directory is retained.",
528
570
  "panel.cancel": "Cancel",
529
571
  "panel.renameTitle": "Rename standalone session",
@@ -568,6 +610,39 @@ var en = {
568
610
  "error.noSession": "No session is available"
569
611
  };
570
612
 
613
+ // src/client/selection.ts
614
+ function toggleSelection(selected, sessionId) {
615
+ const next = new Set(selected);
616
+ if (next.has(sessionId)) next.delete(sessionId);
617
+ else next.add(sessionId);
618
+ return next;
619
+ }
620
+ function selectAllRows(rows) {
621
+ return new Set(rows.map((row) => row.id));
622
+ }
623
+ function selectedRows(rows, selected) {
624
+ return rows.filter((row) => selected.has(row.id));
625
+ }
626
+ function pruneSelection(rows, selected) {
627
+ if (selected.size === 0) return selected;
628
+ const live = new Set(rows.map((row) => row.id));
629
+ let changed = false;
630
+ const next = /* @__PURE__ */ new Set();
631
+ for (const id of selected) {
632
+ if (live.has(id)) next.add(id);
633
+ else changed = true;
634
+ }
635
+ return changed ? next : selected;
636
+ }
637
+ function selectionState(rows, selected) {
638
+ const count = selectedRows(rows, selected).length;
639
+ return {
640
+ count,
641
+ all: rows.length > 0 && count === rows.length,
642
+ some: count > 0 && count < rows.length
643
+ };
644
+ }
645
+
571
646
  // src/client/components.tsx
572
647
  var import_jsx_runtime = require("react/jsx-runtime");
573
648
  function StandaloneIcon({
@@ -866,7 +941,7 @@ function DialogFrame({ title, children, footer, onCancel, busy = false }) {
866
941
  'button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])'
867
942
  )
868
943
  );
869
- focusables()[0]?.focus();
944
+ focusables()[0]?.focus({ preventScroll: true });
870
945
  const onKey = (event) => {
871
946
  if (event.key === "Escape" && !busyRef.current) {
872
947
  event.preventDefault();
@@ -889,7 +964,7 @@ function DialogFrame({ title, children, footer, onCancel, busy = false }) {
889
964
  document.addEventListener("keydown", onKey);
890
965
  return () => {
891
966
  document.removeEventListener("keydown", onKey);
892
- previous?.focus();
967
+ previous?.focus({ preventScroll: true });
893
968
  };
894
969
  }, []);
895
970
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -1031,6 +1106,72 @@ function DeleteDialog({
1031
1106
  }
1032
1107
  );
1033
1108
  }
1109
+ function BatchDeleteDialog({
1110
+ targets,
1111
+ t,
1112
+ progress,
1113
+ onCancel,
1114
+ onConfirm
1115
+ }) {
1116
+ const [submitting, setSubmitting] = (0, import_react3.useState)(false);
1117
+ const [error, setError] = (0, import_react3.useState)(null);
1118
+ const busy = submitting || progress !== null;
1119
+ const running = targets.filter((row) => row.running).length;
1120
+ const hasBlank = targets.some((row) => row.blank);
1121
+ const confirm = async () => {
1122
+ if (busy) return;
1123
+ setSubmitting(true);
1124
+ setError(null);
1125
+ try {
1126
+ await onConfirm();
1127
+ } catch (reason) {
1128
+ setError(messageOf(reason));
1129
+ setSubmitting(false);
1130
+ }
1131
+ };
1132
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
1133
+ DialogFrame,
1134
+ {
1135
+ title: t("panel.batchDeleteTitle", { n: targets.length }),
1136
+ busy,
1137
+ onCancel,
1138
+ footer: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
1139
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1140
+ "button",
1141
+ {
1142
+ type: "button",
1143
+ className: "ss-button ss-buttonQuiet",
1144
+ disabled: busy,
1145
+ onClick: onCancel,
1146
+ children: t("panel.cancel")
1147
+ }
1148
+ ),
1149
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1150
+ "button",
1151
+ {
1152
+ type: "button",
1153
+ className: "ss-button ss-buttonDanger",
1154
+ disabled: busy,
1155
+ "aria-busy": progress !== null,
1156
+ onClick: () => {
1157
+ void confirm();
1158
+ },
1159
+ children: progress === null ? t("panel.batchDelete") : t("panel.batchDeleting", {
1160
+ done: progress.done,
1161
+ total: progress.total
1162
+ })
1163
+ }
1164
+ )
1165
+ ] }),
1166
+ children: [
1167
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "ss-dialogBody", children: t("panel.batchDeleteBody", { n: targets.length }) }),
1168
+ running > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "ss-batchWarning", children: t("panel.batchDeleteRunning", { n: running }) }) : null,
1169
+ hasBlank ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "ss-batchDirs", children: t("panel.batchDeleteDirs") }) : null,
1170
+ error !== null ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ss-error", children: error }) : null
1171
+ ]
1172
+ }
1173
+ );
1174
+ }
1034
1175
  function createStandalonePanel(ctx) {
1035
1176
  const fallbackT = ctx.locale.bind(NS);
1036
1177
  return function StandalonePanel(props) {
@@ -1041,8 +1182,31 @@ function createStandalonePanel(ctx) {
1041
1182
  const [renameTarget, setRenameTarget] = (0, import_react3.useState)(null);
1042
1183
  const [deleteTarget, setDeleteTarget] = (0, import_react3.useState)(null);
1043
1184
  const [menuTarget, setMenuTarget] = (0, import_react3.useState)(null);
1185
+ const [selectionMode, setSelectionMode] = (0, import_react3.useState)(false);
1186
+ const [selectedIds, setSelectedIds] = (0, import_react3.useState)(() => /* @__PURE__ */ new Set());
1187
+ const [batchTargets, setBatchTargets] = (0, import_react3.useState)(null);
1188
+ const [batchProgress, setBatchProgress] = (0, import_react3.useState)(null);
1044
1189
  const menuRef = (0, import_react3.useRef)(null);
1045
1190
  const menuButtonRef = (0, import_react3.useRef)(null);
1191
+ const selectAllRef = (0, import_react3.useRef)(null);
1192
+ const selectButtonRef = (0, import_react3.useRef)(null);
1193
+ const panelRef = (0, import_react3.useRef)(null);
1194
+ const wasSelecting = (0, import_react3.useRef)(false);
1195
+ const selected = (0, import_react3.useMemo)(() => selectedRows(rows, selectedIds), [rows, selectedIds]);
1196
+ const state = (0, import_react3.useMemo)(() => selectionState(rows, selectedIds), [rows, selectedIds]);
1197
+ const locked = busy !== null || batchProgress !== null;
1198
+ const exitSelection = () => {
1199
+ setSelectionMode(false);
1200
+ setSelectedIds(/* @__PURE__ */ new Set());
1201
+ setMenuTarget(null);
1202
+ setError(null);
1203
+ };
1204
+ const enterSelection = () => {
1205
+ if (locked) return;
1206
+ setMenuTarget(null);
1207
+ setSelectedIds(/* @__PURE__ */ new Set());
1208
+ setSelectionMode(true);
1209
+ };
1046
1210
  (0, import_react3.useEffect)(() => {
1047
1211
  if (menuTarget === null) return;
1048
1212
  menuRef.current?.querySelector("button")?.focus();
@@ -1063,8 +1227,42 @@ function createStandalonePanel(ctx) {
1063
1227
  document.removeEventListener("keydown", onKeyDown);
1064
1228
  };
1065
1229
  }, [menuTarget]);
1230
+ (0, import_react3.useEffect)(() => {
1231
+ const pruned = pruneSelection(rows, selectedIds);
1232
+ if (pruned !== selectedIds) setSelectedIds(pruned);
1233
+ if (rows.length === 0 && selectionMode) {
1234
+ setSelectionMode(false);
1235
+ setSelectedIds(/* @__PURE__ */ new Set());
1236
+ }
1237
+ }, [rows, selectedIds, selectionMode]);
1238
+ (0, import_react3.useEffect)(() => {
1239
+ if (selectionMode) selectAllRef.current?.focus({ preventScroll: true });
1240
+ }, [selectionMode]);
1241
+ (0, import_react3.useEffect)(() => {
1242
+ if (wasSelecting.current && !selectionMode && rows.length > 0) {
1243
+ selectButtonRef.current?.focus({ preventScroll: true });
1244
+ }
1245
+ wasSelecting.current = selectionMode;
1246
+ }, [selectionMode, rows.length]);
1247
+ (0, import_react3.useEffect)(() => {
1248
+ if (selectAllRef.current !== null) selectAllRef.current.indeterminate = state.some;
1249
+ }, [state.some, selectionMode]);
1250
+ (0, import_react3.useEffect)(() => {
1251
+ if (!selectionMode) return;
1252
+ const onKey = (event) => {
1253
+ if (batchTargets !== null || renameTarget !== null || deleteTarget !== null || menuTarget !== null) {
1254
+ return;
1255
+ }
1256
+ if (event.key === "Escape") {
1257
+ event.preventDefault();
1258
+ exitSelection();
1259
+ }
1260
+ };
1261
+ document.addEventListener("keydown", onKey);
1262
+ return () => document.removeEventListener("keydown", onKey);
1263
+ }, [selectionMode, batchTargets, renameTarget, deleteTarget, menuTarget]);
1066
1264
  const create = async () => {
1067
- if (busy !== null) return;
1265
+ if (locked) return;
1068
1266
  setBusy("new");
1069
1267
  setError(null);
1070
1268
  try {
@@ -1076,7 +1274,7 @@ function createStandalonePanel(ctx) {
1076
1274
  }
1077
1275
  };
1078
1276
  const open = (row) => {
1079
- if (busy !== null) return;
1277
+ if (locked) return;
1080
1278
  setMenuTarget(null);
1081
1279
  try {
1082
1280
  ctx.uiWorkspace.openSession(row.id);
@@ -1084,6 +1282,14 @@ function createStandalonePanel(ctx) {
1084
1282
  setError(t("panel.actionFailed", { message: messageOf(reason) }));
1085
1283
  }
1086
1284
  };
1285
+ const toggleRow = (sessionId) => {
1286
+ if (locked) return;
1287
+ setSelectedIds((current2) => toggleSelection(current2, sessionId));
1288
+ };
1289
+ const toggleAll = () => {
1290
+ if (locked) return;
1291
+ setSelectedIds(state.all ? /* @__PURE__ */ new Set() : selectAllRows(rows));
1292
+ };
1087
1293
  const rename = async (row, title) => {
1088
1294
  setBusy(row.id);
1089
1295
  setError(null);
@@ -1096,12 +1302,19 @@ function createStandalonePanel(ctx) {
1096
1302
  setBusy(null);
1097
1303
  }
1098
1304
  };
1305
+ const reopenIfUnmounted = () => {
1306
+ window.setTimeout(() => {
1307
+ if (panelRef.current === null || !panelRef.current.isConnected) {
1308
+ openManagementPanel(ctx, t);
1309
+ }
1310
+ }, 0);
1311
+ };
1099
1312
  const remove = async (row) => {
1100
1313
  setBusy(row.id);
1101
1314
  setError(null);
1102
1315
  try {
1103
1316
  await archiveStandalone(ctx, row.id);
1104
- openManagementPanel(ctx, t);
1317
+ reopenIfUnmounted();
1105
1318
  setDeleteTarget(null);
1106
1319
  } catch (reason) {
1107
1320
  throw new Error(messageOf(reason));
@@ -1109,17 +1322,117 @@ function createStandalonePanel(ctx) {
1109
1322
  setBusy(null);
1110
1323
  }
1111
1324
  };
1325
+ const beginBatch = () => {
1326
+ if (locked || selected.length === 0) return;
1327
+ setMenuTarget(null);
1328
+ setError(null);
1329
+ setBatchProgress(null);
1330
+ setBatchTargets([...selected]);
1331
+ };
1332
+ const runBatch = async (targets) => {
1333
+ setBatchProgress({ done: 0, total: targets.length });
1334
+ setError(null);
1335
+ try {
1336
+ const result = await archiveStandalones(
1337
+ ctx,
1338
+ targets.map((row) => row.id),
1339
+ (done, total) => setBatchProgress({ done, total })
1340
+ );
1341
+ setBatchTargets(null);
1342
+ setSelectedIds(new Set(result.failed.map((failure) => failure.sessionId)));
1343
+ if (result.failed.length === 0) {
1344
+ setSelectionMode(false);
1345
+ } else {
1346
+ const message = t("panel.batchPartial", { n: result.failed.length });
1347
+ setError(message);
1348
+ showNotice("error", message);
1349
+ }
1350
+ reopenIfUnmounted();
1351
+ } catch (reason) {
1352
+ setBatchTargets(null);
1353
+ const message = t("panel.actionFailed", { message: messageOf(reason) });
1354
+ setError(message);
1355
+ showNotice("error", message);
1356
+ reopenIfUnmounted();
1357
+ } finally {
1358
+ setBatchProgress(null);
1359
+ }
1360
+ };
1112
1361
  const count = t("panel.count", { n: rows.length });
1113
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "ss-panel", "aria-label": t("panel.title"), children: [
1362
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { ref: panelRef, className: "ss-panel", "aria-label": t("panel.title"), children: [
1114
1363
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ss-shell", children: [
1115
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("header", { className: "ss-header", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
1116
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ss-titleRow", children: [
1117
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "ss-title", children: t("panel.title") }),
1118
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ss-count ss-countInline", children: count })
1119
- ] }),
1120
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "ss-description", children: t("panel.description") })
1121
- ] }) }),
1122
- error !== null ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ss-error", role: "alert", children: error }) : null,
1364
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
1365
+ "header",
1366
+ {
1367
+ className: "ss-header",
1368
+ role: selectionMode ? "toolbar" : void 0,
1369
+ "aria-label": selectionMode ? t("panel.selectToolbar") : void 0,
1370
+ children: [
1371
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ss-headerMain", children: [
1372
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ss-titleRow", children: [
1373
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "ss-title", children: t("panel.title") }),
1374
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ss-count ss-countInline", children: selectionMode ? t("panel.selectedCount", { n: state.count, total: rows.length }) : count })
1375
+ ] }),
1376
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1377
+ "p",
1378
+ {
1379
+ className: `ss-statusLine${error !== null ? " ss-statusLineError" : ""}`,
1380
+ role: error !== null ? "alert" : void 0,
1381
+ title: error ?? void 0,
1382
+ children: error ?? (selectionMode ? t("panel.selectionHint") : t("panel.description"))
1383
+ }
1384
+ )
1385
+ ] }),
1386
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ss-headerActions", children: selectionMode ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
1387
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { className: "ss-selectAll", children: [
1388
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1389
+ "input",
1390
+ {
1391
+ ref: selectAllRef,
1392
+ type: "checkbox",
1393
+ className: "ss-checkbox",
1394
+ checked: state.all,
1395
+ disabled: locked,
1396
+ "aria-label": t("panel.selectAllLabel"),
1397
+ onChange: toggleAll
1398
+ }
1399
+ ),
1400
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: t("panel.selectAll") })
1401
+ ] }),
1402
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ss-deleteSlot", children: state.count > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1403
+ "button",
1404
+ {
1405
+ type: "button",
1406
+ className: "ss-button ss-buttonDanger",
1407
+ disabled: locked,
1408
+ onClick: beginBatch,
1409
+ children: t("panel.batchDelete")
1410
+ }
1411
+ ) : null }),
1412
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1413
+ "button",
1414
+ {
1415
+ type: "button",
1416
+ className: "ss-selectButton",
1417
+ disabled: locked,
1418
+ onClick: exitSelection,
1419
+ children: t("panel.cancel")
1420
+ }
1421
+ )
1422
+ ] }) : rows.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1423
+ "button",
1424
+ {
1425
+ ref: selectButtonRef,
1426
+ type: "button",
1427
+ className: "ss-selectButton",
1428
+ disabled: locked,
1429
+ onClick: enterSelection,
1430
+ children: t("panel.select")
1431
+ }
1432
+ ) : null })
1433
+ ]
1434
+ }
1435
+ ),
1123
1436
  loading && rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ss-empty", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "ss-emptyHint", children: t("panel.loading") }) }) : rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ss-empty", children: [
1124
1437
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "ss-emptyTitle", children: t("panel.empty") }),
1125
1438
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "ss-emptyHint", children: t("panel.emptyHint") }),
@@ -1128,7 +1441,7 @@ function createStandalonePanel(ctx) {
1128
1441
  {
1129
1442
  type: "button",
1130
1443
  className: "ss-button ss-buttonPrimary",
1131
- disabled: busy !== null,
1444
+ disabled: locked,
1132
1445
  onClick: () => {
1133
1446
  void create();
1134
1447
  },
@@ -1142,6 +1455,7 @@ function createStandalonePanel(ctx) {
1142
1455
  const title = row.title?.trim() || t("panel.untitled");
1143
1456
  const updated = relativeTimeLabel(t, row.updatedAt);
1144
1457
  const openMenu = menuTarget === row.id;
1458
+ const checked = selectedIds.has(row.id);
1145
1459
  const metaItems = [];
1146
1460
  if (updated !== "") metaItems.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: updated }, "time"));
1147
1461
  if (row.running) {
@@ -1160,30 +1474,46 @@ function createStandalonePanel(ctx) {
1160
1474
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
1161
1475
  "li",
1162
1476
  {
1163
- className: `ss-row${openMenu ? " ss-rowMenuOpen" : ""}`,
1164
- role: "button",
1165
- tabIndex: 0,
1166
- "aria-disabled": busy !== null,
1167
- onClick: () => open(row),
1168
- onKeyDown: (event) => {
1169
- if (event.target !== event.currentTarget) return;
1170
- if (event.key === "Enter" || event.key === " ") {
1171
- event.preventDefault();
1172
- open(row);
1173
- } else if (event.key === "ArrowDown") {
1174
- event.preventDefault();
1175
- setMenuTarget(row.id);
1176
- }
1177
- },
1477
+ className: `ss-row${openMenu ? " ss-rowMenuOpen" : ""}${selectionMode && checked ? " ss-rowSelected" : ""}`,
1178
1478
  children: [
1179
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ss-rowMain", children: [
1180
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ss-rowTitleRow", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ss-rowTitle", title, children: title }) }),
1181
- metaItems.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ss-rowMeta", children: metaItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react3.Fragment, { children: [
1182
- index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ss-dotSep", children: "\xB7" }) : null,
1183
- item
1184
- ] }, index)) }) : null
1185
- ] }),
1186
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ss-rowActions", children: [
1479
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ss-rowLead", children: selectionMode ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1480
+ "input",
1481
+ {
1482
+ type: "checkbox",
1483
+ className: "ss-checkbox",
1484
+ checked,
1485
+ disabled: locked,
1486
+ "aria-label": t("panel.selectRow", { title }),
1487
+ onChange: () => toggleRow(row.id)
1488
+ }
1489
+ ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StandaloneIcon, { size: 14 }) }),
1490
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
1491
+ "button",
1492
+ {
1493
+ type: "button",
1494
+ className: "ss-rowMain",
1495
+ disabled: locked,
1496
+ "aria-pressed": selectionMode ? checked : void 0,
1497
+ onClick: () => {
1498
+ if (selectionMode) toggleRow(row.id);
1499
+ else open(row);
1500
+ },
1501
+ onKeyDown: (event) => {
1502
+ if (!selectionMode && event.key === "ArrowDown") {
1503
+ event.preventDefault();
1504
+ setMenuTarget(row.id);
1505
+ }
1506
+ },
1507
+ children: [
1508
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ss-rowTitleRow", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ss-rowTitle", title, children: title }) }),
1509
+ metaItems.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ss-rowMeta", children: metaItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react3.Fragment, { children: [
1510
+ index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ss-dotSep", children: "\xB7" }) : null,
1511
+ item
1512
+ ] }, index)) }) : null
1513
+ ]
1514
+ }
1515
+ ),
1516
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ss-rowActions", children: !selectionMode ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
1187
1517
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1188
1518
  "button",
1189
1519
  {
@@ -1192,7 +1522,7 @@ function createStandalonePanel(ctx) {
1192
1522
  "aria-label": t("panel.more"),
1193
1523
  "aria-haspopup": "menu",
1194
1524
  "aria-expanded": openMenu,
1195
- disabled: busy !== null,
1525
+ disabled: locked,
1196
1526
  ref: openMenu ? menuButtonRef : void 0,
1197
1527
  onClick: (event) => {
1198
1528
  event.stopPropagation();
@@ -1215,7 +1545,7 @@ function createStandalonePanel(ctx) {
1215
1545
  {
1216
1546
  type: "button",
1217
1547
  role: "menuitem",
1218
- disabled: busy !== null,
1548
+ disabled: locked,
1219
1549
  onClick: () => {
1220
1550
  setMenuTarget(null);
1221
1551
  setRenameTarget(row);
@@ -1229,7 +1559,7 @@ function createStandalonePanel(ctx) {
1229
1559
  type: "button",
1230
1560
  role: "menuitem",
1231
1561
  className: "ss-rowMenuDanger",
1232
- disabled: busy !== null,
1562
+ disabled: locked,
1233
1563
  onClick: () => {
1234
1564
  setMenuTarget(null);
1235
1565
  setDeleteTarget(row);
@@ -1240,7 +1570,7 @@ function createStandalonePanel(ctx) {
1240
1570
  ]
1241
1571
  }
1242
1572
  ) : null
1243
- ] })
1573
+ ] }) : null })
1244
1574
  ]
1245
1575
  },
1246
1576
  row.id
@@ -1248,6 +1578,18 @@ function createStandalonePanel(ctx) {
1248
1578
  }) }),
1249
1579
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "ss-panelHint", children: t("panel.archivedHint") })
1250
1580
  ] }),
1581
+ batchTargets !== null ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1582
+ BatchDeleteDialog,
1583
+ {
1584
+ targets: batchTargets,
1585
+ t,
1586
+ progress: batchProgress,
1587
+ onCancel: () => {
1588
+ if (batchProgress === null) setBatchTargets(null);
1589
+ },
1590
+ onConfirm: () => runBatch(batchTargets)
1591
+ }
1592
+ ) : null,
1251
1593
  renameTarget !== null ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1252
1594
  RenameDialog,
1253
1595
  {
@@ -1291,9 +1633,14 @@ var CSS = `
1291
1633
  align-items: flex-start;
1292
1634
  gap: 16px;
1293
1635
  justify-content: space-between;
1294
- flex-wrap: wrap;
1636
+ flex-wrap: nowrap;
1637
+ min-height: 58px;
1295
1638
  margin-bottom: 8px;
1296
1639
  }
1640
+ .ss-headerMain {
1641
+ min-width: 0;
1642
+ flex: 1;
1643
+ }
1297
1644
  .ss-titleRow {
1298
1645
  display: flex;
1299
1646
  align-items: center;
@@ -1306,12 +1653,17 @@ var CSS = `
1306
1653
  font-weight: 600;
1307
1654
  margin: 0;
1308
1655
  }
1309
- .ss-description {
1656
+ .ss-statusLine {
1657
+ margin: 6px 0 0;
1310
1658
  color: var(--dsw-alias-label-secondary, #59636e);
1311
1659
  font-size: 13px;
1312
1660
  line-height: 20px;
1313
- margin: 6px 0 0;
1314
- max-width: 560px;
1661
+ overflow: hidden;
1662
+ text-overflow: ellipsis;
1663
+ white-space: nowrap;
1664
+ }
1665
+ .ss-statusLineError {
1666
+ color: var(--dsw-alias-state-error-primary, #d1242f);
1315
1667
  }
1316
1668
  .ss-count {
1317
1669
  color: var(--dsw-alias-label-tertiary, #818b98);
@@ -1323,9 +1675,57 @@ var CSS = `
1323
1675
  margin-top: 0;
1324
1676
  align-self: center;
1325
1677
  }
1678
+ .ss-headerActions {
1679
+ display: flex;
1680
+ flex: 0 0 176px;
1681
+ width: 176px;
1682
+ height: 32px;
1683
+ align-items: center;
1684
+ justify-content: flex-end;
1685
+ flex-wrap: nowrap;
1686
+ gap: 8px;
1687
+ }
1688
+ .ss-deleteSlot {
1689
+ width: 56px;
1690
+ height: 32px;
1691
+ flex: none;
1692
+ display: flex;
1693
+ justify-content: flex-end;
1694
+ }
1695
+ .ss-deleteSlot .ss-button {
1696
+ min-width: 52px;
1697
+ flex: none;
1698
+ }
1699
+ .ss-selectButton {
1700
+ min-height: 32px;
1701
+ padding: 3px 8px;
1702
+ border: 0;
1703
+ border-radius: var(--dsw-radius-md, 10px);
1704
+ background: transparent;
1705
+ color: var(--dsw-alias-label-secondary, #59636e);
1706
+ font: inherit;
1707
+ font-size: 13px;
1708
+ line-height: 20px;
1709
+ cursor: pointer;
1710
+ }
1711
+ .ss-selectButton:hover:not(:disabled) {
1712
+ color: var(--dsw-alias-label-primary, #1f2328);
1713
+ background: var(--dsw-alias-interactive-bg-hover, #e9ebee);
1714
+ }
1715
+ .ss-selectButton:focus-visible {
1716
+ outline: var(--dsw-focus-ring-width, 2px) solid
1717
+ var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary, #3b82f6));
1718
+ outline-offset: 1px;
1719
+ }
1720
+ .ss-selectButton:disabled {
1721
+ cursor: default;
1722
+ opacity: 0.55;
1723
+ }
1326
1724
  .ss-button {
1327
1725
  font: inherit;
1328
1726
  display: inline-flex;
1727
+ flex: none;
1728
+ white-space: nowrap;
1329
1729
  align-items: center;
1330
1730
  justify-content: center;
1331
1731
  gap: 6px;
@@ -1384,6 +1784,28 @@ var CSS = `
1384
1784
  background: var(--dsw-alias-state-business-tertiary, rgba(59, 130, 246, 0.12));
1385
1785
  border: 0.5px solid var(--dsw-alias-interactive-bg-hover, rgba(59, 130, 246, 0.18));
1386
1786
  }
1787
+ .ss-selectAll {
1788
+ display: inline-flex;
1789
+ align-items: center;
1790
+ gap: 7px;
1791
+ color: var(--dsw-alias-label-secondary, #59636e);
1792
+ font-size: 13px;
1793
+ line-height: 20px;
1794
+ cursor: pointer;
1795
+ user-select: none;
1796
+ }
1797
+ .ss-checkbox {
1798
+ width: 18px;
1799
+ height: 18px;
1800
+ margin: 0;
1801
+ flex: none;
1802
+ accent-color: var(--dsw-alias-state-business-primary, #2563eb);
1803
+ cursor: pointer;
1804
+ }
1805
+ .ss-checkbox:disabled {
1806
+ cursor: default;
1807
+ opacity: 0.55;
1808
+ }
1387
1809
  .ss-list {
1388
1810
  display: flex;
1389
1811
  flex-direction: column;
@@ -1394,10 +1816,12 @@ var CSS = `
1394
1816
  }
1395
1817
  .ss-row {
1396
1818
  position: relative;
1397
- display: flex;
1819
+ display: grid;
1820
+ grid-template-columns: 18px minmax(0, 1fr) 28px;
1821
+ column-gap: 14px;
1398
1822
  align-items: center;
1399
- gap: 14px;
1400
1823
  box-sizing: border-box;
1824
+ height: 66px;
1401
1825
  padding: 12px 14px;
1402
1826
  border-radius: var(--dsw-radius-lg, 14px);
1403
1827
  border: 0.5px solid var(--dsw-alias-border-l2, rgba(128, 128, 128, 0.2));
@@ -1410,21 +1834,48 @@ var CSS = `
1410
1834
  border-color: var(--dsw-alias-border-l4, rgba(128, 128, 128, 0.35));
1411
1835
  background: var(--dsw-alias-interactive-bg-hover, #e9ebee);
1412
1836
  }
1413
- .ss-row:focus-visible {
1414
- outline: var(--dsw-focus-ring-width, 2px) solid
1415
- var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary, #3b82f6));
1416
- outline-offset: 1px;
1837
+ .ss-rowSelected,
1838
+ .ss-rowSelected:hover,
1839
+ .ss-rowSelected:focus-within {
1840
+ border-color: var(--dsw-alias-state-business-primary, #3b82f6);
1417
1841
  }
1418
1842
  .ss-row[aria-disabled="true"] {
1419
1843
  cursor: default;
1420
1844
  opacity: 0.7;
1421
1845
  }
1846
+ .ss-rowLead {
1847
+ width: 18px;
1848
+ height: 20px;
1849
+ flex: none;
1850
+ display: inline-flex;
1851
+ align-items: center;
1852
+ justify-content: center;
1853
+ color: var(--dsw-alias-label-tertiary, #818b98);
1854
+ }
1422
1855
  .ss-rowMain {
1423
1856
  min-width: 0;
1424
- flex: 1;
1857
+ width: 100%;
1858
+ grid-column: 2;
1425
1859
  display: flex;
1426
1860
  flex-direction: column;
1427
1861
  gap: 3px;
1862
+ padding: 0;
1863
+ border: 0;
1864
+ background: transparent;
1865
+ color: inherit;
1866
+ font: inherit;
1867
+ text-align: left;
1868
+ cursor: pointer;
1869
+ }
1870
+ .ss-rowMain:disabled {
1871
+ cursor: default;
1872
+ opacity: 0.7;
1873
+ }
1874
+ .ss-rowMain:focus-visible {
1875
+ outline: var(--dsw-focus-ring-width, 2px) solid
1876
+ var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary, #3b82f6));
1877
+ outline-offset: 2px;
1878
+ border-radius: 6px;
1428
1879
  }
1429
1880
  .ss-rowTitleRow {
1430
1881
  display: flex;
@@ -1449,16 +1900,21 @@ var CSS = `
1449
1900
  align-items: center;
1450
1901
  gap: 8px;
1451
1902
  min-width: 0;
1452
- flex-wrap: wrap;
1903
+ flex-wrap: nowrap;
1904
+ overflow: hidden;
1905
+ white-space: nowrap;
1453
1906
  }
1454
1907
  .ss-dotSep {
1455
1908
  opacity: 0.5;
1456
1909
  }
1457
1910
  .ss-rowActions {
1458
1911
  position: relative;
1912
+ grid-column: 3;
1913
+ width: 28px;
1459
1914
  display: flex;
1460
1915
  align-items: center;
1461
- gap: 6px;
1916
+ justify-content: center;
1917
+ gap: 0;
1462
1918
  flex: none;
1463
1919
  }
1464
1920
  .ss-rowMenuButton {
@@ -1613,6 +2069,8 @@ var CSS = `
1613
2069
  .ss-dialog {
1614
2070
  width: 100%;
1615
2071
  max-width: 440px;
2072
+ max-height: calc(100vh - 48px);
2073
+ overflow: auto;
1616
2074
  box-sizing: border-box;
1617
2075
  border-radius: var(--dsw-radius-lg, 14px);
1618
2076
  border: 0.5px solid var(--dsw-alias-border-l4, rgba(128, 128, 128, 0.35));
@@ -1649,6 +2107,19 @@ var CSS = `
1649
2107
  gap: 8px;
1650
2108
  margin-top: 18px;
1651
2109
  }
2110
+ .ss-batchWarning {
2111
+ margin: 0 0 10px;
2112
+ color: var(--dsw-alias-label-primary, #1f2328);
2113
+ font-size: 12px;
2114
+ line-height: 18px;
2115
+ font-weight: 600;
2116
+ }
2117
+ .ss-batchDirs {
2118
+ margin: 0 0 10px;
2119
+ color: var(--dsw-alias-label-tertiary, #818b98);
2120
+ font-size: 12px;
2121
+ line-height: 18px;
2122
+ }
1652
2123
  .ss-footerAction {
1653
2124
  box-sizing: border-box;
1654
2125
  width: 100%;
@@ -1804,8 +2275,8 @@ var CSS = `
1804
2275
  }
1805
2276
  @media (max-width: 640px) {
1806
2277
  .ss-panel { padding: 20px 14px 40px; }
1807
- .ss-row { flex-wrap: wrap; }
1808
- .ss-rowActions { width: 100%; justify-content: flex-end; }
2278
+ .ss-row { flex-wrap: nowrap; gap: 10px; }
2279
+ .ss-headerActions { flex-basis: 176px; width: 176px; }
1809
2280
  }
1810
2281
  `;
1811
2282
  function insertStyles() {
@@ -36,5 +36,24 @@ export declare function renameStandalone(ctx: ClientContext, sessionId: string,
36
36
  * @param sessionId - target session.
37
37
  */
38
38
  export declare function archiveStandalone(ctx: ClientContext, sessionId: string): Promise<void>;
39
+ /** One failed session in a batch archive operation. */
40
+ export interface BatchArchiveFailure {
41
+ readonly sessionId: string;
42
+ readonly message: string;
43
+ }
44
+ /** Result of archiving a snapshot of selected sessions. */
45
+ export interface BatchArchiveResult {
46
+ readonly archived: readonly string[];
47
+ readonly failed: readonly BatchArchiveFailure[];
48
+ }
49
+ /**
50
+ * Archive sessions one at a time. A failure is recorded and the remaining
51
+ * sessions continue, so one stale row cannot strand the rest of the batch.
52
+ * @param ctx - client root context.
53
+ * @param sessionIds - frozen snapshot of the selected session ids.
54
+ * @param onProgress - called after every attempt with 1-based progress.
55
+ * @returns successfully archived ids and per-session failures.
56
+ */
57
+ export declare function archiveStandalones(ctx: ClientContext, sessionIds: readonly string[], onProgress?: (done: number, total: number) => void): Promise<BatchArchiveResult>;
39
58
  /** Human-readable error text. */
40
59
  export declare function messageOf(error: unknown): string;
@@ -3,7 +3,7 @@
3
3
  * keeps `en` complete, and both shipped languages are registered together.
4
4
  */
5
5
  export declare const NS = "standaloneSession";
6
- export type StandaloneKey = 'panel.label' | 'panel.title' | 'panel.description' | 'panel.new' | 'panel.empty' | 'panel.emptyHint' | 'panel.badge' | 'panel.open' | 'panel.rename' | 'panel.delete' | 'panel.untitled' | 'panel.blank' | 'panel.running' | 'panel.cwd' | 'panel.count' | 'panel.deleteTitle' | 'panel.deleteBody' | 'panel.deleteConfirm' | 'panel.deleteKeepDir' | 'panel.cancel' | 'panel.renameTitle' | 'panel.renameLabel' | 'panel.more' | 'panel.save' | 'panel.titleRequired' | 'panel.actionFailed' | 'panel.retry' | 'panel.archivedHint' | 'panel.loading' | 'entry.label' | 'launcher.creating' | 'launcher.failedTitle' | 'launcher.retry' | 'launcher.manage' | 'launcher.hint' | 'command.label' | 'command.description' | 'command.manageLabel' | 'command.manageDescription' | 'footer.manage' | 'footer.manageCount' | 'footer.manageTooltip' | 'time.now' | 'time.minutes' | 'time.hours' | 'time.days' | 'toast.manageFailed' | 'hero.badge' | 'hero.hint' | 'row.mark' | 'row.hover' | 'composer.placeholder' | 'toast.created' | 'toast.createFailed' | 'toast.deleteFailed' | 'toast.deleted' | 'toast.renamed' | 'toast.renameFailed' | 'error.noHome' | 'error.noSession';
6
+ export type StandaloneKey = 'panel.label' | 'panel.title' | 'panel.description' | 'panel.new' | 'panel.empty' | 'panel.emptyHint' | 'panel.badge' | 'panel.open' | 'panel.rename' | 'panel.delete' | 'panel.untitled' | 'panel.blank' | 'panel.running' | 'panel.cwd' | 'panel.count' | 'panel.deleteTitle' | 'panel.deleteBody' | 'panel.deleteConfirm' | 'panel.select' | 'panel.selectToolbar' | 'panel.selectAll' | 'panel.selectAllLabel' | 'panel.selectionHint' | 'panel.selectedCount' | 'panel.selectRow' | 'panel.batchDelete' | 'panel.batchDeleteTitle' | 'panel.batchDeleteBody' | 'panel.batchDeleteRunning' | 'panel.batchDeleteDirs' | 'panel.batchDeleting' | 'panel.batchPartial' | 'panel.deleteKeepDir' | 'panel.cancel' | 'panel.renameTitle' | 'panel.renameLabel' | 'panel.more' | 'panel.save' | 'panel.titleRequired' | 'panel.actionFailed' | 'panel.retry' | 'panel.archivedHint' | 'panel.loading' | 'entry.label' | 'launcher.creating' | 'launcher.failedTitle' | 'launcher.retry' | 'launcher.manage' | 'launcher.hint' | 'command.label' | 'command.description' | 'command.manageLabel' | 'command.manageDescription' | 'footer.manage' | 'footer.manageCount' | 'footer.manageTooltip' | 'time.now' | 'time.minutes' | 'time.hours' | 'time.days' | 'toast.manageFailed' | 'hero.badge' | 'hero.hint' | 'row.mark' | 'row.hover' | 'composer.placeholder' | 'toast.created' | 'toast.createFailed' | 'toast.deleteFailed' | 'toast.deleted' | 'toast.renamed' | 'toast.renameFailed' | 'error.noHome' | 'error.noSession';
7
7
  export type StandaloneDict = Readonly<Record<StandaloneKey, string>>;
8
8
  export declare const zh: StandaloneDict;
9
9
  export declare const en: StandaloneDict;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Pure selection helpers for the standalone-session manager. Keeping these out
3
+ * of the panel makes bulk-selection edge cases (pruning, select-all, partial
4
+ * state) directly unit-testable.
5
+ */
6
+ import type { SessionRow } from './dsh.js';
7
+ /** Toggle one session id without mutating the caller's set. */
8
+ export declare function toggleSelection(selected: ReadonlySet<string>, sessionId: string): ReadonlySet<string>;
9
+ /** Select every row in the current view. */
10
+ export declare function selectAllRows(rows: readonly SessionRow[]): ReadonlySet<string>;
11
+ /** Rows that are still present in the current view and selected. */
12
+ export declare function selectedRows(rows: readonly SessionRow[], selected: ReadonlySet<string>): SessionRow[];
13
+ /**
14
+ * Drop ids that disappeared from the view. Returns the original set when
15
+ * nothing changed so callers can avoid a redundant state update.
16
+ */
17
+ export declare function pruneSelection(rows: readonly SessionRow[], selected: ReadonlySet<string>): ReadonlySet<string>;
18
+ /** Select-all checkbox state for the current view. */
19
+ export declare function selectionState(rows: readonly SessionRow[], selected: ReadonlySet<string>): {
20
+ readonly count: number;
21
+ readonly all: boolean;
22
+ readonly some: boolean;
23
+ };
24
+ /** Counts used by the batch confirmation copy. */
25
+ export declare function batchSummary(rows: readonly SessionRow[], selected: ReadonlySet<string>): {
26
+ readonly count: number;
27
+ readonly running: number;
28
+ readonly blank: number;
29
+ };
@@ -2,7 +2,7 @@
2
2
  * One namespaced stylesheet. DSH theme variables carry the palette, so the
3
3
  * plugin follows light/dark themes without owning color tokens.
4
4
  */
5
- export declare const CSS = "\n.ss-panel {\n box-sizing: border-box;\n height: 100%;\n min-height: 0;\n overflow: auto;\n padding: 32px clamp(20px, 5vw, 56px) 56px;\n color: var(--dsw-alias-label-primary, #1f2328);\n background: var(--dsw-specific-main-fill, transparent);\n}\n.ss-shell {\n width: 100%;\n max-width: 880px;\n margin: 0 auto;\n}\n.ss-header {\n display: flex;\n align-items: flex-start;\n gap: 16px;\n justify-content: space-between;\n flex-wrap: wrap;\n margin-bottom: 8px;\n}\n.ss-titleRow {\n display: flex;\n align-items: center;\n gap: 10px;\n min-width: 0;\n}\n.ss-title {\n font-size: 24px;\n line-height: 32px;\n font-weight: 600;\n margin: 0;\n}\n.ss-description {\n color: var(--dsw-alias-label-secondary, #59636e);\n font-size: 13px;\n line-height: 20px;\n margin: 6px 0 0;\n max-width: 560px;\n}\n.ss-count {\n color: var(--dsw-alias-label-tertiary, #818b98);\n font-size: 12px;\n line-height: 20px;\n margin-top: 6px;\n}\n.ss-countInline {\n margin-top: 0;\n align-self: center;\n}\n.ss-button {\n font: inherit;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n box-sizing: border-box;\n min-height: 32px;\n padding: 5px 12px;\n border-radius: var(--dsw-radius-md, 10px);\n border: 0.5px solid transparent;\n cursor: pointer;\n color: var(--dsw-alias-label-primary, #1f2328);\n background: var(--dsw-alias-button-elevated-fill, #f3f4f6);\n transition: background 120ms ease, border-color 120ms ease;\n}\n.ss-button:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover, #e9ebee);\n}\n.ss-button:focus-visible {\n outline: var(--dsw-focus-ring-width, 2px) solid\n var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary, #3b82f6));\n outline-offset: 1px;\n}\n.ss-button:disabled {\n cursor: default;\n opacity: 0.55;\n}\n.ss-buttonPrimary {\n color: #fff;\n background: var(--dsw-alias-state-business-primary, #2563eb);\n border-color: var(--dsw-alias-state-business-primary, #2563eb);\n}\n.ss-buttonPrimary:hover:not(:disabled) {\n background: var(--dsw-alias-state-business-primary, #2563eb);\n filter: brightness(1.05);\n}\n.ss-buttonQuiet {\n background: transparent;\n border-color: var(--dsw-alias-border-l2, rgba(128, 128, 128, 0.22));\n}\n.ss-buttonDanger {\n color: var(--dsw-alias-state-error-primary, #d1242f);\n background: transparent;\n border-color: var(--dsw-alias-border-l2, rgba(128, 128, 128, 0.22));\n}\n.ss-badge {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n flex: none;\n border-radius: 999px;\n padding: 1px 8px 2px;\n font-size: 11px;\n line-height: 16px;\n font-weight: 600;\n letter-spacing: 0.01em;\n color: var(--dsw-alias-label-primary-bluish, #1f4f8f);\n background: var(--dsw-alias-state-business-tertiary, rgba(59, 130, 246, 0.12));\n border: 0.5px solid var(--dsw-alias-interactive-bg-hover, rgba(59, 130, 246, 0.18));\n}\n.ss-list {\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin: 20px 0 0;\n padding: 0;\n list-style: none;\n}\n.ss-row {\n position: relative;\n display: flex;\n align-items: center;\n gap: 14px;\n box-sizing: border-box;\n padding: 12px 14px;\n border-radius: var(--dsw-radius-lg, 14px);\n border: 0.5px solid var(--dsw-alias-border-l2, rgba(128, 128, 128, 0.2));\n background: var(--dsw-alias-bg-elevated, rgba(255, 255, 255, 0.02));\n cursor: pointer;\n transition: background 120ms ease, border-color 120ms ease;\n}\n.ss-row:hover,\n.ss-row:focus-within {\n border-color: var(--dsw-alias-border-l4, rgba(128, 128, 128, 0.35));\n background: var(--dsw-alias-interactive-bg-hover, #e9ebee);\n}\n.ss-row:focus-visible {\n outline: var(--dsw-focus-ring-width, 2px) solid\n var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary, #3b82f6));\n outline-offset: 1px;\n}\n.ss-row[aria-disabled=\"true\"] {\n cursor: default;\n opacity: 0.7;\n}\n.ss-rowMain {\n min-width: 0;\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 3px;\n}\n.ss-rowTitleRow {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n}\n.ss-rowTitle {\n font-size: 14px;\n line-height: 20px;\n font-weight: 600;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.ss-rowMeta {\n color: var(--dsw-alias-label-tertiary, #818b98);\n font-size: 12px;\n line-height: 18px;\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n flex-wrap: wrap;\n}\n.ss-dotSep {\n opacity: 0.5;\n}\n.ss-rowActions {\n position: relative;\n display: flex;\n align-items: center;\n gap: 6px;\n flex: none;\n}\n.ss-rowMenuButton {\n width: 28px;\n height: 28px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: 0;\n border-radius: var(--dsw-radius-md, 10px);\n background: transparent;\n color: var(--dsw-alias-label-tertiary, #818b98);\n font: inherit;\n font-size: 18px;\n line-height: 1;\n cursor: pointer;\n opacity: 0;\n transition: background 120ms ease, color 120ms ease, opacity 120ms ease;\n}\n.ss-row:hover .ss-rowMenuButton,\n.ss-row:focus-within .ss-rowMenuButton,\n.ss-rowMenuOpen .ss-rowMenuButton {\n opacity: 1;\n}\n.ss-rowMenuButton:hover:not(:disabled) {\n color: var(--dsw-alias-label-primary, #1f2328);\n background: var(--dsw-alias-interactive-bg-hover, #e9ebee);\n}\n.ss-rowMenuButton:focus-visible {\n opacity: 1;\n outline: var(--dsw-focus-ring-width, 2px) solid\n var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary, #3b82f6));\n outline-offset: 1px;\n}\n.ss-rowMenuButton:disabled {\n cursor: default;\n opacity: 0.35;\n}\n.ss-rowMenu {\n position: absolute;\n top: calc(100% + 4px);\n right: 0;\n z-index: 20;\n min-width: 136px;\n padding: 4px;\n display: flex;\n flex-direction: column;\n gap: 2px;\n border: 0.5px solid var(--dsw-alias-border-l4, rgba(128, 128, 128, 0.35));\n border-radius: var(--dsw-radius-md, 10px);\n background: var(--dsw-alias-bg-elevated, #fff);\n box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);\n}\n.ss-rowMenu button {\n box-sizing: border-box;\n width: 100%;\n padding: 6px 9px;\n border: 0;\n border-radius: 6px;\n background: transparent;\n color: var(--dsw-alias-label-primary, #1f2328);\n font: inherit;\n font-size: 13px;\n line-height: 20px;\n text-align: left;\n cursor: pointer;\n}\n.ss-rowMenu button:hover:not(:disabled),\n.ss-rowMenu button:focus-visible {\n background: var(--dsw-alias-interactive-bg-hover, #e9ebee);\n outline: none;\n}\n.ss-rowMenu button:disabled {\n cursor: default;\n opacity: 0.5;\n}\n.ss-rowMenuDanger {\n color: var(--dsw-alias-state-error-primary, #d1242f) !important;\n}\n.ss-status {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n}\n.ss-statusDot {\n width: 5px;\n height: 5px;\n border-radius: 50%;\n background: currentColor;\n opacity: 0.55;\n}\n.ss-stateRunning {\n color: var(--dsw-alias-state-business-primary, #2563eb);\n font-weight: 600;\n}\n.ss-empty {\n margin-top: 28px;\n padding: 44px 24px;\n text-align: center;\n border: 0.5px dashed var(--dsw-alias-border-l2, rgba(128, 128, 128, 0.3));\n border-radius: var(--dsw-radius-lg, 14px);\n}\n.ss-emptyTitle {\n font-size: 15px;\n font-weight: 600;\n line-height: 22px;\n margin: 0 0 6px;\n}\n.ss-emptyHint {\n color: var(--dsw-alias-label-secondary, #59636e);\n font-size: 13px;\n line-height: 20px;\n margin: 0 auto;\n max-width: 460px;\n}\n.ss-emptyAction {\n margin-top: 18px;\n}\n.ss-panelHint {\n margin: 18px 0 0;\n color: var(--dsw-alias-label-tertiary, #818b98);\n font-size: 12px;\n line-height: 20px;\n}\n.ss-fieldLabel {\n display: block;\n margin: 12px 0 6px;\n color: var(--dsw-alias-label-secondary, #59636e);\n font-size: 12px;\n line-height: 18px;\n}\n.ss-error {\n margin-top: 16px;\n padding: 8px 10px;\n border-radius: var(--dsw-radius-sm, 8px);\n color: var(--dsw-alias-state-error-primary, #d1242f);\n background: var(--dsw-alias-state-error-tertiary, rgba(209, 36, 47, 0.08));\n font-size: 12px;\n line-height: 18px;\n}\n.ss-dialogBackdrop {\n position: fixed;\n inset: 0;\n z-index: 80;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(0, 0, 0, 0.28);\n padding: 24px;\n}\n.ss-dialog {\n width: 100%;\n max-width: 440px;\n box-sizing: border-box;\n border-radius: var(--dsw-radius-lg, 14px);\n border: 0.5px solid var(--dsw-alias-border-l4, rgba(128, 128, 128, 0.35));\n background: var(--dsw-alias-bg-elevated, #fff);\n padding: 20px;\n box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);\n}\n.ss-dialogTitle {\n margin: 0 0 6px;\n font-size: 16px;\n line-height: 24px;\n font-weight: 600;\n}\n.ss-dialogBody {\n margin: 0 0 14px;\n color: var(--dsw-alias-label-secondary, #59636e);\n font-size: 13px;\n line-height: 20px;\n}\n.ss-input {\n box-sizing: border-box;\n width: 100%;\n height: 36px;\n border-radius: var(--dsw-radius-sm, 8px);\n border: 0.5px solid var(--dsw-alias-border-l4, rgba(128, 128, 128, 0.35));\n background: transparent;\n color: inherit;\n font: inherit;\n padding: 0 10px;\n}\n.ss-dialogFooter {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n margin-top: 18px;\n}\n.ss-footerAction {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n align-items: center;\n gap: 8px;\n min-height: 30px;\n padding: 4px 8px;\n border: 0;\n border-radius: var(--dsw-radius-md, 10px);\n background: transparent;\n color: var(--dsw-alias-label-secondary, #59636e);\n font: inherit;\n cursor: pointer;\n text-align: left;\n}\n.ss-footerAction:hover {\n color: var(--dsw-alias-label-primary, #1f2328);\n background: var(--dsw-alias-interactive-bg-hover, #e9ebee);\n}\n.ss-footerAction:disabled {\n cursor: default;\n opacity: 0.55;\n}\n.ss-footerLabel {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 13px;\n}\n.ss-footerRail {\n width: 36px;\n height: 36px;\n justify-content: center;\n padding: 0;\n}\n.ss-panelIcon {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n.ss-launcher {\n box-sizing: border-box;\n min-height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 32px;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n.ss-launcherCard {\n box-sizing: border-box;\n width: 100%;\n max-width: 430px;\n padding: 30px 28px;\n text-align: center;\n border: 0.5px solid var(--dsw-alias-border-l2, rgba(128, 128, 128, 0.22));\n border-radius: var(--dsw-radius-lg, 14px);\n background: var(--dsw-alias-bg-elevated, rgba(255, 255, 255, 0.02));\n}\n.ss-launcherSpinner {\n width: 22px;\n height: 22px;\n margin: 0 auto 14px;\n border-radius: 50%;\n border: 2px solid var(--dsw-alias-border-l2, rgba(128, 128, 128, 0.25));\n border-top-color: var(--dsw-alias-state-business-primary, #2563eb);\n animation: ss-spin 900ms linear infinite;\n}\n@keyframes ss-spin {\n to { transform: rotate(360deg); }\n}\n.ss-launcherTitle {\n margin: 0;\n font-size: 15px;\n line-height: 22px;\n font-weight: 600;\n}\n.ss-launcherHint {\n margin: 6px 0 0;\n color: var(--dsw-alias-label-secondary, #59636e);\n font-size: 13px;\n line-height: 20px;\n}\n.ss-launcherActions {\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n gap: 8px;\n margin-top: 18px;\n}\n.ss-heroBadge {\n margin-right: 4px;\n}\n.ss-rowMark {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 14px;\n height: 14px;\n border-radius: 4px;\n font-size: 10px;\n line-height: 1;\n font-weight: 700;\n color: var(--dsw-alias-label-primary-bluish, #1f4f8f);\n background: var(--dsw-alias-state-business-tertiary, rgba(59, 130, 246, 0.14));\n flex: none;\n}\n.ss-rowHover {\n display: flex;\n align-items: center;\n gap: 6px;\n color: #cfd3d6;\n font-size: 12px;\n line-height: 16px;\n}\n.ss-toast {\n position: fixed;\n left: 50%;\n bottom: 28px;\n transform: translateX(-50%);\n z-index: 90;\n max-width: min(520px, calc(100vw - 40px));\n box-sizing: border-box;\n padding: 9px 14px;\n border-radius: var(--dsw-radius-md, 10px);\n border: 0.5px solid var(--dsw-alias-border-l4, rgba(128, 128, 128, 0.35));\n background: var(--dsw-alias-bg-elevated, #fff);\n color: var(--dsw-alias-label-primary, #1f2328);\n box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);\n font-size: 13px;\n line-height: 19px;\n pointer-events: auto;\n}\n.ss-toastError {\n color: var(--dsw-alias-state-error-primary, #d1242f);\n}\n.ss-visuallyHidden {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n@media (hover: none) {\n .ss-rowMenuButton { opacity: 1; }\n}\n@media (max-width: 640px) {\n .ss-panel { padding: 20px 14px 40px; }\n .ss-row { flex-wrap: wrap; }\n .ss-rowActions { width: 100%; justify-content: flex-end; }\n}\n";
5
+ export declare const CSS = "\n.ss-panel {\n box-sizing: border-box;\n height: 100%;\n min-height: 0;\n overflow: auto;\n padding: 32px clamp(20px, 5vw, 56px) 56px;\n color: var(--dsw-alias-label-primary, #1f2328);\n background: var(--dsw-specific-main-fill, transparent);\n}\n.ss-shell {\n width: 100%;\n max-width: 880px;\n margin: 0 auto;\n}\n.ss-header {\n display: flex;\n align-items: flex-start;\n gap: 16px;\n justify-content: space-between;\n flex-wrap: nowrap;\n min-height: 58px;\n margin-bottom: 8px;\n}\n.ss-headerMain {\n min-width: 0;\n flex: 1;\n}\n.ss-titleRow {\n display: flex;\n align-items: center;\n gap: 10px;\n min-width: 0;\n}\n.ss-title {\n font-size: 24px;\n line-height: 32px;\n font-weight: 600;\n margin: 0;\n}\n.ss-statusLine {\n margin: 6px 0 0;\n color: var(--dsw-alias-label-secondary, #59636e);\n font-size: 13px;\n line-height: 20px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.ss-statusLineError {\n color: var(--dsw-alias-state-error-primary, #d1242f);\n}\n.ss-count {\n color: var(--dsw-alias-label-tertiary, #818b98);\n font-size: 12px;\n line-height: 20px;\n margin-top: 6px;\n}\n.ss-countInline {\n margin-top: 0;\n align-self: center;\n}\n.ss-headerActions {\n display: flex;\n flex: 0 0 176px;\n width: 176px;\n height: 32px;\n align-items: center;\n justify-content: flex-end;\n flex-wrap: nowrap;\n gap: 8px;\n}\n.ss-deleteSlot {\n width: 56px;\n height: 32px;\n flex: none;\n display: flex;\n justify-content: flex-end;\n}\n.ss-deleteSlot .ss-button {\n min-width: 52px;\n flex: none;\n}\n.ss-selectButton {\n min-height: 32px;\n padding: 3px 8px;\n border: 0;\n border-radius: var(--dsw-radius-md, 10px);\n background: transparent;\n color: var(--dsw-alias-label-secondary, #59636e);\n font: inherit;\n font-size: 13px;\n line-height: 20px;\n cursor: pointer;\n}\n.ss-selectButton:hover:not(:disabled) {\n color: var(--dsw-alias-label-primary, #1f2328);\n background: var(--dsw-alias-interactive-bg-hover, #e9ebee);\n}\n.ss-selectButton:focus-visible {\n outline: var(--dsw-focus-ring-width, 2px) solid\n var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary, #3b82f6));\n outline-offset: 1px;\n}\n.ss-selectButton:disabled {\n cursor: default;\n opacity: 0.55;\n}\n.ss-button {\n font: inherit;\n display: inline-flex;\n flex: none;\n white-space: nowrap;\n align-items: center;\n justify-content: center;\n gap: 6px;\n box-sizing: border-box;\n min-height: 32px;\n padding: 5px 12px;\n border-radius: var(--dsw-radius-md, 10px);\n border: 0.5px solid transparent;\n cursor: pointer;\n color: var(--dsw-alias-label-primary, #1f2328);\n background: var(--dsw-alias-button-elevated-fill, #f3f4f6);\n transition: background 120ms ease, border-color 120ms ease;\n}\n.ss-button:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover, #e9ebee);\n}\n.ss-button:focus-visible {\n outline: var(--dsw-focus-ring-width, 2px) solid\n var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary, #3b82f6));\n outline-offset: 1px;\n}\n.ss-button:disabled {\n cursor: default;\n opacity: 0.55;\n}\n.ss-buttonPrimary {\n color: #fff;\n background: var(--dsw-alias-state-business-primary, #2563eb);\n border-color: var(--dsw-alias-state-business-primary, #2563eb);\n}\n.ss-buttonPrimary:hover:not(:disabled) {\n background: var(--dsw-alias-state-business-primary, #2563eb);\n filter: brightness(1.05);\n}\n.ss-buttonQuiet {\n background: transparent;\n border-color: var(--dsw-alias-border-l2, rgba(128, 128, 128, 0.22));\n}\n.ss-buttonDanger {\n color: var(--dsw-alias-state-error-primary, #d1242f);\n background: transparent;\n border-color: var(--dsw-alias-border-l2, rgba(128, 128, 128, 0.22));\n}\n.ss-badge {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n flex: none;\n border-radius: 999px;\n padding: 1px 8px 2px;\n font-size: 11px;\n line-height: 16px;\n font-weight: 600;\n letter-spacing: 0.01em;\n color: var(--dsw-alias-label-primary-bluish, #1f4f8f);\n background: var(--dsw-alias-state-business-tertiary, rgba(59, 130, 246, 0.12));\n border: 0.5px solid var(--dsw-alias-interactive-bg-hover, rgba(59, 130, 246, 0.18));\n}\n.ss-selectAll {\n display: inline-flex;\n align-items: center;\n gap: 7px;\n color: var(--dsw-alias-label-secondary, #59636e);\n font-size: 13px;\n line-height: 20px;\n cursor: pointer;\n user-select: none;\n}\n.ss-checkbox {\n width: 18px;\n height: 18px;\n margin: 0;\n flex: none;\n accent-color: var(--dsw-alias-state-business-primary, #2563eb);\n cursor: pointer;\n}\n.ss-checkbox:disabled {\n cursor: default;\n opacity: 0.55;\n}\n.ss-list {\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin: 20px 0 0;\n padding: 0;\n list-style: none;\n}\n.ss-row {\n position: relative;\n display: grid;\n grid-template-columns: 18px minmax(0, 1fr) 28px;\n column-gap: 14px;\n align-items: center;\n box-sizing: border-box;\n height: 66px;\n padding: 12px 14px;\n border-radius: var(--dsw-radius-lg, 14px);\n border: 0.5px solid var(--dsw-alias-border-l2, rgba(128, 128, 128, 0.2));\n background: var(--dsw-alias-bg-elevated, rgba(255, 255, 255, 0.02));\n cursor: pointer;\n transition: background 120ms ease, border-color 120ms ease;\n}\n.ss-row:hover,\n.ss-row:focus-within {\n border-color: var(--dsw-alias-border-l4, rgba(128, 128, 128, 0.35));\n background: var(--dsw-alias-interactive-bg-hover, #e9ebee);\n}\n.ss-rowSelected,\n.ss-rowSelected:hover,\n.ss-rowSelected:focus-within {\n border-color: var(--dsw-alias-state-business-primary, #3b82f6);\n}\n.ss-row[aria-disabled=\"true\"] {\n cursor: default;\n opacity: 0.7;\n}\n.ss-rowLead {\n width: 18px;\n height: 20px;\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: var(--dsw-alias-label-tertiary, #818b98);\n}\n.ss-rowMain {\n min-width: 0;\n width: 100%;\n grid-column: 2;\n display: flex;\n flex-direction: column;\n gap: 3px;\n padding: 0;\n border: 0;\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n.ss-rowMain:disabled {\n cursor: default;\n opacity: 0.7;\n}\n.ss-rowMain:focus-visible {\n outline: var(--dsw-focus-ring-width, 2px) solid\n var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary, #3b82f6));\n outline-offset: 2px;\n border-radius: 6px;\n}\n.ss-rowTitleRow {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n}\n.ss-rowTitle {\n font-size: 14px;\n line-height: 20px;\n font-weight: 600;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.ss-rowMeta {\n color: var(--dsw-alias-label-tertiary, #818b98);\n font-size: 12px;\n line-height: 18px;\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n flex-wrap: nowrap;\n overflow: hidden;\n white-space: nowrap;\n}\n.ss-dotSep {\n opacity: 0.5;\n}\n.ss-rowActions {\n position: relative;\n grid-column: 3;\n width: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0;\n flex: none;\n}\n.ss-rowMenuButton {\n width: 28px;\n height: 28px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: 0;\n border-radius: var(--dsw-radius-md, 10px);\n background: transparent;\n color: var(--dsw-alias-label-tertiary, #818b98);\n font: inherit;\n font-size: 18px;\n line-height: 1;\n cursor: pointer;\n opacity: 0;\n transition: background 120ms ease, color 120ms ease, opacity 120ms ease;\n}\n.ss-row:hover .ss-rowMenuButton,\n.ss-row:focus-within .ss-rowMenuButton,\n.ss-rowMenuOpen .ss-rowMenuButton {\n opacity: 1;\n}\n.ss-rowMenuButton:hover:not(:disabled) {\n color: var(--dsw-alias-label-primary, #1f2328);\n background: var(--dsw-alias-interactive-bg-hover, #e9ebee);\n}\n.ss-rowMenuButton:focus-visible {\n opacity: 1;\n outline: var(--dsw-focus-ring-width, 2px) solid\n var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary, #3b82f6));\n outline-offset: 1px;\n}\n.ss-rowMenuButton:disabled {\n cursor: default;\n opacity: 0.35;\n}\n.ss-rowMenu {\n position: absolute;\n top: calc(100% + 4px);\n right: 0;\n z-index: 20;\n min-width: 136px;\n padding: 4px;\n display: flex;\n flex-direction: column;\n gap: 2px;\n border: 0.5px solid var(--dsw-alias-border-l4, rgba(128, 128, 128, 0.35));\n border-radius: var(--dsw-radius-md, 10px);\n background: var(--dsw-alias-bg-elevated, #fff);\n box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);\n}\n.ss-rowMenu button {\n box-sizing: border-box;\n width: 100%;\n padding: 6px 9px;\n border: 0;\n border-radius: 6px;\n background: transparent;\n color: var(--dsw-alias-label-primary, #1f2328);\n font: inherit;\n font-size: 13px;\n line-height: 20px;\n text-align: left;\n cursor: pointer;\n}\n.ss-rowMenu button:hover:not(:disabled),\n.ss-rowMenu button:focus-visible {\n background: var(--dsw-alias-interactive-bg-hover, #e9ebee);\n outline: none;\n}\n.ss-rowMenu button:disabled {\n cursor: default;\n opacity: 0.5;\n}\n.ss-rowMenuDanger {\n color: var(--dsw-alias-state-error-primary, #d1242f) !important;\n}\n.ss-status {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n}\n.ss-statusDot {\n width: 5px;\n height: 5px;\n border-radius: 50%;\n background: currentColor;\n opacity: 0.55;\n}\n.ss-stateRunning {\n color: var(--dsw-alias-state-business-primary, #2563eb);\n font-weight: 600;\n}\n.ss-empty {\n margin-top: 28px;\n padding: 44px 24px;\n text-align: center;\n border: 0.5px dashed var(--dsw-alias-border-l2, rgba(128, 128, 128, 0.3));\n border-radius: var(--dsw-radius-lg, 14px);\n}\n.ss-emptyTitle {\n font-size: 15px;\n font-weight: 600;\n line-height: 22px;\n margin: 0 0 6px;\n}\n.ss-emptyHint {\n color: var(--dsw-alias-label-secondary, #59636e);\n font-size: 13px;\n line-height: 20px;\n margin: 0 auto;\n max-width: 460px;\n}\n.ss-emptyAction {\n margin-top: 18px;\n}\n.ss-panelHint {\n margin: 18px 0 0;\n color: var(--dsw-alias-label-tertiary, #818b98);\n font-size: 12px;\n line-height: 20px;\n}\n.ss-fieldLabel {\n display: block;\n margin: 12px 0 6px;\n color: var(--dsw-alias-label-secondary, #59636e);\n font-size: 12px;\n line-height: 18px;\n}\n.ss-error {\n margin-top: 16px;\n padding: 8px 10px;\n border-radius: var(--dsw-radius-sm, 8px);\n color: var(--dsw-alias-state-error-primary, #d1242f);\n background: var(--dsw-alias-state-error-tertiary, rgba(209, 36, 47, 0.08));\n font-size: 12px;\n line-height: 18px;\n}\n.ss-dialogBackdrop {\n position: fixed;\n inset: 0;\n z-index: 80;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(0, 0, 0, 0.28);\n padding: 24px;\n}\n.ss-dialog {\n width: 100%;\n max-width: 440px;\n max-height: calc(100vh - 48px);\n overflow: auto;\n box-sizing: border-box;\n border-radius: var(--dsw-radius-lg, 14px);\n border: 0.5px solid var(--dsw-alias-border-l4, rgba(128, 128, 128, 0.35));\n background: var(--dsw-alias-bg-elevated, #fff);\n padding: 20px;\n box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);\n}\n.ss-dialogTitle {\n margin: 0 0 6px;\n font-size: 16px;\n line-height: 24px;\n font-weight: 600;\n}\n.ss-dialogBody {\n margin: 0 0 14px;\n color: var(--dsw-alias-label-secondary, #59636e);\n font-size: 13px;\n line-height: 20px;\n}\n.ss-input {\n box-sizing: border-box;\n width: 100%;\n height: 36px;\n border-radius: var(--dsw-radius-sm, 8px);\n border: 0.5px solid var(--dsw-alias-border-l4, rgba(128, 128, 128, 0.35));\n background: transparent;\n color: inherit;\n font: inherit;\n padding: 0 10px;\n}\n.ss-dialogFooter {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n margin-top: 18px;\n}\n.ss-batchWarning {\n margin: 0 0 10px;\n color: var(--dsw-alias-label-primary, #1f2328);\n font-size: 12px;\n line-height: 18px;\n font-weight: 600;\n}\n.ss-batchDirs {\n margin: 0 0 10px;\n color: var(--dsw-alias-label-tertiary, #818b98);\n font-size: 12px;\n line-height: 18px;\n}\n.ss-footerAction {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n align-items: center;\n gap: 8px;\n min-height: 30px;\n padding: 4px 8px;\n border: 0;\n border-radius: var(--dsw-radius-md, 10px);\n background: transparent;\n color: var(--dsw-alias-label-secondary, #59636e);\n font: inherit;\n cursor: pointer;\n text-align: left;\n}\n.ss-footerAction:hover {\n color: var(--dsw-alias-label-primary, #1f2328);\n background: var(--dsw-alias-interactive-bg-hover, #e9ebee);\n}\n.ss-footerAction:disabled {\n cursor: default;\n opacity: 0.55;\n}\n.ss-footerLabel {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 13px;\n}\n.ss-footerRail {\n width: 36px;\n height: 36px;\n justify-content: center;\n padding: 0;\n}\n.ss-panelIcon {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n.ss-launcher {\n box-sizing: border-box;\n min-height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 32px;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n.ss-launcherCard {\n box-sizing: border-box;\n width: 100%;\n max-width: 430px;\n padding: 30px 28px;\n text-align: center;\n border: 0.5px solid var(--dsw-alias-border-l2, rgba(128, 128, 128, 0.22));\n border-radius: var(--dsw-radius-lg, 14px);\n background: var(--dsw-alias-bg-elevated, rgba(255, 255, 255, 0.02));\n}\n.ss-launcherSpinner {\n width: 22px;\n height: 22px;\n margin: 0 auto 14px;\n border-radius: 50%;\n border: 2px solid var(--dsw-alias-border-l2, rgba(128, 128, 128, 0.25));\n border-top-color: var(--dsw-alias-state-business-primary, #2563eb);\n animation: ss-spin 900ms linear infinite;\n}\n@keyframes ss-spin {\n to { transform: rotate(360deg); }\n}\n.ss-launcherTitle {\n margin: 0;\n font-size: 15px;\n line-height: 22px;\n font-weight: 600;\n}\n.ss-launcherHint {\n margin: 6px 0 0;\n color: var(--dsw-alias-label-secondary, #59636e);\n font-size: 13px;\n line-height: 20px;\n}\n.ss-launcherActions {\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n gap: 8px;\n margin-top: 18px;\n}\n.ss-heroBadge {\n margin-right: 4px;\n}\n.ss-rowMark {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 14px;\n height: 14px;\n border-radius: 4px;\n font-size: 10px;\n line-height: 1;\n font-weight: 700;\n color: var(--dsw-alias-label-primary-bluish, #1f4f8f);\n background: var(--dsw-alias-state-business-tertiary, rgba(59, 130, 246, 0.14));\n flex: none;\n}\n.ss-rowHover {\n display: flex;\n align-items: center;\n gap: 6px;\n color: #cfd3d6;\n font-size: 12px;\n line-height: 16px;\n}\n.ss-toast {\n position: fixed;\n left: 50%;\n bottom: 28px;\n transform: translateX(-50%);\n z-index: 90;\n max-width: min(520px, calc(100vw - 40px));\n box-sizing: border-box;\n padding: 9px 14px;\n border-radius: var(--dsw-radius-md, 10px);\n border: 0.5px solid var(--dsw-alias-border-l4, rgba(128, 128, 128, 0.35));\n background: var(--dsw-alias-bg-elevated, #fff);\n color: var(--dsw-alias-label-primary, #1f2328);\n box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);\n font-size: 13px;\n line-height: 19px;\n pointer-events: auto;\n}\n.ss-toastError {\n color: var(--dsw-alias-state-error-primary, #d1242f);\n}\n.ss-visuallyHidden {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n@media (hover: none) {\n .ss-rowMenuButton { opacity: 1; }\n}\n@media (max-width: 640px) {\n .ss-panel { padding: 20px 14px 40px; }\n .ss-row { flex-wrap: nowrap; gap: 10px; }\n .ss-headerActions { flex-basis: 176px; width: 176px; }\n}\n";
6
6
  /**
7
7
  * Insert (or replace) the plugin's one style element.
8
8
  * @returns a disposer that removes the element.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-standalone-session",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "displayName": "Standalone Session",
5
5
  "description": "Create and manage standalone DSH sessions that are not attached to any workspace.",
6
6
  "type": "module",