@groeponline/pi-wishcraft 0.17.3

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.
Files changed (106) hide show
  1. package/AGENTS.md +68 -0
  2. package/CHANGELOG.md +724 -0
  3. package/CONTRIBUTING.md +37 -0
  4. package/README.md +648 -0
  5. package/RELEASE.md +117 -0
  6. package/ROADMAP.md +52 -0
  7. package/bash-mode/completion-providers.ts +269 -0
  8. package/bash-mode/completion.ts +416 -0
  9. package/bash-mode/editor-ghost.ts +40 -0
  10. package/bash-mode/editor-input.ts +80 -0
  11. package/bash-mode/editor.ts +437 -0
  12. package/bash-mode/history.ts +263 -0
  13. package/bash-mode/shell-session.ts +286 -0
  14. package/bash-mode/transcript.ts +108 -0
  15. package/bash-mode/types.ts +80 -0
  16. package/index.ts +6 -0
  17. package/package.json +55 -0
  18. package/queue/store.ts +443 -0
  19. package/queue/types.ts +54 -0
  20. package/src/config/custom-items.ts +182 -0
  21. package/src/config/extension-statuses.ts +51 -0
  22. package/src/config/layout.ts +60 -0
  23. package/src/config/parse.ts +127 -0
  24. package/src/config/powerline-config.ts +18 -0
  25. package/src/config/presets.ts +245 -0
  26. package/src/config/primitives.ts +117 -0
  27. package/src/config/segment-ids.ts +114 -0
  28. package/src/config/segment-options.ts +128 -0
  29. package/src/config/settings-patch.ts +26 -0
  30. package/src/config/types.ts +277 -0
  31. package/src/core/frontmatter.ts +40 -0
  32. package/src/editor/autocomplete-chain.ts +41 -0
  33. package/src/extension/activate.ts +28 -0
  34. package/src/extension/bash-mode-actions.ts +104 -0
  35. package/src/extension/commands.ts +268 -0
  36. package/src/extension/constants.ts +46 -0
  37. package/src/extension/custom-editor.ts +406 -0
  38. package/src/extension/git-invalidation.ts +40 -0
  39. package/src/extension/layout.ts +160 -0
  40. package/src/extension/menu-views.ts +393 -0
  41. package/src/extension/powerline-widgets.ts +95 -0
  42. package/src/extension/prompt-history.ts +219 -0
  43. package/src/extension/queue-commands.ts +245 -0
  44. package/src/extension/queue-context.ts +12 -0
  45. package/src/extension/queue-integration.ts +434 -0
  46. package/src/extension/segment-context.ts +212 -0
  47. package/src/extension/session-lifecycle.ts +373 -0
  48. package/src/extension/settings-io.ts +202 -0
  49. package/src/extension/shortcuts-config.ts +357 -0
  50. package/src/extension/shortcuts-router.ts +383 -0
  51. package/src/extension/skills/inline-invocation.ts +174 -0
  52. package/src/extension/skills/ook.md +6 -0
  53. package/src/extension/skills/test.md +6 -0
  54. package/src/extension/stale-context.ts +10 -0
  55. package/src/extension/stash-history.ts +103 -0
  56. package/src/extension/state.ts +159 -0
  57. package/src/extension/status-line-renderers.ts +222 -0
  58. package/src/extension/types.ts +97 -0
  59. package/src/extension/vibe-command.ts +160 -0
  60. package/src/extension/welcome-control.ts +27 -0
  61. package/src/extension/welcome-integration.ts +153 -0
  62. package/src/git/status.ts +332 -0
  63. package/src/paths/agent-dirs.ts +67 -0
  64. package/src/render/timer.ts +46 -0
  65. package/src/segments/core.ts +256 -0
  66. package/src/segments/custom.ts +114 -0
  67. package/src/segments/index.ts +3 -0
  68. package/src/segments/registry.ts +87 -0
  69. package/src/segments/shared.ts +36 -0
  70. package/src/segments/system.ts +235 -0
  71. package/src/segments/usage.ts +178 -0
  72. package/src/shell/cd-command.ts +190 -0
  73. package/src/shortcuts/matching.ts +61 -0
  74. package/src/theme/colors.ts +60 -0
  75. package/src/theme/icons.ts +175 -0
  76. package/src/theme/separators.ts +41 -0
  77. package/src/theme/theme.ts +211 -0
  78. package/src/tools/graph.ts +75 -0
  79. package/src/tools/patch.ts +179 -0
  80. package/src/tools/ripgrep.ts +104 -0
  81. package/src/usage/context.ts +97 -0
  82. package/src/usage/ledger.ts +293 -0
  83. package/src/usage/rates.ts +155 -0
  84. package/src/welcome/auto-dismiss.ts +43 -0
  85. package/src/welcome/banner.ts +68 -0
  86. package/src/welcome/discover.ts +234 -0
  87. package/src/welcome/format.ts +18 -0
  88. package/src/welcome/index.ts +5 -0
  89. package/src/welcome/layout.ts +36 -0
  90. package/src/welcome/overlay.ts +80 -0
  91. package/src/welcome/renderer.ts +157 -0
  92. package/src/welcome/sessions.ts +107 -0
  93. package/src/welcome/types.ts +41 -0
  94. package/src/welcome/widgets/graph-widget.ts +25 -0
  95. package/src/welcome/widgets/index.ts +20 -0
  96. package/src/welcome/widgets/queue-widget.ts +26 -0
  97. package/src/welcome/widgets/sessions-widget.ts +23 -0
  98. package/src/welcome/widgets/shortcuts-widget.ts +17 -0
  99. package/src/welcome/widgets/system-widget.ts +29 -0
  100. package/src/working-vibes/generate.ts +144 -0
  101. package/src/working-vibes/index.ts +24 -0
  102. package/src/working-vibes/manager.ts +198 -0
  103. package/src/working-vibes/provider.ts +163 -0
  104. package/src/working-vibes/storage.ts +357 -0
  105. package/theme.example.json +24 -0
  106. package/tsconfig.json +13 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,724 @@
1
+ # Changelog
2
+
3
+ ## [0.17.3] - 2026-08-10
4
+
5
+ ### Added
6
+ - **Inline skill/command invocation** — Trigger skills with `/` and commands with `$` directly from the powerline/wishcraft input, with trigger expansion. Skill discovery scans agent-global and project-local skill/prompt dirs (from `feat/inline-skill-invocation`, #5).
7
+
8
+ ### Fixed
9
+ - **Fullscreen footer height** — Return one blank footer line so the Powerline footer matches Pi fullscreen dock sizing at startup (ported from upstream `nicobailon/pi-powerline-footer` #151).
10
+ - **Post-compaction queue delivery** — Snapshot the queue context and session generation before delayed delivery, and reset undelivered items to queued on a stale extension context instead of marking them failed (ported from upstream `27cc7bf`).
11
+ - **Global shell history fallback** — Cache an unreadable global history file as empty under its fingerprint so bash mode keeps working without logging a stack on every keypress until the file changes (ported from upstream `d3649cf` #149).
12
+
13
+ ## [0.17.2] - 2026-08-05
14
+
15
+ ### Fixed
16
+ - **Context segment stale after compaction.** The `session_compact` handler didn't reset `coreContextUsageCache` or trigger a status render, so the bar kept showing the pre-compact fill (e.g. `196k/200k (98%)`) after compaction completed. Now resets the cache and forces an immediate redraw on compaction completion.
17
+
18
+ ## [0.17.0] - 2026-08-05
19
+
20
+ ### Added
21
+ - **Full powerline menu** (`alt+p`): Navigate segments / Configure… / Open ports (full list) / TPS detail / Toggle. Configure sub-menu changes preset, sets/clears the TPS override, toggles UDP in open-ports, sets segment labels, and shows current config.
22
+ - **`alt+i` info shortcut** — opens the full open-ports list directly.
23
+ - **Configurable keybinds** — `powerlineShortcuts.menu` and `powerlineShortcuts.info` (defaults `alt+p` / `alt+i`), with the same conflict resolution as the other powerline shortcuts. Set to `null` to disable. Applies after `/reload`.
24
+ - **Segment labels** — `powerline.segmentLabels` renames the text for any segment (e.g. `tps: "speed"`), shown between the icon and the value.
25
+
26
+ ## [0.16.0] - 2026-08-05
27
+
28
+ ### Fixed
29
+ - **TPS rewritten with a 1-second sliding window.** The previous rolling EMA spiked (e.g. `tps:1118`) because renders fire every ~33ms during streaming, making per-render `dOut/dt` explode on tiny `dt`. TPS is now `tokens in the last ~1s` over a 5s sample ring — stable, honest, decays to 0 when idle. No more absurd values.
30
+ - **Open-ports now counts unique TCP listening ports** by default (was unique TCP+UDP, which included noisy UDP multicast/ephemeral like mDNS 5353, DHCP, SSDP). New `segmentOptions.openPorts.includeUdp` opts back into UDP. 23 TCP unique on the dev machine (was 33).
31
+
32
+ ## [0.15.0] - 2026-08-05
33
+
34
+ ### Added
35
+ - **Navigable powerline segments** — `alt+p` now opens an overlay mirroring the live status bar segments; `↑`/`↓` move, `enter` activates a per-segment action (TPS set hint, open-ports list, git branch, etc.). Pi core renders the footer as static text, so live click is not possible; this is the closest interactive equivalent.
36
+ - Segment icons: TPS shows a rocket/bolt and lights up in the tokens color while generating; open-ports shows a plug icon.
37
+
38
+ ### Fixed
39
+ - **TPS no longer shows absurd values** (e.g. `tps:12775`). It now uses a rolling token-rate (EMA-smoothed, reset after idle gaps) instead of a session-average, which broke after extension reload because `sessionStartTime` resets while output is cumulative.
40
+ - **Open-ports count is now unique ports** (dedupes IPv4/IPv6 dual-stack listeners) instead of raw `ss` lines (48 raw → 32 unique on the dev machine). Column parsing is column-agnostic (works for both `ss` and `netstat`).
41
+ - **Context segment hidden** instead of showing `NaN`/`??` when no context window is known.
42
+
43
+ ## [0.14.1] - 2026-08-05
44
+
45
+ ### Fixed
46
+ - README documents custom segments, custom presets, and the `chef` preset (TPS + open-ports + interactive commands).
47
+
48
+ ## [0.14.0] - 2026-08-05
49
+
50
+ ### Added
51
+ - **Fully customizable segments** — Define your own status segments in settings without touching TypeScript: `command` (runs a shell command, optional `cacheMs`), `env` (reads an env var, optional `fallback`), and `static` (fixed text). Each supports `prefix` and `color`.
52
+ - **Custom presets** — Define presets in settings with `left`/`right`/`secondary` segment lists, `separator`, `colors`, and `segmentOptions`; they merge over built-ins and are selectable via `powerline.preset`.
53
+ - **Release automation** — `npm run release <patch|minor|major|1.2.3>` bumps version, rolls CHANGELOG, tags `vX.Y.Z`, and pushes; `.github/workflows/release.yml` runs tests and publishes to npm on tag.
54
+
55
+ ### Fixed
56
+ - **TPS segment** now derives a real session-average tokens/sec from live `usageStats` instead of showing `?` when `POWERLINE_TPS` is unset (env override still honored).
57
+ - **Open ports segment** counts listening sockets robustly: `ss -tulnH` → `ss -tuln` → `netstat -tuln` → `/proc/net` parse, instead of silently showing `0`/`?`.
58
+ - **`chef` preset colors** use valid theme colors (`queue: "dim"` instead of the invalid `"muted"` that triggered a fallback warning).
59
+ - Removed the duplicate `thinking` entry in the built-in segment registry.
60
+
61
+ ## [0.13.0] - 2026-08-05
62
+
63
+ Forked to GroepOnline. Adds ChefGroep-specific status segments and interactivity.
64
+
65
+ ### Added
66
+ - **`chef` preset** — Muted, slash-separated status bar preset (hostname, model, thinking, shell mode, path, git, queue left; tps, open ports, cost, context %, time right).
67
+ - **`tps` segment** — Reads `POWERLINE_TPS` env var and shows tokens/sec in the status bar.
68
+ - **`open_ports` segment** — Counts listening sockets via `ss -tuln` and shows the open-port total.
69
+ - **`/tps` command** — Show or set `POWERLINE_TPS` at runtime.
70
+ - **`/open-ports` command** — Lists listening sockets in a select overlay.
71
+ - **`alt+p` shortcut** — Powerline quick-actions menu (preset, TPS, ports, toggle).
72
+
73
+ ### Changed
74
+ - Removed rainbow gradient from high thinking levels; uses the preset's `thinking` color instead.
75
+
76
+ ## [0.12.1] - 2026-08-04
77
+
78
+ ### Fixed
79
+ - **Queue preview labels** — Saved ideas now show an `idea:` preview label instead of looking like normal queued prompts, while deliverable, sending, and blocked queue items keep distinct labels.
80
+
81
+ ## [0.12.0] - 2026-08-03
82
+
83
+ ### Added
84
+ - **Strict TypeScript gate** — Added a source-only TypeScript check pinned to TypeScript 5.9.3 and Node 24 typings, plus a GitHub Actions workflow that runs typecheck before tests on Ubuntu and Windows.
85
+ - **Saved-idea follow-up commands** — Added `/ideas next` to send the oldest active captured idea to the current session, plus `/idea issue [id]` and `/ideas issue [id]` to hand saved ideas to the current agent for guarded GitHub issue triage.
86
+
87
+ ### Fixed
88
+ - **Compaction lifecycle support** — Switched compaction-aware queue delivery to Pi's supported `session_before_compact` and `session_compact` extension lifecycle instead of internal session events.
89
+
90
+ ## [0.11.0] - 2026-08-03
91
+
92
+ ### Added
93
+ - **Powerline Queue + Inbox** — Added a file-backed queue and idea inbox for capturing thoughts without interrupting the current agent. Messages submitted during compaction are held by Powerline and delivered after successful compaction, while failed or cancelled compactions leave them blocked and visible. `/compact <text>` now compacts and queues `<text>` as the next prompt instead of treating it as compaction-summary instructions. New `/idea`, `/ideas`, and `/queue` commands manage captured ideas, queued prompts, project aliases, retries, clears, and current-session delivery; the `queue` segment and preview row surface active queue, idea, and blocked counts.
94
+ - **Sigil idea capture** — Added leading-`#` idea capture so typing `# <idea>` and pressing Enter saves the idea instead of sending it. The sigil is configurable through `powerline.queue.captureSigil`, the editor prompt glyph switches to `#` while drafting a captured idea, stash history entries can be promoted to ideas, and delivered ideas include provenance for orchestrator handoff.
95
+ - **Combined cache-read format** — Added opt-in `powerline.cache_read.format: "both"` to show raw cache-read tokens alongside the cache hit rate, for example `cache in: 12k (80%)`. Thanks to e (@edabchann) for #136.
96
+
97
+ ## [0.10.0] - 2026-08-02
98
+
99
+ ### Changed
100
+ - **Long-session footer responsiveness** — Footer refreshes now reuse the active session branch and core context result while its leaf is unchanged, pull urgent paints ahead of queued streaming refreshes, and repaint as soon as background git data arrives. This removes repeated full-session walks from the interactive render path without slowing status updates.
101
+ - **Minimum Pi version** — Working vibes now stream through the model registry's provider, which Pi exposes from 0.81.0 onward, so the supported Pi range is `>=0.81.0 <0.84.0`.
102
+
103
+ ### Fixed
104
+ - **Vibe generation with extension-registered providers** — Fixed `No API provider registered for api: <name>` when the vibe model came from a provider registered by another extension. Pi 0.81 moved those providers out of the shared API table that the previous code path resolved against. Vibe requests now also carry resolved provider environment values and credential-derived base URLs, so profile-based and proxied providers reach the right endpoint. Thanks to Thurston Sandberg (@thurstonsand) for #134.
105
+
106
+ ## [0.9.0] - 2026-07-31
107
+
108
+ ### Added
109
+ - **Cost currency display** — Added optional non-USD display for the `cost` segment via `powerline.cost.currency`, with background FX-rate caching. Thanks to @tanuki-cat for #130.
110
+ - **Subagent cost accounting** — Added subagent child-run cost to the `cost` segment total so parallel/worker runs are reflected in session spend. Thanks to Ričardas Čubukinas (@xadips) for #128.
111
+
112
+ ### Changed
113
+ - **Native fixed input cutover** — Removed the extension-owned fixed editor and chat scrolling; Pi now owns native input and feed scrolling.
114
+
115
+ ### Fixed
116
+ - **Vibe generation theme parsing** — Fixed `/vibe generate` so multi-word theme names parse correctly when an optional count is provided. Thanks to Hacxy (@hacxy) for #127.
117
+
118
+ ## [0.8.1] - 2026-07-30
119
+
120
+ ### Changed
121
+ - **Interactive hot-path performance** — Shell history ghost suggestions now cache project and global history behind file-fingerprint validation instead of re-reading and re-parsing history files on every keystroke; fixed-editor cluster rendering only width-normalizes rows that can reach the terminal instead of every candidate line; and streaming token-stat updates reuse the append-only session prefix instead of rescanning the full event list. Measured on stress workloads with byte-identical output: 100k-line zsh history reads ~5,500x faster, large fixed-editor redraws ~390x faster, and 20k-event streaming token updates ~300x faster.
122
+
123
+ ## [0.8.0] - 2026-07-29
124
+
125
+ ### Added
126
+ - **Session directory switching** — Added `/cd <path>` to continue the current conversation from another working directory while keeping Pi tools and the footer path segment in sync. Thanks to chengxiang (@chengxiang1997) for #114.
127
+ - **Separator override** — Added `powerline.separator` so separator style can be chosen independently of the active preset. Thanks to Andy8647 and mj-meyer for #106/#116.
128
+ - **Git host icon** — Added opt-in `powerline.git.hostIcon` to replace the git branch icon with a detected GitHub, GitLab, Bitbucket, or generic git host icon when an origin remote is available. Thanks to Andy8647 for #113.
129
+ - **Segment display formats** — Added opt-in `powerline.context.format` and `powerline.cache_read.format` settings for compact percentage-style context and cache-read segments. Thanks to Andy8647 for #109.
130
+ - **copyOnSelect toggle** — Added `powerline.copyOnSelect` (default `true`) to control whether mouse text selection auto-copies to clipboard on release. Set to `false` to disable auto-copy; the selection then stays highlighted with a `N characters selected, ctrl+c to copy` hint, and copies explicitly via `ctrl+c` or right-click. Thanks to Andy8647 for #105.
131
+ - **Scroll-away card toggle** — Added `powerline.scrollAwayCard` and `/powerline scroll-away-card on|off|toggle` so the fixed editor and chat navigation shortcuts can remain enabled while the scroll-away hint card is hidden. Thanks to Alexander Gerdes (@Avg8888), Whisperfall, and Bruno Orsolon (@brunoorsolon) for #97/#108/#99.
132
+
133
+ ### Changed
134
+ - **TypeScript cleanup** — Tightened local result and helper types around vibe generation, prompt history, context usage, and bash history reset paths.
135
+ - **Inline custom UI repainting** — Avoids rerendering static chat while fixed-editor inline custom UI clusters repaint with unchanged viewport geometry. Thanks to JMHSV for #111.
136
+ - **Status render caching** — Caches session token aggregation between unchanged render inputs and keeps stale git segment values visible during background refreshes, reducing long-session redraw work and git flicker. Thanks to Andy8647 for #107.
137
+ - **Fixed-editor scrolling performance** — Uses terminal row shifts, cached transcript lines, an 8 ms repaint cadence, and transient shortcut-card hiding during active wheel movement to cut scroll latency and terminal output churn.
138
+
139
+ ### Fixed
140
+ - **Fixed-editor output padding** — Applies top-level `outputPad` as the fixed-editor outer inset so fixed-editor mode matches Pi’s regular output spacing. Thanks to Gabriel Dehan for #104.
141
+ - **Fixed-editor keyboard negotiation** — Retries extended keyboard mode setup briefly after entering the alternate screen so late Kitty/modifyOtherKeys negotiation is enabled on the active screen. Thanks to Raymond Ko for #102.
142
+ - **Theme override path** — Loads `theme.json` from the documented agent-dir `extensions/powerline-footer` path before falling back to the loaded package directory, and clarifies setup docs for `showLastPrompt` and layout rows. Thanks to MeisterP for #117.
143
+ - **Print-mode terminal cleanup** — Terminal reset and cursor restoration sequences run only during interactive TUI shutdowns, keeping `pi -p` output visible. Thanks to Sergey Konkin (@sergeykonkin) for #101.
144
+
145
+ ## [0.7.0] - 2026-07-14
146
+
147
+ ### Added
148
+ - **Fixed-editor scroll-away shortcut hint card** — Shows a stacked bottom/user/assistant shortcut card when chat is scrolled away from the bottom; clicking anywhere in the card jumps back to the bottom when fixed-editor mouse handling is enabled.
149
+ - **Welcome toggle** — Added `powerline.welcome` so the startup welcome UI can be disabled without disabling the footer. Thanks to OCPdev25, miloslavnosek, vzeazy, and Florian Kinder (@fank) for #48/#89.
150
+ - **Display options** — Added `powerline.cost.subscriptionDisplay` and `powerline.model.display` for subscription cost and provider-qualified model names. Thanks to Alexandr Burdiyan (@burdiyan), Meidhy (@dymayday), Mathu Mounasamy (@Mathuv), and pserey for #3/#83/#50.
151
+ - **Legacy sharp-S stash opt-in** — Added `powerline.stashSharpSShortcut` for users who intentionally want printable `ß` to trigger stash. Thanks to SebastianRuettiRuettger and Filip (@filipores) for #39/#84.
152
+ - **Contribution guide** — Added lightweight bug report, feature request, PR, testing, docs, and changelog guidance. Thanks to OCPdev25 for #49.
153
+ - **Agent-dir path support** — Respects `PI_CODING_AGENT_DIR` for global powerline settings, stash history, sessions, vibes, skills, commands, and extension discovery. Thanks to Hrand Liu (@IstPlayer) for #86.
154
+ - **Segment disabling** — Added `powerline.disabledSegments` to hide built-in or configured custom segments from any preset. Thanks to Brian Lange (@bjlange) for #88.
155
+ - **Startup token estimate** — The welcome UI now shows an approximate initial system-prompt token count before the first message. Thanks to Ibrahim Mohammed (@IbrahimMohammed47) for #80.
156
+ - **Configurable segment layout** — Added `powerline.layout` for exact `left`, `right`, and `secondary` group overrides on any preset, including explicit `custom:<id>` placement. This replaces the misleading fixed `custom` preset. Thanks to Bruno Orsolon (@brunoorsolon), Thurston Sandberg (@thurstonsand), and Arthur Bodera (@Thinkscape) for #54/#40/#37.
157
+ - **Primary row placement** — Added `powerline.placement` and `/powerline placement above|below|toggle` to move the primary powerline row around the editor while keeping notifications and responsive overflow in their existing groups. Thanks to Rogerio Saulo (@rsaulo) for #77.
158
+
159
+ ### Changed
160
+ - **Herdr and tmux scroll guidance** — Keeps fixed-editor mouse scrolling enabled by default and documents that host multiplexer scrollback needs `/powerline fixed-editor off`.
161
+ - **Bottom jump shortcut** — Uses `ctrl+alt+g` as the default fixed-editor jump-to-bottom shortcut instead of `ctrl+shift+g`.
162
+ - **Stash shortcut safety** — Literal `ß` is no longer consumed as stash by default; unambiguous Alt/Meta-S escape encodings still work.
163
+ - **Docs for UI and demo settings** — Clarified that the README screenshot is illustrative, documented a current footer setup, noted the old chrome limitation, and documented the URL modifier-click mouse-capture limitation plus Shift bypass. Thanks to Yosof Badr (@yosofbadr), kaiwah, Jason (@itguy327), Oliver Mannion (@tekumara), thurstonsand, jmd1011, and Thomas Dietert (@tdietert) for #75/#63/#45/#93/#95.
164
+ - **Pi 0.80 compatibility** — Widened peer ranges and refreshed dev dependencies against `@earendil-works/*` 0.80.3. Thanks to Alexander Gerdes (@Avg8888) and AlexKucera for #87.
165
+ - **Shortcut disabling** — `powerlineShortcuts` and `bashMode.toggleShortcut` now treat `null` or `""` as explicit disabled values and omit disabled chat jumps from fixed-editor hints. Thanks to Koen De Jaeger (@kdejaeger) for #73.
166
+ - **Editor autocomplete composition** — Powerline now passes Pi's autocomplete provider through a previous editor's `setAutocompleteProvider()` before adding bash-mode wrappers, preserving prior autocomplete-provider wrappers where possible. Thanks to Tifan Dwi Avianto (@tifandotme) for #61.
167
+ - **Context usage display** — The context segment now shows used tokens, maximum tokens, and percentage together. Thanks to Fayi Femi-Balogun (@fayimora) for #92.
168
+ - **Maximum thinking style** — Pi's `max` thinking level now uses the same rainbow treatment as `high` and `xhigh`. Thanks to @AiraNadih for #94.
169
+
170
+ ### Fixed
171
+ - **Fixed-editor wheel bursts** — Coalesces rapid mouse-wheel packets into throttled viewport repaints and defers the follow-up TUI render until scrolling settles, reducing flicker and slowdowns in terminal multiplexers.
172
+ - **Welcome discovery noise** — Ignored vanished/dangling skill, extension, and prompt-template entries during welcome overlay discovery instead of printing stack traces.
173
+ - **Reload keyboard protocol** — Preserves extended keyboard modes on `/reload` and only hard-resets them on real quit. Thanks to Francesco Buldo (@frabul), Alexander Gerdes (@Avg8888), and Sylvain Rivierre (@slhad) for #81/#82/#85.
174
+ - **Prompt history recall** — Up-arrow prompt history no longer clobbers multiline drafts from the last logical line. Thanks to Nelson Tam (@nelson) and ceblan for #79.
175
+ - **Stale extension contexts** — Handles both old and new Pi stale-context messages and guards late `agent_end` UI access without swallowing unrelated errors. Thanks to JackIce (@jackice) and Salem Sayed Abdel Gawad (@salemsayed) for #62, and Joshua Brunner (@joshuajbrunner), Arthur Bodera (@Thinkscape), @k0valik, and ET (@EdrisT) for #33.
176
+ - **Context icon glyph** — Switched the Nerd Font context icon to a stable v3-friendly database glyph. Thanks to Michael Leonard (@LeonardMH) for #41.
177
+ - **Recent session names** — Recent-session project names now prefer the session JSONL header `cwd` basename before falling back to encoded directory names. Thanks to Jon Leemon (@nomeelnoj) for #76.
178
+ - **Quit cursor restore** — When fixed-editor mode is off, quitting now moves the terminal cursor below Pi's inline editor area without running on `/reload` or session switches. Thanks to afkdev8 (@mrinfinidy) for #60.
179
+ - **Custom cursor bindings** — Prompt-history recall now intercepts only literal Up/Down arrows, so custom cursor bindings such as `alt+j` and `alt+k` reach normal editor movement. Thanks to Hrand Liu (@IstPlayer) for #96.
180
+
181
+ ## [0.6.1] - 2026-06-08
182
+
183
+ ### Fixed
184
+ - **Prompt history draft preservation** — Returning from prompt-history browsing with Down now restores the unsent editor draft instead of clearing it.
185
+
186
+ ## [0.6.0] - 2026-06-05
187
+
188
+ ### Changed
189
+ - **Prompt history recall** — Pressing Up at the end of non-bash editor text now recalls the previous submitted prompt, while Up inside the text keeps normal cursor movement.
190
+ - **Pi 0.76 compatibility** — Verified compatibility against `@earendil-works/pi-ai`, `@earendil-works/pi-coding-agent`, and `@earendil-works/pi-tui` `0.76.0`, then widened peer/dev ranges to `>=0.74.0 <0.77.0`.
191
+ - **Git polling control** — Added `powerline.git.polling` with `full`, `branch`, and `off` modes so users can avoid background dirty-state polling in worktrees or Windows environments.
192
+
193
+ ### Fixed
194
+ - **Session-switch keyboard modes** — Preserved Kitty keyboard protocol and `modifyOtherKeys` across session switches so Shift+Enter keeps inserting newlines after resume/new/fork.
195
+ - **Fixed-editor IME positioning** — Kept the terminal cursor anchored to the logical editor cursor even when the visible hardware cursor is hidden, improving IME candidate placement.
196
+ - **Fixed-editor image scrolling** — Cleared stale Kitty image placements when the app-owned chat viewport moves so images scroll with text.
197
+ - **Stale extension contexts** — Ignored only Pi's stale-context render race during session replacement while preserving other render errors.
198
+ - **Stash text lookup** — Fell back to Pi's editor text when the custom editor temporarily reports an empty string, so stash/copy/history actions can still see current input.
199
+ - **Segment option config** — Parsed and merged documented segment options like `powerline.path.mode` over preset defaults.
200
+ - **Fixed-editor selection hit-testing** — Refreshed root viewport state before mouse selection hit-testing so copied text stays aligned after output changes.
201
+
202
+ ## [0.5.6] - 2026-05-26
203
+
204
+ ### Fixed
205
+ - **Fixed-editor mouse scrolling** — Reasserted terminal mouse reporting after fixed-editor writes so mouse-wheel scrolling keeps working when the fixed editor is enabled.
206
+ - **Fixed-editor chat clipping** — Guarded fixed-editor viewport writes against terminal autowrap drift so full-width user message boxes no longer lose characters at the right edge.
207
+
208
+ ## [0.5.5] - 2026-05-26
209
+
210
+ ### Fixed
211
+ - **Pi 0.75 extension installs** — Widened Pi package peer dependency ranges so `pi-powerline-footer` can install alongside extensions that require Pi 0.75.x packages.
212
+
213
+ ## [0.5.4] - 2026-05-10
214
+
215
+ ### Fixed
216
+ - **Editor undo shortcut** — Command-Z now restores deleted prompt text through the custom editor undo stack.
217
+
218
+ ## [0.5.3] - 2026-05-10
219
+
220
+ ### Fixed
221
+ - **Fixed-editor status scrolling** — Mouse wheel scrolling now repaints the app-owned chat viewport immediately when fixed status rows are present, instead of waiting for a later TUI diff render.
222
+
223
+ ## [0.5.2] - 2026-05-09
224
+
225
+ ### Fixed
226
+ - **Editor file drops** — Finder file, folder, image, and screenshot drops now insert path strings into the custom editor, including terminals that send `file://` URI drops.
227
+ - **Fixed-editor status scrolling** — Mouse wheel and keyboard scrolling now refresh viewport bounds when fixed Pi/status rows appear, so fixed status messages no longer stop chat scrolling.
228
+
229
+ ## [0.5.1] - 2026-05-02
230
+
231
+ ### Fixed
232
+ - **Fixed-editor context-menu copy** — Right-clicking inside an app-owned text selection now restores the full highlighted range after terminal context-menu Copy, instead of leaving only the clicked word on the clipboard.
233
+
234
+ ## [0.5.0] - 2026-05-02
235
+
236
+ ### Changed
237
+ - **Fixed editor hard cutover** — Chat/feed content now scrolls in a TUI-owned viewport above the fixed powerline/editor cluster. Mouse wheel and PageUp/PageDown scroll chat without moving the editor. Dragging chat or fixed-editor text highlights it and copies on release. Use `/powerline fixed-editor on|off|toggle` to switch back to Pi’s regular scrolling layout, or `/powerline mouse-scroll off` for native terminal selection.
238
+ - **Chat shortcuts** — Added configurable previous/next shortcuts for jumping the fixed-editor chat viewport through user messages (`ctrl+shift+u` / `ctrl+shift+i`), LLM messages (`ctrl+alt+,` / `ctrl+alt+.`), plus `ctrl+shift+g` to jump straight to the bottom. Fixed-editor feed scrolling now also has configurable `scrollChatUp` / `scrollChatDown` shortcuts, defaulting to `cmd+up` / `cmd+down`.
239
+ - **Editor navigation shortcuts** — Added configurable `editorStart` / `editorEnd` shortcuts, defaulting to `cmd+shift+up` / `cmd+shift+down`, to move the editor cursor to the start of the first line or end of the last line. Shortcut settings are refreshed per session, and `cmd+shift` aliases canonicalize to the same `super+shift` form as the defaults. Unsupported Command-letter bindings are ignored instead of matching plain text input.
240
+
241
+ ### Fixed
242
+ - **Bash ghost shell safety** — Bash-mode and one-off `!command` ghost suggestions no longer spawn shell-native completion probes, avoiding interactive zsh/fish/bash subprocesses that can interfere with terminal job control and stop the parent Pi process.
243
+ - **Thinking status repainting** — Thinking level changes now invalidate the powerline layout immediately and use live thinking state, so rapid Shift+Tab cycling updates the footer without waiting for the next agent turn, typing throttle, or session-history refresh. Tree navigation clears the live override so branch history can show the selected branch's thinking level.
244
+ - **Context usage repainting** — The context-window usage segment now refreshes from live streaming assistant usage on message updates and forces a final repaint at message/turn completion, so values like `17.1%/272k` update sooner than session-history-only refreshes. `/tree` navigation with a branch summary now uses Pi's current context estimate immediately instead of waiting for the next assistant turn. Live usage is cleared across sessions and agent turns, `totalTokens` is preferred when providers report it, and zero-token, aborted, or error messages fall back to the last valid persisted usage instead of flashing `0%`.
245
+ - **Extension status repainting** — `ctx.ui.setStatus()` updates now invalidate the powerline layout immediately while idle, so custom status items such as `🪃 auto` appear without waiting for the next prompt or agent event.
246
+ - **Fixed-editor working status** — Pi's working/status line, like `⠏ Shaolin Switchblade Sync...`, now stays fixed with the editor instead of scrolling with chat.
247
+ - **Fixed-editor follow-up queue** — The fixed editor now re-enables Pi's extended keyboard mode after entering alternate screen, so `Alt+Enter` still reaches Pi's follow-up queue while the agent is streaming.
248
+ - **Fixed-editor terminal cleanup** — Session shutdown and emergency exit cleanup now leave alternate screen before clearing the full Kitty CSI-u stack and xterm modifyOtherKeys mode, preventing keypresses from leaking as sequences like `97;1:3u` after quitting Pi.
249
+ - **Fixed-editor overlay width** — Overlay compositing now normalizes tabbed overlay lines and strips OSC shell-integration markers from overlay-visible base lines, preventing side-chat overlays from producing rendered lines wider than the terminal.
250
+ - **Fixed-editor selection context menu** — App-owned text selection now briefly releases mouse reporting after copy so a follow-up right-click can open the terminal context menu.
251
+ - **Fixed-editor selection overflow** — Chat selection highlighting now strips OSC shell-integration control sequences before slicing text, preventing exposed `]133` markers from making rendered lines exceed terminal width.
252
+ - **Fixed-editor text selection** — Dragging inside the fixed editor cluster now highlights and copies selected text instead of being swallowed by mouse-scroll handling. Dragging a chat selection to the viewport edge now scrolls while keeping the selection active.
253
+ - **Fixed-editor right-click menu** — Right-click temporarily releases mouse reporting so the terminal context menu remains available while fixed-editor mouse scrolling is enabled.
254
+ - **Fixed-editor double-click selection** — Double-clicking chat or fixed-editor text now selects the whole line while mouse reporting is active.
255
+ - **Fixed-editor keyboard scrolling** — Command+PageUp/PageDown and Ctrl+Shift+Up/Down now scroll the fixed-editor chat viewport, giving compact keyboards a default page-scroll shortcut.
256
+ - **Fixed-editor submit follow** — Submitting editor text now returns the fixed-editor chat viewport to the bottom so the new prompt/output stays in view.
257
+
258
+ ## [0.4.20] - 2026-04-26
259
+
260
+ ### Changed
261
+ - **Welcome overlay logo** — Replaced the old π splash art with a block-rendered version of the current Pi logo.
262
+ - **Status line branding** — Removed the standalone `π` segment from the powerline surface so the editor row starts with model/status information.
263
+ - **Stash shortcut** — Accept macOS `Option+S` even when the terminal emits the literal `ß` character instead of an `alt+s` escape sequence.
264
+ - **Model segment** — Removed the extra ASCII model glyph before the model name.
265
+
266
+ ## [0.4.19] - 2026-04-25
267
+
268
+ ### Fixed
269
+ - **Editor responsiveness during live status updates** — Coalesced status repaints and moved the top powerline row out of the editor render path so shifting status items do less work while typing.
270
+
271
+ ## [0.4.18] - 2026-04-23
272
+
273
+ ### Fixed
274
+ - **Editor responsiveness while streaming** — Reduced powerline layout work during assistant streaming and coalesced welcome-dismiss work so typing in the editor stays more responsive while output is arriving.
275
+
276
+ ## [0.4.17] - 2026-04-23
277
+
278
+ ### Fixed
279
+ - **Session shutdown crash** — Footer/editor render paths no longer read stale session-bound `ctx` objects during Ctrl+C, reload, or session replacement, preventing Pi 0.69.x stale-extension errors.
280
+ - **Bash transcript theme regression** — The bash transcript widget now uses the full Pi theme provided by the widget factory, avoiding `theme.fg is not a function` crashes from editor theme objects.
281
+ - **Welcome overlay shutdown cleanup** — Delayed welcome overlays now ignore replaced sessions and clean up their countdown timer safely during early dismissal.
282
+
283
+ ## [0.4.16] - 2026-04-21
284
+
285
+ ### Fixed
286
+ - **Project-local powerline settings now apply** — The extension now merges global and project settings for `powerline`, so project `.pi/settings.json` custom items and preset overrides render correctly without requiring a matching global config.
287
+ - **Preset changes preserve project-local custom items** — `/powerline <preset>` now writes back to the project settings file when that file owns the `powerline` key, preserving existing `customItems` instead of silently bypassing project configuration.
288
+ - **Promoted status rendering cleanup** — Custom powerline items now normalize status text consistently, keep notification-style statuses renderable when promoted, and avoid duplicate notification display above the editor.
289
+ - **Custom-item review cleanup** — Removed the remaining `any` escape from the custom-items test and deleted redundant narration comments in the touched segment code.
290
+ - **Per-level thinking colors restored** — `minimal`, `low`, and `medium` thinking levels now render with their documented distinct colors again, and the theme surface now exposes only the thinking color keys that actually affect runtime rendering.
291
+ - **Thinking-color cleanup** — Narrowed the segment theme contract to the `fg()` API it actually uses, removed the regression test cast, and cleaned the nearby thinking docs/comments to match the project’s plain-text style.
292
+
293
+ ## [0.4.15] - 2026-04-21
294
+
295
+ ### Added
296
+ - **`theme.json` icon overrides** — `theme.json` can now override footer icons alongside colors, so you can tone down or remove glyphs like the auto-compact marker without editing `icons.ts`.
297
+
298
+ ### Fixed
299
+ - **Older pi autocomplete compatibility** — Bash-mode autocomplete providers now stay sync-compatible when they have no dropdown items, so wrapping the default provider no longer risks handing older hosts a `Promise` from `getSuggestions()`.
300
+ - **Enter no longer forces ghost text** — Bash-mode Enter now submits exactly what is in the editor instead of silently accepting the current ghost suggestion first. `Tab` and Right Arrow remain the explicit ghost-accept actions.
301
+
302
+ ## [0.4.14] - 2026-04-21
303
+
304
+ ### Fixed
305
+ - **Ghost-first bash predictions** — Bash mode no longer opens or relies on a shell autocomplete dropdown. Typing now updates only the inline ghost suggestion, and `Tab` accepts that ghost instead of surfacing a menu.
306
+ - **Irrelevant command-position suggestions** — Command stems now resolve from successful project history first, can use guarded global Git history as a backup, and fall back to a tiny curated default set when history is absent. Today that means `g` → `git status` and `c` → `cd ..`, while generic command noise like `g++` stays out of the shell UI.
307
+ - **Empty-prompt global-history ghosts** — When bash mode starts on an empty prompt without a successful project-history match, it now stays empty instead of promoting an unvalidated global-history command.
308
+
309
+ ## [0.4.13] - 2026-04-20
310
+
311
+ ### Fixed
312
+ - **Stale footer repaint after model changes and agent completion** — The shared footer/editor render path now invalidates its cached layout and repaints immediately on `model_select` and `agent_end`, fixing the stale model/status behavior reported in issue #11 and avoiding the incomplete direct-render approach proposed in PR #19.
313
+ - **Bracketed paste shell UI refresh** — After multiline bracketed paste completes, bash-mode ghost suggestions and shell autocomplete now refresh normally instead of staying stale.
314
+
315
+ ## [0.4.12] - 2026-04-20
316
+
317
+ ### Added
318
+ - **Sticky bash mode** — Added `/bash-mode`, `/bash-reset`, a configurable `ctrl+shift+b` toggle, a persistent per-session shell runtime, and an embedded shell transcript below the editor.
319
+ - **Shell-aware completion pipeline** — Added project/global shell history ranking, git-aware completions, PATH/path completions, active-shell native completion adapters, and ghost suggestions for bash mode.
320
+ - **Shell mode status segment** — Added a dedicated `shell_mode` segment that shows when bash mode is active and whether the managed shell is idle or running.
321
+ - **Test coverage for bash mode primitives** — Added tests for transcript truncation, history parsing, completion ranking, ghost suggestions, and managed shell cwd persistence.
322
+ - **Empty-prompt bash ghost suggestions** — Entering bash mode on an empty prompt now shows a history-based inline ghost suggestion immediately, and clearing the prompt restores it without auto-opening the dropdown.
323
+
324
+ ### Changed
325
+ - **Auto-hide native context under custom compaction** — When `pi-custom-compaction` is installed and enabled, the powerline now hides `context_pct` and `context_total` so the footer does not show stale native context usage after virtual background summaries apply.
326
+
327
+ ### Fixed
328
+ - **Newest-first shell history ranking** — Bash mode now treats project and global shell history consistently so the newest matching command wins instead of older matches surfacing first.
329
+ - **Interrupted shell recovery** — If an interrupted shell command tears down the managed shell process, the session now marks the command as failed, clears stale process state, and starts cleanly on the next command instead of getting stuck.
330
+ - **Escaped fallback path completions** — Deterministic path completions now escape shell-special characters like spaces before insertion while keeping the dropdown labels readable.
331
+ - **Native completion cwd drift** — Shell-native completion probes now run from the managed shell cwd instead of the extension directory, so repo-aware and path-aware suggestions match the actual bash-mode location.
332
+ - **Broken bash argument completions** — Bash native completion no longer suggests unrelated executables like `declare` for argument positions such as `cd d`, and directory candidates keep their trailing slash.
333
+ - **Enter while shell is busy** — Pressing Enter with ghost text visible no longer mutates the editor when a shell command is already running.
334
+ - **Package release contents** — The published package now includes the new `bash-mode/*.ts` runtime files instead of only the root-level extension files.
335
+ - **Transcript eviction** — The bash transcript now keeps the active command visible even when that single command exceeds the retention cap, instead of evicting the running command entirely.
336
+ - **Escaped native zsh directory completions** — Native zsh completions now preserve trailing directory slashes for escaped path suggestions like `My\ Folder/`.
337
+ - **Prompt history navigation regression** — Bash mode no longer reuses pi-tui’s internal `historyIndex` slot for shell history state, so normal Up/Down prompt navigation works reliably again and Down clears the editor when returning to the live draft.
338
+ - **Empty-prompt shell history browsing** — Bash mode history navigation now works from an empty prompt too, returning the newest commands instead of reporting no matches.
339
+ - **One-off `!` / `!!` shell predictions** — Default one-off bash commands now reuse the shell completion pipeline too, so typing `!` or `!!` shows ghost suggestions immediately and Right Arrow accepts them just like sticky bash mode.
340
+ - **Bang-command completion alignment** — One-off shell predictions now only activate for real `!` / `!!` commands at the start of the prompt, matching pi’s actual submission behavior instead of also triggering after leading whitespace.
341
+ - **Hidden ghost acceptance** — Right Arrow no longer accepts a ghost suggestion when the cursor is not at the end of the line, so moving around inside a command behaves normally.
342
+ - **Working vibe generation on `openai-codex/*` and similar providers** — Vibe generation now sends a minimal system prompt to providers that require instructions, batch generation preserves provider error messages instead of collapsing them into `Empty response from model`, and the default vibe model now uses `openai-codex/gpt-5.4-mini` instead of an Anthropic default.
343
+ - **Multiline paste submission regression** — The custom editor no longer misreads bracketed multiline paste chunks as submit keys, so pasted text stays in the editor instead of getting split into separate submitted prompts.
344
+
345
+ ## [0.4.11] - 2026-04-14
346
+
347
+ ### Fixed
348
+ - **Prompt-width crash on pasted unicode text** — Replaced manual truncation in the last-prompt widget and welcome helpers with pi-tui truncation so pasted text containing grapheme clusters no longer overflows terminal width and crashes the UI.
349
+ - **Session usage typing cleanup** — Replaced broad session assistant-message casts with local type narrowing in footer context building.
350
+
351
+ ### Changed
352
+ - **Status copy simplified** — Removed emoji-based stash and fallback status markers from the current UI and docs.
353
+
354
+ ## [0.4.10] - 2026-04-12
355
+
356
+ ### Changed
357
+ - **Model segment simplified** — Footer model segment now shows model info only (plus thinking), without profile labels.
358
+
359
+ ### Removed
360
+ - **Profile switching surface** — Removed `/model-switcher`, profile cycle/select shortcuts, and profile persistence wiring from this extension.
361
+
362
+ ## [0.4.9] - 2026-04-03
363
+
364
+ ### Added
365
+ - **Recent project prompts in prompt history** — `/stash-history` and `ctrl+alt+h` now let you choose between saved stashed prompts and recent user-submitted prompts from pi sessions in the current project folder.
366
+
367
+ ### Fixed
368
+ - **Session transition cleanup in prompt history UI** — Unified stash and welcome cleanup under `session_start` reason handling so replacement starts reset session-local state without relying on removed post-transition extension events.
369
+
370
+ ## [0.4.8] - 2026-03-27
371
+
372
+ ### Fixed
373
+ - **Broken vibe generation after pi update** — Migrated from removed `modelRegistry.getApiKey()` to `getApiKeyAndHeaders()`, passing both `apiKey` and `headers` through to `complete()` so OAuth and custom proxy providers work correctly.
374
+
375
+ ## [0.4.7] - 2026-03-22
376
+
377
+ ### Fixed
378
+ - **Stale footer after profile switch** — Invalidated layout cache after switching profiles so the powerline updates immediately instead of lagging behind the notification.
379
+
380
+ ## [0.4.6] - 2026-03-22
381
+
382
+ ### Added
383
+ - **Model profiles** — Added saved model + thinking combos via `modelProfiles` in settings. When active, profiles with a label show the label in the model segment; profiles without a label append a `(P#)` indicator to the model name.
384
+ - **Profile shortcuts** — Added `alt+shift+tab` profile cycling and `ctrl+alt+m` profile selector overlay, both configurable through `powerlineShortcuts`.
385
+ - **`/model-switcher` command** — Added profile management commands for listing, adding (interactive picker or direct text), removing, and switching by profile number, with immediate persistence to `settings.json`.
386
+
387
+ ## [0.4.5] - 2026-03-19
388
+
389
+ ### Added
390
+ - **Stash history overlay** — Added `ctrl+alt+h` stash history picker showing up to 12 recent stashed prompts (newest first).
391
+ - **Stash history slash command** — Added `/stash-history` to open the same stash history picker from the command prompt.
392
+ - **Persistent stash history storage** — Stash history now saves to `~/.pi/agent/powerline-footer/stash-history.json`.
393
+ - **Insert mode prompt for stash history** — Selecting a stash history entry now supports `Replace`, `Append`, or `Cancel` when the editor already has text.
394
+ - **Editor-wide clipboard shortcuts** — Added `ctrl+alt+c` to copy all editor text and `ctrl+alt+x` to cut all editor text.
395
+ - **Configurable powerline shortcuts** — Added `powerlineShortcuts` settings support for `stashHistory`, `copyEditor`, and `cutEditor` bindings.
396
+
397
+ ### Changed
398
+ - **Stash lifecycle consistency** — Active stash resets on session switch and when `powerline` is disabled, while stash history persists to disk for reuse across restarts.
399
+ - **Stash update behavior** — Pressing `Alt+S` while both editor text and an active stash exist now updates the stash with the current editor text and clears the editor (no swap-back into the editor).
400
+ - **Shortcut override hardening** — Invalid shortcut override values are rejected, and conflicting shortcuts auto-fallback so `Alt+S` stash behavior and all three powerline shortcuts remain usable.
401
+
402
+ ## [0.4.4] - 2026-03-19
403
+
404
+ ### Removed
405
+ - Dropped npm `bin` installer shim and removed `cli.js`; package now targets `pi install npm:pi-powerline-footer` as the only install path.
406
+
407
+ ## [0.4.3] - 2026-03-19
408
+
409
+ ### Fixed
410
+ - **`nerd` preset crash on `primary` theme color** — Replaced invalid `tokens: "primary"` with `tokens: "muted"` so `/powerline nerd` no longer trips `Unknown theme color: primary` on current pi themes.
411
+ - **Stale theme docs** — Updated README and `theme.example.json` to remove `primary` as a supported theme color name and align documented defaults with runtime values.
412
+ - **Thinking level fallback from footer context** — `buildSegmentContext()` now correctly falls back to `ctx.getThinkingLevel()` when no session `thinking_level_change` event exists.
413
+ - **Vibe config persistence signaling** — `/vibe` commands now warn when runtime changes could not be written to `settings.json` instead of silently claiming persistence.
414
+ - **Welcome text width truncation** — Truncation now respects `visibleWidth()` per codepoint, preventing wide-character overflow in welcome rendering.
415
+ - **JS extension discovery parity** — `discoverLoadedCounts()` now recognizes directory `index.js` and standalone `.js` extension entries, not just TypeScript files.
416
+ - **Package count scope parity** — Welcome extension counts now include npm packages from both global (`~/.pi/agent/settings.json`) and project (`.pi/settings.json`) settings.
417
+ - **Dead `git` semantic color path** — Removed unused `git` semantic color wiring that was never read by segment rendering.
418
+ - **Vibe batch count hardening** — `/vibe generate` and `generateVibesBatch()` now clamp invalid/negative/huge counts to safe bounds.
419
+ - **Custom editor async race guard** — Late `setupCustomEditor()` async completion no longer re-attaches editor/footer/widgets after the extension has been disabled.
420
+ - **Vibe file path sanitization** — Theme names are now slugged to safe filenames before file reads/writes, preventing path-like theme strings from producing unsafe paths.
421
+ - **Home directory resolution hardening** — Settings/vibe path resolution now falls back to OS homedir APIs when `HOME`/`USERPROFILE` are unset.
422
+ - **Dead `thinkingHigh` semantic path** — Removed unused `thinkingHigh` semantic color plumbing from runtime theme config/types and example theme JSON.
423
+ - **Dead color table entries** — Removed unused ANSI color constants from `colors.ts` to match only colors actually used by welcome/editor chrome rendering.
424
+
425
+ ## [0.4.2] - 2026-03-15
426
+
427
+ ### Fixed
428
+ - **Ghost entries in extension statuses** — Status values that are purely ANSI escape codes with no visible text (zero `visibleWidth`) are now filtered out instead of rendering as blank ` · ` gaps in the powerline bar.
429
+ - **Double separator artifacts** — Extensions that bake in their own trailing separators (e.g., Glimpse's `G ·`) no longer clash with the segment's own ` · ` joiner. Trailing ANSI codes, whitespace, `·`, and `|` are stripped from each status value before joining.
430
+
431
+ ## [0.4.1] - 2026-03-12
432
+
433
+ ### Fixed
434
+ - **Prompt history now survives custom editor reinstalls** — Up-arrow recall is preserved across `/reload`, preset changes, and the editor's autocomplete self-rebind path by snapshotting prompt history before replacement and restoring it into the new custom editor instance. Explicitly disabling `powerline-footer` via `/powerline` still clears the extension-managed history on purpose.
435
+
436
+ ## [0.4.0] - 2026-03-11
437
+
438
+ ### Added
439
+ - **Editor stash** — Press `Alt+S` to save editor content and clear the editor, type a quick prompt, and have the stashed text auto-restored when the agent finishes. Toggles: stash, pop, swap, or "nothing to stash" depending on editor/stash state. Status indicator (`stash`) shown in the powerline bar on presets that include `extension_statuses`. Auto-restore only happens when the editor is empty (won't overwrite text you started typing).
440
+
441
+ ### Fixed
442
+ - **Stale state on session switch** — `/new` and `/resume` now properly reset session timer, context, last prompt, streaming flag, and dismiss any active welcome overlay/header. Previously these carried over from the old session because `session_start` only fires on initial load and `/reload`, not on session changes.
443
+
444
+ ### Removed
445
+ - Dead `clearThemeCache()` export from `theme.ts`
446
+ - Dead `user_message` event handler (welcome dismissal already handled by `agent_start`, `tool_call`, and editor keypress)
447
+ - Unused parameters across handlers and segments
448
+ - Redundant double settings file read (consolidated into single `readSettings()` helper)
449
+
450
+ ## [0.3.1] - 2026-02-28
451
+
452
+ ### Changed
453
+ - **Last prompt reminder now always visible** — Shows your last message at all times (not just during streaming) so you always have context. Disable via `"showLastPrompt": false` in settings.json.
454
+
455
+ ## [0.3.0] - 2026-02-28
456
+
457
+ ### Added
458
+ - **Last prompt reminder** — Shows your last message below the powerline bar while the agent is streaming, so you don't forget what you asked during long operations. Displays as a subtle gray `↳ your message here...` that disappears when the agent finishes.
459
+
460
+ ## [0.2.24] - 2026-02-15
461
+
462
+ ### Fixed
463
+ - **Secondary row disappearing** — When overflow segments exceeded terminal width, the entire secondary row vanished instead of showing what fits. The secondary row now applies the same width-fitting logic as the top bar, adding segments until full and stopping there.
464
+
465
+ ### Removed
466
+ - Dead `width` field from `SegmentContext` (set but never read by any segment)
467
+ - Dead `rainbow` function and `RAINBOW_COLORS` from `colors.ts` (duplicated in `theme.ts`, which is the version actually used)
468
+
469
+ ## [0.2.23] - 2026-02-06
470
+
471
+ ### Fixed
472
+ - **Slash command autocomplete not appearing** — Custom editor created during `session_start` never received the autocomplete provider because pi v0.52.7 moved `setupAutocomplete()` to run after extensions load. The `handleInput` override now detects the missing provider on first keystroke, re-triggers `setEditorComponent` (which succeeds because the provider exists by then), and forwards the keystroke to the new editor. Users without editor-replacing extensions were unaffected.
473
+
474
+ ## [0.2.22] - 2026-01-31
475
+
476
+ ### Fixed
477
+ - **Detached HEAD flickering** — Git branch segment no longer oscillates between showing "detached" and hiding every 500ms when HEAD is detached
478
+ - Root cause: two competing branch detection methods (provider reads `.git/HEAD` → `"detached"`, extension runs `git branch --show-current` → empty/null) fought via a `??` fallback that leaked the provider value on every cache expiry
479
+ - Branch cache now returns stale value while refreshing instead of falling through to provider
480
+ - Detached HEAD now shows the short commit SHA (e.g., `abc1234 (detached)`) instead of bare "detached"
481
+
482
+ ### Changed
483
+ - **Extracted `runGit` helper** — Consolidated duplicated process-spawning logic from `fetchGitBranch` and `fetchGitStatus` into a shared helper
484
+ - `fetchGitBranch` now distinguishes "not a git repo" (null, early exit) from "detached HEAD" (empty string, SHA lookup) — avoids spawning a wasteful second process for non-git directories
485
+
486
+ ## [0.2.21] - 2026-01-31
487
+
488
+ ### Changed
489
+ - **Status bar moved above editor** — Powerline segments now render above the top border instead of below the bottom border, keeping the input prompt closer to the conversation
490
+ - **Removed blank line below editor** — Eliminated extra spacing after the status bar
491
+ - **Default segment order** — Model and thinking level now appear before path for better at-a-glance info (π → model → think → path → ...)
492
+
493
+ ## [0.2.20] - 2026-01-30
494
+
495
+ ### Changed
496
+ - **Editor layout redesign** — Replaced rounded box (`╭╮│╰╯`) with clean open layout:
497
+ - Subtle grey `─` top/bottom borders with 1-char margins
498
+ - `>` input prompt on first content line (light gray), continuation lines indented to match
499
+ - Status bar moved below the bottom border as a standalone line
500
+ - Status bar no longer has trailing `─` fill
501
+ - **Softer border colors** — Borders use muted grey (`sep`) instead of bright blue (`border`)
502
+
503
+ ### Fixed
504
+ - **Scroll indicator detection** — Bottom border regex now matches editor scroll indicators (`─── ↓ N more`) in addition to plain borders, preventing broken rendering when editor content is scrollable
505
+ - **Segment overflow** — `topBarAvailable` no longer wastes 4 chars on removed box corners, giving segments the full terminal width for layout calculation
506
+
507
+ ## [0.2.19] - 2026-01-28
508
+
509
+ ### Added
510
+ - **File-based vibe mode** — Pre-generate vibes once, pull from file at runtime (zero cost, instant)
511
+ - `/vibe generate <theme> [count]` — Generate and save vibes to `~/.pi/agent/vibes/{theme}.txt`
512
+ - `/vibe mode file` — Switch to file-based mode
513
+ - `/vibe mode generate` — Switch back to on-demand generation
514
+ - Uses seed-based deterministic shuffle for no-repeat selection
515
+ - Works offline, no API key needed at runtime
516
+
517
+ ### Improved
518
+ - **Better vibe variety in generate mode** — Tracks last 5 vibes and excludes them from generation
519
+ - **Updated prompt** — Now emphasizes creativity and avoiding clichéd phrases
520
+ - **Richer tool call context** — Uses agent's response text instead of just "reading file: X" for more contextual vibes
521
+ - **Configurable max message length** — `workingVibeMaxLength` setting (default: 65 chars, up from 50)
522
+
523
+ ## [0.2.18] - 2026-01-28
524
+
525
+ ### Fixed
526
+ - **Race condition in vibe generation** — Fixed bug where stale vibe generations could overwrite newer ones by capturing AbortController in local variable
527
+
528
+ ## [0.2.17] - 2026-01-28
529
+
530
+ ### Added
531
+ - **Working Vibes** — AI-generated themed loading messages that match your preferred style
532
+ - Set a theme with `/vibe star trek` and loading messages become "Running diagnostics..." instead of "Working..."
533
+ - Configure via `settings.json`: `"workingVibe": "pirate"` for nautical-themed messages
534
+ - Supports any theme: star trek, pirate, zen, noir, cowboy, etc.
535
+ - Shows "Channeling {theme}..." placeholder, then updates when AI responds (within 3s timeout)
536
+ - **Auto-refresh on tool calls** — Generates new vibes during long tasks (rate-limited, default 30s)
537
+ - Configurable refresh interval via `workingVibeRefreshInterval` (in seconds)
538
+ - Custom prompt templates via `workingVibePrompt` with `{theme}` and `{task}` variables
539
+ - Uses claude-haiku-4-5 by default (~$0.000015/generation), configurable via `/vibe model` or `workingVibeModel` setting
540
+
541
+ ### Fixed
542
+ - **Event handlers now use correct events** — Replaced non-existent `stream_start`/`stream_end` with `agent_start`/`agent_end`
543
+ - **Removed duplicate powerline bar** — Footer no longer renders redundant status during streaming
544
+
545
+ ## [0.2.16] - 2026-01-28
546
+
547
+ ### Fixed
548
+ - **Model and path colors restored** — Fixed color regression from v0.2.13 theme refactor:
549
+ - Model segment now uses original pink (`#d787af`) instead of white/gray (`text`)
550
+ - Path segment now uses original cyan (`#00afaf`) instead of muted gray
551
+
552
+ ## [0.2.15] - 2026-01-27
553
+
554
+ ### Added
555
+ - **Status notifications above editor** — Extension status messages that look like notifications (e.g., `[pi-annotate] Received: CANCEL`) now appear on a separate line above the editor input
556
+ - Notification-style statuses (starting with `[`) appear above editor
557
+ - Compact statuses (e.g., `MCP: 6 servers`) remain in the powerline bar
558
+
559
+ ## [0.2.14] - 2026-01-26
560
+
561
+ ### Fixed
562
+ - **Theme type mismatch crash** — Fixed `TypeError: theme.fg is not a function` caused by passing `EditorTheme` (from pi-tui) instead of `Theme` (from pi-coding-agent) to segment rendering
563
+ - **Invalid theme color** — Changed `"primary"` to `"text"` in default colors since `"primary"` is not a valid `ThemeColor`
564
+
565
+ ## [0.2.13] - 2026-01-27
566
+
567
+ ### Added
568
+ - **Theme system** — Colors now integrate with pi's theme system instead of hardcoded values
569
+ - Each preset defines its own color scheme with semantic color names
570
+ - Optional `theme.json` file for user customization (power user feature)
571
+ - Colors can be theme names (`accent`, `primary`, `muted`) or hex values (`#ff5500`)
572
+ - Added `theme.example.json` documenting all available color options
573
+
574
+ ### Changed
575
+ - Segments now use pi's `Theme` object for color rendering
576
+ - Removed hardcoded ANSI color codes in favor of theme-based colors
577
+ - Presets include both layout AND color scheme for cohesive looks
578
+ - Simplified thinking level colors to use semantic `thinking` color (rainbow preserved for high/xhigh)
579
+
580
+ ## [0.2.12] - 2026-01-27
581
+
582
+ ### Added
583
+ - **Responsive segment layout** — Segments dynamically flow between top bar and secondary row based on terminal width
584
+ - When terminal is wide: all segments fit in top bar, secondary row hidden
585
+ - When terminal is narrow: overflow segments move to secondary row automatically
586
+
587
+ ### Changed
588
+ - **Default preset reordered** — New order: π → folder → model → think → git → context% → cache → cost
589
+ - Path now appears before model name for better visual hierarchy
590
+ - Thinking level now appears right after model name
591
+ - Added git, cache_read, and cost to primary row in default preset
592
+ - **Thinking label shortened** — `thinking:level` → `think:level` to save 3 characters
593
+
594
+ ### Fixed
595
+ - **Narrow terminal crash** — Welcome screen now gracefully skips rendering on terminals < 44 columns wide
596
+ - **Editor crash on very narrow terminals** — Falls back to original render when width < 10
597
+ - **Streaming footer crash** — Truncation now properly handles edge cases and won't render content that exceeds terminal width
598
+ - **Secondary widget crash** — Content width is now validated before rendering
599
+ - **Layout cache invalidation** — Cache now properly clears when preset changes or powerline is toggled off
600
+
601
+ ## [0.2.11] - 2026-01-26
602
+
603
+ ### Changed
604
+ - Added `pi` manifest to package.json for pi v0.50.0 package system compliance
605
+ - Added `pi-package` keyword for npm discoverability
606
+
607
+ ## [0.2.10] - 2026-01-17
608
+
609
+ ### Fixed
610
+ - Welcome overlay now properly dismisses for `p "command"` case by:
611
+ - Adding `tool_call` event listener (fires before stream_start)
612
+ - Checking `isStreaming` flag when overlay is about to show
613
+ - Checking session for existing activity (assistant messages, tool calls)
614
+ - Refactored dismissal logic into `dismissWelcome()` helper
615
+
616
+ ## [0.2.9] - 2026-01-17
617
+
618
+ ### Fixed
619
+ - Welcome overlay/header now dismisses when agent starts streaming (fixes `p "command"` case where welcome would briefly flash)
620
+ - Race condition where dismissal request could be lost due to 100ms setup delay in overlay
621
+
622
+ ## [0.2.8] - 2026-01-16
623
+
624
+ ### Changed
625
+ - `quietStartup: true` → shows welcome as header (dismisses on first input)
626
+ - `quietStartup: false` or not set → shows welcome as centered overlay (dismisses on key/timeout)
627
+ - Both modes use same two-column layout: logo, model info, tips, loaded counts, recent sessions
628
+ - Refactored welcome.ts to share rendering logic between header and overlay
629
+
630
+ ### Fixed
631
+ - `/powerline` toggle off now clears all custom UI (editor, footer, header)
632
+
633
+ ## [0.2.6] - 2026-01-16
634
+
635
+ ### Fixed
636
+ - Removed invalid `?` keyboard shortcut tip, replaced with `Shift+Tab` for cycling thinking level
637
+
638
+ ## [0.2.5] - 2026-01-16
639
+
640
+ ### Added
641
+ - **Welcome overlay** — Branded "pi agent" splash screen shown as centered overlay on startup
642
+ - Two-column boxed layout with gradient PI logo (magenta → cyan)
643
+ - Shows current model name and provider
644
+ - Keyboard tips section (?, /, !)
645
+ - Loaded counts: context files (AGENTS.md), extensions, skills, and prompt templates
646
+ - Recent sessions list (up to 3, with time ago)
647
+ - Auto-dismisses after 30 seconds or on any key press
648
+ - Version now reads from package.json instead of being hardcoded
649
+ - Context file discovery now checks `.claude/AGENTS.md` paths (matching pi-mono)
650
+
651
+ ## [0.2.4] - 2026-01-15
652
+
653
+ ### Fixed
654
+ - Compatible with pi-tui 0.47.0 breaking change: CustomEditor constructor now requires `tui` as first argument
655
+
656
+ ## [0.2.3] - 2026-01-15
657
+
658
+ ### Fixed
659
+ - npm bin entry now works correctly with `npx pi-powerline-footer`
660
+
661
+ ## [0.2.2] - 2026-01-15
662
+
663
+ ### Changed
664
+ - **Path segment defaults to basename** — Shows just the directory name (e.g., `powerline-footer`) instead of full path to save space
665
+ - **New path modes** — `basename` (default), `abbreviated` (truncated full path), `full` (complete path)
666
+ - Simplified path options: replaced `abbreviate`, `stripWorkPrefix` with cleaner `mode` option
667
+ - Full/nerd presets use `abbreviated` mode, default/minimal/compact use `basename`
668
+ - Thinking segment now uses dedicated gradient colors (thinkingOff → thinkingMedium)
669
+
670
+ ### Fixed
671
+ - Path basename extraction now uses `path.basename()` for Windows compatibility
672
+ - Git branch cache now stores `null` results, preventing repeated git calls in non-git directories
673
+ - Git status cache now stores empty results for non-git directories (was also spawning repeatedly)
674
+ - Removed dead `footerDispose` variable (cleanup handled by pi internally)
675
+
676
+ ## [0.2.1] - 2026-01-10
677
+
678
+ ### Added
679
+ - **Live git branch updates** — Branch now updates in real-time when switching via `git checkout`, `git switch`, etc.
680
+ - **Own branch fetching** — Extension fetches branch directly via `git branch --show-current` instead of relying solely on FooterDataProvider
681
+ - **Branch cache with 500ms TTL** — Faster refresh cycle for branch changes
682
+ - **Staggered re-renders for escape commands** — Multiple re-renders at 100/300/500ms to catch updates from `!` commands
683
+
684
+ ### Fixed
685
+ - Git branch not updating after `git checkout` to existing branches
686
+ - Race condition where FooterDataProvider's branch cache wasn't updating in time
687
+
688
+ ## [0.2.0] - 2026-01-10
689
+
690
+ ### Added
691
+ - **Extension statuses segment** — Displays status text from other extensions (e.g., rewind checkpoint count)
692
+ - **Thinking level segment** — Live-updating display of current thinking level (`thinking:off`, `thinking:med`, etc.)
693
+ - **Rainbow effect** — High and xhigh thinking levels display with rainbow gradient inspired by Claude Code's ultrathink
694
+ - **Color gradient** — Thinking levels use progressive colors: gray → purple-gray → blue → teal → rainbow
695
+ - **Streaming visibility** — Status bar now renders in footer during streaming so it's always visible
696
+
697
+ ### Changed
698
+ - Extension statuses appear at end of status bar (last item in default/full/nerd presets)
699
+ - Default preset now includes `thinking` segment after model
700
+ - Thinking level reads from session branch entries for live updates
701
+ - Footer invalidate() now triggers re-render for settings changes
702
+ - Responsive truncation — progressively removes segments on narrow windows instead of hiding status
703
+
704
+ ### Fixed
705
+ - ANSI color reset after status content to prevent color bleeding
706
+ - ANSI color reset after rainbow text
707
+
708
+ ### Removed
709
+ - Unused brain icon definitions
710
+
711
+ ## [0.1.0] - 2026-01-10
712
+
713
+ ### Added
714
+ - Initial release
715
+ - Rounded box design rendering in editor top border
716
+ - 18 segment types: pi, model, thinking, path, git, subagents, token_in, token_out, token_total, cost, context_pct, context_total, time_spent, time, session, hostname, cache_read, cache_write
717
+ - 6 presets: default, minimal, compact, full, nerd, ascii
718
+ - 10 separator styles: powerline, powerline-thin, slash, pipe, dot, chevron, star, block, none, ascii
719
+ - Git integration with async status fetching and 1s cache TTL
720
+ - Nerd Font auto-detection for common terminals
721
+ - oh-my-pi dark theme color matching
722
+ - Context percentage warnings at 70%/90%
723
+ - Auto-compact indicator
724
+ - Subscription detection