dsh-talk-map 0.1.85 → 0.1.86

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.
Files changed (2) hide show
  1. package/client/client.js +31 -4
  2. package/package.json +1 -1
package/client/client.js CHANGED
@@ -497,7 +497,7 @@ var zh = {
497
497
  "digest.empty": "这条对话还没有摘要,先刷新摘要再来看。",
498
498
  "digest.copy": "复制",
499
499
  "digest.close": "关闭",
500
- "global.searchPlaceholder": "b85 · 搜地图上的卡片(标题/正文)",
500
+ "global.searchPlaceholder": "b86 · 搜地图上的卡片(标题/正文)",
501
501
  "global.searchRun": "搜索",
502
502
  "global.searchTitle": "搜索地图",
503
503
  "font.group": "文字大小",
@@ -689,7 +689,7 @@ var en = {
689
689
  "menu.noGroup": "Remove from group (free card)",
690
690
  "menu.open": "Open conversation",
691
691
  "menu.markUnread": "Mark as unread",
692
- "global.searchPlaceholder": "b85 · Search cards on the map",
692
+ "global.searchPlaceholder": "b86 · Search cards on the map",
693
693
  "global.searchRun": "Search",
694
694
  "global.searchTitle": "Search the map",
695
695
  "font.group": "Text size",
@@ -16463,7 +16463,8 @@ function lampOf(sessionId, status, summary, alerts2, finished2) {
16463
16463
  if (alerts2.has(sessionId)) return "error";
16464
16464
  if (status?.pendingInteraction !== void 0) return "waiting";
16465
16465
  if (status?.running === true || summary?.running === true) return "running";
16466
- if (status?.completionUnread === true || finished2.has(sessionId)) return "done";
16466
+ const isMain = (summary?.retainedBy?.mainView ?? 0) > 0;
16467
+ if (!isMain && (status?.completionUnread === true || finished2.has(sessionId))) return "done";
16467
16468
  return void 0;
16468
16469
  }
16469
16470
  function SidebarQueue() {
@@ -16486,6 +16487,7 @@ function SidebarQueue() {
16486
16487
  const [previews, setPreviews] = (0, import_react18.useState)({});
16487
16488
  const [height, setHeight] = (0, import_react18.useState)(() => storedHeight());
16488
16489
  const drag = (0, import_react18.useRef)(null);
16490
+ const [opened, setOpened] = (0, import_react18.useState)(() => /* @__PURE__ */ new Set());
16489
16491
  const askedRef = (0, import_react18.useRef)(/* @__PURE__ */ new Set());
16490
16492
  (0, import_react18.useEffect)(() => {
16491
16493
  const timer4 = setInterval(() => {
@@ -16517,6 +16519,26 @@ function SidebarQueue() {
16517
16519
  } catch {
16518
16520
  }
16519
16521
  };
16522
+ (0, import_react18.useEffect)(() => {
16523
+ for (const sessionId of finished2) {
16524
+ const summary = sessions.byId[sessionId];
16525
+ if ((summary?.retainedBy?.mainView ?? 0) > 0) sessionActivity.forget(sessionId);
16526
+ }
16527
+ }, [finished2, sessions]);
16528
+ (0, import_react18.useEffect)(() => {
16529
+ if (opened.size === 0) return;
16530
+ const stale = [...opened].filter((sessionId) => {
16531
+ const summary = sessions.byId[sessionId];
16532
+ const lamp = lampOf(sessionId, statusById.get(sessionId), summary, alerts2, finished2);
16533
+ return lamp !== "done";
16534
+ });
16535
+ if (stale.length === 0) return;
16536
+ setOpened((current) => {
16537
+ const next = new Set(current);
16538
+ for (const id2 of stale) next.delete(id2);
16539
+ return next;
16540
+ });
16541
+ }, [opened, sessions, statusById, alerts2, finished2]);
16520
16542
  const rows = (0, import_react18.useMemo)(() => {
16521
16543
  const out = [];
16522
16544
  for (const [cardId, card] of Object.entries(canvasState.cards)) {
@@ -16524,6 +16546,7 @@ function SidebarQueue() {
16524
16546
  const summary = sessions.byId[card.sessionId];
16525
16547
  const lamp = lampOf(card.sessionId, statusById.get(card.sessionId), summary, alerts2, finished2);
16526
16548
  if (lamp === void 0) continue;
16549
+ if (lamp === "done" && opened.has(card.sessionId)) continue;
16527
16550
  out.push({
16528
16551
  cardId,
16529
16552
  sessionId: card.sessionId,
@@ -16535,7 +16558,7 @@ function SidebarQueue() {
16535
16558
  }
16536
16559
  out.sort((a, b) => (b.updatedAt ?? 0) - (a.updatedAt ?? 0));
16537
16560
  return out;
16538
- }, [canvasState.cards, sessions, statusById, alerts2, finished2, drafts]);
16561
+ }, [canvasState.cards, sessions, statusById, alerts2, finished2, drafts, opened]);
16539
16562
  (0, import_react18.useEffect)(() => {
16540
16563
  const wanted = rows.slice(0, PREVIEW_LIMIT).map((row) => row.sessionId).filter((id2) => !askedRef.current.has(id2));
16541
16564
  if (wanted.length === 0) return;
@@ -16616,12 +16639,16 @@ function SidebarQueue() {
16616
16639
  role: "button",
16617
16640
  tabIndex: 0,
16618
16641
  onClick: () => {
16642
+ sessionActivity.forget(row.sessionId);
16643
+ setOpened((current) => new Set(current).add(row.sessionId));
16619
16644
  closeMapPanel();
16620
16645
  openSessionInUi(row.sessionId);
16621
16646
  },
16622
16647
  onKeyDown: (event) => {
16623
16648
  if (event.key !== "Enter" && event.key !== " ") return;
16624
16649
  event.preventDefault();
16650
+ sessionActivity.forget(row.sessionId);
16651
+ setOpened((current) => new Set(current).add(row.sessionId));
16625
16652
  closeMapPanel();
16626
16653
  openSessionInUi(row.sessionId);
16627
16654
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-talk-map",
3
- "version": "0.1.85",
3
+ "version": "0.1.86",
4
4
  "description": "Visual conversation map for DeepSeek Harness: an infinite whiteboard where every session is a card — drag to arrange, double-click to start a chat in place, draw an edge to fork a new session with injected context. Built for ADHD-friendly spatial memory. · DSH 可视化对话地图:会话即卡片,双击即聊,连线分叉带上下文的新对话。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",