pi-bar 0.3.30 → 0.3.31

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/README.md CHANGED
@@ -3,23 +3,23 @@
3
3
  [![npm version](https://img.shields.io/npm/v/pi-bar.svg)](https://www.npmjs.com/package/pi-bar)
4
4
  [![npm downloads](https://img.shields.io/npm/dm/pi-bar.svg)](https://www.npmjs.com/package/pi-bar)
5
5
 
6
- **Never accidentally run Opus on a typo again.** pi-bar keeps your model, thinking level, context pressure, extension status, and a live one-line progress update visible in pi's footer.
6
+ **Never accidentally run Opus on a typo again.** pi-bar keeps your model, thinking level, context pressure, a live progress update, and any extension statuses visible in pi's footer.
7
7
 
8
8
  ```text
9
- claude-opus-4.7 ❯ think:med ❯ 2.6% / 1.0M ❯ Inspecting package structure ❯ plan:active
9
+ claude-opus-4.7 ❯ think:med ❯ 2.6% / 1.0M ❯ Reviewing package structure ❯ plan:active
10
10
  ```
11
11
 
12
- ![pi-bar with low context usage](https://cdn.jsdelivr.net/npm/pi-bar@0.3.30/assets/screenshot-green.png)
13
- ![pi-bar with medium context usage](https://cdn.jsdelivr.net/npm/pi-bar@0.3.30/assets/screenshot-yellow.png)
14
- ![pi-bar with high context usage](https://cdn.jsdelivr.net/npm/pi-bar@0.3.30/assets/screenshot-red.png)
12
+ ![pi-bar with low context usage](https://cdn.jsdelivr.net/npm/pi-bar@0.3.31/assets/screenshot-green.png)
13
+ ![pi-bar with medium context usage](https://cdn.jsdelivr.net/npm/pi-bar@0.3.31/assets/screenshot-yellow.png)
14
+ ![pi-bar with high context usage](https://cdn.jsdelivr.net/npm/pi-bar@0.3.31/assets/screenshot-red.png)
15
15
 
16
16
  ## Why use it?
17
17
 
18
18
  - **See the active model at a glance** — catch accidental model switches before an expensive or sensitive task starts.
19
19
  - **Track thinking level in place** — immediately notice when you are using the wrong reasoning setting.
20
20
  - **Watch context pressure early** — context usage turns green, yellow, then red as you approach the limit.
21
- - **Follow what pi is doing** — a live progress update keeps the current task visible without scrolling.
22
- - **Keep extension statuses visible** — statuses set with `ctx.ui.setStatus()` still appear in the custom footer.
21
+ - **Follow what pi is doing** — a one-line progress update keeps the current task visible without scrolling.
22
+ - **Keep extension statuses visible** — statuses other extensions set still appear in the footer.
23
23
 
24
24
  pi-bar is intentionally tiny: one small extension, no broad behavior changes, and no commands to learn. It replaces pi's built-in footer with a compact model / thinking / context / progress / extension-status line.
25
25
 
@@ -46,34 +46,31 @@ PI_BAR_SHOW=model,thinking,context,progress,extensions pi
46
46
  PI_BAR_SHOW=model,context pi
47
47
  ```
48
48
 
49
- Allowed segments are `model`, `thinking`, `context`, `progress`, and `extensions`. The `progress` segment is hidden until pi-bar generates a current update. The `extensions` segment is hidden when no extension has set a status.
50
-
51
- > The legacy `tldr` segment name and `PI_BAR_TLDR_MODEL` / `bar.tldrModel` settings still work and are kept as aliases for existing configs.
49
+ Allowed segments are `model`, `thinking`, `context`, `progress`, and `extensions`. The `progress` segment stays hidden until pi-bar has a current update. The `extensions` segment stays hidden when no extension has set a status.
52
50
 
53
51
  ### Configure live progress updates
54
52
 
55
- pi-bar shows a concise live progress update of the current task in the footer. It generates updates from recent prompt, assistant, and deterministic code-compressed tool facts (for example `bash ... ok`, `grep ... 4 matches`, `read file`, or `custom_tool key=value ok`). It resets when you navigate the session tree so stale summaries do not follow you across branches. Set `PI_BAR_SHOW` without `progress` to hide it.
53
+ pi-bar shows a short, plain-English description of what pi is working on right now. It refreshes as pi works and resets when you switch branches in the session tree, so stale updates never follow you across tasks. Set `PI_BAR_SHOW` without `progress` to hide it.
56
54
 
57
- Override the progress update model with:
55
+ Pick a specific model for the update by setting the env var or pi settings:
58
56
 
59
57
  ```bash
60
58
  PI_BAR_PROGRESS_MODEL=anthropic/claude-haiku-4-5 pi
61
59
  ```
62
60
 
63
- You can also set `bar.progressModel` in pi settings.
61
+ Or in pi settings: `bar.progressModel`. Otherwise pi-bar picks a fast model you are already authenticated with.
64
62
 
65
63
  ### Configure extension statuses
66
64
 
67
- pi-bar shows statuses set by other extensions with `ctx.ui.setStatus()`.
68
- Use `/bar` inside pi to open an interactive status-visibility picker.
65
+ Other pi extensions can publish small status badges. Pi-bar collects them into the `extensions` segment. Run `/bar` inside pi to pick which ones to show:
69
66
 
70
67
  ```text
71
68
  /bar
72
69
  ```
73
70
 
74
- Toggle each status key between `shown` and `hidden`. The `New statuses` row controls whether status keys discovered later are shown or hidden by default.
71
+ Toggle each status between `shown` and `hidden`. The `New statuses` row controls the default for badges that appear later.
75
72
 
76
- Status filter choices persist globally across pi sessions. Set `PI_BAR_CONFIG=/path/to/config.json` before launching pi to override the default config path (`~/.pi/agent/pi-bar.json`). Advanced command forms like `/bar status hide <key>` still work for scripting.
73
+ Your choices persist across pi sessions in `~/.pi/agent/pi-bar.json`. Override the path with `PI_BAR_CONFIG=/some/path.json`.
77
74
 
78
75
  ### Change context thresholds
79
76
 
@@ -92,4 +89,4 @@ The first number is the warning/yellow threshold. The second number is the dange
92
89
 
93
90
  Pi extensions run with your local user permissions. Review any pi package source before installing it.
94
91
 
95
- Live progress update generation sends short activity snippets to the selected provider. Disable the `progress` segment with `PI_BAR_SHOW` if that is unacceptable.
92
+ Progress updates send short snippets of your session activity to the selected model provider. Disable the `progress` segment with `PI_BAR_SHOW` if that is not acceptable.
@@ -1,18 +1,20 @@
1
1
  /**
2
- * pi-bar — footer/statusline extension.
2
+ * pi-bar — footer / statusline extension.
3
3
  *
4
- * Replaces the built-in footer with left-aligned segments:
5
- * <model name> ❯ think:<level> ❯ <context% / window> ❯ <progress> ❯ <extension statuses>
4
+ * Replaces pi's built-in footer with left-aligned segments:
5
+ * <model> ❯ think:<level> ❯ <context% / window> ❯ <progress> ❯ <extensions>
6
6
  *
7
- * Examples:
8
- * claude-opus-4.7 ❯ think:med ❯ 2.6% / 1.0M
7
+ * Example:
8
+ * claude-opus-4.7 ❯ think:med ❯ 2.6% / 1.0M ❯ Reviewing package structure
9
9
  *
10
- * Re-renders on model change, thinking-level change, status updates,
11
- * and after each assistant turn so context usage stays current.
10
+ * Re-renders on model change, thinking-level change, status updates, and after
11
+ * each assistant turn so context usage stays current.
12
12
  *
13
- * Configuration env vars:
14
- * PI_BAR_SHOW=model,thinking,context,progress,extensions
15
- * PI_BAR_THRESHOLDS=70,90
13
+ * Environment variables:
14
+ * PI_BAR_SHOW comma-separated list of segments to show
15
+ * PI_BAR_THRESHOLDS warning,danger context-usage percentages
16
+ * PI_BAR_PROGRESS_MODEL provider/id for the progress update model
17
+ * PI_BAR_CONFIG override the persisted status-filter config path
16
18
  */
17
19
 
18
20
  import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-bar",
3
- "version": "0.3.30",
3
+ "version": "0.3.31",
4
4
  "description": "Pi footer/statusline showing active model, thinking level, context pressure, live progress updates, and extension statuses.",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -52,6 +52,6 @@
52
52
  "extensions": [
53
53
  "./extensions/status-footer.ts"
54
54
  ],
55
- "image": "https://cdn.jsdelivr.net/npm/pi-bar@0.3.30/assets/screenshot-yellow.png"
55
+ "image": "https://cdn.jsdelivr.net/npm/pi-bar@0.3.31/assets/screenshot-yellow.png"
56
56
  }
57
57
  }