@henryqw/pi-footer 5.0.0 → 5.0.1
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 +33 -15
- package/package.json +1 -1
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
|
|
|
@@ -19,7 +19,7 @@ pi remove npm:@henryqw/pi-open-in
|
|
|
19
19
|
pi install npm:@henryqw/pi-footer
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
For project-local
|
|
22
|
+
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
23
|
|
|
24
24
|
Both entry points load by default. To use `/open` without the custom footer, use Pi's native package resource filter in `settings.json`:
|
|
25
25
|
|
|
@@ -47,7 +47,7 @@ To use only the footer, select `extensions/footer.ts` instead. You can also use
|
|
|
47
47
|
|
|
48
48
|
## Use
|
|
49
49
|
|
|
50
|
-
After installation, start a Pi TUI session. The footer shows
|
|
50
|
+
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
51
|
|
|
52
52
|
| Surface | Type | Purpose |
|
|
53
53
|
| --- | --- | --- |
|
|
@@ -63,9 +63,19 @@ pi-harness · clear-field-f8d2 [+2 ~3 ?1 ↑2] · PR #123 · approved Codex #
|
|
|
63
63
|
✓ CG · ● 🐴 ponytail: ⚡ FULL ◷ 12m 34s
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
### Footer lines
|
|
67
|
+
|
|
68
|
+
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.
|
|
69
|
+
|
|
70
|
+
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 `—`.
|
|
71
|
+
|
|
72
|
+
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.
|
|
73
|
+
|
|
74
|
+
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.
|
|
75
|
+
|
|
76
|
+
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.
|
|
77
|
+
|
|
78
|
+
### Git state
|
|
69
79
|
|
|
70
80
|
Git badges appear only when action is needed:
|
|
71
81
|
|
|
@@ -90,20 +100,24 @@ Unavailable values render as `—` without a misleading percent sign.
|
|
|
90
100
|
|
|
91
101
|
`ultra` renders as a rainbow when the active Pi runtime supplies that thinking level. Unsupported levels never appear.
|
|
92
102
|
|
|
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
|
|
103
|
+
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.
|
|
104
|
+
|
|
105
|
+
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
106
|
|
|
95
|
-
|
|
107
|
+
Only direct `codegraph_explore` tool calls trigger the `● CG` badge. The footer does not show CodeGraph queries from inside scripted tools.
|
|
96
108
|
|
|
97
109
|
## Config
|
|
98
110
|
|
|
99
|
-
Package-owned: `~/.pi/agent/config/pi-footer/config.json` for footer
|
|
111
|
+
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
112
|
|
|
101
113
|
| Name | Description | Values | Default |
|
|
102
114
|
| --- | --- | --- | --- |
|
|
103
115
|
| `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
116
|
| `command` | Command that `/open` runs. | Non-empty string. | `"code"` |
|
|
105
117
|
|
|
106
|
-
The footer reads `colors` once
|
|
118
|
+
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.
|
|
119
|
+
|
|
120
|
+
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
121
|
|
|
108
122
|
### Footer color roles
|
|
109
123
|
|
|
@@ -140,11 +154,13 @@ Every role is optional:
|
|
|
140
154
|
}
|
|
141
155
|
```
|
|
142
156
|
|
|
143
|
-
Theme tokens are `accent`, `dim`, `muted`, `text`, `success`, `warning`, `error`, and `thinkingText`. Thinking levels keep their built-in gradient
|
|
157
|
+
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
158
|
|
|
145
159
|
### Open command
|
|
146
160
|
|
|
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.
|
|
161
|
+
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.
|
|
162
|
+
|
|
163
|
+
`/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
164
|
|
|
149
165
|
## API
|
|
150
166
|
|
|
@@ -166,7 +182,7 @@ These exports are for package consumers. The commands in Use are the Pi interfac
|
|
|
166
182
|
| `loadOpenInConfig(agentDir?)` | function | Reads and validates the owner config. |
|
|
167
183
|
| `configuredOpenUri(path)` | function | Returns a safe VS Code URI for a supported command. |
|
|
168
184
|
|
|
169
|
-
`loadOpenInConfig` returns a `@henryqw/pi-config-store` `ConfigLoad` result: `status`, `source` (`"missing"` or `"file"`), `issues`, and, when `status` is `"ok"`, `value`. `value.command
|
|
185
|
+
`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
186
|
|
|
171
187
|
`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
188
|
|
|
@@ -174,10 +190,12 @@ These exports are for package consumers. The commands in Use are the Pi interfac
|
|
|
174
190
|
|
|
175
191
|
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
192
|
|
|
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,
|
|
193
|
+
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.
|
|
194
|
+
|
|
195
|
+
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
196
|
|
|
179
197
|
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
198
|
|
|
181
|
-
Pi handles the custom URI in its default fullscreen TUI. Use normal primary click. Regular TUI (`"tuiMode": "regular"` or `--tui-mode regular`)
|
|
199
|
+
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
200
|
|
|
183
201
|
Ghostty uses `Cmd+click`, but it possibly does not open custom URI schemes.
|