From 6c6b9ec01b3ea88814c05ef804987e21e44f7f72 Mon Sep 17 00:00:00 2001 From: lesetong Date: Mon, 24 Aug 2026 10:27:00 +0800 Subject: [PATCH] Hide completed progress in Herdr --- README.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- src/herdr.ts | 2 +- tests/ui.test.ts | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7e9f4c7..be0296d 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ Tool calls remain compact in the conversation. Expand a tool result with Pi's no ## Herdr Integration -When Pi runs inside Herdr, the extension reports the most specific `in-progress` task as a `task` pane metadata token. If nothing is in progress, it falls back to a blocked task. Parallel current tasks use a separate `task_count` token so Herdr can truncate long task names responsively while keeping the remaining count visible, for example `#7 Implement auth · +2`. The `task_progress` token reports aggregate completion as `done/total`, including `N/N` when all tasks are complete. +When Pi runs inside Herdr, the extension reports the most specific `in-progress` task as a `task` pane metadata token. If nothing is in progress, it falls back to a blocked task. Parallel current tasks use a separate `task_count` token so Herdr can truncate long task names responsively while keeping the remaining count visible, for example `#7 Implement auth · +2`. The `task_progress` token reports aggregate completion as `done/total` while tasks remain unfinished and is omitted once all tasks are complete. Add `$task`, `$task_count`, and `$task_progress` to the Herdr agent sidebar in `~/.config/herdr/config.toml`: diff --git a/package-lock.json b/package-lock.json index 18578f7..cbeca6b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pi-todo-herdr", - "version": "0.2.1", + "version": "0.2.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pi-todo-herdr", - "version": "0.2.1", + "version": "0.2.5", "license": "MIT", "devDependencies": { "@earendil-works/pi-ai": "^0.81.1", diff --git a/package.json b/package.json index 3822331..905d050 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pi-todo-herdr", - "version": "0.2.4", + "version": "0.2.5", "description": "Hierarchical task tools for Pi with a live widget and Herdr sidebar integration.", "type": "module", "main": "./index.ts", diff --git a/src/herdr.ts b/src/herdr.ts index c9a6259..3ce0e7e 100644 --- a/src/herdr.ts +++ b/src/herdr.ts @@ -40,7 +40,7 @@ export function currentTaskTokens(tasks: Task[]): Record return { [TASK_TOKEN]: candidates.length > 0 ? `#${candidates[0]!.id} ${candidates[0]!.name}` : null, [COUNT_TOKEN]: candidates.length > 1 ? `+${candidates.length - 1}` : null, - [PROGRESS_TOKEN]: stats.total > 0 ? `${stats.done}/${stats.total}` : null, + [PROGRESS_TOKEN]: stats.total > 0 && stats.done < stats.total ? `${stats.done}/${stats.total}` : null, }; } diff --git a/tests/ui.test.ts b/tests/ui.test.ts index 92b8951..4b80f4d 100644 --- a/tests/ui.test.ts +++ b/tests/ui.test.ts @@ -197,7 +197,7 @@ test("uses blocked tasks only when nothing is in progress", () => { assert.deepEqual(currentTaskTokens(state.list()), { task: null, task_count: null, - task_progress: "2/2", + task_progress: null, }); });