@fanchao8609/agent_brain_sync 1.19.1 → 1.19.2
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/package.json +1 -1
- package/src/store.js +20 -13
package/package.json
CHANGED
package/src/store.js
CHANGED
|
@@ -1041,20 +1041,27 @@ async function markDone(file, id, kind = '落地', conclusion, bySid = '') {
|
|
|
1041
1041
|
break;
|
|
1042
1042
|
}
|
|
1043
1043
|
moved = [head, ...bp];
|
|
1044
|
-
//
|
|
1045
|
-
// 重建分区时就是无主杂行(实测被清掉,待办静默消失)。
|
|
1044
|
+
// 还有未勾子项就**不许 done**(2026-10-18 用户定)。
|
|
1046
1045
|
//
|
|
1047
|
-
//
|
|
1048
|
-
//
|
|
1049
|
-
//
|
|
1050
|
-
//
|
|
1051
|
-
//
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1046
|
+
// 规则:主任务与子任务都是任务,处理方式一样 —— 子任务也是看板上一行,
|
|
1047
|
+
// 也要自己完成。只有主子全部完成,主任务才能经 done。
|
|
1048
|
+
//
|
|
1049
|
+
// 为何不自己搬:上四版的四种做法全被否定——
|
|
1050
|
+
// ① 随父任务进 Done(原实现)→ Done 区被 collapseDone 折叠成计数,
|
|
1051
|
+
// 未勾子项进去即消失(实测 factory-docs-slim)
|
|
1052
|
+
// ② 升为顶层任务(<id>-restN)→ 用户:子任务不能升格
|
|
1053
|
+
// ③ 建占位主任务挂住 → 仍是无中生有,与 ② 同病
|
|
1054
|
+
// ④ 就这么留着不管 → 无主杂行,重建分区时被清掉
|
|
1055
|
+
// 正确做法是**不替用户决定**:告诉他还有哪些没完成,让他先勾或先删。
|
|
1056
|
+
if (leftover.length) {
|
|
1057
|
+
throw new Error(
|
|
1058
|
+
`✗ 任务 "${wantId}" 还有 ${leftover.length} 条子任务未完成,不能 done:\n` +
|
|
1059
|
+
leftover.map((p) => ` - [ ] ${p}`).join('\n') +
|
|
1060
|
+
`\n子任务也是任务,主子全部完成才能 done。先二选一:\n` +
|
|
1061
|
+
` • 做完了 → abs todo bp-done ${wantId} (勾最后一条;指定第 N 条:bp-done ${wantId} --n N)\n` +
|
|
1062
|
+
` • 不做了 → 删掉那几行子项,再 abs todo done ${wantId}`,
|
|
1063
|
+
);
|
|
1064
|
+
}
|
|
1058
1065
|
continue;
|
|
1059
1066
|
}
|
|
1060
1067
|
kept.push(l);
|