Hide completed progress in Herdr

This commit is contained in:
lesetong
2026-08-24 10:27:00 +08:00
parent 98f3904189
commit 6c6b9ec01b
5 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -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`:
+2 -2
View File
@@ -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",
+1 -1
View File
@@ -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",
+1 -1
View File
@@ -40,7 +40,7 @@ export function currentTaskTokens(tasks: Task[]): Record<string, string | null>
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,
};
}
+1 -1
View File
@@ -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,
});
});