@yolk_vat-y/dsh-project-memory 0.6.11 → 0.7.0
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/CHANGELOG.md +104 -120
- package/README.md +14 -105
- package/README.zh-CN.md +14 -105
- package/client/client.js +228 -95
- package/client/client.js.map +1 -1
- package/package.json +2 -2
- package/scripts/file-peak.mjs +1 -1
- package/scripts/tool-schema-size.mjs +1 -1
- package/skills/project-memory/SKILL.md +1 -1
- package/skills/project-memory/scripts/pm-digest.mjs +20 -6
- package/src/audit.js +10 -2
- package/src/auto-inject.js +124 -38
- package/src/client/MemoryView.tsx +119 -40
- package/src/client/TaskCommandNode.tsx +6 -4
- package/src/client/TaskComponents.tsx +13 -16
- package/src/client/TaskPanel.tsx +41 -15
- package/src/client/client.ts +4 -7
- package/src/client/paging.js +1 -14
- package/src/client/settings-card.tsx +9 -0
- package/src/client/task-data-store.ts +57 -7
- package/src/client/task-hooks.ts +0 -2
- package/src/client/task-scope.js +16 -1
- package/src/client/task-ui-store.ts +1 -1
- package/src/commands/insight-actions.js +91 -94
- package/src/commands/task-actions.js +7 -5
- package/src/commands/tasks.js +34 -10
- package/src/doc-index.js +3 -1
- package/src/enhancer.js +0 -12
- package/src/index-failures.js +1 -1
- package/src/index-pipeline.js +11 -2
- package/src/index.js +60 -14
- package/src/inject-visible.js +282 -0
- package/src/insight-store.js +133 -68
- package/src/lazy.js +29 -23
- package/src/llm-route.js +1 -1
- package/src/llm.js +1 -8
- package/src/ops.js +18 -5
- package/src/parsers/pdfjs-parser.js +3 -33
- package/src/project-memory-service.js +195 -0
- package/src/project-profile.js +0 -4
- package/src/setup/taskbridge.js +38 -6
- package/src/store.js +639 -147
- package/src/symbols.js +2 -4
- package/src/tools/context.js +14 -0
- package/src/tools/forget.js +7 -17
- package/src/tools/index-doc.js +62 -21
- package/src/tools/index-repo.js +17 -15
- package/src/tools/lesson-tools.js +10 -13
- package/src/tools/output.js +33 -0
- package/src/tools/query-memory.js +7 -12
- package/src/tools/remember.js +8 -18
- package/src/tools/stats.js +4 -9
- package/src/tools/task-tools.js +23 -22
- package/src/tools/watch-repo.js +16 -15
- package/src/util/flush.js +1 -1
- package/src/util/fs.js +135 -20
- package/src/util/insight-fields.js +22 -0
- package/src/util/message-source.js +20 -0
- package/src/util/relative-time.js +24 -0
- package/src/util/search.js +0 -1
- package/src/util/task-view.js +8 -15
- package/src/util/value.js +16 -0
- package/src/vector-index.js +2 -2
- package/src/watch.js +25 -8
- package/client/client.d.ts +0 -27
- package/client/client.d.ts.map +0 -1
- package/client/style.css +0 -395
package/client/client.js
CHANGED
|
@@ -500,7 +500,20 @@ window.__ModuleLoader__.load({
|
|
|
500
500
|
function broadcastAppliesTo(localRoot, incomingRoot) {
|
|
501
501
|
if (typeof incomingRoot !== "string" || incomingRoot === "") return false;
|
|
502
502
|
if (typeof localRoot !== "string" || localRoot === "") return false;
|
|
503
|
-
return localRoot === incomingRoot;
|
|
503
|
+
return rootKey(localRoot) === rootKey(incomingRoot);
|
|
504
|
+
}
|
|
505
|
+
/** Windows/macOS 的文件系统大小写不敏感;Linux 上不能把两个只差大小写的根当成一个。 */
|
|
506
|
+
function caseInsensitiveFs() {
|
|
507
|
+
const platform = typeof navigator !== "undefined" ? String(navigator.platform || "") : "";
|
|
508
|
+
if (/win/i.test(platform) || /mac/i.test(platform)) return true;
|
|
509
|
+
const ua = typeof navigator !== "undefined" ? String(navigator.userAgent || "") : "";
|
|
510
|
+
return /Windows|Macintosh/i.test(ua);
|
|
511
|
+
}
|
|
512
|
+
/** 根的规范键:统一分隔符、去掉末尾分隔符;大小写不敏感平台再折叠大小写。 */
|
|
513
|
+
function rootKey(root) {
|
|
514
|
+
let key = String(root).replace(/\\/g, "/");
|
|
515
|
+
if (key.length > 1) key = key.replace(/\/+$/, "");
|
|
516
|
+
return caseInsensitiveFs() ? key.toLowerCase() : key;
|
|
504
517
|
}
|
|
505
518
|
/**
|
|
506
519
|
* 从 `/tasks` 载荷里取项目根(旧宿主没有该键)。
|
|
@@ -540,12 +553,14 @@ window.__ModuleLoader__.load({
|
|
|
540
553
|
return null;
|
|
541
554
|
}
|
|
542
555
|
}
|
|
543
|
-
const SYNC_CHANNEL = typeof window !== "undefined" ? new BroadcastChannel("dsh-pm-tasks-data") : null;
|
|
556
|
+
const SYNC_CHANNEL = typeof window !== "undefined" && typeof BroadcastChannel !== "undefined" ? new BroadcastChannel("dsh-pm-tasks-data") : null;
|
|
544
557
|
let dataState = {
|
|
545
558
|
tasks: [],
|
|
546
559
|
boundTaskId: null,
|
|
547
560
|
archivedCount: 0,
|
|
548
561
|
root: null,
|
|
562
|
+
sessionId: null,
|
|
563
|
+
lastSyncAt: 0,
|
|
549
564
|
lastUpdate: 0
|
|
550
565
|
};
|
|
551
566
|
const dataListeners = /* @__PURE__ */ new Set();
|
|
@@ -556,30 +571,38 @@ window.__ModuleLoader__.load({
|
|
|
556
571
|
boundTaskId: patch?.boundTaskId ?? null,
|
|
557
572
|
archivedCount: typeof patch?.archivedCount === "number" ? patch.archivedCount : 0,
|
|
558
573
|
root: payloadRoot(patch?.root),
|
|
574
|
+
sessionId: typeof patch?.sessionId === "string" && patch.sessionId ? patch.sessionId : null,
|
|
575
|
+
lastSyncAt: typeof patch?.lastSyncAt === "number" ? patch.lastSyncAt : 0,
|
|
559
576
|
lastUpdate: typeof patch?.lastUpdate === "number" ? patch.lastUpdate : 0
|
|
560
577
|
};
|
|
561
578
|
for (const listener of dataListeners) listener();
|
|
562
579
|
}
|
|
563
|
-
function broadcastDataUpdate(tasks, archivedCount, root) {
|
|
580
|
+
function broadcastDataUpdate(tasks, archivedCount, root, boundTaskId, sessionId, sentAt) {
|
|
564
581
|
if (!SYNC_CHANNEL) return;
|
|
565
582
|
SYNC_CHANNEL.postMessage({
|
|
566
583
|
type: "PROJECT_TASKS_UPDATED",
|
|
567
584
|
payload: {
|
|
568
585
|
tasks: Array.isArray(tasks) ? tasks : [],
|
|
569
586
|
archivedCount,
|
|
570
|
-
root
|
|
587
|
+
root,
|
|
588
|
+
boundTaskId,
|
|
589
|
+
sessionId,
|
|
590
|
+
sentAt
|
|
571
591
|
}
|
|
572
592
|
});
|
|
573
593
|
}
|
|
574
594
|
if (SYNC_CHANNEL) SYNC_CHANNEL.onmessage = (event) => {
|
|
575
595
|
const msg = event.data;
|
|
576
596
|
if (msg?.type !== "PROJECT_TASKS_UPDATED" || !msg.payload) return;
|
|
577
|
-
const { tasks, archivedCount, root } = msg.payload;
|
|
597
|
+
const { tasks, archivedCount, root, boundTaskId, sessionId, sentAt } = msg.payload;
|
|
578
598
|
if (!broadcastAppliesTo(dataState.root, root)) return;
|
|
599
|
+
if (typeof sentAt === "number" && sentAt < dataState.lastSyncAt) return;
|
|
579
600
|
setDataState((prev) => ({
|
|
580
601
|
...prev,
|
|
581
602
|
tasks: Array.isArray(tasks) ? tasks : [],
|
|
582
603
|
archivedCount: typeof archivedCount === "number" ? archivedCount : prev.archivedCount,
|
|
604
|
+
...sessionId && prev.sessionId && sessionId === prev.sessionId ? { boundTaskId: typeof boundTaskId === "string" ? boundTaskId : null } : {},
|
|
605
|
+
lastSyncAt: typeof sentAt === "number" ? sentAt : prev.lastSyncAt,
|
|
583
606
|
lastUpdate: Date.now()
|
|
584
607
|
}));
|
|
585
608
|
};
|
|
@@ -598,14 +621,18 @@ window.__ModuleLoader__.load({
|
|
|
598
621
|
const nextTasks = payload.tasks || [];
|
|
599
622
|
const nextArchived = payload.archivedCount ?? 0;
|
|
600
623
|
const nextRoot = payloadRoot(payload.root);
|
|
624
|
+
const nextSession = payload.sessionId === void 0 ? dataState.sessionId : typeof payload.sessionId === "string" && payload.sessionId ? payload.sessionId : null;
|
|
625
|
+
const sentAt = Date.now();
|
|
601
626
|
setDataState({
|
|
602
627
|
tasks: nextTasks,
|
|
603
628
|
boundTaskId: payload.boundTaskId ?? null,
|
|
604
629
|
archivedCount: nextArchived,
|
|
605
630
|
root: nextRoot,
|
|
606
|
-
|
|
631
|
+
sessionId: nextSession,
|
|
632
|
+
lastSyncAt: sentAt,
|
|
633
|
+
lastUpdate: sentAt
|
|
607
634
|
});
|
|
608
|
-
broadcastDataUpdate(nextTasks, nextArchived, nextRoot);
|
|
635
|
+
broadcastDataUpdate(nextTasks, nextArchived, nextRoot, payload.boundTaskId ?? null, nextSession, sentAt);
|
|
609
636
|
},
|
|
610
637
|
reset() {
|
|
611
638
|
setDataState({
|
|
@@ -613,6 +640,8 @@ window.__ModuleLoader__.load({
|
|
|
613
640
|
boundTaskId: null,
|
|
614
641
|
archivedCount: 0,
|
|
615
642
|
root: null,
|
|
643
|
+
sessionId: null,
|
|
644
|
+
lastSyncAt: 0,
|
|
616
645
|
lastUpdate: 0
|
|
617
646
|
});
|
|
618
647
|
}
|
|
@@ -627,7 +656,7 @@ window.__ModuleLoader__.load({
|
|
|
627
656
|
//#endregion
|
|
628
657
|
//#region src/client/task-ui-store.ts
|
|
629
658
|
/**
|
|
630
|
-
* Task UI Store — 仅管本地 UI 状态(closed、minimized、position、
|
|
659
|
+
* Task UI Store — 仅管本地 UI 状态(closed、minimized、position、expandedTaskIds、theme、showHints)
|
|
631
660
|
* - 持久化到 localStorage(key: dsh-pm-task-panel-ui)
|
|
632
661
|
* - 不跨标签页同步(每个标签页独立)
|
|
633
662
|
* - 启动/刷新强制 closed: true,面板默认不显示
|
|
@@ -841,7 +870,7 @@ window.__ModuleLoader__.load({
|
|
|
841
870
|
* (插入自身前后)/按钮输入等控件上 → 取消;
|
|
842
871
|
* - 350ms 内原地松手 = 普通点击,不产生幽灵;Esc → 取消。
|
|
843
872
|
*/
|
|
844
|
-
function useTaskDrag(taskId,
|
|
873
|
+
function useTaskDrag(taskId, isBound, onReorder) {
|
|
845
874
|
const [dragState, setDragState] = (0, react.useState)(null);
|
|
846
875
|
const [dropTargetIndex, setDropTargetIndex] = (0, react.useState)(null);
|
|
847
876
|
const dragRef = (0, react.useRef)(dragState);
|
|
@@ -983,6 +1012,32 @@ window.__ModuleLoader__.load({
|
|
|
983
1012
|
};
|
|
984
1013
|
}
|
|
985
1014
|
//#endregion
|
|
1015
|
+
//#region src/util/relative-time.js
|
|
1016
|
+
/**
|
|
1017
|
+
* 相对时间(中文)的唯一实现:面板、`list_tasks`、`/tasks` 共用。
|
|
1018
|
+
*
|
|
1019
|
+
* 两处调用方对"时间坏掉"的期待不同,所以 fallback 是参数而不是第二份实现:
|
|
1020
|
+
* - 服务端把条目交给模型,省略时间会像"没有时间信息",默认 `'未知'`;
|
|
1021
|
+
* - 面板是给人看的,时间坏了就留空,不显示脏字。
|
|
1022
|
+
*
|
|
1023
|
+
* 客户端旧副本用 `new Date(iso).getTime()` 直接算 diff:非法 ISO 得到 NaN,一路比较都不成立,
|
|
1024
|
+
* 最后渲染成 "NaN天前"。收敛到这一份后,非法/缺失时间一律走 fallback(而不是各写一套判据)。
|
|
1025
|
+
* @param {string} [iso] ISO 时间戳
|
|
1026
|
+
* @param {string} [fallback] 解析失败时的文案
|
|
1027
|
+
* @returns {string}
|
|
1028
|
+
*/
|
|
1029
|
+
function timeAgo(iso, fallback = "未知") {
|
|
1030
|
+
const t = Date.parse(iso ?? "");
|
|
1031
|
+
if (!Number.isFinite(t)) return fallback;
|
|
1032
|
+
const diff = Date.now() - t;
|
|
1033
|
+
const m = Math.floor(diff / 6e4);
|
|
1034
|
+
if (m < 1) return "刚刚";
|
|
1035
|
+
if (m < 60) return `${m}分钟前`;
|
|
1036
|
+
const h = Math.floor(m / 60);
|
|
1037
|
+
if (h < 24) return `${h}小时前`;
|
|
1038
|
+
return `${Math.floor(h / 24)}天前`;
|
|
1039
|
+
}
|
|
1040
|
+
//#endregion
|
|
986
1041
|
//#region \0dsh-css:src/client/TaskPanel.module.css.mjs
|
|
987
1042
|
const css$2 = ".i54Wjq_panel{pointer-events:auto;background:var(--dsw-alias-bg-layer-2,var(--dsw-alias-bg-base,#fff));border:1px solid var(--dsw-alias-border-l2,#7f7f7f4d);border-radius:14px;flex-direction:column;width:380px;max-width:calc(100vw - 24px);max-height:min(70vh,640px);font-family:inherit;animation:.18s ease-out i54Wjq_panelIn;display:flex;position:fixed;overflow:hidden;box-shadow:0 12px 32px #00000029,0 2px 8px #00000014}@keyframes i54Wjq_panelIn{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}.i54Wjq_dragHandle{cursor:grab;z-index:1;justify-content:center;align-items:center;height:12px;display:flex;position:absolute;top:0;left:0;right:0}.i54Wjq_dragHandle:active{cursor:grabbing}.i54Wjq_handleGrip{background:var(--dsw-alias-separator-primary,#7f7f7f59);opacity:.8;border-radius:2px;width:32px;height:3px}.i54Wjq_header{border-bottom:1px solid var(--dsw-alias-border-l1,#7f7f7f2e);-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center;gap:8px;padding:10px 10px 8px 14px;display:flex}.i54Wjq_headerLeft{align-items:center;gap:6px;min-width:0;display:flex}.i54Wjq_headerIcon{color:var(--dsw-alias-label-secondary);flex:none}.i54Wjq_headerTitle{color:var(--dsw-alias-label-primary);white-space:nowrap;margin:0;font-size:13px;font-weight:600;line-height:20px}.i54Wjq_headerRight{align-items:center;gap:2px;margin-left:auto;display:flex}.i54Wjq_hintsOff{opacity:.45}.i54Wjq_hintsOff:hover{opacity:.75}.i54Wjq_counts{color:var(--dsw-alias-label-tertiary);white-space:nowrap;margin-right:4px;font-size:11px;line-height:16px}.i54Wjq_boundBadge{color:var(--dsw-alias-label-primary-foreground,#fff);background:var(--dsw-alias-button-primary-fill,#3a6ef5);white-space:nowrap;border-radius:7px;flex:none;padding:0 6px;font-size:10px;line-height:14px}.i54Wjq_notice{color:var(--dsw-alias-state-warn-label,#b7791f);background:var(--dsw-alias-interactive-bg-hover,#7f7f7f1a);word-break:break-all;border-radius:8px;margin:8px 12px 0;padding:6px 10px;font-size:12px;line-height:18px}.i54Wjq_taskList{scrollbar-width:thin;scrollbar-color:var(--dsw-alias-scrollbar-bg-l2,transparent) transparent;flex-direction:column;gap:6px;padding:8px;display:flex;overflow-y:auto}.i54Wjq_emptyState{text-align:center;color:var(--dsw-alias-label-secondary);padding:36px 24px 30px}.i54Wjq_emptyTitle{color:var(--dsw-alias-label-primary);margin:0 0 6px;font-size:13px;font-weight:600}.i54Wjq_emptyDesc{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:20px}.i54Wjq_syncHint{color:var(--dsw-alias-label-dimmed);justify-content:center;align-items:center;gap:6px;margin:10px 0 0;font-size:11px;display:flex}.i54Wjq_card{border:1px solid var(--dsw-alias-border-l1,#7f7f7f29);background:var(--dsw-alias-bg-base,transparent);content-visibility:auto;contain-intrinsic-size:auto 140px;border-radius:10px;transition:border-color .15s;overflow:hidden}.i54Wjq_cardBound{border-color:var(--dsw-alias-border-l3,#7f7f7f59);box-shadow:inset 0 0 0 .5px var(--dsw-alias-border-l3,transparent)}.i54Wjq_cardHead{cursor:pointer;text-align:left;background:0 0;border:none;justify-content:space-between;align-items:center;gap:8px;width:100%;padding:8px 10px 7px;display:flex}.i54Wjq_cardHead:hover{background:var(--dsw-alias-interactive-bg-hover,#7f7f7f14)}.i54Wjq_cardTitleRow{align-items:center;gap:6px;min-width:0;display:flex}.i54Wjq_cardTitle{color:var(--dsw-alias-label-primary);white-space:nowrap;text-overflow:ellipsis;font-size:13px;font-weight:500;line-height:20px;overflow:hidden}.i54Wjq_cardMeta{color:var(--dsw-alias-label-tertiary);flex:none;align-items:center;gap:8px;display:flex}.i54Wjq_progressText{font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-secondary);font-size:11px;line-height:16px}.i54Wjq_updated{color:var(--dsw-alias-label-dimmed);font-size:10px;line-height:14px}.i54Wjq_chevron{color:var(--dsw-alias-label-tertiary);display:inline-flex}.i54Wjq_track{background:var(--dsw-alias-interactive-bg-hover,#7f7f7f1f);border-radius:1px;height:2px;margin:0 10px 6px;overflow:hidden}.i54Wjq_trackFill{background:var(--dsw-alias-label-primary-bluish,var(--dsw-alias-button-primary-fill,#3a6ef5));border-radius:1px;height:100%;transition:width .2s}.i54Wjq_cardBody{border-top:1px solid var(--dsw-alias-border-l1,#7f7f7f24);overscroll-behavior:contain;max-height:300px;padding:8px 10px 10px;overflow-y:auto}.i54Wjq_section{margin-bottom:8px}.i54Wjq_section:last-child{margin-bottom:0}.i54Wjq_sectionLabel{color:var(--dsw-alias-label-secondary);align-items:center;gap:6px;margin-bottom:4px;font-size:11px;line-height:16px;display:flex}.i54Wjq_sectionCount{background:var(--dsw-alias-interactive-bg-hover,#7f7f7f1a);color:var(--dsw-alias-label-tertiary);border-radius:6px;padding:0 5px;font-size:10px;line-height:14px}.i54Wjq_stepsList{flex-direction:column;gap:1px;margin:0;padding:0;list-style:none;display:flex}.i54Wjq_stepRow{align-items:flex-start;gap:7px;padding:3px 2px;display:flex}.i54Wjq_stepRow>svg{flex:none;margin-top:2px}.i54Wjq_stepDone{color:var(--dsw-alias-label-dimmed)}.i54Wjq_stepRun{color:var(--dsw-alias-label-primary-bluish,#3a6ef5)}.i54Wjq_stepPending{background:var(--dsw-alias-border-l3,#7f7f7f80);border-radius:50%;flex:none;width:8px;height:8px;margin:5px 3px}.i54Wjq_stepContent{color:var(--dsw-alias-label-secondary);word-break:break-word;white-space:pre-wrap;font-size:12px;line-height:20px}.i54Wjq_stepContentDone{color:var(--dsw-alias-label-dimmed);text-decoration:line-through}.i54Wjq_stepContentRun{color:var(--dsw-alias-label-primary)}.i54Wjq_muted{color:var(--dsw-alias-label-dimmed);font-size:11px;line-height:18px}.i54Wjq_filesList{flex-direction:column;margin:0;padding:0;list-style:none;display:flex}.i54Wjq_fileRow{cursor:pointer;text-align:left;background:0 0;border:none;border-radius:6px;align-items:center;gap:6px;width:100%;padding:3px 4px;display:flex}.i54Wjq_fileRow:hover{background:var(--dsw-alias-interactive-bg-hover,#7f7f7f14)}.i54Wjq_fileDot{background:var(--dsw-alias-border-l3,#7f7f7f80);border-radius:50%;flex:none;width:5px;height:5px}.i54Wjq_filePath{color:var(--dsw-alias-label-secondary);white-space:nowrap;text-overflow:ellipsis;text-align:left;direction:rtl;font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace;font-size:11px;line-height:18px;overflow:hidden}.i54Wjq_fileLine{color:var(--dsw-alias-label-dimmed);flex:none;font-size:10px;line-height:18px}.i54Wjq_cardFooter{gap:6px;margin-top:8px;display:flex}@media (prefers-reduced-motion:reduce){.i54Wjq_panel{animation:none}.i54Wjq_trackFill,.i54Wjq_card{transition:none}}.i54Wjq_miniBar{border:1px solid var(--dsw-alias-border-l3,#7f7f7f4d);background:var(--dsw-alias-bg-layer-2,var(--dsw-alias-bg-base,#fff));max-width:min(46vw,340px);height:34px;color:var(--dsw-alias-label-primary);cursor:grab;-webkit-user-select:none;user-select:none;pointer-events:auto;border-radius:999px;align-items:center;gap:7px;padding:0 12px;font-size:12px;line-height:18px;transition:background .15s,border-color .15s;display:inline-flex;position:fixed;box-shadow:0 6px 20px #00000024,0 1px 4px #00000014}.i54Wjq_miniBar:active{cursor:grabbing}.i54Wjq_miniBar:hover{background:var(--dsw-alias-interactive-bg-hover,#7f7f7f14)}.i54Wjq_miniIcon{color:var(--dsw-alias-label-secondary);flex:none}.i54Wjq_miniText{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.i54Wjq_miniChevron{color:var(--dsw-alias-label-tertiary);flex:none}.i54Wjq_taskList{flex:auto;min-height:0}.i54Wjq_card{flex-direction:column;display:flex}.i54Wjq_boundaryFallback{border:1px solid var(--dsw-alias-border-l3,#7f7f7f4d);background:var(--dsw-alias-bg-layer-2,#fff);color:var(--dsw-alias-label-secondary);cursor:pointer;pointer-events:auto;border-radius:999px;padding:4px 10px;font-size:12px;line-height:18px;position:fixed;top:64px;right:16px}.i54Wjq_stepToggle{cursor:pointer;background:0 0;border:none;border-radius:4px;flex:none;align-items:center;margin-top:2px;padding:0;display:inline-flex}.i54Wjq_stepToggle:hover{background:var(--dsw-alias-interactive-bg-hover,#7f7f7f1f)}.i54Wjq_stepToggle:disabled{cursor:default;opacity:.5}.i54Wjq_stepEditable{cursor:text;border-radius:3px}.i54Wjq_stepEditable:hover{outline:1px dashed var(--dsw-alias-border-l3,#7f7f7f66);outline-offset:1px}.i54Wjq_stepInput{box-sizing:border-box;width:auto;min-width:0;font:inherit;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-base,transparent);border:1px solid var(--dsw-alias-border-l3,#7f7f7f73);border-radius:5px;flex:auto;padding:0 5px;font-size:12px;line-height:20px}.i54Wjq_editorArea{box-sizing:border-box;min-width:0;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-base,transparent);border:1px solid var(--dsw-alias-border-l3,#7f7f7f73);resize:none;vertical-align:middle;cursor:text;white-space:pre-wrap;word-break:break-word;border-radius:5px;flex:1;margin:0;padding:2px 5px;font-family:inherit;font-size:12px;line-height:20px;overflow:hidden}.i54Wjq_editorArea:focus{border-color:var(--dsw-alias-border-l3,#7f7f7f99);outline:none}.i54Wjq_stepDragging{opacity:.3;background:var(--dsw-alias-interactive-bg-hover,#7f7f7f14)}.i54Wjq_cardTitleEditable{cursor:text;border-radius:3px}.i54Wjq_cardTitleEditable:hover{outline:1px dashed var(--dsw-alias-border-l3,#7f7f7f66);outline-offset:1px}.i54Wjq_panel[data-theme=glass],.i54Wjq_miniBar[data-theme=glass]{background:color-mix(in srgb, var(--dsw-alias-bg-layer-2,#fff) 90%, transparent);-webkit-backdrop-filter:blur(18px)saturate(1.2);border:1px solid color-mix(in srgb, var(--dsw-alias-border-l2,#7f7f7f4d) 80%, transparent)}.i54Wjq_panel[data-theme=glass] .i54Wjq_card{background:color-mix(in srgb, var(--dsw-alias-bg-base,transparent) 84%, transparent);border-color:color-mix(in srgb, var(--dsw-alias-border-l1,#7f7f7f29) 60%, transparent)}.i54Wjq_panel[data-theme=glass] .i54Wjq_cardBody{border-top-color:color-mix(in srgb, var(--dsw-alias-border-l1,#7f7f7f24) 60%, transparent)}@media (prefers-reduced-transparency:reduce){.i54Wjq_panel[data-theme=glass],.i54Wjq_miniBar[data-theme=glass]{background:var(--dsw-alias-bg-layer-2,#fff);-webkit-backdrop-filter:none;backdrop-filter:none}.i54Wjq_panel[data-theme=glass] .i54Wjq_card{background:var(--dsw-alias-bg-base,transparent)}}@supports not ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){.i54Wjq_panel[data-theme=glass],.i54Wjq_miniBar[data-theme=glass]{background:var(--dsw-alias-bg-layer-2,#fff)}}.i54Wjq_panel[data-theme=brutal]{box-shadow:none;border-width:1px;border-radius:6px}.i54Wjq_panel[data-theme=brutal] .i54Wjq_card{border:1px solid var(--dsw-alias-border-l3,#7f7f7f6b);background:var(--dsw-alias-bg-base,transparent);box-shadow:none;border-radius:3px}.i54Wjq_panel[data-theme=brutal] .i54Wjq_cardHead{padding:7px 10px 6px}.i54Wjq_panel[data-theme=brutal] .i54Wjq_cardTitle{letter-spacing:.01em;font-weight:650}.i54Wjq_panel[data-theme=brutal] .i54Wjq_headerTitle{letter-spacing:.03em}.i54Wjq_panel[data-theme=brutal] .i54Wjq_boundBadge{border-radius:2px}.i54Wjq_panel[data-theme=brutal] .i54Wjq_track{border-radius:0;height:3px}.i54Wjq_panel[data-theme=brutal] .i54Wjq_trackFill{border-radius:0}.i54Wjq_panel[data-theme=brutal] .i54Wjq_cardBody{border-top:1px solid var(--dsw-alias-border-l2,#7f7f7f3d)}.i54Wjq_panel[data-theme=mono] .i54Wjq_headerTitle,.i54Wjq_panel[data-theme=mono] .i54Wjq_counts,.i54Wjq_panel[data-theme=mono] .i54Wjq_cardTitle,.i54Wjq_panel[data-theme=mono] .i54Wjq_progressText,.i54Wjq_panel[data-theme=mono] .i54Wjq_stepContent,.i54Wjq_panel[data-theme=mono] .i54Wjq_filePath{font-family:ui-monospace,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.i54Wjq_panel[data-theme=mono] .i54Wjq_cardTitle{font-size:12px}.i54Wjq_panel[data-theme=mono] .i54Wjq_stepContent{font-size:11.5px}.i54Wjq_panel[data-theme=mono] .i54Wjq_card{border-radius:5px}.i54Wjq_panel[data-theme=mono] .i54Wjq_trackFill{border-radius:0}.i54Wjq_panel[data-theme=mono] .i54Wjq_stepPending{border-radius:1px}.i54Wjq_panel[data-theme=mono] .i54Wjq_updated{letter-spacing:.02em}.i54Wjq_headerIconBtn{color:inherit;cursor:pointer;background:0 0;border:none;border-radius:0;flex:none;justify-content:center;align-items:center;margin:0;padding:0;display:inline-flex}.i54Wjq_headerIcon{color:var(--dsw-alias-label-secondary);flex:none;display:block}.i54Wjq_headerLeft{min-width:0}.i54Wjq_headerTitle{text-overflow:ellipsis;flex:0 auto;min-width:0;overflow:hidden}.i54Wjq_headerRight{min-width:0}.i54Wjq_counts{text-overflow:ellipsis;flex:none;max-width:45%;margin-left:auto;overflow:hidden}.i54Wjq_dragGhost{pointer-events:none;z-index:9999;transition:left 50ms,top 50ms;position:fixed;transform:translate(-50%,-50%)}.i54Wjq_dragGhostCard{background:var(--dsw-alias-bg-layer-2,var(--dsw-alias-bg-base,#fff));border:1px solid var(--dsw-alias-border-l3,#7f7f7f59);color:var(--dsw-alias-label-primary);white-space:nowrap;border-radius:8px;align-items:center;gap:8px;max-width:280px;padding:8px 12px;font-size:12px;line-height:20px;display:inline-flex;transform:scale(.9);box-shadow:0 8px 24px #0000002e,0 2px 8px #0000001a}.i54Wjq_dragGhostContent{text-overflow:ellipsis;word-break:break-word;flex:1;min-width:0;overflow:hidden}.i54Wjq_dragGhostClose{width:20px;height:20px;color:var(--dsw-alias-label-tertiary);cursor:pointer;opacity:.6;background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;margin-left:8px;font-size:16px;line-height:1;transition:opacity .15s,background .15s,color .15s;display:inline-flex}.i54Wjq_dragGhostClose:hover{opacity:1;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-interactive-bg-hover,#7f7f7f1f)}.i54Wjq_dropTargetBefore{position:relative}.i54Wjq_dropTargetBefore:before{content:\"\";background:var(--dsw-alias-button-primary-fill,#3a6ef5);height:2px;box-shadow:0 0 4px var(--dsw-alias-button-primary-fill,#3a6ef5);border-radius:1px;animation:.8s ease-in-out infinite i54Wjq_dropPulse;position:absolute;top:-1px;left:0;right:0}.i54Wjq_dropTargetAfter{position:relative}.i54Wjq_dropTargetAfter:after{content:\"\";background:var(--dsw-alias-button-primary-fill,#3a6ef5);height:2px;box-shadow:0 0 4px var(--dsw-alias-button-primary-fill,#3a6ef5);border-radius:1px;animation:.8s ease-in-out infinite i54Wjq_dropPulse;position:absolute;bottom:-1px;left:0;right:0}@keyframes i54Wjq_dropPulse{0%,to{opacity:.6}50%{opacity:1}}.i54Wjq_memoryPane{flex-direction:column;gap:6px;max-height:480px;padding:8px 10px 10px;display:flex;overflow:auto}.i54Wjq_memToolbar{justify-content:space-between;align-items:center;gap:8px;display:flex}.i54Wjq_memCount{opacity:.75;font-size:12px;font-weight:600}.i54Wjq_memList{flex-direction:column;gap:6px;display:flex}.i54Wjq_memSentinel{flex:none;height:1px}.i54Wjq_memFooter{flex-direction:column;align-items:center;gap:4px;padding:6px 0 2px;font-size:12px;display:flex}.i54Wjq_memRow{border:1px solid var(--dsw-border-weak,#80808040);background:color-mix(in srgb, var(--dsw-bg-secondary,#f5f5f5) 45%, transparent);content-visibility:auto;contain-intrinsic-size:auto 76px;border-radius:6px;flex-direction:column;gap:4px;padding:6px 8px;display:flex}.i54Wjq_memRowArchived{opacity:.55}.i54Wjq_memRowMain{flex-direction:column;gap:2px;display:flex}.i54Wjq_memTitle{word-break:break-word;align-items:flex-start;gap:6px;font-size:13px;line-height:1.35;display:flex}.i54Wjq_kindBadge{background:var(--dsw-accent-soft,#5078ff26);color:var(--dsw-accent,#4d6bfe);border-radius:4px;flex:none;padding:0 5px;font-size:11px;line-height:1.5}.i54Wjq_memMeta{flex-wrap:wrap;align-items:center;gap:4px;display:flex}.i54Wjq_badge{background:color-mix(in srgb, var(--dsw-fg,#222) 8%, transparent);border-radius:4px;padding:0 5px;font-size:11px;line-height:1.5}.i54Wjq_badgeDraft{color:#b26a00;background:#ffb40029}.i54Wjq_badgeArchived{opacity:.8}.i54Wjq_memBody{opacity:.8;word-break:break-word;font-size:12px}.i54Wjq_memActs{flex-wrap:wrap;gap:4px;display:flex}.i54Wjq_memToolbarActs{align-items:center;gap:6px;display:flex}.i54Wjq_memNew{border:1px solid var(--dsw-border-weak,#80808040);border-radius:6px;flex-direction:column;gap:6px;padding:8px;display:flex}.i54Wjq_memNewRow{align-items:center;gap:8px;display:flex}.i54Wjq_memLabel{opacity:.8;align-items:center;gap:6px;font-size:12px;display:inline-flex}.i54Wjq_memNew select,.i54Wjq_memNew textarea{box-sizing:border-box;width:100%}";
|
|
988
1043
|
const tagId$2 = "@yolk_vat-y/dsh-project-memory/TaskPanel.module.css";
|
|
@@ -1102,16 +1157,6 @@ window.__ModuleLoader__.load({
|
|
|
1102
1157
|
experience: t("mem.kind.experience")
|
|
1103
1158
|
}[kind] ?? kind;
|
|
1104
1159
|
}
|
|
1105
|
-
function timeAgo(iso) {
|
|
1106
|
-
if (!iso) return "";
|
|
1107
|
-
const diff = Date.now() - new Date(iso).getTime();
|
|
1108
|
-
const m = Math.floor(diff / 6e4);
|
|
1109
|
-
if (m < 1) return "刚刚";
|
|
1110
|
-
if (m < 60) return `${m}分钟前`;
|
|
1111
|
-
const h = Math.floor(m / 60);
|
|
1112
|
-
if (h < 24) return `${h}小时前`;
|
|
1113
|
-
return `${Math.floor(h / 24)}天前`;
|
|
1114
|
-
}
|
|
1115
1160
|
function StepIcon({ status }) {
|
|
1116
1161
|
if (status === "completed") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconCheckOutline16, { className: TaskPanel_module_css_default.stepDone });
|
|
1117
1162
|
if (status === "in_progress") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconPlayOutline16, { className: TaskPanel_module_css_default.stepRun });
|
|
@@ -1124,7 +1169,7 @@ window.__ModuleLoader__.load({
|
|
|
1124
1169
|
* 数值是可感知与可靠性的折中:太小慢速双击会失效,太大单击会显“肉”。
|
|
1125
1170
|
*/
|
|
1126
1171
|
const CLICK_SINGLE_DELAY_MS = 250;
|
|
1127
|
-
function InlineEditor({ value, className, maxRows = 8, onValueChange, onCommit, onCancel }) {
|
|
1172
|
+
function InlineEditor({ value, className, maxRows = 8, disabled = false, onValueChange, onCommit, onCancel }) {
|
|
1128
1173
|
const ref = (0, react.useRef)(null);
|
|
1129
1174
|
(0, react.useLayoutEffect)(() => {
|
|
1130
1175
|
const el = ref.current;
|
|
@@ -1145,6 +1190,7 @@ window.__ModuleLoader__.load({
|
|
|
1145
1190
|
rows: 1,
|
|
1146
1191
|
value,
|
|
1147
1192
|
autoFocus: true,
|
|
1193
|
+
disabled,
|
|
1148
1194
|
spellCheck: false,
|
|
1149
1195
|
onChange: (e) => onValueChange(e.target.value),
|
|
1150
1196
|
onFocus: (e) => {
|
|
@@ -1231,19 +1277,21 @@ window.__ModuleLoader__.load({
|
|
|
1231
1277
|
}
|
|
1232
1278
|
function TaskCard({ task, isBound, expanded, onToggleExpand, onSwitch, onUnbind, onArchive, onRename, onEditStep, onCycleStatus, onReorderSteps, onInsightAction, showHints, syncing, t }) {
|
|
1233
1279
|
const steps = task.steps || [];
|
|
1234
|
-
const { dragState, dropTargetIndex, startDrag, cancelDrag } = useTaskDrag(task.id,
|
|
1280
|
+
const { dragState, dropTargetIndex, startDrag, cancelDrag } = useTaskDrag(task.id, isBound, onReorderSteps);
|
|
1235
1281
|
const [stepEdit, setStepEdit] = (0, react.useState)(null);
|
|
1236
1282
|
const [titleEdit, setTitleEdit] = (0, react.useState)(null);
|
|
1237
1283
|
const done = steps.filter((s) => s.status === "completed").length;
|
|
1238
1284
|
const pct = steps.length > 0 ? Math.round(done / steps.length * 100) : 0;
|
|
1239
1285
|
const commitStepEdit = (index) => {
|
|
1240
1286
|
if (!stepEdit || stepEdit.index !== index) return;
|
|
1287
|
+
if (syncing) return;
|
|
1241
1288
|
const value = stepEdit.value;
|
|
1242
1289
|
setStepEdit(null);
|
|
1243
1290
|
onEditStep(index, value);
|
|
1244
1291
|
};
|
|
1245
1292
|
const commitTitleEdit = () => {
|
|
1246
1293
|
if (titleEdit === null) return;
|
|
1294
|
+
if (syncing) return;
|
|
1247
1295
|
const value = titleEdit.value;
|
|
1248
1296
|
setTitleEdit(null);
|
|
1249
1297
|
onRename(value);
|
|
@@ -1302,6 +1350,7 @@ window.__ModuleLoader__.load({
|
|
|
1302
1350
|
className: TaskPanel_module_css_default.editorArea,
|
|
1303
1351
|
value: titleEdit.value,
|
|
1304
1352
|
maxRows: 4,
|
|
1353
|
+
disabled: syncing,
|
|
1305
1354
|
onValueChange: (value) => setTitleEdit({ value }),
|
|
1306
1355
|
onCommit: commitTitleEdit,
|
|
1307
1356
|
onCancel: () => setTitleEdit(null)
|
|
@@ -1312,7 +1361,7 @@ window.__ModuleLoader__.load({
|
|
|
1312
1361
|
onDoubleClick: (e) => {
|
|
1313
1362
|
e.preventDefault();
|
|
1314
1363
|
e.stopPropagation();
|
|
1315
|
-
if (isBound) setTitleEdit({ value: String(task.title ?? "") });
|
|
1364
|
+
if (isBound && !syncing) setTitleEdit({ value: String(task.title ?? "") });
|
|
1316
1365
|
},
|
|
1317
1366
|
children: task.title
|
|
1318
1367
|
})]
|
|
@@ -1329,7 +1378,7 @@ window.__ModuleLoader__.load({
|
|
|
1329
1378
|
}),
|
|
1330
1379
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1331
1380
|
className: TaskPanel_module_css_default.updated,
|
|
1332
|
-
children: timeAgo(task.updatedAt || task.lastActiveAt)
|
|
1381
|
+
children: timeAgo(task.updatedAt || task.lastActiveAt, "")
|
|
1333
1382
|
}),
|
|
1334
1383
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1335
1384
|
className: TaskPanel_module_css_default.chevron,
|
|
@@ -1386,6 +1435,7 @@ window.__ModuleLoader__.load({
|
|
|
1386
1435
|
className: TaskPanel_module_css_default.editorArea,
|
|
1387
1436
|
value: stepEdit.value,
|
|
1388
1437
|
maxRows: 10,
|
|
1438
|
+
disabled: syncing,
|
|
1389
1439
|
onValueChange: (value) => setStepEdit({
|
|
1390
1440
|
index: i,
|
|
1391
1441
|
value
|
|
@@ -1397,7 +1447,7 @@ window.__ModuleLoader__.load({
|
|
|
1397
1447
|
title: isBound && showHints ? t("step.edit-hint") : void 0,
|
|
1398
1448
|
onDoubleClick: (e) => {
|
|
1399
1449
|
e.stopPropagation();
|
|
1400
|
-
if (isBound) setStepEdit({
|
|
1450
|
+
if (isBound && !syncing) setStepEdit({
|
|
1401
1451
|
index: i,
|
|
1402
1452
|
value: String(step.content ?? "")
|
|
1403
1453
|
});
|
|
@@ -1556,6 +1606,8 @@ window.__ModuleLoader__.load({
|
|
|
1556
1606
|
]
|
|
1557
1607
|
});
|
|
1558
1608
|
}
|
|
1609
|
+
//#endregion
|
|
1610
|
+
//#region src/client/paging.js
|
|
1559
1611
|
/** 预取提前量:哨兵进入视口**下方 600px** 就开始取下一页,数据在滚到底之前到位。 */
|
|
1560
1612
|
const PREFETCH_MARGIN = "600px 0px";
|
|
1561
1613
|
/**
|
|
@@ -1569,7 +1621,7 @@ window.__ModuleLoader__.load({
|
|
|
1569
1621
|
return `/tasks insight list ${scope} ${offset} ${limit}`;
|
|
1570
1622
|
}
|
|
1571
1623
|
/**
|
|
1572
|
-
* 追加一页并**按 id 去重**。去重是必需的:前缀重放(见
|
|
1624
|
+
* 追加一页并**按 id 去重**。去重是必需的:前缀重放(见 MemoryView.loadPrefix)与并发
|
|
1573
1625
|
* 刷新都可能让同一 id 出现两次,重复行带重复按钮,点错一个就是误删。
|
|
1574
1626
|
* @param {ReadonlyArray<{id?: string}>} prev - 已渲染条目。
|
|
1575
1627
|
* @param {ReadonlyArray<{id?: string}>} page - 新到的一页。
|
|
@@ -1583,20 +1635,6 @@ window.__ModuleLoader__.load({
|
|
|
1583
1635
|
return [...prev, ...fresh];
|
|
1584
1636
|
}
|
|
1585
1637
|
/**
|
|
1586
|
-
* 动作(archive/delete/promote…)之后的重载窗口:刷新**已加载的整个前缀**而非重置成第一页(否则
|
|
1587
|
-
* 会把正在看第 5 页的用户弹回顶部);用 offset 分页而非 keyset 游标正是为了让"把 0..N 重取一遍"
|
|
1588
|
-
* 可行。**上限**:宿主单页最多 {@link HOST_PAGE_MAX} 条且静默截断,`limit` 在这里夹住,余下的由 `nextOffset` 追加。
|
|
1589
|
-
* @param {number} loadedCount - 当前已渲染条数。
|
|
1590
|
-
* @param {number} [pageSize] - 每页条数下界,保证至少取一页。
|
|
1591
|
-
* @returns {{offset: number, limit: number}} 重放请求窗口(limit ≤ HOST_PAGE_MAX)。
|
|
1592
|
-
*/
|
|
1593
|
-
function reloadWindowRequest(loadedCount, pageSize = 30) {
|
|
1594
|
-
return {
|
|
1595
|
-
offset: 0,
|
|
1596
|
-
limit: Math.min(200, Math.max(pageSize, Number.isFinite(loadedCount) && loadedCount > 0 ? Math.floor(loadedCount) : 0))
|
|
1597
|
-
};
|
|
1598
|
-
}
|
|
1599
|
-
/**
|
|
1600
1638
|
* 把宿主载荷归一成窗口状态,兼容三种形态:新宿主分页(有 `total` + `nextOffset`)、新宿主不
|
|
1601
1639
|
* 分页(省略 limit,`nextOffset === null`)、老宿主/老 bundle(两个字段都没有 → 视为一次给全)。
|
|
1602
1640
|
* @param {any} data - 已解析的 JSON 载荷。
|
|
@@ -1678,7 +1716,7 @@ window.__ModuleLoader__.load({
|
|
|
1678
1716
|
//#region src/client/MemoryView.tsx
|
|
1679
1717
|
/**
|
|
1680
1718
|
* Memory View — 记忆三作用域列表(Task 草稿 / Project / Global)
|
|
1681
|
-
* 数据通道与任务面板一致:remote.commands.execute 执行
|
|
1719
|
+
* 数据通道与任务面板一致:remote.commands.execute 执行 `/tasks insight …`,取 JSON 载荷。
|
|
1682
1720
|
* 动作:confirm(草稿审核) / promote(向上提升) / demote(向下降级,需绑定任务) / archive / restore / delete
|
|
1683
1721
|
*
|
|
1684
1722
|
* 列表是**增量加载**的:首屏只取 PAGE_SIZE 条,滚到底前 600px 预取下一页追加。
|
|
@@ -1705,6 +1743,11 @@ window.__ModuleLoader__.load({
|
|
|
1705
1743
|
}
|
|
1706
1744
|
return hit;
|
|
1707
1745
|
}
|
|
1746
|
+
/** 动作会跨 scope 改变列表:整份失效本 session/root 的缓存,否则目标页 30s 内仍显示旧列表。 */
|
|
1747
|
+
function invalidateInsightCache(sessionId, root) {
|
|
1748
|
+
const prefix = `${sessionId || ""}|${root || ""}|`;
|
|
1749
|
+
for (const key of [...insightCache.keys()]) if (key.startsWith(prefix)) insightCache.delete(key);
|
|
1750
|
+
}
|
|
1708
1751
|
function writeInsightCache(sessionId, scope, root, boundTaskId, rows, total, nextOffset) {
|
|
1709
1752
|
const key = insightCacheKey(sessionId, scope, root, boundTaskId);
|
|
1710
1753
|
insightCache.delete(key);
|
|
@@ -1757,10 +1800,12 @@ window.__ModuleLoader__.load({
|
|
|
1757
1800
|
function MemoryView({ ctx, sessionId, scope, root, boundTaskId, showHints, t }) {
|
|
1758
1801
|
const [rows, setRows] = (0, react.useState)([]);
|
|
1759
1802
|
const [total, setTotal] = (0, react.useState)(0);
|
|
1803
|
+
const totalRef = (0, react.useRef)(0);
|
|
1760
1804
|
const [nextOffset, setNextOffset] = (0, react.useState)(null);
|
|
1761
1805
|
const [error, setError] = (0, react.useState)(null);
|
|
1762
1806
|
const [loading, setLoading] = (0, react.useState)(false);
|
|
1763
1807
|
const [loadingMore, setLoadingMore] = (0, react.useState)(false);
|
|
1808
|
+
const failedPageRef = (0, react.useRef)(null);
|
|
1764
1809
|
const [showSpinner, setShowSpinner] = (0, react.useState)(false);
|
|
1765
1810
|
const [busy, setBusy] = (0, react.useState)(false);
|
|
1766
1811
|
const [showNew, setShowNew] = (0, react.useState)(false);
|
|
@@ -1776,29 +1821,14 @@ window.__ModuleLoader__.load({
|
|
|
1776
1821
|
const scrollRef = (0, react.useRef)(null);
|
|
1777
1822
|
const sentinelRef = (0, react.useRef)(null);
|
|
1778
1823
|
const runLine = (0, react.useCallback)(async (line) => {
|
|
1779
|
-
const
|
|
1780
|
-
|
|
1824
|
+
const result = await invokeCommand(ctx, sessionId, line);
|
|
1825
|
+
return result.ok ? {
|
|
1826
|
+
ok: true,
|
|
1827
|
+
text: result.text
|
|
1828
|
+
} : {
|
|
1781
1829
|
ok: false,
|
|
1782
|
-
text:
|
|
1830
|
+
text: result.error || "command failed"
|
|
1783
1831
|
};
|
|
1784
|
-
try {
|
|
1785
|
-
const envelope = await commands.execute(sessionId, line, []);
|
|
1786
|
-
const execution = envelope && typeof envelope === "object" && "value" in envelope ? envelope.value : envelope;
|
|
1787
|
-
const result = execution?.result ?? execution;
|
|
1788
|
-
if (result?.kind === "error") return {
|
|
1789
|
-
ok: false,
|
|
1790
|
-
text: result.text ?? "command error"
|
|
1791
|
-
};
|
|
1792
|
-
return {
|
|
1793
|
-
ok: true,
|
|
1794
|
-
text: result?.text ?? ""
|
|
1795
|
-
};
|
|
1796
|
-
} catch (err) {
|
|
1797
|
-
return {
|
|
1798
|
-
ok: false,
|
|
1799
|
-
text: String(err?.message ?? err)
|
|
1800
|
-
};
|
|
1801
|
-
}
|
|
1802
1832
|
}, [ctx, sessionId]);
|
|
1803
1833
|
const gateRef = (0, react.useRef)(null);
|
|
1804
1834
|
if (gateRef.current === null) gateRef.current = createRequestGate();
|
|
@@ -1806,41 +1836,75 @@ window.__ModuleLoader__.load({
|
|
|
1806
1836
|
(0, react.useEffect)(() => {
|
|
1807
1837
|
scopeRef.current = scope;
|
|
1808
1838
|
}, [scope]);
|
|
1839
|
+
(0, react.useEffect)(() => {
|
|
1840
|
+
setShowNew(false);
|
|
1841
|
+
setEditingId(null);
|
|
1842
|
+
setForm({
|
|
1843
|
+
title: "",
|
|
1844
|
+
kind: "lesson",
|
|
1845
|
+
body: "",
|
|
1846
|
+
steps: "",
|
|
1847
|
+
trigger: ""
|
|
1848
|
+
});
|
|
1849
|
+
setSavedTip(null);
|
|
1850
|
+
}, [
|
|
1851
|
+
scope,
|
|
1852
|
+
sessionId,
|
|
1853
|
+
root
|
|
1854
|
+
]);
|
|
1809
1855
|
/**
|
|
1810
1856
|
* 取一页并落到状态里。
|
|
1811
1857
|
* @param offset 起始下标。
|
|
1812
1858
|
* @param limit 本页条数。
|
|
1813
1859
|
* @param append true=追加到已渲染列表;false=替换成这一页(首屏或前缀重放)。
|
|
1860
|
+
* @param opts.prefix 前缀重放时忽略 total 变化(由调用方连续取页直到目标条数)。
|
|
1861
|
+
* @returns 本页条数与下一页 offset;请求被取代/失败时为 null。
|
|
1814
1862
|
*/
|
|
1815
|
-
const load = (0, react.useCallback)(async (offset, limit, append) => {
|
|
1863
|
+
const load = (0, react.useCallback)(async (offset, limit, append, opts = {}) => {
|
|
1816
1864
|
if (!sessionId) {
|
|
1817
1865
|
setRows([]);
|
|
1818
1866
|
setTotal(0);
|
|
1819
1867
|
setNextOffset(null);
|
|
1820
1868
|
setError(null);
|
|
1821
1869
|
setLoading(false);
|
|
1822
|
-
|
|
1870
|
+
failedPageRef.current = null;
|
|
1871
|
+
return null;
|
|
1823
1872
|
}
|
|
1824
1873
|
const requestedScope = scopeRef.current;
|
|
1825
1874
|
const key = `${requestedScope}|${offset}|${limit}|${append}`;
|
|
1826
1875
|
const ticket = gateRef.current.begin(key);
|
|
1827
|
-
if (ticket === false) return;
|
|
1876
|
+
if (ticket === false) return null;
|
|
1828
1877
|
if (!append) setLoading(true);
|
|
1829
1878
|
setLoadingMore(append);
|
|
1830
1879
|
setError(null);
|
|
1831
1880
|
const spinner = window.setTimeout(() => setShowSpinner(true), 150);
|
|
1832
1881
|
try {
|
|
1833
1882
|
const res = await runLine(insightListLine(requestedScope, offset, limit));
|
|
1834
|
-
if (gateRef.current.isStale(ticket, requestedScope, scopeRef.current)) return;
|
|
1883
|
+
if (gateRef.current.isStale(ticket, requestedScope, scopeRef.current)) return null;
|
|
1835
1884
|
if (!res.ok) {
|
|
1885
|
+
failedPageRef.current = {
|
|
1886
|
+
offset,
|
|
1887
|
+
append
|
|
1888
|
+
};
|
|
1836
1889
|
setError(res.text);
|
|
1837
|
-
return;
|
|
1890
|
+
return null;
|
|
1838
1891
|
}
|
|
1839
1892
|
const parsed = parseInsightPayloadText(res.text);
|
|
1840
1893
|
if (!parsed) {
|
|
1894
|
+
failedPageRef.current = {
|
|
1895
|
+
offset,
|
|
1896
|
+
append
|
|
1897
|
+
};
|
|
1841
1898
|
setError("unparsable payload");
|
|
1842
|
-
return;
|
|
1899
|
+
return null;
|
|
1843
1900
|
}
|
|
1901
|
+
if (append && !opts.prefix && parsed.total !== totalRef.current) {
|
|
1902
|
+
totalRef.current = parsed.total;
|
|
1903
|
+
loadRef.current(0, 30, false);
|
|
1904
|
+
return null;
|
|
1905
|
+
}
|
|
1906
|
+
failedPageRef.current = null;
|
|
1907
|
+
totalRef.current = parsed.total;
|
|
1844
1908
|
setRows((prev) => {
|
|
1845
1909
|
const next = append ? appendUnique(prev, parsed.items) : parsed.items;
|
|
1846
1910
|
writeInsightCache(sessionId, requestedScope, root, boundTaskId, next, parsed.total, parsed.nextOffset);
|
|
@@ -1848,6 +1912,10 @@ window.__ModuleLoader__.load({
|
|
|
1848
1912
|
});
|
|
1849
1913
|
setTotal(parsed.total);
|
|
1850
1914
|
setNextOffset(parsed.nextOffset);
|
|
1915
|
+
return {
|
|
1916
|
+
count: parsed.items.length,
|
|
1917
|
+
nextOffset: parsed.nextOffset
|
|
1918
|
+
};
|
|
1851
1919
|
} finally {
|
|
1852
1920
|
window.clearTimeout(spinner);
|
|
1853
1921
|
if (gateRef.current.end(key, ticket)) {
|
|
@@ -1869,13 +1937,20 @@ window.__ModuleLoader__.load({
|
|
|
1869
1937
|
(0, react.useEffect)(() => {
|
|
1870
1938
|
setRows([]);
|
|
1871
1939
|
setTotal(0);
|
|
1940
|
+
totalRef.current = 0;
|
|
1872
1941
|
setNextOffset(null);
|
|
1873
1942
|
setError(null);
|
|
1943
|
+
failedPageRef.current = null;
|
|
1874
1944
|
if (!sessionId) return;
|
|
1875
1945
|
const cached = readInsightCache(sessionId, scope, root, boundTaskId);
|
|
1876
1946
|
if (cached) {
|
|
1947
|
+
const gate = gateRef.current;
|
|
1948
|
+
const key = `cache|${scope}|${root || ""}|${boundTaskId || ""}`;
|
|
1949
|
+
const ticket = gate.begin(key);
|
|
1950
|
+
if (ticket !== false) gate.end(key, ticket);
|
|
1877
1951
|
setRows(cached.rows);
|
|
1878
1952
|
setTotal(cached.total);
|
|
1953
|
+
totalRef.current = cached.total;
|
|
1879
1954
|
setNextOffset(cached.nextOffset);
|
|
1880
1955
|
setLoading(false);
|
|
1881
1956
|
setLoadingMore(false);
|
|
@@ -1904,11 +1979,25 @@ window.__ModuleLoader__.load({
|
|
|
1904
1979
|
}, [nextOffset, rows.length]);
|
|
1905
1980
|
/**
|
|
1906
1981
|
* 重载**已加载的整个前缀**(不是重置成第一页):动作之后用户的位置不该跳回顶部。
|
|
1982
|
+
* 宿主单页上限是 HOST_PAGE_MAX,超过它时必须连续拉多页,否则一次动作会把 500 条
|
|
1983
|
+
* 已加载列表截回 200 条(旧实现说的“余下由 nextOffset 追加”,
|
|
1984
|
+
* 但替换式加载不会自动追加)。
|
|
1907
1985
|
*/
|
|
1986
|
+
const loadPrefix = (0, react.useCallback)(async (desired) => {
|
|
1987
|
+
const target = Math.max(30, desired || 0);
|
|
1988
|
+
let offset = 0;
|
|
1989
|
+
let loaded = 0;
|
|
1990
|
+
for (let guard = 0; guard < 100 && loaded < target; guard++) {
|
|
1991
|
+
const win = await loadRef.current(offset, Math.min(200, target - loaded), offset !== 0, { prefix: true });
|
|
1992
|
+
if (!win) break;
|
|
1993
|
+
loaded += win.count;
|
|
1994
|
+
if (win.nextOffset === null) break;
|
|
1995
|
+
offset = win.nextOffset;
|
|
1996
|
+
}
|
|
1997
|
+
}, []);
|
|
1908
1998
|
const reloadWindow = (0, react.useCallback)(async () => {
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
}, [rows.length]);
|
|
1999
|
+
await loadPrefix(rows.length);
|
|
2000
|
+
}, [loadPrefix, rows.length]);
|
|
1912
2001
|
const act = async (action, id) => {
|
|
1913
2002
|
if (busy) return;
|
|
1914
2003
|
setBusy(true);
|
|
@@ -1917,7 +2006,10 @@ window.__ModuleLoader__.load({
|
|
|
1917
2006
|
const line = `/tasks insight ${action} ${scope} ${id}${action === "demote" && scope === "project" && boundTaskId ? ` ${boundTaskId}` : ""}`;
|
|
1918
2007
|
const res = await runLine(line);
|
|
1919
2008
|
if (!res.ok) setError(res.text);
|
|
1920
|
-
else
|
|
2009
|
+
else {
|
|
2010
|
+
invalidateInsightCache(sessionId, root);
|
|
2011
|
+
await reloadWindow();
|
|
2012
|
+
}
|
|
1921
2013
|
} finally {
|
|
1922
2014
|
setBusy(false);
|
|
1923
2015
|
}
|
|
@@ -1979,17 +2071,22 @@ window.__ModuleLoader__.load({
|
|
|
1979
2071
|
title,
|
|
1980
2072
|
kind: form.kind
|
|
1981
2073
|
};
|
|
1982
|
-
if (
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
2074
|
+
if (!editingId) {
|
|
2075
|
+
if (form.kind === "lesson") fields.pattern = title;
|
|
2076
|
+
if (form.kind === "decision") fields.choice = title;
|
|
2077
|
+
if (form.kind === "experience") fields.problem = title;
|
|
2078
|
+
}
|
|
2079
|
+
if (form.kind !== "procedure" && (editingId || form.body.trim())) {
|
|
2080
|
+
const body = form.body.trim();
|
|
2081
|
+
if (form.kind === "lesson") fields.fix = body;
|
|
2082
|
+
else if (form.kind === "decision") fields.reason = body;
|
|
2083
|
+
else if (form.kind === "experience") fields.solution = body;
|
|
2084
|
+
else fields.body = body;
|
|
1990
2085
|
}
|
|
1991
|
-
|
|
1992
|
-
|
|
2086
|
+
const editingRow = editingId ? rows.find((r) => r.id === editingId) : null;
|
|
2087
|
+
const stepsTruncated = Boolean(editingId && (editingRow?.stepsTotal ?? 0) > 50);
|
|
2088
|
+
if (form.kind === "procedure" && (editingId || form.steps.trim()) && !stepsTruncated) fields.steps = form.steps.split("\n").map((s) => s.trim()).filter(Boolean);
|
|
2089
|
+
if (form.kind === "procedure" && (editingId || form.trigger.trim())) fields.trigger = { keywords: form.trigger.split(/[,,]/).map((s) => s.trim()).filter(Boolean) };
|
|
1993
2090
|
const line = editingId ? `/tasks insight edit ${scope} ${editingId} ${JSON.stringify(fields)}` : `/tasks insight save ${scope} ${JSON.stringify(fields)}`;
|
|
1994
2091
|
const res = await runLine(line);
|
|
1995
2092
|
if (!res.ok) setError(res.text);
|
|
@@ -1997,6 +2094,7 @@ window.__ModuleLoader__.load({
|
|
|
1997
2094
|
setSavedTip(t("mem.saved"));
|
|
1998
2095
|
closeForm();
|
|
1999
2096
|
window.setTimeout(() => setSavedTip(null), 2500);
|
|
2097
|
+
invalidateInsightCache(sessionId, root);
|
|
2000
2098
|
await reloadWindow();
|
|
2001
2099
|
}
|
|
2002
2100
|
} finally {
|
|
@@ -2141,7 +2239,11 @@ window.__ModuleLoader__.load({
|
|
|
2141
2239
|
variant: "outline",
|
|
2142
2240
|
size: "sm",
|
|
2143
2241
|
disabled: loading || loadingMore,
|
|
2144
|
-
onClick: () =>
|
|
2242
|
+
onClick: () => {
|
|
2243
|
+
const failed = failedPageRef.current;
|
|
2244
|
+
if (failed) loadRef.current(failed.offset, 30, failed.append);
|
|
2245
|
+
else reloadWindow();
|
|
2246
|
+
},
|
|
2145
2247
|
children: t("mem.retry")
|
|
2146
2248
|
})
|
|
2147
2249
|
]
|
|
@@ -2433,6 +2535,9 @@ window.__ModuleLoader__.load({
|
|
|
2433
2535
|
const sessionId = useSessionId(ctx);
|
|
2434
2536
|
const [syncing, setSyncing] = (0, react.useState)(false);
|
|
2435
2537
|
const syncingRef = (0, react.useRef)(false);
|
|
2538
|
+
const pendingRefreshRef = (0, react.useRef)(false);
|
|
2539
|
+
const sessionIdRef = (0, react.useRef)(sessionId);
|
|
2540
|
+
sessionIdRef.current = sessionId;
|
|
2436
2541
|
const [syncedAt, setSyncedAt] = (0, react.useState)(0);
|
|
2437
2542
|
const [syncError, setSyncError] = (0, react.useState)(null);
|
|
2438
2543
|
const showHints = ui.showHints;
|
|
@@ -2447,14 +2552,16 @@ window.__ModuleLoader__.load({
|
|
|
2447
2552
|
const tasks = Array.isArray(data.tasks) ? data.tasks : [];
|
|
2448
2553
|
const activeTasks = tasks.filter((task) => !task.archived);
|
|
2449
2554
|
const boundTask = data.boundTaskId ? tasks.find((task) => task.id === data.boundTaskId) ?? null : null;
|
|
2450
|
-
const applyPayload = (text) => {
|
|
2555
|
+
const applyPayload = (text, requestSessionId) => {
|
|
2556
|
+
if (requestSessionId !== sessionIdRef.current) return false;
|
|
2451
2557
|
const parsed = parseTaskPayloadText(text);
|
|
2452
2558
|
if (!parsed) return false;
|
|
2453
2559
|
dataActions.setTasks({
|
|
2454
2560
|
tasks: parsed.tasks,
|
|
2455
2561
|
boundTaskId: parsed.boundId,
|
|
2456
2562
|
archivedCount: parsed.archived,
|
|
2457
|
-
root: parsed.root
|
|
2563
|
+
root: parsed.root,
|
|
2564
|
+
sessionId
|
|
2458
2565
|
});
|
|
2459
2566
|
setSyncedAt(Date.now());
|
|
2460
2567
|
setSyncError(null);
|
|
@@ -2466,7 +2573,7 @@ window.__ModuleLoader__.load({
|
|
|
2466
2573
|
setSyncError(result.error === "no-channel" ? t("panel.no-channel") : result.error || t("panel.sync-failed"));
|
|
2467
2574
|
return false;
|
|
2468
2575
|
}
|
|
2469
|
-
return applyPayload(result.text);
|
|
2576
|
+
return applyPayload(result.text, sessionId);
|
|
2470
2577
|
};
|
|
2471
2578
|
const withLock = async (fn) => {
|
|
2472
2579
|
if (syncingRef.current) return;
|
|
@@ -2477,6 +2584,10 @@ window.__ModuleLoader__.load({
|
|
|
2477
2584
|
} finally {
|
|
2478
2585
|
syncingRef.current = false;
|
|
2479
2586
|
setSyncing(false);
|
|
2587
|
+
if (pendingRefreshRef.current) {
|
|
2588
|
+
pendingRefreshRef.current = false;
|
|
2589
|
+
refreshRef.current();
|
|
2590
|
+
}
|
|
2480
2591
|
}
|
|
2481
2592
|
};
|
|
2482
2593
|
/**
|
|
@@ -2491,6 +2602,10 @@ window.__ModuleLoader__.load({
|
|
|
2491
2602
|
* 它们各自会推宿主清单(adoptStepsToSession),不需要巡检式补写。
|
|
2492
2603
|
*/
|
|
2493
2604
|
const refresh = async () => {
|
|
2605
|
+
if (syncingRef.current) {
|
|
2606
|
+
pendingRefreshRef.current = true;
|
|
2607
|
+
return;
|
|
2608
|
+
}
|
|
2494
2609
|
await withLock(() => runLine("/tasks"));
|
|
2495
2610
|
};
|
|
2496
2611
|
const handleAction = async (verb, taskId) => {
|
|
@@ -2498,7 +2613,8 @@ window.__ModuleLoader__.load({
|
|
|
2498
2613
|
};
|
|
2499
2614
|
const handleInsightTask = async (action, id) => {
|
|
2500
2615
|
await withLock(async () => {
|
|
2501
|
-
await runLine(`/tasks insight ${action} task ${id}`);
|
|
2616
|
+
if (!await runLine(`/tasks insight ${action} task ${id}`)) return;
|
|
2617
|
+
invalidateInsightCache(sessionId, data.root ?? null);
|
|
2502
2618
|
await runLine("/tasks");
|
|
2503
2619
|
});
|
|
2504
2620
|
};
|
|
@@ -2559,7 +2675,6 @@ window.__ModuleLoader__.load({
|
|
|
2559
2675
|
const onMove = (ev) => {
|
|
2560
2676
|
if (!drag.current) return;
|
|
2561
2677
|
const width = panelRef.current?.offsetWidth ?? 380;
|
|
2562
|
-
panelRef.current?.offsetHeight;
|
|
2563
2678
|
const x = Math.max(8, Math.min(window.innerWidth - width - 8, ev.clientX - drag.current.dx));
|
|
2564
2679
|
const y = Math.max(8, Math.min(window.innerHeight - 64, ev.clientY - drag.current.dy));
|
|
2565
2680
|
dragPosRef.current = {
|
|
@@ -2586,8 +2701,15 @@ window.__ModuleLoader__.load({
|
|
|
2586
2701
|
refreshRef.current = () => {
|
|
2587
2702
|
refresh();
|
|
2588
2703
|
};
|
|
2704
|
+
const syncedSessionRef = (0, react.useRef)(null);
|
|
2589
2705
|
(0, react.useEffect)(() => {
|
|
2590
|
-
if (ui.closed || !sessionId
|
|
2706
|
+
if (ui.closed || !sessionId) return;
|
|
2707
|
+
if (syncedSessionRef.current !== sessionId) {
|
|
2708
|
+
syncedSessionRef.current = sessionId;
|
|
2709
|
+
dataActions.reset();
|
|
2710
|
+
refreshRef.current();
|
|
2711
|
+
return;
|
|
2712
|
+
}
|
|
2591
2713
|
if (Date.now() - Math.max(data.lastUpdate, syncedAt) < 5e3) return;
|
|
2592
2714
|
refreshRef.current();
|
|
2593
2715
|
}, [
|
|
@@ -2610,7 +2732,9 @@ window.__ModuleLoader__.load({
|
|
|
2610
2732
|
}
|
|
2611
2733
|
const doneCount = activeTasks.filter((task) => {
|
|
2612
2734
|
const steps = task.steps || [];
|
|
2613
|
-
|
|
2735
|
+
const totalSteps = task.totals?.steps ?? steps.length;
|
|
2736
|
+
const done = task.totals?.completedSteps ?? steps.filter((s) => s.status === "completed").length;
|
|
2737
|
+
return totalSteps > 0 && done === totalSteps;
|
|
2614
2738
|
}).length;
|
|
2615
2739
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2616
2740
|
className: TaskPanel_module_css_default.panel,
|
|
@@ -2756,7 +2880,6 @@ window.__ModuleLoader__.load({
|
|
|
2756
2880
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2757
2881
|
className: TaskPanel_module_css_default.taskList,
|
|
2758
2882
|
children: [activeTasks.map((task) => {
|
|
2759
|
-
task.steps;
|
|
2760
2883
|
const expanded = ui.expandedTaskIds.includes(task.id);
|
|
2761
2884
|
const isBound = data.boundTaskId === task.id;
|
|
2762
2885
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TaskCard, {
|
|
@@ -2807,8 +2930,8 @@ window.__ModuleLoader__.load({
|
|
|
2807
2930
|
//#endregion
|
|
2808
2931
|
//#region src/client/TaskCommandNode.tsx
|
|
2809
2932
|
/**
|
|
2810
|
-
* /tasks
|
|
2811
|
-
*
|
|
2933
|
+
* /tasks(含 /tasks insight …)与旧版 /task、/insight 节点的渲染器(conversation.chat.commandview)。
|
|
2934
|
+
* 列表型命令只显示一行摘要;记忆动作类只显示一句结果——
|
|
2812
2935
|
* 目的:大 JSON 载荷绝不整段渲染进对话(否则切视图会刷屏)。
|
|
2813
2936
|
*/
|
|
2814
2937
|
function TaskCommandNode({ node }) {
|
|
@@ -2860,11 +2983,13 @@ window.__ModuleLoader__.load({
|
|
|
2860
2983
|
if (isList && (isInsight ? parsedInsights : parsedTasks)) return null;
|
|
2861
2984
|
if (isInsight) {
|
|
2862
2985
|
const note = String(text ?? "").split("\n")[0].slice(0, 120);
|
|
2986
|
+
const label = name === "insight" ? "/insight" : "/tasks insight";
|
|
2863
2987
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2864
2988
|
className: TaskCommandNode_module_css_default.row,
|
|
2865
2989
|
"data-variant": "ok",
|
|
2866
2990
|
children: [
|
|
2867
|
-
|
|
2991
|
+
label,
|
|
2992
|
+
" ",
|
|
2868
2993
|
insightVerb,
|
|
2869
2994
|
" ",
|
|
2870
2995
|
note || "已完成"
|
|
@@ -3373,6 +3498,14 @@ window.__ModuleLoader__.load({
|
|
|
3373
3498
|
*/
|
|
3374
3499
|
function registerSettingsCard(ctx) {
|
|
3375
3500
|
if (typeof ctx?.inject !== "function") return;
|
|
3501
|
+
if (service(ctx, "configForms")) {
|
|
3502
|
+
const missing = [
|
|
3503
|
+
"slots",
|
|
3504
|
+
"configForms",
|
|
3505
|
+
"locale"
|
|
3506
|
+
].filter((name) => !service(ctx, name));
|
|
3507
|
+
if (missing.length) console.warn(`[${SETTINGS_NS}] settings card unavailable: missing client service(s) ${missing.join(", ")}`);
|
|
3508
|
+
}
|
|
3376
3509
|
try {
|
|
3377
3510
|
ctx.inject([
|
|
3378
3511
|
"slots",
|
|
@@ -3531,9 +3664,9 @@ window.__ModuleLoader__.load({
|
|
|
3531
3664
|
id: "dsh-project-memory-task-panel",
|
|
3532
3665
|
order: 100
|
|
3533
3666
|
}, () => (0, react.createElement)(TaskPanelEntry, { ctx })));
|
|
3534
|
-
|
|
3667
|
+
slots.inject("conversation.chat.commandview", () => register({
|
|
3535
3668
|
name: "conversation.chat.commandview",
|
|
3536
|
-
key
|
|
3669
|
+
key: "tasks"
|
|
3537
3670
|
}, TaskCommandNode));
|
|
3538
3671
|
registerShowTaskPanelView(slots, keep);
|
|
3539
3672
|
} catch (err) {
|