@lune_99/pi-dock 0.1.0 → 0.2.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/CHANGELOG.md +37 -0
- package/README.md +18 -18
- package/docs/dock-overview.png +0 -0
- package/docs/dock-overview.svg +2 -2
- package/docs/dock-styles.png +0 -0
- package/docs/dock-styles.svg +8 -8
- package/docs/reference.md +80 -49
- package/package.json +4 -4
- package/src/dock-controller.ts +24 -2
- package/src/dock-footer.ts +85 -24
- package/src/dock-panel.ts +3 -1
- package/src/dock-renderer.ts +38 -24
- package/src/dock-status.ts +272 -85
- package/src/index.ts +9 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.2.0] - 2026-11-28
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **Response token speed beside the model.** A `tok/s` segment shows the latest measured response's output tokens divided by Pi's measured response duration, dimmed after completion. Only positive, finite measurements are used; no live rate is estimated. Narrow terminals hide the entire segment before truncating the model, without changing the statistics row.
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- **The info row keeps every statistic in place.** Each statistic keeps its own columns whether or
|
|
14
|
+
not it has data, so bars and labels no longer move when tokens, cache or cost first arrive, and
|
|
15
|
+
the divider before the dock row's model follows the info row's bars. Cache writes have their own
|
|
16
|
+
slot on the far left, so providers that never report them leave only blank space there. All
|
|
17
|
+
statistics now need 120 columns instead of 117.
|
|
18
|
+
- **The info row keeps the cache hit rate the longest.** Tokens and cost now give way before
|
|
19
|
+
`CH`, so a shrinking row keeps the hit rate beside context use and `(auto)` once cost is gone.
|
|
20
|
+
The drop order is cache writes, cache reads, tokens, cost, hit rate and `(auto)`; the hit-rate
|
|
21
|
+
slot survives down to 80 columns instead of 104, and cost down to 90 instead of 79.
|
|
22
|
+
- **The speed segment uses the thinking level's bullet.** `model • max • 48.2 tok/s` replaces the
|
|
23
|
+
mixed `·` and `•` separators in the model segment.
|
|
24
|
+
- **Clearer Dock selection.** The focus arrow sits beside the selected module, with a
|
|
25
|
+
background that preserves plugin status colors. Modules keep their original spacing, content
|
|
26
|
+
width and shortcut behavior.
|
|
27
|
+
- **The directory gives way before statistics.** A narrowing info row first shortens the
|
|
28
|
+
working directory to its project folder (`…/project`) and keeps the git branch, then drops
|
|
29
|
+
whole statistic slots; the session name and the project folder go before the branch. The row
|
|
30
|
+
reserves at most 40 columns for the folder and branch, so at 97 columns it keeps cache reads,
|
|
31
|
+
hit rate, tokens and cost instead of only context use and `(auto)`.
|
|
32
|
+
- **Core 0.2 dependency.** Require `@lune_99/pi-lune-extensions-core@^0.2.1`. The earlier
|
|
33
|
+
`^0.1.0` range excluded Core 0.2, so an installation kept Core 0.1.0 beside the newer Core
|
|
34
|
+
that other Lune packages load.
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- **Right-aligned, persistent response speed.** The model and speed reach the dock's right edge without moving the statistics grid, with single spaces between thinking level, speed and unit. Hide the speed segment until a reliable measurement exists, then retain the last value through new responses, missing measurements and cancellation.
|
|
39
|
+
|
|
40
|
+
## [0.1.0] - 2026-10-16
|
|
41
|
+
|
|
5
42
|
### Added
|
|
6
43
|
|
|
7
44
|
- **Persistent Dock settings.** `/dock` controls on/off, base/detail/full density, plugin visibility
|
package/README.md
CHANGED
|
@@ -28,36 +28,36 @@ Dock starts enabled with the `ruled` style. Lune Shell Inspector and Lune Ask Qu
|
|
|
28
28
|
|
|
29
29
|
- **Brings Lune's signals together.** Shell Inspector shows job activity; Ask Question shows pending requests. Each module opens its existing panel directly.
|
|
30
30
|
- **Gets you there from the keyboard.** Press Down in an empty editor, choose a module with Left/Right, and press Enter. Closing the panel returns focus to the dock.
|
|
31
|
-
- **Keeps the session in view.** The model
|
|
32
|
-
- **Holds the numbers steady.** Usage
|
|
33
|
-
- **Fits the space you have.** Narrow terminals shorten the directory
|
|
31
|
+
- **Keeps the session in view.** The model, thinking level and response token speed sit right-aligned beside the modules. Speed stays hidden until a reliable measurement exists, then keeps the last measured value after completion or cancellation. It is highlighted during generation and dim afterward. The next row carries the working directory, branch, tokens, cache, cost and context use.
|
|
32
|
+
- **Holds the numbers steady.** Usage statistics sit on a fixed grid, so new or changing values never move a bar or a label. The divider before the right-aligned model follows the same grid.
|
|
33
|
+
- **Fits the space you have.** Narrow terminals hide the whole speed segment before shortening the model, and shorten the directory to its project folder before they drop whole statistic slots. The git branch stays. A crowded module row scrolls around your selection.
|
|
34
34
|
- **Lets you choose the density.** Pick a style, adjust module detail, hide modules or change their order. Settings apply immediately and persist across sessions.
|
|
35
35
|
|
|
36
36
|
## Dock styles
|
|
37
37
|
|
|
38
38
|

|
|
39
39
|
|
|
40
|
-
| Style
|
|
41
|
-
|
|
|
40
|
+
| Style | |
|
|
41
|
+
| ----------------- | --------------------------------------------------------- |
|
|
42
42
|
| `ruled` · default | Rules around the module/model row and directory/usage row |
|
|
43
|
-
| `boxed`
|
|
44
|
-
| `compact`
|
|
45
|
-
| `minimal`
|
|
46
|
-
| `classic`
|
|
43
|
+
| `boxed` | The same information in a rounded frame |
|
|
44
|
+
| `compact` | Two rows with no frame |
|
|
45
|
+
| `minimal` | One row with modules, model and context use |
|
|
46
|
+
| `classic` | Modules only, with Pi's existing footer |
|
|
47
47
|
|
|
48
48
|
Run `/dock` to preview and choose a style. Every style except `classic` replaces Pi's built-in footer; choose `classic` when another extension uses that footer. Folder and branch icons use Nerd Font glyphs.
|
|
49
49
|
|
|
50
50
|
## Keyboard controls
|
|
51
51
|
|
|
52
|
-
| Where
|
|
53
|
-
|
|
|
54
|
-
| Empty editor | `↓`
|
|
55
|
-
| Editor
|
|
56
|
-
| Dock
|
|
57
|
-
| Dock
|
|
58
|
-
| Dock
|
|
59
|
-
| Dock
|
|
60
|
-
| Dock
|
|
52
|
+
| Where | Key | Action |
|
|
53
|
+
| ------------ | -------------- | ------------------------------------------ |
|
|
54
|
+
| Empty editor | `↓` | Focus Dock |
|
|
55
|
+
| Editor | `Super+↓` | Focus Dock while preserving your text |
|
|
56
|
+
| Dock | `←` / `→` | Select a module |
|
|
57
|
+
| Dock | `Home` / `End` | Jump to the first / last module |
|
|
58
|
+
| Dock | `Enter` | Open its panel |
|
|
59
|
+
| Dock | `↑` / `Esc` | Return to the editor |
|
|
60
|
+
| Dock | Type or paste | Return to the editor and deliver the input |
|
|
61
61
|
|
|
62
62
|
`Super` is Command on macOS. Editor shortcuts leave autocomplete and other open panels alone; ordinary Down also leaves non-empty editor text alone.
|
|
63
63
|
|
package/docs/dock-overview.png
CHANGED
|
Binary file
|
package/docs/dock-overview.svg
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<circle cx="24" cy="17" r="5" fill="#ff5f57"/><circle cx="42" cy="17" r="5" fill="#febc2e"/><circle cx="60" cy="17" r="5" fill="#28c840"/>
|
|
6
6
|
<text x="80" y="22" fill="#9da5a9" font-size="13">pi — select a module, press Enter, get back to work</text>
|
|
7
7
|
<text x="18.00" y="65.97" fill="#768186" textLength="1062.18" lengthAdjust="spacingAndGlyphs">──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────</text>
|
|
8
|
-
<rect x="26.43" y="71.40" width="160.17" height="19.4" fill="#213b49"/><text x="18.00" y="85.37" fill="#a798d7" textLength="8.43" lengthAdjust="spacingAndGlyphs">❯</text><text x="26.43" y="85.37" fill="#dee0e1" textLength="160.17" lengthAdjust="spacingAndGlyphs">○ Shell · 2 running</text><text x="186.60" y="85.37" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="211.89" y="85.37" fill="#dee0e1" textLength="210.75" lengthAdjust="spacingAndGlyphs">○ Ask · 1 pending request</text><text x="422.64" y="85.37" fill="#dee0e1" textLength="
|
|
8
|
+
<rect x="18.00" y="71.40" width="8.43" height="19.4" fill="#213b49"/><rect x="26.43" y="71.40" width="160.17" height="19.4" fill="#213b49"/><text x="18.00" y="85.37" fill="#a798d7" textLength="8.43" lengthAdjust="spacingAndGlyphs">❯</text><text x="26.43" y="85.37" fill="#dee0e1" textLength="160.17" lengthAdjust="spacingAndGlyphs">○ Shell · 2 running</text><text x="186.60" y="85.37" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="211.89" y="85.37" fill="#dee0e1" textLength="210.75" lengthAdjust="spacingAndGlyphs">○ Ask · 1 pending request</text><text x="422.64" y="85.37" fill="#dee0e1" textLength="210.75" lengthAdjust="spacingAndGlyphs"> </text><text x="633.39" y="85.37" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="658.68" y="85.37" fill="#dee0e1" textLength="33.72" lengthAdjust="spacingAndGlyphs"> </text><text x="692.40" y="85.37" fill="#a798d7" textLength="101.16" lengthAdjust="spacingAndGlyphs">(anthropic) </text><text x="793.56" y="85.37" fill="#dee0e1" textLength="126.45" lengthAdjust="spacingAndGlyphs">claude-opus-5-5</text><text x="920.01" y="85.37" fill="#7e888e" textLength="50.58" lengthAdjust="spacingAndGlyphs"> • max</text><text x="970.59" y="85.37" fill="#7e888e" textLength="109.59" lengthAdjust="spacingAndGlyphs"> • 48.2 tok/s</text>
|
|
9
9
|
<text x="18.00" y="104.77" fill="#768186" textLength="758.70" lengthAdjust="spacingAndGlyphs">──────────────────────────────────────────────────────────────────────────────────────────</text><text x="776.70" y="104.77" fill="#dee0e1" textLength="8.43" lengthAdjust="spacingAndGlyphs"> </text><text x="785.13" y="104.77" fill="#7e888e" textLength="278.19" lengthAdjust="spacingAndGlyphs">←→ select · enter open · esc back</text><text x="1063.32" y="104.77" fill="#dee0e1" textLength="8.43" lengthAdjust="spacingAndGlyphs"> </text><text x="1071.75" y="104.77" fill="#768186" textLength="8.43" lengthAdjust="spacingAndGlyphs">─</text>
|
|
10
|
-
<text x="18.00" y="124.17" fill="#dee0e1" textLength="8.43" lengthAdjust="spacingAndGlyphs"> </text><text x="26.43" y="124.17" fill="#9da5a9" textLength="151.74" lengthAdjust="spacingAndGlyphs"> ~/projects/lune</text><text x="178.17" y="124.17" fill="#a798d7" textLength="84.30" lengthAdjust="spacingAndGlyphs"> (main)</text><text x="262.47" y="124.17" fill="#dee0e1" textLength="
|
|
10
|
+
<text x="18.00" y="124.17" fill="#dee0e1" textLength="8.43" lengthAdjust="spacingAndGlyphs"> </text><text x="26.43" y="124.17" fill="#9da5a9" textLength="151.74" lengthAdjust="spacingAndGlyphs"> ~/projects/lune</text><text x="178.17" y="124.17" fill="#a798d7" textLength="84.30" lengthAdjust="spacingAndGlyphs"> (main)</text><text x="262.47" y="124.17" fill="#dee0e1" textLength="210.75" lengthAdjust="spacingAndGlyphs"> </text><text x="473.22" y="124.17" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="498.51" y="124.17" fill="#9da5a9" textLength="42.15" lengthAdjust="spacingAndGlyphs">R187k</text><text x="540.66" y="124.17" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="565.95" y="124.17" fill="#9da5a9" textLength="67.44" lengthAdjust="spacingAndGlyphs">CH 98.9%</text><text x="633.39" y="124.17" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="658.68" y="124.17" fill="#9da5a9" textLength="33.72" lengthAdjust="spacingAndGlyphs">↑28k</text><text x="692.40" y="124.17" fill="#dee0e1" textLength="16.86" lengthAdjust="spacingAndGlyphs"> </text><text x="709.26" y="124.17" fill="#9da5a9" textLength="42.15" lengthAdjust="spacingAndGlyphs">↓5.6k</text><text x="751.41" y="124.17" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="776.70" y="124.17" fill="#9da5a9" textLength="50.58" lengthAdjust="spacingAndGlyphs">$0.008</text><text x="827.28" y="124.17" fill="#dee0e1" textLength="8.43" lengthAdjust="spacingAndGlyphs"> </text><text x="835.71" y="124.17" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="861.00" y="124.17" fill="#9da5a9" textLength="143.31" lengthAdjust="spacingAndGlyphs"> 27k/1.0M · 2.7% </text><text x="1004.31" y="124.17" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="1029.60" y="124.17" fill="#a798d7" textLength="50.58" lengthAdjust="spacingAndGlyphs">(auto)</text>
|
|
11
11
|
<text x="18.00" y="143.57" fill="#768186" textLength="1062.18" lengthAdjust="spacingAndGlyphs">──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────</text>
|
|
12
12
|
</svg>
|
package/docs/dock-styles.png
CHANGED
|
Binary file
|
package/docs/dock-styles.svg
CHANGED
|
@@ -6,25 +6,25 @@
|
|
|
6
6
|
<text x="80" y="22" fill="#9da5a9" font-size="13">pi — five styles, the same tools at your fingertips</text>
|
|
7
7
|
<text x="18.00" y="65.97" fill="#a798d7" textLength="50.58" lengthAdjust="spacingAndGlyphs"> ruled</text>
|
|
8
8
|
<text x="18.00" y="85.37" fill="#768186" textLength="1062.18" lengthAdjust="spacingAndGlyphs">──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────</text>
|
|
9
|
-
<rect x="26.43" y="90.80" width="160.17" height="19.4" fill="#213b49"/><text x="18.00" y="104.77" fill="#a798d7" textLength="8.43" lengthAdjust="spacingAndGlyphs">❯</text><text x="26.43" y="104.77" fill="#dee0e1" textLength="160.17" lengthAdjust="spacingAndGlyphs">○ Shell · 2 running</text><text x="186.60" y="104.77" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="211.89" y="104.77" fill="#dee0e1" textLength="210.75" lengthAdjust="spacingAndGlyphs">○ Ask · 1 pending request</text><text x="422.64" y="104.77" fill="#dee0e1" textLength="
|
|
9
|
+
<rect x="18.00" y="90.80" width="8.43" height="19.4" fill="#213b49"/><rect x="26.43" y="90.80" width="160.17" height="19.4" fill="#213b49"/><text x="18.00" y="104.77" fill="#a798d7" textLength="8.43" lengthAdjust="spacingAndGlyphs">❯</text><text x="26.43" y="104.77" fill="#dee0e1" textLength="160.17" lengthAdjust="spacingAndGlyphs">○ Shell · 2 running</text><text x="186.60" y="104.77" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="211.89" y="104.77" fill="#dee0e1" textLength="210.75" lengthAdjust="spacingAndGlyphs">○ Ask · 1 pending request</text><text x="422.64" y="104.77" fill="#dee0e1" textLength="210.75" lengthAdjust="spacingAndGlyphs"> </text><text x="633.39" y="104.77" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="658.68" y="104.77" fill="#dee0e1" textLength="33.72" lengthAdjust="spacingAndGlyphs"> </text><text x="692.40" y="104.77" fill="#a798d7" textLength="101.16" lengthAdjust="spacingAndGlyphs">(anthropic) </text><text x="793.56" y="104.77" fill="#dee0e1" textLength="126.45" lengthAdjust="spacingAndGlyphs">claude-opus-5-5</text><text x="920.01" y="104.77" fill="#7e888e" textLength="50.58" lengthAdjust="spacingAndGlyphs"> • max</text><text x="970.59" y="104.77" fill="#7e888e" textLength="109.59" lengthAdjust="spacingAndGlyphs"> • 48.2 tok/s</text>
|
|
10
10
|
<text x="18.00" y="124.17" fill="#768186" textLength="758.70" lengthAdjust="spacingAndGlyphs">──────────────────────────────────────────────────────────────────────────────────────────</text><text x="776.70" y="124.17" fill="#dee0e1" textLength="8.43" lengthAdjust="spacingAndGlyphs"> </text><text x="785.13" y="124.17" fill="#7e888e" textLength="278.19" lengthAdjust="spacingAndGlyphs">←→ select · enter open · esc back</text><text x="1063.32" y="124.17" fill="#dee0e1" textLength="8.43" lengthAdjust="spacingAndGlyphs"> </text><text x="1071.75" y="124.17" fill="#768186" textLength="8.43" lengthAdjust="spacingAndGlyphs">─</text>
|
|
11
|
-
<text x="18.00" y="143.57" fill="#dee0e1" textLength="8.43" lengthAdjust="spacingAndGlyphs"> </text><text x="26.43" y="143.57" fill="#9da5a9" textLength="151.74" lengthAdjust="spacingAndGlyphs"> ~/projects/lune</text><text x="178.17" y="143.57" fill="#a798d7" textLength="84.30" lengthAdjust="spacingAndGlyphs"> (main)</text><text x="262.47" y="143.57" fill="#dee0e1" textLength="
|
|
11
|
+
<text x="18.00" y="143.57" fill="#dee0e1" textLength="8.43" lengthAdjust="spacingAndGlyphs"> </text><text x="26.43" y="143.57" fill="#9da5a9" textLength="151.74" lengthAdjust="spacingAndGlyphs"> ~/projects/lune</text><text x="178.17" y="143.57" fill="#a798d7" textLength="84.30" lengthAdjust="spacingAndGlyphs"> (main)</text><text x="262.47" y="143.57" fill="#dee0e1" textLength="210.75" lengthAdjust="spacingAndGlyphs"> </text><text x="473.22" y="143.57" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="498.51" y="143.57" fill="#9da5a9" textLength="42.15" lengthAdjust="spacingAndGlyphs">R187k</text><text x="540.66" y="143.57" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="565.95" y="143.57" fill="#9da5a9" textLength="67.44" lengthAdjust="spacingAndGlyphs">CH 98.9%</text><text x="633.39" y="143.57" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="658.68" y="143.57" fill="#9da5a9" textLength="33.72" lengthAdjust="spacingAndGlyphs">↑28k</text><text x="692.40" y="143.57" fill="#dee0e1" textLength="16.86" lengthAdjust="spacingAndGlyphs"> </text><text x="709.26" y="143.57" fill="#9da5a9" textLength="42.15" lengthAdjust="spacingAndGlyphs">↓5.6k</text><text x="751.41" y="143.57" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="776.70" y="143.57" fill="#9da5a9" textLength="50.58" lengthAdjust="spacingAndGlyphs">$0.008</text><text x="827.28" y="143.57" fill="#dee0e1" textLength="8.43" lengthAdjust="spacingAndGlyphs"> </text><text x="835.71" y="143.57" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="861.00" y="143.57" fill="#9da5a9" textLength="143.31" lengthAdjust="spacingAndGlyphs"> 27k/1.0M · 2.7% </text><text x="1004.31" y="143.57" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="1029.60" y="143.57" fill="#a798d7" textLength="50.58" lengthAdjust="spacingAndGlyphs">(auto)</text>
|
|
12
12
|
<text x="18.00" y="162.97" fill="#768186" textLength="1062.18" lengthAdjust="spacingAndGlyphs">──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────</text>
|
|
13
13
|
|
|
14
14
|
<text x="18.00" y="201.77" fill="#a798d7" textLength="50.58" lengthAdjust="spacingAndGlyphs"> boxed</text>
|
|
15
15
|
<text x="18.00" y="221.17" fill="#768186" textLength="8.43" lengthAdjust="spacingAndGlyphs">╭</text><text x="26.43" y="221.17" fill="#768186" textLength="1045.32" lengthAdjust="spacingAndGlyphs">────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────</text><text x="1071.75" y="221.17" fill="#768186" textLength="8.43" lengthAdjust="spacingAndGlyphs">╮</text>
|
|
16
|
-
<rect x="34.86" y="226.60" width="160.17" height="19.4" fill="#213b49"/><text x="18.00" y="240.57" fill="#768186" textLength="8.43" lengthAdjust="spacingAndGlyphs">│</text><text x="26.43" y="240.57" fill="#a798d7" textLength="8.43" lengthAdjust="spacingAndGlyphs">❯</text><text x="34.86" y="240.57" fill="#dee0e1" textLength="160.17" lengthAdjust="spacingAndGlyphs">○ Shell · 2 running</text><text x="195.03" y="240.57" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="220.32" y="240.57" fill="#dee0e1" textLength="210.75" lengthAdjust="spacingAndGlyphs">○ Ask · 1 pending request</text><text x="431.07" y="240.57" fill="#dee0e1" textLength="
|
|
16
|
+
<rect x="26.43" y="226.60" width="8.43" height="19.4" fill="#213b49"/><rect x="34.86" y="226.60" width="160.17" height="19.4" fill="#213b49"/><text x="18.00" y="240.57" fill="#768186" textLength="8.43" lengthAdjust="spacingAndGlyphs">│</text><text x="26.43" y="240.57" fill="#a798d7" textLength="8.43" lengthAdjust="spacingAndGlyphs">❯</text><text x="34.86" y="240.57" fill="#dee0e1" textLength="160.17" lengthAdjust="spacingAndGlyphs">○ Shell · 2 running</text><text x="195.03" y="240.57" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="220.32" y="240.57" fill="#dee0e1" textLength="210.75" lengthAdjust="spacingAndGlyphs">○ Ask · 1 pending request</text><text x="431.07" y="240.57" fill="#dee0e1" textLength="185.46" lengthAdjust="spacingAndGlyphs"> </text><text x="616.53" y="240.57" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="641.82" y="240.57" fill="#dee0e1" textLength="33.72" lengthAdjust="spacingAndGlyphs"> </text><text x="675.54" y="240.57" fill="#a798d7" textLength="101.16" lengthAdjust="spacingAndGlyphs">(anthropic) </text><text x="776.70" y="240.57" fill="#dee0e1" textLength="126.45" lengthAdjust="spacingAndGlyphs">claude-opus-5-5</text><text x="903.15" y="240.57" fill="#7e888e" textLength="50.58" lengthAdjust="spacingAndGlyphs"> • max</text><text x="953.73" y="240.57" fill="#7e888e" textLength="109.59" lengthAdjust="spacingAndGlyphs"> • 48.2 tok/s</text><text x="1063.32" y="240.57" fill="#dee0e1" textLength="8.43" lengthAdjust="spacingAndGlyphs"> </text><text x="1071.75" y="240.57" fill="#768186" textLength="8.43" lengthAdjust="spacingAndGlyphs">│</text>
|
|
17
17
|
<text x="18.00" y="259.97" fill="#768186" textLength="8.43" lengthAdjust="spacingAndGlyphs">├</text><text x="26.43" y="259.97" fill="#768186" textLength="741.84" lengthAdjust="spacingAndGlyphs">────────────────────────────────────────────────────────────────────────────────────────</text><text x="768.27" y="259.97" fill="#dee0e1" textLength="8.43" lengthAdjust="spacingAndGlyphs"> </text><text x="776.70" y="259.97" fill="#7e888e" textLength="278.19" lengthAdjust="spacingAndGlyphs">←→ select · enter open · esc back</text><text x="1054.89" y="259.97" fill="#dee0e1" textLength="8.43" lengthAdjust="spacingAndGlyphs"> </text><text x="1063.32" y="259.97" fill="#768186" textLength="8.43" lengthAdjust="spacingAndGlyphs">─</text><text x="1071.75" y="259.97" fill="#768186" textLength="8.43" lengthAdjust="spacingAndGlyphs">┤</text>
|
|
18
|
-
<text x="18.00" y="279.37" fill="#768186" textLength="8.43" lengthAdjust="spacingAndGlyphs">│</text><text x="26.43" y="279.37" fill="#dee0e1" textLength="8.43" lengthAdjust="spacingAndGlyphs"> </text><text x="34.86" y="279.37" fill="#9da5a9" textLength="151.74" lengthAdjust="spacingAndGlyphs"> ~/projects/lune</text><text x="186.60" y="279.37" fill="#a798d7" textLength="84.30" lengthAdjust="spacingAndGlyphs"> (main)</text><text x="270.90" y="279.37" fill="#dee0e1" textLength="
|
|
18
|
+
<text x="18.00" y="279.37" fill="#768186" textLength="8.43" lengthAdjust="spacingAndGlyphs">│</text><text x="26.43" y="279.37" fill="#dee0e1" textLength="8.43" lengthAdjust="spacingAndGlyphs"> </text><text x="34.86" y="279.37" fill="#9da5a9" textLength="151.74" lengthAdjust="spacingAndGlyphs"> ~/projects/lune</text><text x="186.60" y="279.37" fill="#a798d7" textLength="84.30" lengthAdjust="spacingAndGlyphs"> (main)</text><text x="270.90" y="279.37" fill="#dee0e1" textLength="185.46" lengthAdjust="spacingAndGlyphs"> </text><text x="456.36" y="279.37" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="481.65" y="279.37" fill="#9da5a9" textLength="42.15" lengthAdjust="spacingAndGlyphs">R187k</text><text x="523.80" y="279.37" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="549.09" y="279.37" fill="#9da5a9" textLength="67.44" lengthAdjust="spacingAndGlyphs">CH 98.9%</text><text x="616.53" y="279.37" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="641.82" y="279.37" fill="#9da5a9" textLength="33.72" lengthAdjust="spacingAndGlyphs">↑28k</text><text x="675.54" y="279.37" fill="#dee0e1" textLength="16.86" lengthAdjust="spacingAndGlyphs"> </text><text x="692.40" y="279.37" fill="#9da5a9" textLength="42.15" lengthAdjust="spacingAndGlyphs">↓5.6k</text><text x="734.55" y="279.37" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="759.84" y="279.37" fill="#9da5a9" textLength="50.58" lengthAdjust="spacingAndGlyphs">$0.008</text><text x="810.42" y="279.37" fill="#dee0e1" textLength="8.43" lengthAdjust="spacingAndGlyphs"> </text><text x="818.85" y="279.37" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="844.14" y="279.37" fill="#9da5a9" textLength="143.31" lengthAdjust="spacingAndGlyphs"> 27k/1.0M · 2.7% </text><text x="987.45" y="279.37" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="1012.74" y="279.37" fill="#a798d7" textLength="50.58" lengthAdjust="spacingAndGlyphs">(auto)</text><text x="1063.32" y="279.37" fill="#dee0e1" textLength="8.43" lengthAdjust="spacingAndGlyphs"> </text><text x="1071.75" y="279.37" fill="#768186" textLength="8.43" lengthAdjust="spacingAndGlyphs">│</text>
|
|
19
19
|
<text x="18.00" y="298.77" fill="#768186" textLength="8.43" lengthAdjust="spacingAndGlyphs">╰</text><text x="26.43" y="298.77" fill="#768186" textLength="1045.32" lengthAdjust="spacingAndGlyphs">────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────</text><text x="1071.75" y="298.77" fill="#768186" textLength="8.43" lengthAdjust="spacingAndGlyphs">╯</text>
|
|
20
20
|
|
|
21
21
|
<text x="18.00" y="337.57" fill="#a798d7" textLength="67.44" lengthAdjust="spacingAndGlyphs"> compact</text>
|
|
22
|
-
<rect x="26.43" y="343.00" width="160.17" height="19.4" fill="#213b49"/><text x="18.00" y="356.97" fill="#a798d7" textLength="8.43" lengthAdjust="spacingAndGlyphs">❯</text><text x="26.43" y="356.97" fill="#dee0e1" textLength="160.17" lengthAdjust="spacingAndGlyphs">○ Shell · 2 running</text><text x="186.60" y="356.97" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="211.89" y="356.97" fill="#dee0e1" textLength="210.75" lengthAdjust="spacingAndGlyphs">○ Ask · 1 pending request</text><text x="422.64" y="356.97" fill="#dee0e1" textLength="354.06" lengthAdjust="spacingAndGlyphs"> </text><text x="776.70" y="356.97" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="801.99" y="356.97" fill="#7e888e" textLength="278.19" lengthAdjust="spacingAndGlyphs">←→ select · enter open · esc back</text>
|
|
23
|
-
<text x="18.00" y="376.37" fill="#dee0e1" textLength="8.43" lengthAdjust="spacingAndGlyphs"> </text><text x="26.43" y="376.37" fill="#9da5a9" textLength="151.74" lengthAdjust="spacingAndGlyphs"> ~/projects/lune</text><text x="178.17" y="376.37" fill="#a798d7" textLength="84.30" lengthAdjust="spacingAndGlyphs"> (main)</text><text x="262.47" y="376.37" fill="#dee0e1" textLength="
|
|
22
|
+
<rect x="18.00" y="343.00" width="8.43" height="19.4" fill="#213b49"/><rect x="26.43" y="343.00" width="160.17" height="19.4" fill="#213b49"/><text x="18.00" y="356.97" fill="#a798d7" textLength="8.43" lengthAdjust="spacingAndGlyphs">❯</text><text x="26.43" y="356.97" fill="#dee0e1" textLength="160.17" lengthAdjust="spacingAndGlyphs">○ Shell · 2 running</text><text x="186.60" y="356.97" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="211.89" y="356.97" fill="#dee0e1" textLength="210.75" lengthAdjust="spacingAndGlyphs">○ Ask · 1 pending request</text><text x="422.64" y="356.97" fill="#dee0e1" textLength="354.06" lengthAdjust="spacingAndGlyphs"> </text><text x="776.70" y="356.97" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="801.99" y="356.97" fill="#7e888e" textLength="278.19" lengthAdjust="spacingAndGlyphs">←→ select · enter open · esc back</text>
|
|
23
|
+
<text x="18.00" y="376.37" fill="#dee0e1" textLength="8.43" lengthAdjust="spacingAndGlyphs"> </text><text x="26.43" y="376.37" fill="#9da5a9" textLength="151.74" lengthAdjust="spacingAndGlyphs"> ~/projects/lune</text><text x="178.17" y="376.37" fill="#a798d7" textLength="84.30" lengthAdjust="spacingAndGlyphs"> (main)</text><text x="262.47" y="376.37" fill="#dee0e1" textLength="210.75" lengthAdjust="spacingAndGlyphs"> </text><text x="473.22" y="376.37" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="498.51" y="376.37" fill="#9da5a9" textLength="42.15" lengthAdjust="spacingAndGlyphs">R187k</text><text x="540.66" y="376.37" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="565.95" y="376.37" fill="#9da5a9" textLength="67.44" lengthAdjust="spacingAndGlyphs">CH 98.9%</text><text x="633.39" y="376.37" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="658.68" y="376.37" fill="#9da5a9" textLength="33.72" lengthAdjust="spacingAndGlyphs">↑28k</text><text x="692.40" y="376.37" fill="#dee0e1" textLength="16.86" lengthAdjust="spacingAndGlyphs"> </text><text x="709.26" y="376.37" fill="#9da5a9" textLength="42.15" lengthAdjust="spacingAndGlyphs">↓5.6k</text><text x="751.41" y="376.37" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="776.70" y="376.37" fill="#9da5a9" textLength="50.58" lengthAdjust="spacingAndGlyphs">$0.008</text><text x="827.28" y="376.37" fill="#dee0e1" textLength="8.43" lengthAdjust="spacingAndGlyphs"> </text><text x="835.71" y="376.37" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="861.00" y="376.37" fill="#9da5a9" textLength="143.31" lengthAdjust="spacingAndGlyphs"> 27k/1.0M · 2.7% </text><text x="1004.31" y="376.37" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="1029.60" y="376.37" fill="#a798d7" textLength="50.58" lengthAdjust="spacingAndGlyphs">(auto)</text>
|
|
24
24
|
|
|
25
25
|
<text x="18.00" y="415.17" fill="#a798d7" textLength="67.44" lengthAdjust="spacingAndGlyphs"> minimal</text>
|
|
26
|
-
<rect x="26.43" y="420.60" width="160.17" height="19.4" fill="#213b49"/><text x="18.00" y="434.57" fill="#a798d7" textLength="8.43" lengthAdjust="spacingAndGlyphs">❯</text><text x="26.43" y="434.57" fill="#dee0e1" textLength="160.17" lengthAdjust="spacingAndGlyphs">○ Shell · 2 running</text><text x="186.60" y="434.57" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="211.89" y="434.57" fill="#dee0e1" textLength="210.75" lengthAdjust="spacingAndGlyphs">○ Ask · 1 pending request</text><text x="422.64" y="434.57" fill="#dee0e1" textLength="354.06" lengthAdjust="spacingAndGlyphs"> </text><text x="776.70" y="434.57" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="801.99" y="434.57" fill="#7e888e" textLength="278.19" lengthAdjust="spacingAndGlyphs">←→ select · enter open · esc back</text>
|
|
26
|
+
<rect x="18.00" y="420.60" width="8.43" height="19.4" fill="#213b49"/><rect x="26.43" y="420.60" width="160.17" height="19.4" fill="#213b49"/><text x="18.00" y="434.57" fill="#a798d7" textLength="8.43" lengthAdjust="spacingAndGlyphs">❯</text><text x="26.43" y="434.57" fill="#dee0e1" textLength="160.17" lengthAdjust="spacingAndGlyphs">○ Shell · 2 running</text><text x="186.60" y="434.57" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="211.89" y="434.57" fill="#dee0e1" textLength="210.75" lengthAdjust="spacingAndGlyphs">○ Ask · 1 pending request</text><text x="422.64" y="434.57" fill="#dee0e1" textLength="354.06" lengthAdjust="spacingAndGlyphs"> </text><text x="776.70" y="434.57" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="801.99" y="434.57" fill="#7e888e" textLength="278.19" lengthAdjust="spacingAndGlyphs">←→ select · enter open · esc back</text>
|
|
27
27
|
|
|
28
28
|
<text x="18.00" y="473.37" fill="#a798d7" textLength="67.44" lengthAdjust="spacingAndGlyphs"> classic</text>
|
|
29
|
-
<rect x="26.43" y="478.80" width="160.17" height="19.4" fill="#213b49"/><text x="18.00" y="492.77" fill="#a798d7" textLength="8.43" lengthAdjust="spacingAndGlyphs">❯</text><text x="26.43" y="492.77" fill="#dee0e1" textLength="160.17" lengthAdjust="spacingAndGlyphs">○ Shell · 2 running</text><text x="186.60" y="492.77" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="211.89" y="492.77" fill="#dee0e1" textLength="210.75" lengthAdjust="spacingAndGlyphs">○ Ask · 1 pending request</text><text x="422.64" y="492.77" fill="#dee0e1" textLength="379.35" lengthAdjust="spacingAndGlyphs"> </text><text x="801.99" y="492.77" fill="#7e888e" textLength="278.19" lengthAdjust="spacingAndGlyphs">←→ select · enter open · esc back</text>
|
|
29
|
+
<rect x="18.00" y="478.80" width="8.43" height="19.4" fill="#213b49"/><rect x="26.43" y="478.80" width="160.17" height="19.4" fill="#213b49"/><text x="18.00" y="492.77" fill="#a798d7" textLength="8.43" lengthAdjust="spacingAndGlyphs">❯</text><text x="26.43" y="492.77" fill="#dee0e1" textLength="160.17" lengthAdjust="spacingAndGlyphs">○ Shell · 2 running</text><text x="186.60" y="492.77" fill="#7e888e" textLength="25.29" lengthAdjust="spacingAndGlyphs"> │ </text><text x="211.89" y="492.77" fill="#dee0e1" textLength="210.75" lengthAdjust="spacingAndGlyphs">○ Ask · 1 pending request</text><text x="422.64" y="492.77" fill="#dee0e1" textLength="379.35" lengthAdjust="spacingAndGlyphs"> </text><text x="801.99" y="492.77" fill="#7e888e" textLength="278.19" lengthAdjust="spacingAndGlyphs">←→ select · enter open · esc back</text>
|
|
30
30
|
</svg>
|
package/docs/reference.md
CHANGED
|
@@ -8,37 +8,66 @@ keyboard and press Enter to open its existing interface directly; there is no ac
|
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
10
|
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
11
|
-
○ Shell
|
|
11
|
+
○ Shell │ ○ Ask │ (anthropic) claude-opus-5-5 • max
|
|
12
12
|
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
13
|
-
…/local-extensions/pi-recap (main)
|
|
13
|
+
…/local-extensions/pi-recap (main) │ R187k │ CH 98.9% │ ↑28k ↓5.6k │ $0.008 │ 27k/1.0M · 2.7% │ (auto)
|
|
14
14
|
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
The dock **replaces Pi's built-in footer**, so every statistic it showed stays visible:
|
|
18
18
|
|
|
19
|
-
| Row
|
|
20
|
-
|
|
|
21
|
-
| Dock | Module cells, one per contributing extension | `(provider) model • thinking level`
|
|
22
|
-
| Info | Working directory, git branch, session name
|
|
19
|
+
| Row | Left | Right |
|
|
20
|
+
| ---- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| Dock | Module cells, one per contributing extension | `(provider) model • thinking level • 48.2 tok/s` |
|
|
22
|
+
| Info | Working directory, git branch, session name | Cache `W`rite, cache `R`ead, `CH` cache hit, tokens `↑in ↓out`, cost, context use (`used/window · share`), `(auto)` |
|
|
23
23
|
|
|
24
24
|
Statuses set by other extensions through `ctx.ui.setStatus()` follow on a row of their own.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
The statistics sit on a fixed grid against the right edge. Every statistic owns a slot of fixed
|
|
26
|
+
width and keeps it whether or not it has data, so no bar or label ever moves while a session runs.
|
|
27
|
+
Text starts one column after its bar, with the label attached to its number; a growing number uses
|
|
28
|
+
only the padding behind it. A slot with no data yet stays blank: a fresh session shows only context
|
|
29
|
+
use and `(auto)`, and the others fill their own columns once Pi reports tokens, cache or cost.
|
|
30
|
+
Slots that often stay blank, such as cache writes for providers that do not report them, sit on
|
|
31
|
+
the left, so their blank columns join the gap after the directory.
|
|
32
|
+
|
|
33
|
+
The model and speed are flush right. The divider before them continues one of the info row's bars,
|
|
34
|
+
with any spare padding between the divider and model, never after the speed. It takes the rightmost
|
|
35
|
+
bar that leaves room within half the row, dropping the provider and then the speed before giving up
|
|
36
|
+
divider alignment.
|
|
37
|
+
|
|
38
|
+
The speed segment follows the thinking level (or model name for models without thinking) with single
|
|
39
|
+
spaces and the same `•` bullet, as in `model • max • 48.2 tok/s`. Without a reliable measurement the
|
|
40
|
+
entire segment stays hidden, including its separator and unit. Once measured, the latest speed stays
|
|
41
|
+
visible through subsequent generation and after completion or cancellation, until a new valid
|
|
42
|
+
measurement replaces it. It is highlighted while an assistant response is generating and dimmed when
|
|
43
|
+
finished.
|
|
44
|
+
|
|
45
|
+
Speed is the provider-reported output tokens divided by Pi's measured response duration, including
|
|
46
|
+
the wait for the first token, not a pure decoding benchmark. Both output tokens and duration must be
|
|
47
|
+
positive and finite. Pi does not provide a reliable cross-provider live token count; partial usage,
|
|
48
|
+
text length, stream chunks, tool usage and tool execution time are not used. A response without valid
|
|
49
|
+
measurements does not erase the previous value or invent a zero. The measurement resets on detachment,
|
|
50
|
+
reload, session replacement or tree navigation, and is hidden for a different model. Narrow terminals
|
|
51
|
+
drop the entire speed segment before truncating the model; no part of its number or unit is clipped.
|
|
52
|
+
The model visibility switch also controls speed, and `classic` leaves Pi's footer unchanged.
|
|
53
|
+
|
|
54
|
+
Which slots are reserved depends on the terminal width, the project folder and the branch, never on
|
|
55
|
+
the numbers. The row keeps room only for the project folder and branch (at most 40 columns, or the
|
|
56
|
+
branch alone when it is longer). The statistics take the rest, so a narrowing terminal first
|
|
57
|
+
shortens the directory from the left, down to `…/project`. Then it drops cache writes, cache
|
|
58
|
+
reads, tokens, cost, hit rate and `(auto)` in that order, and always keeps context use. The
|
|
59
|
+
directory is fitted against the full reservation, so it does not move as numbers arrive. The
|
|
60
|
+
session name goes before the project folder, and the branch goes last. Below 40 columns the model
|
|
61
|
+
is hidden so the cells keep the whole row.
|
|
62
|
+
Provider shows only when more than one is available, and `(auto)` reflects the compaction setting
|
|
63
|
+
read when the session starts.
|
|
36
64
|
|
|
37
65
|
Every cell composes exactly one physical row. Plugins own their complete text, markers and theme
|
|
38
66
|
styling. Dock selects a level, allocates horizontal width, separates cells with a dim bar and
|
|
39
|
-
highlights the selected contribution. Focus
|
|
40
|
-
|
|
41
|
-
|
|
67
|
+
highlights the selected contribution. Focus places `❯` directly beside the selected module using
|
|
68
|
+
existing space, so module spacing and content widths stay the same. The highlight preserves plugin
|
|
69
|
+
status colors. In `ruled` and `boxed`, key hints ride the rule under the cells. With no contributions
|
|
70
|
+
the model and info rows still render.
|
|
42
71
|
|
|
43
72
|
Pi allows one custom footer: if another extension installs its own after the dock, that footer
|
|
44
73
|
replaces the dock's; choose the `classic` style or turn the dock off to avoid the clash. The
|
|
@@ -48,23 +77,23 @@ folder and branch icons are Nerd Font glyphs.
|
|
|
48
77
|
|
|
49
78
|
Choose a style in `/dock`; the panel previews it, focused, before you commit.
|
|
50
79
|
|
|
51
|
-
| Style
|
|
52
|
-
|
|
|
53
|
-
| `ruled` (default) | Rule, dock + model, rule, directory + usage, rule | Key hints ride the rule under the cells
|
|
54
|
-
| `boxed`
|
|
55
|
-
| `compact`
|
|
56
|
-
| `minimal`
|
|
57
|
-
| `classic`
|
|
80
|
+
| Style | Rows | Notes |
|
|
81
|
+
| ----------------- | ------------------------------------------------- | --------------------------------------------------- |
|
|
82
|
+
| `ruled` (default) | Rule, dock + model, rule, directory + usage, rule | Key hints ride the rule under the cells |
|
|
83
|
+
| `boxed` | The same rows in a rounded box | Key hints ride the box's middle rule |
|
|
84
|
+
| `compact` | Dock + model, directory + usage | No frame; key hints replace the model while focused |
|
|
85
|
+
| `minimal` | Cells + model + context use | One row, plus extension statuses when present |
|
|
86
|
+
| `classic` | Cells only | Leaves Pi's own footer in place |
|
|
58
87
|
|
|
59
88
|
```text
|
|
60
89
|
╭──────────────────────────────────────────────────────────╮
|
|
61
|
-
│ ○ Shell
|
|
90
|
+
│ ○ Shell │ ○ Ask │ model • max │ boxed
|
|
62
91
|
├──────────────────────────────────────────────────────────┤
|
|
63
|
-
│ ~/proj (main)
|
|
92
|
+
│ ~/proj (main) │ ↑28k ↓5.6k │ 27k/1.0M · 2.7% │
|
|
64
93
|
╰──────────────────────────────────────────────────────────╯
|
|
65
94
|
|
|
66
|
-
○ Shell
|
|
67
|
-
~/proj (main)
|
|
95
|
+
○ Shell │ ○ Ask │ model • max compact
|
|
96
|
+
~/proj (main) │ ↑28k ↓5.6k │ 27k/1.0M · 2.7%
|
|
68
97
|
```
|
|
69
98
|
|
|
70
99
|
Every style except `classic` takes over Pi's footer. Three switches trim what those styles
|
|
@@ -75,6 +104,7 @@ context use from the usage counters.
|
|
|
75
104
|
|
|
76
105
|
Lune Dock and its contributor extensions use the Dock protocol from
|
|
77
106
|
`@lune_99/pi-lune-extensions-core/dock`; Core also supplies the shared settings infrastructure.
|
|
107
|
+
|
|
78
108
|
```sh
|
|
79
109
|
pi install npm:@lune_99/pi-dock
|
|
80
110
|
```
|
|
@@ -91,14 +121,14 @@ and Ctrl+R removes the selected override. Changes apply immediately, including t
|
|
|
91
121
|
off, which removes the block and its keyboard listener and restores Pi's footer and each plugin's
|
|
92
122
|
independent status bar; plugin panels and commands stay usable.
|
|
93
123
|
|
|
94
|
-
| Setting
|
|
95
|
-
|
|
|
96
|
-
| `enabled`
|
|
97
|
-
| `style`
|
|
98
|
-
| `displayMode`
|
|
99
|
-
| `showModel`, `showWorkspace`, `showUsage` | on / off
|
|
100
|
-
| `hidden`
|
|
101
|
-
| `order`
|
|
124
|
+
| Setting | Values | Default |
|
|
125
|
+
| ----------------------------------------- | --------------------------------------------------------- | ------------------ |
|
|
126
|
+
| `enabled` | on / off | on |
|
|
127
|
+
| `style` | `ruled`, `boxed`, `compact`, `minimal`, `classic` | `ruled` |
|
|
128
|
+
| `displayMode` | `base`, `detail`, `full` | `detail` |
|
|
129
|
+
| `showModel`, `showWorkspace`, `showUsage` | on / off | on |
|
|
130
|
+
| `hidden` | plugin ids left out of the dock | none |
|
|
131
|
+
| `order` | plugin id → position, smaller first (missing counts as 0) | registration order |
|
|
102
132
|
|
|
103
133
|
Values live in `~/.pi/agent/lune-settings/pi-dock.json` (`PI_CODING_AGENT_DIR` moves the agent
|
|
104
134
|
directory; project overrides are in `<project>/.pi/lune-settings/pi-dock.json`), and only
|
|
@@ -116,15 +146,15 @@ errors instead of silently resetting settings.
|
|
|
116
146
|
|
|
117
147
|
## Keyboard interaction
|
|
118
148
|
|
|
119
|
-
| Context
|
|
120
|
-
|
|
|
121
|
-
| Main editor, empty and no autocomplete or overlay | Down
|
|
122
|
-
| Main editor, no autocomplete or overlay
|
|
123
|
-
| Dock
|
|
124
|
-
| Dock
|
|
125
|
-
| Dock
|
|
126
|
-
| Dock
|
|
127
|
-
| Dock
|
|
149
|
+
| Context | Key | Result |
|
|
150
|
+
| ------------------------------------------------- | ---------------------------------------- | ---------------------------------------------------------- |
|
|
151
|
+
| Main editor, empty and no autocomplete or overlay | Down | Focus the dock |
|
|
152
|
+
| Main editor, no autocomplete or overlay | Super+Down | Focus without clearing the text |
|
|
153
|
+
| Dock | Left / Right | Select previous / next module, wrapping at the ends |
|
|
154
|
+
| Dock | Home / End | Select the first / last module |
|
|
155
|
+
| Dock | Enter | Open the selected module directly |
|
|
156
|
+
| Dock | Up / Esc | Return to the editor without forwarding the navigation key |
|
|
157
|
+
| Dock | Typing, paste or an application shortcut | Return to the editor and deliver the input |
|
|
128
158
|
|
|
129
159
|
`Super` is Command on macOS. Delivery depends on the terminal's keyboard protocol and its
|
|
130
160
|
own shortcuts. Terminal key-release events are ignored, so releasing a key never hands focus
|
|
@@ -146,7 +176,8 @@ stays red. This is plugin-owned, ephemeral view state.
|
|
|
146
176
|
Ask Question supplies base identity, pending request count in detail (requests, rather than
|
|
147
177
|
individual questions), and the next request's subject in full. Enter opens the existing
|
|
148
178
|
`/question` panel, including draft persistence on Esc. Both plugins remain registered when idle,
|
|
149
|
-
|
|
179
|
+
showing only their status marker and name at every display level. Visibility is controlled by
|
|
180
|
+
Dock settings and never by plugin state.
|
|
150
181
|
|
|
151
182
|
The Dock protocol in Core (`@lune_99/pi-lune-extensions-core/dock`, protocol version 1) exposes `LuneDockSnapshot` and
|
|
152
183
|
`LuneDockProvider`: `getSnapshot()`, `subscribe(listener)` and `activate()`. Every supplied
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lune_99/pi-dock",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "A compact keyboard-operated dock for Lune Pi extensions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"docs:images": "node --experimental-strip-types tools/make-doc-images.mjs"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@lune_99/pi-lune-extensions-core": "^0.1
|
|
29
|
+
"@lune_99/pi-lune-extensions-core": "^0.2.1"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@earendil-works/pi-coding-agent": ">=1.0.4",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"typebox": ">=1.3.27"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@earendil-works/pi-coding-agent": "1.
|
|
38
|
-
"@earendil-works/pi-tui": "1.
|
|
37
|
+
"@earendil-works/pi-coding-agent": "1.6.0",
|
|
38
|
+
"@earendil-works/pi-tui": "1.6.0",
|
|
39
39
|
"@types/node": "^22.20.2",
|
|
40
40
|
"typebox": "1.3.27",
|
|
41
41
|
"typescript": "5.9.3"
|
package/src/dock-controller.ts
CHANGED
|
@@ -13,9 +13,14 @@ import {
|
|
|
13
13
|
} from "@earendil-works/pi-tui";
|
|
14
14
|
import { getDockRegistry, type DockRegistry } from "@lune_99/pi-lune-extensions-core/dock/host";
|
|
15
15
|
import type { LuneDockDisplayMode } from "@lune_99/pi-lune-extensions-core/dock";
|
|
16
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
DockFooter,
|
|
18
|
+
replacesFooter,
|
|
19
|
+
type DockFooterInput,
|
|
20
|
+
type DockLayout,
|
|
21
|
+
} from "./dock-footer.ts";
|
|
17
22
|
import type { VisibleDockItem } from "./dock-renderer.ts";
|
|
18
|
-
import { DockStatusSource, type DockStatus } from "./dock-status.ts";
|
|
23
|
+
import { DockStatusSource, type DockMessageEvent, type DockStatus } from "./dock-status.ts";
|
|
19
24
|
|
|
20
25
|
export const WIDGET_ID = "pi-dock";
|
|
21
26
|
|
|
@@ -132,6 +137,21 @@ export class DockController {
|
|
|
132
137
|
return this.statusSource.collect(this.ctx, this.footerData);
|
|
133
138
|
}
|
|
134
139
|
|
|
140
|
+
observeMessage(event: DockMessageEvent, ctx: ExtensionContext): void {
|
|
141
|
+
if (
|
|
142
|
+
!this.ctx ||
|
|
143
|
+
this.ctx.ui !== ctx.ui ||
|
|
144
|
+
this.ctx.sessionManager.getSessionId() !== ctx.sessionManager.getSessionId()
|
|
145
|
+
)
|
|
146
|
+
return;
|
|
147
|
+
if (this.statusSource.observeMessage(event, ctx)) this.tui?.requestRender();
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
resetTokenSpeed(): void {
|
|
151
|
+
this.statusSource.resetTokenSpeed();
|
|
152
|
+
this.invalidate();
|
|
153
|
+
}
|
|
154
|
+
|
|
135
155
|
/** Nothing to draw before attachment, or when a style that shows statistics has no footer data yet. */
|
|
136
156
|
footerInput(focused: boolean): DockFooterInput | undefined {
|
|
137
157
|
if (!this.ctx) return undefined;
|
|
@@ -172,6 +192,7 @@ export class DockController {
|
|
|
172
192
|
detach(): void {
|
|
173
193
|
this.generation++;
|
|
174
194
|
this.queuedGeneration = undefined;
|
|
195
|
+
this.statusSource.resetTokenSpeed();
|
|
175
196
|
this.unsubscribeInput?.();
|
|
176
197
|
this.unsubscribeInput = undefined;
|
|
177
198
|
this.leaveFocus();
|
|
@@ -407,6 +428,7 @@ export class DockController {
|
|
|
407
428
|
this.refresh();
|
|
408
429
|
} catch (error) {
|
|
409
430
|
this.reportError(error);
|
|
431
|
+
// eslint-disable-next-line no-unsafe-finally -- A failed refresh must not refocus a stale dock.
|
|
410
432
|
return;
|
|
411
433
|
}
|
|
412
434
|
if (this.items.length > 0 && this.component && !this.tui?.hasOverlay()) {
|