aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Soarez <igor@soarez.org>2026-10-27 14:25:44 +0200
committerIgor Soarez <igor@soarez.org>2026-10-27 14:25:44 +0200
commita7e065cd4f39abda178af58127ead1ab502e0f3b (patch)
tree0f74bd4dcbe8482e780dd38845af856da38f50b9
parent7455ddfcf6158ec1304d1188a9530f7973e845d5 (diff)
pi: no footer line for the importance
it took a line of its own in pi's footer. pi says the level when it is set, and /importance alone shows it; pi clears the old line at /reload.
-rw-r--r--README.md2
-rw-r--r--crates/dinggerd/assets/pi/pi-agent-state.ts8
-rwxr-xr-xtests/e2e.sh3
-rwxr-xr-xtests/pi-live.sh3
4 files changed, 8 insertions, 8 deletions
diff --git a/README.md b/README.md
index 94729e7..d9ae7de 100644
--- a/README.md
+++ b/README.md
@@ -104,7 +104,7 @@ than a poll is still a completion.
still notifies, and waits in line like any other). In pi, type
`/importance high|normal|low` (no argument: the current level); pi saves
it with the session, so it comes back after `/reload`, a restart, or a
- restore, and its footer shows a level other than normal. For other agents,
+ restore. For other agents,
run `dingger importance high|normal|low` in the agent's pane (in Claude
Code: `! dingger importance high`, which Claude may answer with a model
turn), or pass `--pane`; it lasts until the agent exits.
diff --git a/crates/dinggerd/assets/pi/pi-agent-state.ts b/crates/dinggerd/assets/pi/pi-agent-state.ts
index 0719265..fd13b55 100644
--- a/crates/dinggerd/assets/pi/pi-agent-state.ts
+++ b/crates/dinggerd/assets/pi/pi-agent-state.ts
@@ -194,8 +194,8 @@ export default function (pi) {
publishState();
});
- function showImportance(ctx: any) {
- ctx?.ui?.setStatus?.("dingger-importance", importance === "normal" ? undefined : `importance: ${importance}`);
+ // No footer status: it would take a line of its own in pi.
+ function announceImportance() {
pi.events.emit("dingger:importance", { level: importance });
}
@@ -221,7 +221,7 @@ export default function (pi) {
if (wanted !== importance) {
importance = wanted as Importance;
pi.appendEntry(importanceEntry, { level: importance });
- showImportance(ctx);
+ announceImportance();
// Without a state: the state stays as last reported.
if (enabled()) {
void report(undefined);
@@ -263,7 +263,7 @@ export default function (pi) {
updateSessionFile(ctx);
// Each session has its own: /new starts at normal, /resume brings its own back.
importance = savedImportance(ctx);
- showImportance(ctx);
+ announceImportance();
publishState(true);
});
diff --git a/tests/e2e.sh b/tests/e2e.sh
index 0da517a..4b60316 100755
--- a/tests/e2e.sh
+++ b/tests/e2e.sh
@@ -905,7 +905,7 @@ if command -v node >/dev/null; then
iext "$I2" session_start "/importance high"
expect "/importance high reaches dingger" "opt $I2 @dingger_importance" high
expect "saved in the session" "grep -c '\"customType\":\"dingger-importance\",\"data\":{\"level\":\"high\"}' $ENTRIES" 1
- expect "shown in pi's footer" "grep -c '^status dingger-importance importance: high$' $EXTLOG" 1
+ expect "no footer status in pi" "grep -c '^status' $EXTLOG" 0
expect "announced to other extensions" "grep -c '^event dingger:importance {\"level\":\"high\"}$' $EXTLOG" 1
report "$I2" "" normal
expect "imp: set back by hand" "opt $I2 @dingger_importance" ""
@@ -927,7 +927,6 @@ if command -v node >/dev/null; then
expect "an unknown level is refused" "grep -c '^notify importance is high, normal, or low$' $EXTLOG" 1
expect "levels complete" "grep '^complete' $EXTLOG" "complete high"
expect "normal reaches dingger" "opt $I2 @dingger_importance" ""
- expect "and leaves the footer" "grep -c '^status dingger-importance $' $EXTLOG" 1
fi
# --- 22. mark as unread ----------------------------------------------------
diff --git a/tests/pi-live.sh b/tests/pi-live.sh
index 9842343..059a92b 100755
--- a/tests/pi-live.sh
+++ b/tests/pi-live.sh
@@ -110,7 +110,8 @@ t send-keys -t main:agent Escape
sleep 0.5
type_line agent "/importance high"
expect "/importance high: the pane option" "t show -pv -t main:agent @dingger_importance 2>/dev/null" high 50
-expect "and pi's footer (its last line)" "t capture-pane -p -t main:agent | grep -v '^ *$' | tail -1 | sed 's/^ *//'" "importance: high" 30
+expect "pi says so" "t capture-pane -p -t main:agent | grep -c 'importance: high'" 1 30
+expect "and adds no footer line" "t capture-pane -p -t main:agent | grep -v '^ *$' | tail -1 | grep -c 'importance'" 0
expect "saved in the session file" "grep -c '\"customType\":\"dingger-importance\"' \"\$(t show -pv -t main:agent @agent_session)\"" 1 30
# Seen (what a jump does; no client is attached here), then marked unread.
t set -p -t main:agent @dingger_ack 1; "$DINGGER" poke