dsh-talk-map 0.1.86 → 0.1.87

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 +43 -19
  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": "b86 · 搜地图上的卡片(标题/正文)",
500
+ "global.searchPlaceholder": "b87 · 搜地图上的卡片(标题/正文)",
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": "b86 · Search cards on the map",
692
+ "global.searchPlaceholder": "b87 · Search cards on the map",
693
693
  "global.searchRun": "Search",
694
694
  "global.searchTitle": "Search the map",
695
695
  "font.group": "Text size",
@@ -13991,12 +13991,13 @@ function StatusRail(props) {
13991
13991
  const rows = [];
13992
13992
  for (const cardId of order) {
13993
13993
  const entry = byId2.get(cardId);
13994
- if (entry !== void 0) rows.push(entry);
13994
+ if (entry !== void 0 && entry.lamp !== void 0) rows.push(entry);
13995
13995
  }
13996
13996
  for (const entry of props.entries) {
13997
- if (!order.includes(entry.cardId)) rows.push(entry);
13997
+ if (entry.lamp !== void 0 && !order.includes(entry.cardId)) rows.push(entry);
13998
13998
  }
13999
- return rows;
13999
+ const drafts = props.entries.filter((entry) => entry.lamp === void 0).sort((a, b) => b.stamp - a.stamp);
14000
+ return [...rows, ...drafts];
14000
14001
  }, [order, props.entries]);
14001
14002
  (0, import_react11.useLayoutEffect)(() => {
14002
14003
  if (drag !== null) return;
@@ -14124,7 +14125,7 @@ function StatusRail(props) {
14124
14125
  const renderCard = (entry, floating) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
14125
14126
  "div",
14126
14127
  {
14127
- className: `${talk_map_default["card"]} ${talk_map_default[LAMP_CLASS3[entry.lamp]] ?? ""} ${talk_map_default["statusRailCard"]}${floating ? ` ${talk_map_default["statusRailCardDragging"]}` : ""}`,
14128
+ className: `${talk_map_default["card"]} ${entry.lamp === void 0 ? "" : talk_map_default[LAMP_CLASS3[entry.lamp]] ?? ""} ${talk_map_default["statusRailCard"]}${floating ? ` ${talk_map_default["statusRailCardDragging"]}` : ""}`,
14128
14129
  onPointerDown: floating ? void 0 : (event) => {
14129
14130
  beginDrag(event, entry.cardId);
14130
14131
  },
@@ -14134,7 +14135,7 @@ function StatusRail(props) {
14134
14135
  entry.preview !== void 0 && entry.preview !== "" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: talk_map_default["cardSummary"], children: entry.preview }) : null,
14135
14136
  /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: talk_map_default["cardFooter"], children: [
14136
14137
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: talk_map_default["cardTime"], children: relativeTime(entry.updatedAt) }),
14137
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: `${talk_map_default["cardChip"]} ${talk_map_default[LAMP_CHIP[entry.lamp].className]}`, children: [
14138
+ entry.lamp === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: `${talk_map_default["cardChip"]} ${talk_map_default["cardChipDraft"]}`, children: t("card.draft") }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: `${talk_map_default["cardChip"]} ${talk_map_default[LAMP_CHIP[entry.lamp].className]}`, children: [
14138
14139
  LAMP_CHIP[entry.lamp].dot ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: talk_map_default["runningDot"] }) : null,
14139
14140
  t(LAMP_CHIP[entry.lamp].key)
14140
14141
  ] })
@@ -14850,7 +14851,22 @@ function CanvasInner(props) {
14850
14851
  for (const [cardId, card] of Object.entries(visibleCards)) {
14851
14852
  if (card.boardId !== INBOX_BOARD_ID) continue;
14852
14853
  const lamp = glowOf(card.sessionId);
14853
- if (lamp === void 0) continue;
14854
+ if (lamp === void 0) {
14855
+ const draftText = draftTexts[card.sessionId];
14856
+ if (draftText === void 0 || draftText.trim() === "") continue;
14857
+ const draftSummary = sessions.byId[card.sessionId];
14858
+ rows.push({
14859
+ cardId,
14860
+ sessionId: card.sessionId,
14861
+ title: renamedTitles[card.sessionId] ?? draftSummary?.displayTitle ?? card.sessionId,
14862
+ stamp: draftSummary?.updatedAt ?? 0,
14863
+ draft: true,
14864
+ ...draftSummary?.updatedAt !== void 0 ? { updatedAt: draftSummary.updatedAt } : {},
14865
+ preview: draftText,
14866
+ ...pinnedSessions.has(card.sessionId) ? { pinned: true } : {}
14867
+ });
14868
+ continue;
14869
+ }
14854
14870
  const summary = sessions.byId[card.sessionId];
14855
14871
  rows.push({
14856
14872
  cardId,
@@ -16545,18 +16561,26 @@ function SidebarQueue() {
16545
16561
  if (card.boardId !== INBOX_BOARD_ID) continue;
16546
16562
  const summary = sessions.byId[card.sessionId];
16547
16563
  const lamp = lampOf(card.sessionId, statusById.get(card.sessionId), summary, alerts2, finished2);
16548
- if (lamp === void 0) continue;
16564
+ const draftText = drafts[card.sessionId];
16565
+ const hasDraft = draftText !== void 0 && draftText.trim() !== "";
16566
+ if (lamp === void 0 && !hasDraft) continue;
16549
16567
  if (lamp === "done" && opened.has(card.sessionId)) continue;
16568
+ const draftOnly = lamp === void 0;
16550
16569
  out.push({
16551
16570
  cardId,
16552
16571
  sessionId: card.sessionId,
16553
16572
  title: summary?.displayTitle ?? card.sessionId,
16554
- lamp,
16555
- ...summary?.updatedAt !== void 0 ? { updatedAt: summary.updatedAt } : {},
16556
- ...drafts[card.sessionId] !== void 0 ? { draft: drafts[card.sessionId] } : {}
16573
+ ...draftOnly ? { draft: true } : { lamp },
16574
+ ...draftText !== void 0 ? { draftText } : {},
16575
+ ...summary?.updatedAt !== void 0 ? { updatedAt: summary.updatedAt } : {}
16557
16576
  });
16558
16577
  }
16559
- out.sort((a, b) => (b.updatedAt ?? 0) - (a.updatedAt ?? 0));
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
+ });
16560
16584
  return out;
16561
16585
  }, [canvasState.cards, sessions, statusById, alerts2, finished2, drafts, opened]);
16562
16586
  (0, import_react18.useEffect)(() => {
@@ -16625,16 +16649,16 @@ function SidebarQueue() {
16625
16649
  role: "list",
16626
16650
  style: { display: "flex", flexDirection: "column", gap: 6, flex: "1 1 auto", minHeight: 0, overflowY: "auto", overflowX: "hidden", padding: "0 4px 6px", overscrollBehavior: "contain" },
16627
16651
  children: rows.map((row) => {
16628
- const draft = row.draft;
16629
- const body = draft !== void 0 && draft.trim() !== "" ? draft : previews[row.sessionId];
16630
- const chip = LAMP_CHIP[row.lamp];
16652
+ const draftText = row.draftText;
16653
+ const body = draftText !== void 0 && draftText.trim() !== "" ? draftText : previews[row.sessionId];
16654
+ const chip = row.lamp === void 0 ? void 0 : LAMP_CHIP[row.lamp];
16631
16655
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
16632
16656
  "div",
16633
16657
  {
16634
- className: `${talk_map_default["card"]} ${talk_map_default[LAMP_CLASS[row.lamp]] ?? ""} ${talk_map_default["statusRailCard"]} ${talk_map_default["sidebarQueueCard"]}`,
16658
+ className: `${talk_map_default["card"]} ${row.lamp === void 0 ? "" : talk_map_default[LAMP_CLASS[row.lamp]] ?? ""} ${talk_map_default["statusRailCard"]} ${talk_map_default["sidebarQueueCard"]}`,
16635
16659
  style: { width: "100%", maxWidth: "100%", boxSizing: "border-box", flex: "none", alignSelf: "stretch" },
16636
16660
  "data-talkmap-queue": row.sessionId,
16637
- "data-lamp": row.lamp,
16661
+ "data-lamp": row.lamp ?? "draft",
16638
16662
  title: row.title,
16639
16663
  role: "button",
16640
16664
  tabIndex: 0,
@@ -16657,7 +16681,7 @@ function SidebarQueue() {
16657
16681
  body !== void 0 && body.trim() !== "" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: talk_map_default["cardSummary"], children: body }) : null,
16658
16682
  /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: talk_map_default["cardFooter"], children: [
16659
16683
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: talk_map_default["cardTime"], children: relativeTime(row.updatedAt) }),
16660
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: `${talk_map_default["cardChip"]} ${talk_map_default[chip.className]}`, children: [
16684
+ chip === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: `${talk_map_default["cardChip"]} ${talk_map_default["cardChipDraft"]}`, children: t("card.draft") }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: `${talk_map_default["cardChip"]} ${talk_map_default[chip.className]}`, children: [
16661
16685
  chip.dot === true ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: talk_map_default["runningDot"] }) : null,
16662
16686
  t(chip.key)
16663
16687
  ] })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-talk-map",
3
- "version": "0.1.86",
3
+ "version": "0.1.87",
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",