From bd1eb9ef9b3b89ff5825eb8bf9b2e978167c9ad0 Mon Sep 17 00:00:00 2001 From: Igor Soarez Date: Tue, 3 Nov 2026 13:05:57 +0200 Subject: show each pi agent's context use: a meter in the panel and search, text in the menu --- README.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 4b1eeb2..5a2a941 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,8 @@ than a poll is still a completion. - **What agents cost** (pi): the menu's top line totals what pi agents spent today, this week, and this month (`$8.86 today · $457 this week · $8.86 this month`); each agent's line adds what its session spent today - (menu, panel, search), and `dingger status` shows both. Periods start at + (at the right edge in the panel and search, after the place in the + menu), and `dingger status` shows both. Periods start at 00:00 UTC (a week on Monday, a month on its 1st). The daemon reads pi's session files (`~/.pi/agent/sessions`, and those of running agents elsewhere) in a thread of its own every 15 seconds, only what was @@ -133,6 +134,15 @@ than a poll is still a completion. here, $1,024 of $2,991). The totals include agents since closed or started over. Amounts are what pi prices each reply at (its model configuration); Claude Code records no prices, so it is not counted. +- **Context use** (pi): how full each agent's context window is, the + number pi's own footer shows. The panel and search draw it as a small + meter at the right edge, after the cost (gray; yellow above 70% and red + above 90%, as in pi; the number on hover); the menu adds it as text + (`$0.70 · 10%`), and `dingger status` has a CTX column. The extension + reports it after each message, compaction, model change, and turn; right + after compacting pi does not know it until the next reply, and neither + does dingger (no meter). Agents on an older extension show none until + they reload. - **Forgotten drafts** (pi): an agent with text left in its input box shows `✎` before its name wherever you are not looking at it (where you look, you may be typing it). Idle agents with one come first among idle agents; @@ -162,7 +172,7 @@ than a poll is still a completion. All per-pane state lives in tmux pane options (`@agent_state`, `@dingger_since`, `@dingger_hook`, `@dingger_importance`, `@dingger_extension`, `@dingger_control`, `@dingger_draft`, -`@dingger_cost`), so restarting dingger loses nothing. +`@dingger_cost`, `@dingger_context`), so restarting dingger loses nothing. ### Keeping pi agents on the current extension @@ -197,7 +207,7 @@ session as a custom entry of type `dingger-importance`. ```bash dingger watch # the daemon (run by launchd, see below) -dingger status # agents in priority order, with what they spent +dingger status # agents in priority order, with cost and context use dingger focus [--pane ID] # jump to an agent (default: the top waiter) dingger importance [LEVEL] # an agent's importance: high, normal, low dingger unread [--pane ID] # mark an idle agent unread (done again) @@ -271,7 +281,8 @@ covers identification, the extension's state and session reports, a turn, extension, restore, reloading an agent on an old extension (and refusing while busy or with a draft), drafts (reported, cleared, kept across a crash and put back by restore), cost (priced replies, counted once across -a real `pi --fork`), and exit. To try a release without installing it: +a real `pi --fork`), context use (pi's footer's number, through a +compaction), and exit. To try a release without installing it: `npm install --prefix /tmp/pi-next @earendil-works/pi-coding-agent@` (through `sfw`), then `tests/pi-live.sh /tmp/pi-next/node_modules/.bin/pi`. -- cgit v1.2.3