@henryqw/pi-footer 5.0.0 → 5.1.0
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 +34 -18
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# `@henryqw/pi-footer`
|
|
2
2
|
|
|
3
|
-
Keep footer identity, model usage, agent-work time, and extension status visible while you work in Pi. Use `/open` to open the current working directory
|
|
3
|
+
Keep footer identity, model usage, agent-work time, and extension status visible while you work in Pi. Use `/open` to open the current working directory with VS Code or another configured command. You can enable the footer and the open commands independently.
|
|
4
4
|
|
|
5
5
|

|
|
6
6
|
|
|
@@ -10,16 +10,14 @@ Keep footer identity, model usage, agent-work time, and extension status visible
|
|
|
10
10
|
pi install npm:@henryqw/pi-footer
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
This package
|
|
14
|
-
|
|
15
|
-
Version 3 replaces `@henryqw/pi-open-in`. If it is installed, remove it before you upgrade. This prevents duplicate `/open` and `/set-open-in` commands:
|
|
13
|
+
This package replaces `@henryqw/pi-open-in`. If it is installed, remove it before you upgrade. This prevents duplicate `/open` and `/set-open-in` commands:
|
|
16
14
|
|
|
17
15
|
```bash
|
|
18
16
|
pi remove npm:@henryqw/pi-open-in
|
|
19
17
|
pi install npm:@henryqw/pi-footer
|
|
20
18
|
```
|
|
21
19
|
|
|
22
|
-
For project-local
|
|
20
|
+
For project-local installations, use `--local` on both commands. Also remove manually configured paths to the old package. Then restart Pi. The existing open command configuration stays at `config/pi-open-in/config.json`. Do not move it.
|
|
23
21
|
|
|
24
22
|
Both entry points load by default. To use `/open` without the custom footer, use Pi's native package resource filter in `settings.json`:
|
|
25
23
|
|
|
@@ -47,7 +45,7 @@ To use only the footer, select `extensions/footer.ts` instead. You can also use
|
|
|
47
45
|
|
|
48
46
|
## Use
|
|
49
47
|
|
|
50
|
-
After installation, start a Pi TUI session. The footer shows
|
|
48
|
+
After installation, start a Pi TUI session. The footer shows footer identity, usage, model, thinking, and extension statuses. Run `/open` to open the current working directory in VS Code by default. `/open` also works while the agent is busy.
|
|
51
49
|
|
|
52
50
|
| Surface | Type | Purpose |
|
|
53
51
|
| --- | --- | --- |
|
|
@@ -63,9 +61,19 @@ pi-harness · clear-field-f8d2 [+2 ~3 ?1 ↑2] · PR #123 · approved Codex #
|
|
|
63
61
|
✓ CG · ● 🐴 ponytail: ⚡ FULL ◷ 12m 34s
|
|
64
62
|
```
|
|
65
63
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
### Footer lines
|
|
65
|
+
|
|
66
|
+
The first line shows the repository, branch, and Git state as footer identity, with the `pi-pr` pull request status beside it. The family status shows the non-empty `pi-multi-codex` quota status on the right. Linked-worktree branches omit the generated `worktree/` prefix.
|
|
67
|
+
|
|
68
|
+
The usage line is the second line. It shows cumulative input tokens, output tokens, latest cache-hit rate, and tokens per second for the most recent assistant response. The footer measures the rate from the first streamed content of the response to the last. This excludes request latency, time to first token, and provider work after the stream ends. Such work includes the Claude bridge shutdown of Claude Code. A response that arrives without streamed content, or all at once, shows `—`.
|
|
69
|
+
|
|
70
|
+
The usage line also shows estimated cost and context usage. Totals include reported tool usage and finished `pi-subagent` background workflows. The active model and thinking level align to the right. With a virtual model, an arrow precedes the physical model and thinking level from the latest successful response. For example: `auto • high → gpt-5.6-luna • medium`. This matches Pi's built-in footer.
|
|
71
|
+
|
|
72
|
+
The third line shows CodeGraph's icon and `CG` first. It shows `✓ CG` with an index, or `○ CG` when a Git repository has no index. During setup, it shows a dim spinner and elapsed time, such as `⠋ CG · indexing 8s`. Non-Git directories show no index badge. Other extension statuses follow, such as `⠋ deps · installing 12s`. Dependency preparation statuses disappear when work completes.
|
|
73
|
+
|
|
74
|
+
Persistent CodeGraph failures keep their theme-colored `!` icon and meaningful text. During direct `codegraph_explore` calls, `● CG` temporarily replaces the CodeGraph status. The status returns when the call finishes. A middle dot separates statuses. Cumulative agent-work time stays on the right, below the active model.
|
|
75
|
+
|
|
76
|
+
### Git state
|
|
69
77
|
|
|
70
78
|
Git badges appear only when action is needed:
|
|
71
79
|
|
|
@@ -90,20 +98,24 @@ Unavailable values render as `—` without a misleading percent sign.
|
|
|
90
98
|
|
|
91
99
|
`ultra` renders as a rainbow when the active Pi runtime supplies that thinking level. Unsupported levels never appear.
|
|
92
100
|
|
|
93
|
-
Only the non-empty `pi-multi-codex` quota status occupies the right side of the first line. The `pi-pr` pull-request status stays beside footer identity
|
|
101
|
+
Only the non-empty `pi-multi-codex` quota status occupies the right side of the first line. The `pi-pr` pull-request status stays beside footer identity. CodeGraph index status, setup progress, or tool activity appears separately on the third line.
|
|
102
|
+
|
|
103
|
+
Statuses from other extensions, including Ponytail and `pi-rewind`, share the left side of the third line. The footer sorts these statuses by key. It preserves colors, links, glyphs, and interior spacing. It removes leading and trailing whitespace and changes line breaks to spaces. It can shorten long statuses to fit the footer.
|
|
94
104
|
|
|
95
|
-
|
|
105
|
+
Only direct `codegraph_explore` tool calls trigger the `● CG` badge. The footer does not show CodeGraph queries from inside scripted tools.
|
|
96
106
|
|
|
97
107
|
## Config
|
|
98
108
|
|
|
99
|
-
Package-owned: `~/.pi/agent/config/pi-footer/config.json` for footer
|
|
109
|
+
Package-owned: `~/.pi/agent/config/pi-footer/config.json` for footer color configuration and `~/.pi/agent/config/pi-open-in/config.json` for open command configuration. Both paths are under `getAgentDir()` when you override it. The retained `pi-open-in` home belongs to the open commands now supplied with this package.
|
|
100
110
|
|
|
101
111
|
| Name | Description | Values | Default |
|
|
102
112
|
| --- | --- | --- | --- |
|
|
103
113
|
| `colors` | Colors for footer-owned text by role. | Object that maps color roles to theme tokens, `#RGB`, `#RRGGBB`, `oklch(...)`, `okhsl(...)`, or an ANSI index from `0` to `255`. | Built-in colors. |
|
|
104
114
|
| `command` | Command that `/open` runs. | Non-empty string. | `"code"` |
|
|
105
115
|
|
|
106
|
-
The footer reads `colors` once
|
|
116
|
+
The footer reads `colors` once at session start. Run `/reload` after you edit it. The footer never rewrites the file. A missing file or a missing role keeps the built-in color.
|
|
117
|
+
|
|
118
|
+
At each session start, the footer warns about unknown keys, unknown roles, and invalid colors. The warning gives the path and the reason. Only the invalid role uses its built-in color. The other roles keep their configured colors. A malformed file uses the built-in colors for all roles.
|
|
107
119
|
|
|
108
120
|
### Footer color roles
|
|
109
121
|
|
|
@@ -140,11 +152,13 @@ Every role is optional:
|
|
|
140
152
|
}
|
|
141
153
|
```
|
|
142
154
|
|
|
143
|
-
Theme tokens are `accent`, `dim`, `muted`, `text`, `success`, `warning`, `error`, and `thinkingText`. Thinking levels keep their built-in gradient
|
|
155
|
+
Theme tokens are `accent`, `dim`, `muted`, `text`, `success`, `warning`, `error`, and `thinkingText`. Thinking levels keep their built-in gradient. Statuses from other extensions keep the colors from those extensions. The `colors` object controls neither.
|
|
144
156
|
|
|
145
157
|
### Open command
|
|
146
158
|
|
|
147
|
-
A missing file silently uses the default command, `code`. An invalid existing file shows a warning and uses `code`. The file stays unchanged. See Limits and recovery.
|
|
159
|
+
A missing file silently uses the default command, `code`. An invalid existing file shows a warning and uses `code`. The file stays unchanged. See Limits and recovery.
|
|
160
|
+
|
|
161
|
+
`/open` reads the config on every run. Only `/set-open-in` writes the file, atomically. Reads do not create or write the config home.
|
|
148
162
|
|
|
149
163
|
## API
|
|
150
164
|
|
|
@@ -166,7 +180,7 @@ These exports are for package consumers. The commands in Use are the Pi interfac
|
|
|
166
180
|
| `loadOpenInConfig(agentDir?)` | function | Reads and validates the owner config. |
|
|
167
181
|
| `configuredOpenUri(path)` | function | Returns a safe VS Code URI for a supported command. |
|
|
168
182
|
|
|
169
|
-
`loadOpenInConfig` returns a `@henryqw/pi-config-store` `ConfigLoad` result: `status`, `source` (`"missing"` or `"file"`), `issues`, and, when `status` is `"ok"`, `value`. `value.command
|
|
183
|
+
`loadOpenInConfig` returns a `@henryqw/pi-config-store` `ConfigLoad` result: `status`, `source` (`"missing"` or `"file"`), `issues`, and, when `status` is `"ok"`, `value`. The function validates `value.command`. An invalid `command` gives `"code"` and an issue. The function does not show issues. Pass an agent directory when needed.
|
|
170
184
|
|
|
171
185
|
`configuredOpenUri(path)` works when the executable is `code`. With `code -n` or `code --new-window`, it adds `windowId=_blank` so the link opens in a new window. It returns `undefined` for other commands. An invalid config uses `code`. The function never shows a notification, because the footer calls it on each render. `@henryqw/pi-config-store` owns the config home and storage.
|
|
172
186
|
|
|
@@ -174,10 +188,12 @@ These exports are for package consumers. The commands in Use are the Pi interfac
|
|
|
174
188
|
|
|
175
189
|
The open command splits on whitespace into an executable and arguments. Tokens cannot contain spaces, and quoting is unsupported. Use a wrapper script for executables in paths that contain spaces.
|
|
176
190
|
|
|
177
|
-
An existing config file must be a JSON object with one non-empty string `command` property. An unknown key, an invalid `command`, or a malformed file shows a warning at session start, or at the next `/open`. The warning also shows when only the footer is active, because the footer link uses this config. Each issue shows one time in each session,
|
|
191
|
+
An existing config file must be a JSON object with one non-empty string `command` property. An unknown key, an invalid `command`, or a malformed file shows a warning at session start, or at the next `/open`. The warning also shows when only the footer is active, because the footer link uses this config. Each issue shows one time in each session, even when the footer and `/open` are both active. The footer never shows a warning while it renders.
|
|
192
|
+
|
|
193
|
+
For these config problems, `/open` and the footer link use `code`, and the file stays unchanged. Fix the file or run `/set-open-in <command>` to replace it. `/set-open-in` first shows each new problem in the file that it replaces. If the configured command exits with an error, Pi reports its error output or exit code. Fix the command. Then run `/open` again.
|
|
178
194
|
|
|
179
195
|
When the configured executable is `code` and Pi reports hyperlink support, the accent-colored checkout name links to the current path. The link opens a new window for `code -n` or `code --new-window`. A missing config silently uses `code`. Other executables and terminals with hyperlinks disabled render plain text.
|
|
180
196
|
|
|
181
|
-
Pi handles the custom URI in its default fullscreen TUI. Use normal primary click. Regular TUI (`"tuiMode": "regular"` or `--tui-mode regular`)
|
|
197
|
+
Pi handles the custom URI in its default fullscreen TUI. Use normal primary click. Regular TUI (`"tuiMode": "regular"` or `--tui-mode regular`) uses the terminal to activate OSC 8 links. The link works only where the terminal opens custom URI schemes.
|
|
182
198
|
|
|
183
199
|
Ghostty uses `Cmd+click`, but it possibly does not open custom URI schemes.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@henryqw/pi-footer",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "Show repository and usage details in the Pi footer and open the current working directory.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"pack:check": "npm pack --dry-run"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@earendil-works/pi-coding-agent": "^1.
|
|
32
|
-
"@earendil-works/pi-tui": "^1.
|
|
31
|
+
"@earendil-works/pi-coding-agent": "^1.3.0",
|
|
32
|
+
"@earendil-works/pi-tui": "^1.3.0"
|
|
33
33
|
},
|
|
34
34
|
"repository": {
|
|
35
35
|
"type": "git",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@henryqw/pi-config-store": "^4.0.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@earendil-works/pi-coding-agent": "1.
|
|
57
|
-
"@earendil-works/pi-tui": "1.
|
|
56
|
+
"@earendil-works/pi-coding-agent": "1.3.0",
|
|
57
|
+
"@earendil-works/pi-tui": "1.3.0"
|
|
58
58
|
}
|
|
59
59
|
}
|