pi-cowboy 0.10.0 → 0.10.1
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/dist/ui/indicator.js
CHANGED
|
@@ -345,6 +345,8 @@ export class PresenceMarker {
|
|
|
345
345
|
}
|
|
346
346
|
/** Take both overlays down, and the poll with them. */
|
|
347
347
|
dispose() {
|
|
348
|
+
const hadPasture = this.drawnPasture().length > 0 &&
|
|
349
|
+
(this.cowboyHandle !== null || this.pastureHandle !== null);
|
|
348
350
|
this.disposed = true;
|
|
349
351
|
if (this.poll !== null) {
|
|
350
352
|
clearInterval(this.poll);
|
|
@@ -354,6 +356,11 @@ export class PresenceMarker {
|
|
|
354
356
|
this.cowboyHandle = null;
|
|
355
357
|
this.pastureHandle?.hide();
|
|
356
358
|
this.pastureHandle = null;
|
|
359
|
+
// A hide only asks for a differential render, and the renderer leaves
|
|
360
|
+
// emptied rows in place, so a taken-down pasture would linger on screen
|
|
361
|
+
// as stale cells. Its removal forces the full re-render that clears them.
|
|
362
|
+
if (hadPasture)
|
|
363
|
+
this.tui.requestRender(true);
|
|
357
364
|
}
|
|
358
365
|
/**
|
|
359
366
|
* The pasture to draw as the herd stands: the herd's placement while grazing
|
|
@@ -407,6 +414,9 @@ export class PresenceMarker {
|
|
|
407
414
|
const { live, ended } = this.countAgents();
|
|
408
415
|
const grazing = this.isGrazing();
|
|
409
416
|
const flipped = grazing !== this.grazing;
|
|
417
|
+
// Gated on the last turn's setting: drawnPasture() already answers to the
|
|
418
|
+
// new one, which is empty on exactly the flip this needs to catch.
|
|
419
|
+
const hadPasture = (this.grazing ?? grazing) && (this.herd?.pasture.length ?? 0) > 0;
|
|
410
420
|
if (this.herd === null ||
|
|
411
421
|
live !== this.herd.liveAgents ||
|
|
412
422
|
ended !== this.herd.endedAgents) {
|
|
@@ -426,8 +436,13 @@ export class PresenceMarker {
|
|
|
426
436
|
// With grazing off there is no pasture to draw and nothing under the cowboy
|
|
427
437
|
// to shift, so a fleet that moves the herd changes nothing on screen. Only
|
|
428
438
|
// the flip repaints, taking the pasture down or bringing it back.
|
|
429
|
-
if (grazing || flipped)
|
|
430
|
-
|
|
439
|
+
if (grazing || flipped) {
|
|
440
|
+
// Taking the pasture down empties its rows, which a differential render
|
|
441
|
+
// leaves in place — so its removal forces the full re-render that
|
|
442
|
+
// clears them.
|
|
443
|
+
const gone = hadPasture && this.drawnPasture().length === 0;
|
|
444
|
+
this.tui.requestRender(gone);
|
|
445
|
+
}
|
|
431
446
|
}
|
|
432
447
|
/** The herd a fleet feeds, reconciled from the herd the marker is holding. */
|
|
433
448
|
place({ live, ended }) {
|
|
@@ -275,7 +275,7 @@ export async function showAgentStatusMenu(ctx) {
|
|
|
275
275
|
ctx.ui.notify("No agents have been spawned this session", "info");
|
|
276
276
|
return;
|
|
277
277
|
}
|
|
278
|
-
// Active work is never cleaned up
|
|
278
|
+
// Active work is never cleaned up
|
|
279
279
|
const activeAgents = agents.filter((r) => isActivePhase(r.lifecycle.phase));
|
|
280
280
|
const finished = agents.filter((r) => !isActivePhase(r.lifecycle.phase));
|
|
281
281
|
const completed = agents.filter((r) => hasOutcome(r.lifecycle) && r.lifecycle.status === "completed");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-cowboy",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"packageManager": "pnpm@12.9.1",
|
|
6
6
|
"description": "Agent orchestrator for pi: can manage Codex, Claude Code, OpenCode, pi, pig and pi-bolt as subagents. Runs subagents in background Herdr panes, isolated in copy-on-write Git worktrees.",
|