dsh-talk-map 0.1.88 → 0.1.89

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 +33 -20
  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": "b88 · 搜地图上的卡片(标题/正文)",
500
+ "global.searchPlaceholder": "b89 · 搜地图上的卡片(标题/正文)",
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": "b88 · Search cards on the map",
692
+ "global.searchPlaceholder": "b89 · Search cards on the map",
693
693
  "global.searchRun": "Search",
694
694
  "global.searchTitle": "Search the map",
695
695
  "font.group": "Text size",
@@ -13885,6 +13885,28 @@ function StackNode(props) {
13885
13885
 
13886
13886
  // src/client/StatusRail.tsx
13887
13887
  var import_react11 = require("react");
13888
+
13889
+ // src/client/queue-order.ts
13890
+ function queueRank(lamp, draft) {
13891
+ if (lamp === "error") return 0;
13892
+ if (lamp === "waiting") return 1;
13893
+ if (lamp === "done") return 2;
13894
+ if (lamp === "running") return 3;
13895
+ return draft ? 4 : 5;
13896
+ }
13897
+ function compareQueueRows(a, b) {
13898
+ const byRank = queueRank(a.lamp, a.draft === true) - queueRank(b.lamp, b.draft === true);
13899
+ if (byRank !== 0) return byRank;
13900
+ const aIndex = a.manualIndex ?? Number.MAX_SAFE_INTEGER;
13901
+ const bIndex = b.manualIndex ?? Number.MAX_SAFE_INTEGER;
13902
+ if (aIndex !== bIndex) return aIndex - bIndex;
13903
+ return (b.updatedAt ?? 0) - (a.updatedAt ?? 0);
13904
+ }
13905
+ function sortQueueRows(rows) {
13906
+ return [...rows].sort(compareQueueRows);
13907
+ }
13908
+
13909
+ // src/client/StatusRail.tsx
13888
13910
  var import_jsx_runtime15 = require("react/jsx-runtime");
13889
13911
  var OPEN_KEY = "dsh.talk-map.status-rail.open.v1";
13890
13912
  var ORDER_KEY = "dsh.talk-map.status-rail.order.v1";
@@ -13987,17 +14009,14 @@ function StatusRail(props) {
13987
14009
  }
13988
14010
  }, [signature]);
13989
14011
  const ordered = (0, import_react11.useMemo)(() => {
13990
- const byId2 = new Map(props.entries.map((entry) => [entry.cardId, entry]));
13991
- const rows = [];
13992
- for (const cardId of order) {
13993
- const entry = byId2.get(cardId);
13994
- if (entry !== void 0 && entry.lamp !== void 0) rows.push(entry);
13995
- }
13996
- for (const entry of props.entries) {
13997
- if (entry.lamp !== void 0 && !order.includes(entry.cardId)) rows.push(entry);
13998
- }
13999
- const drafts = props.entries.filter((entry) => entry.lamp === void 0).sort((a, b) => b.stamp - a.stamp);
14000
- return [...rows, ...drafts];
14012
+ const manualIndex = (cardId) => {
14013
+ const index2 = order.indexOf(cardId);
14014
+ return index2 < 0 ? Number.MAX_SAFE_INTEGER : index2;
14015
+ };
14016
+ return sortQueueRows(props.entries.map((entry) => ({
14017
+ ...entry,
14018
+ manualIndex: manualIndex(entry.cardId)
14019
+ })));
14001
14020
  }, [order, props.entries]);
14002
14021
  (0, import_react11.useLayoutEffect)(() => {
14003
14022
  if (drag !== null) return;
@@ -16575,13 +16594,7 @@ function SidebarQueue() {
16575
16594
  ...summary?.updatedAt !== void 0 ? { updatedAt: summary.updatedAt } : {}
16576
16595
  });
16577
16596
  }
16578
- out.sort((a, b) => {
16579
- const aDraft = a.draft === true ? 1 : 0;
16580
- const bDraft = b.draft === true ? 1 : 0;
16581
- if (aDraft !== bDraft) return aDraft - bDraft;
16582
- return (b.updatedAt ?? 0) - (a.updatedAt ?? 0);
16583
- });
16584
- return out;
16597
+ return sortQueueRows(out);
16585
16598
  }, [canvasState.cards, sessions, statusById, alerts2, finished2, drafts, opened]);
16586
16599
  (0, import_react18.useEffect)(() => {
16587
16600
  const wanted = rows.slice(0, PREVIEW_LIMIT).map((row) => row.sessionId).filter((id2) => !askedRef.current.has(id2));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-talk-map",
3
- "version": "0.1.88",
3
+ "version": "0.1.89",
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",