sentinelayer-cli 0.31.1 → 0.31.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/session/recap.js +13 -0
package/package.json
CHANGED
package/src/session/recap.js
CHANGED
|
@@ -407,6 +407,8 @@ function emptyWorkPlanSummary() {
|
|
|
407
407
|
path: WORK_PLAN_RELATIVE_PATH,
|
|
408
408
|
exists: false,
|
|
409
409
|
truncated: false,
|
|
410
|
+
detailSuppressed: false,
|
|
411
|
+
detailSuppressionReason: "",
|
|
410
412
|
total: 0,
|
|
411
413
|
open: 0,
|
|
412
414
|
completed: 0,
|
|
@@ -431,6 +433,10 @@ function summarizeWorkPlanMarkdown(raw = "", { limit = DEFAULT_WORK_PLAN_SUMMARY
|
|
|
431
433
|
const summary = emptyWorkPlanSummary();
|
|
432
434
|
summary.exists = true;
|
|
433
435
|
summary.truncated = Boolean(truncated);
|
|
436
|
+
if (summary.truncated) {
|
|
437
|
+
summary.detailSuppressed = true;
|
|
438
|
+
summary.detailSuppressionReason = "large_plan_recent_window";
|
|
439
|
+
}
|
|
434
440
|
|
|
435
441
|
const records = [];
|
|
436
442
|
let section = "";
|
|
@@ -469,6 +475,10 @@ function summarizeWorkPlanMarkdown(raw = "", { limit = DEFAULT_WORK_PLAN_SUMMARY
|
|
|
469
475
|
.filter((record) => record.status === "open")
|
|
470
476
|
.slice(-normalizedLimit);
|
|
471
477
|
summary.recent = records.slice(-normalizedLimit);
|
|
478
|
+
if (summary.detailSuppressed) {
|
|
479
|
+
summary.currentSection = "";
|
|
480
|
+
summary.recentOpen = [];
|
|
481
|
+
}
|
|
472
482
|
return summary;
|
|
473
483
|
}
|
|
474
484
|
|
|
@@ -707,6 +717,9 @@ function buildWorkPlanText(workPlan = emptyWorkPlanSummary()) {
|
|
|
707
717
|
const open = Number(workPlan.open || 0);
|
|
708
718
|
const completed = Number(workPlan.completed || 0);
|
|
709
719
|
const pathText = normalizeString(workPlan.path) || WORK_PLAN_RELATIVE_PATH;
|
|
720
|
+
if (workPlan.detailSuppressed || workPlan.truncated) {
|
|
721
|
+
return `Plan: ${open} open / ${completed} done in recent ${pathText} window. Current/next items suppressed because the plan file is large.`;
|
|
722
|
+
}
|
|
710
723
|
const currentSection = normalizeString(workPlan.currentSection);
|
|
711
724
|
const currentText = currentSection ? ` Current: ${currentSection}.` : "";
|
|
712
725
|
const recentOpen = Array.isArray(workPlan.recentOpen) ? workPlan.recentOpen : [];
|