dsh-talk-map 0.1.67 → 0.1.68
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/client/client.js +45 -6
- package/package.json +1 -1
package/client/client.js
CHANGED
|
@@ -465,7 +465,7 @@ var zh = {
|
|
|
465
465
|
"digest.empty": "这条对话还没有摘要,先刷新摘要再来看。",
|
|
466
466
|
"digest.copy": "复制",
|
|
467
467
|
"digest.close": "关闭",
|
|
468
|
-
"global.searchPlaceholder": "
|
|
468
|
+
"global.searchPlaceholder": "b68 · 搜地图上的卡片(标题/正文)",
|
|
469
469
|
"global.searchRun": "搜索",
|
|
470
470
|
"global.searchTitle": "搜索地图",
|
|
471
471
|
"font.group": "文字大小",
|
|
@@ -633,7 +633,7 @@ var en = {
|
|
|
633
633
|
"menu.noGroup": "Remove from group (free card)",
|
|
634
634
|
"menu.open": "Open conversation",
|
|
635
635
|
"menu.markUnread": "Mark as unread",
|
|
636
|
-
"global.searchPlaceholder": "
|
|
636
|
+
"global.searchPlaceholder": "b68 · Search cards on the map",
|
|
637
637
|
"global.searchRun": "Search",
|
|
638
638
|
"global.searchTitle": "Search the map",
|
|
639
639
|
"font.group": "Text size",
|
|
@@ -13791,6 +13791,9 @@ function StatusRail(props) {
|
|
|
13791
13791
|
orderRef.current = order;
|
|
13792
13792
|
const dragRef = (0, import_react11.useRef)(null);
|
|
13793
13793
|
dragRef.current = drag;
|
|
13794
|
+
const movedRef = (0, import_react11.useRef)(false);
|
|
13795
|
+
const clickTimer = (0, import_react11.useRef)(null);
|
|
13796
|
+
const lastTap = (0, import_react11.useRef)(null);
|
|
13794
13797
|
const signature = (0, import_react11.useMemo)(
|
|
13795
13798
|
() => props.entries.map((entry) => `${entry.cardId}:${entry.lamp}:${entry.stamp}`).join("|"),
|
|
13796
13799
|
[props.entries]
|
|
@@ -13876,11 +13879,37 @@ function StatusRail(props) {
|
|
|
13876
13879
|
return best;
|
|
13877
13880
|
};
|
|
13878
13881
|
const onMove = (event) => {
|
|
13882
|
+
const startY = dragRef.current?.startPointerY;
|
|
13883
|
+
if (startY !== void 0 && Math.abs(event.clientY - startY) > 4) movedRef.current = true;
|
|
13879
13884
|
const hover = indexUnder(event.clientY);
|
|
13880
13885
|
setDrag((current) => current === null ? null : { ...current, pointerY: event.clientY, hover });
|
|
13881
13886
|
};
|
|
13882
13887
|
const onUp = () => {
|
|
13883
13888
|
const current = dragRef.current;
|
|
13889
|
+
if (current !== null && movedRef.current === false) {
|
|
13890
|
+
const cardId2 = current.cardId;
|
|
13891
|
+
prevTops.current.clear();
|
|
13892
|
+
setDrag(null);
|
|
13893
|
+
const now2 = Date.now();
|
|
13894
|
+
const previous = lastTap.current;
|
|
13895
|
+
if (previous !== null && previous.cardId === cardId2 && now2 - previous.at < 320) {
|
|
13896
|
+
lastTap.current = null;
|
|
13897
|
+
if (clickTimer.current !== null) {
|
|
13898
|
+
window.clearTimeout(clickTimer.current);
|
|
13899
|
+
clickTimer.current = null;
|
|
13900
|
+
}
|
|
13901
|
+
props.onFocus(cardId2);
|
|
13902
|
+
return;
|
|
13903
|
+
}
|
|
13904
|
+
lastTap.current = { cardId: cardId2, at: now2 };
|
|
13905
|
+
if (clickTimer.current !== null) window.clearTimeout(clickTimer.current);
|
|
13906
|
+
clickTimer.current = window.setTimeout(() => {
|
|
13907
|
+
clickTimer.current = null;
|
|
13908
|
+
lastTap.current = null;
|
|
13909
|
+
props.onOpen(cardId2);
|
|
13910
|
+
}, 240);
|
|
13911
|
+
return;
|
|
13912
|
+
}
|
|
13884
13913
|
if (current !== null && current.hover !== current.origin) {
|
|
13885
13914
|
setOrder((existing) => {
|
|
13886
13915
|
const from = existing.indexOf(current.cardId);
|
|
@@ -13915,6 +13944,7 @@ function StatusRail(props) {
|
|
|
13915
13944
|
const rect = element.getBoundingClientRect();
|
|
13916
13945
|
event.preventDefault();
|
|
13917
13946
|
const index2 = Math.max(0, orderRef.current.indexOf(cardId));
|
|
13947
|
+
movedRef.current = false;
|
|
13918
13948
|
setDrag({
|
|
13919
13949
|
cardId,
|
|
13920
13950
|
origin: index2,
|
|
@@ -13934,9 +13964,6 @@ function StatusRail(props) {
|
|
|
13934
13964
|
onPointerDown: floating ? void 0 : (event) => {
|
|
13935
13965
|
beginDrag(event, entry.cardId);
|
|
13936
13966
|
},
|
|
13937
|
-
onClick: () => {
|
|
13938
|
-
if (!floating && dragRef.current === null) props.onFocus(entry.cardId);
|
|
13939
|
-
},
|
|
13940
13967
|
title: entry.title,
|
|
13941
13968
|
children: [
|
|
13942
13969
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: talk_map_default["cardTop"], children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: talk_map_default["cardTitle"], children: entry.title }) }),
|
|
@@ -15218,6 +15245,10 @@ function CanvasInner(props) {
|
|
|
15218
15245
|
sessionActivity.acknowledge(sessionId);
|
|
15219
15246
|
if (openSessionInUi(sessionId)) closeMapPanel();
|
|
15220
15247
|
};
|
|
15248
|
+
const openRailCard = (0, import_react13.useCallback)((cardId) => {
|
|
15249
|
+
const card = visibleCards[cardId];
|
|
15250
|
+
if (card !== void 0) openSession(card.sessionId);
|
|
15251
|
+
}, [visibleCards, openSession]);
|
|
15221
15252
|
const openSearchHit = (sessionId) => {
|
|
15222
15253
|
openSession(sessionId);
|
|
15223
15254
|
};
|
|
@@ -15897,7 +15928,15 @@ function CanvasInner(props) {
|
|
|
15897
15928
|
]
|
|
15898
15929
|
}
|
|
15899
15930
|
),
|
|
15900
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
15931
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
15932
|
+
StatusRail,
|
|
15933
|
+
{
|
|
15934
|
+
entries: statusEntries,
|
|
15935
|
+
cardWidth: CARD_W,
|
|
15936
|
+
onFocus: focusCard,
|
|
15937
|
+
onOpen: openRailCard
|
|
15938
|
+
}
|
|
15939
|
+
),
|
|
15901
15940
|
batchMode ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
15902
15941
|
BatchBar,
|
|
15903
15942
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-talk-map",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.68",
|
|
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",
|