@narumitw/pi-goal 0.4.3 → 0.6.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/README.md +6 -6
- package/package.json +2 -2
- package/src/goal.ts +6 -6
package/README.md
CHANGED
|
@@ -69,13 +69,13 @@ Older versions wrote unfinished goals to `~/.pi/agent/pi-goal-state.json` keyed
|
|
|
69
69
|
|
|
70
70
|
## 📊 Statusline states
|
|
71
71
|
|
|
72
|
-
`pi-goal` writes compact status strings for statusline extensions:
|
|
72
|
+
`pi-goal` writes compact plain status strings for statusline extensions. `@narumitw/pi-statusline` adds the default `🎯` icon unless configured otherwise:
|
|
73
73
|
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
74
|
+
- `active 3m` — an active goal without a token budget.
|
|
75
|
+
- `active 18k/100k` — an active goal with token usage and budget.
|
|
76
|
+
- `paused` — auto-continuation is paused.
|
|
77
|
+
- `budget 100k/100k` — the token budget was reached; auto-continuation stops.
|
|
78
|
+
- `complete` — shown briefly after `goal_complete` succeeds.
|
|
79
79
|
|
|
80
80
|
## ✅ How completion works
|
|
81
81
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@narumitw/pi-goal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Pi extension that keeps working on a /goal until the agent marks it complete.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@biomejs/biome": "2.4.14",
|
|
35
|
-
"@earendil-works/pi-coding-agent": "0.
|
|
35
|
+
"@earendil-works/pi-coding-agent": "0.79.8",
|
|
36
36
|
"typescript": "6.0.3"
|
|
37
37
|
},
|
|
38
38
|
"repository": {
|
package/src/goal.ts
CHANGED
|
@@ -527,11 +527,11 @@ function updateStatus(ctx: StatusContext, goal: ActiveGoal) {
|
|
|
527
527
|
|
|
528
528
|
export function formatStatus(goal: ActiveGoal | undefined) {
|
|
529
529
|
if (!goal) return undefined;
|
|
530
|
-
if (goal.status === "complete") return "
|
|
531
|
-
if (goal.status === "paused") return "
|
|
532
|
-
if (goal.status === "budget_limited") return
|
|
533
|
-
if (goal.tokenBudget !== undefined) return
|
|
534
|
-
return
|
|
530
|
+
if (goal.status === "complete") return "complete";
|
|
531
|
+
if (goal.status === "paused") return "paused";
|
|
532
|
+
if (goal.status === "budget_limited") return `budget ${formatBudget(goal)}`;
|
|
533
|
+
if (goal.tokenBudget !== undefined) return `active ${formatBudget(goal)}`;
|
|
534
|
+
return `active ${formatDuration(goal.timeUsedSeconds)}`;
|
|
535
535
|
}
|
|
536
536
|
|
|
537
537
|
function formatBudget(goal: ActiveGoal) {
|
|
@@ -731,7 +731,7 @@ function clearActiveGoal(ctx: StatusContext) {
|
|
|
731
731
|
|
|
732
732
|
function showCompletionStatus(ctx: StatusContext) {
|
|
733
733
|
clearCompletionStatusTimer();
|
|
734
|
-
ctx.ui.setStatus(STATUS_KEY, "
|
|
734
|
+
ctx.ui.setStatus(STATUS_KEY, "complete");
|
|
735
735
|
completionStatusTimer = setTimeout(() => {
|
|
736
736
|
completionStatusTimer = undefined;
|
|
737
737
|
try {
|