@selesai/code 0.7.0 → 0.8.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.
Files changed (72) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +4 -2
  3. package/dist/extensions/agent-browser.test.ts +195 -0
  4. package/dist/extensions/agent-browser.ts +158 -0
  5. package/dist/extensions/inline-skills.test.ts +14 -0
  6. package/dist/extensions/inline-skills.ts +14 -7
  7. package/dist/extensions/package.json +2 -1
  8. package/dist/extensions/pi-powerline-footer/.github/workflows/test.yml +27 -0
  9. package/dist/extensions/pi-powerline-footer/CHANGELOG.md +153 -0
  10. package/dist/extensions/pi-powerline-footer/CONTRIBUTING.md +16 -0
  11. package/dist/extensions/pi-powerline-footer/README.md +192 -44
  12. package/dist/extensions/pi-powerline-footer/bash-mode/completion.ts +19 -4
  13. package/dist/extensions/pi-powerline-footer/bash-mode/editor.ts +80 -25
  14. package/dist/extensions/pi-powerline-footer/bash-mode/history.ts +81 -29
  15. package/dist/extensions/pi-powerline-footer/bash-mode/types.ts +1 -1
  16. package/dist/extensions/pi-powerline-footer/cd-command.ts +190 -0
  17. package/dist/extensions/pi-powerline-footer/colors.ts +2 -1
  18. package/dist/extensions/pi-powerline-footer/context-usage.ts +121 -6
  19. package/dist/extensions/pi-powerline-footer/currency-rates.ts +142 -0
  20. package/dist/extensions/pi-powerline-footer/editor-composition.ts +32 -0
  21. package/dist/extensions/pi-powerline-footer/git-status.ts +108 -6
  22. package/dist/extensions/pi-powerline-footer/icons.ts +11 -2
  23. package/dist/extensions/pi-powerline-footer/index.ts +1056 -324
  24. package/dist/extensions/pi-powerline-footer/lifecycle.ts +10 -0
  25. package/dist/extensions/pi-powerline-footer/package.json +10 -6
  26. package/dist/extensions/pi-powerline-footer/paths.ts +22 -0
  27. package/dist/extensions/pi-powerline-footer/powerline-config.ts +297 -15
  28. package/dist/extensions/pi-powerline-footer/presets.ts +6 -25
  29. package/dist/extensions/pi-powerline-footer/queue/store.ts +361 -0
  30. package/dist/extensions/pi-powerline-footer/queue/types.ts +54 -0
  31. package/dist/extensions/pi-powerline-footer/render-scheduler.ts +12 -7
  32. package/dist/extensions/pi-powerline-footer/segments.ts +114 -107
  33. package/dist/extensions/pi-powerline-footer/session-usage.ts +1 -1
  34. package/dist/extensions/pi-powerline-footer/shortcuts.ts +17 -3
  35. package/dist/extensions/pi-powerline-footer/tests/bash-mode.test.ts +189 -17
  36. package/dist/extensions/pi-powerline-footer/tests/cd-command.test.ts +144 -0
  37. package/dist/extensions/pi-powerline-footer/tests/context-usage.test.ts +120 -2
  38. package/dist/extensions/pi-powerline-footer/tests/custom-items.test.ts +245 -22
  39. package/dist/extensions/pi-powerline-footer/tests/editor-composition.test.ts +48 -0
  40. package/dist/extensions/pi-powerline-footer/tests/editor-responsiveness.test.ts +34 -0
  41. package/dist/extensions/pi-powerline-footer/tests/fixed-editor-border.test.ts +39 -0
  42. package/dist/extensions/pi-powerline-footer/tests/git-status.test.ts +92 -0
  43. package/dist/extensions/pi-powerline-footer/tests/guide.test.ts +4 -1
  44. package/dist/extensions/pi-powerline-footer/tests/jump-shortcuts.test.ts +33 -197
  45. package/dist/extensions/pi-powerline-footer/tests/mode-aware-trigger.test.ts +79 -0
  46. package/dist/extensions/pi-powerline-footer/tests/paths.test.ts +63 -0
  47. package/dist/extensions/pi-powerline-footer/tests/queue-store.test.ts +195 -0
  48. package/dist/extensions/pi-powerline-footer/tests/quit-cursor.test.ts +14 -0
  49. package/dist/extensions/pi-powerline-footer/tests/remaining-regressions.test.ts +167 -0
  50. package/dist/extensions/pi-powerline-footer/tests/stash-shortcut.test.ts +23 -18
  51. package/dist/extensions/pi-powerline-footer/tests/thinking-segment.test.ts +16 -1
  52. package/dist/extensions/pi-powerline-footer/tests/token-stats.test.ts +249 -0
  53. package/dist/extensions/pi-powerline-footer/tests/usage-display.test.ts +237 -0
  54. package/dist/extensions/pi-powerline-footer/tests/welcome.test.ts +199 -0
  55. package/dist/extensions/pi-powerline-footer/tests/working-vibes.test.ts +191 -100
  56. package/dist/extensions/pi-powerline-footer/theme.ts +32 -18
  57. package/dist/extensions/pi-powerline-footer/token-stats.ts +304 -0
  58. package/dist/extensions/pi-powerline-footer/tsconfig.json +13 -0
  59. package/dist/extensions/pi-powerline-footer/types.ts +74 -29
  60. package/dist/extensions/pi-powerline-footer/welcome-dismiss.ts +34 -0
  61. package/dist/extensions/pi-powerline-footer/welcome.ts +65 -10
  62. package/dist/extensions/pi-powerline-footer/working-vibes.ts +44 -11
  63. package/dist/extensions/pi-subagents/package-lock.json +2 -2
  64. package/dist/extensions/pi-subagents/package.json +1 -1
  65. package/dist/extensions/pi-subagents/src/slash/inline-subagents.ts +57 -24
  66. package/dist/extensions/pi-subagents/test/unit/inline-subagents.test.ts +82 -7
  67. package/dist/extensions/pi-subagents/test/unit/package-manifest.test.ts +1 -1
  68. package/dist/extensions/ponytail/index.js +1 -31
  69. package/dist/extensions/ponytail/test/extension.test.js +5 -22
  70. package/dist/extensions/rtk.test.ts +27 -12
  71. package/dist/extensions/rtk.ts +41 -35
  72. package/package.json +1 -1
@@ -2,6 +2,159 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ### Changed
6
+ - **Upstream 0.12.3 merge (Selesai fork)** — Updated from upstream v0.5.4 to v0.12.3. Adopts the Powerline queue/inbox (`/idea`, `/ideas`, `/queue`, `/ideas next`, `/ideas issue`), compaction-aware queue delivery, `/cd` session directory switching, cost currency and subagent cost accounting, `powerline.separator`/`layout`/`placement`/`disabledSegments`/`welcome` options, git host icons, cached session token stats, strict TypeScript gate, and all upstream fixes through 0.12.3. Selesai-specific features are preserved: the fixed editor and chat scrolling, the guide overlay, the TPS tracker, session-usage accounting, and mode-aware autocomplete trigger forwarding.
7
+
8
+
9
+ ## [0.12.3] - 2026-08-09
10
+
11
+ ### Fixed
12
+ - **Post-compaction context display** — Show a clearly marked estimate from the active compacted context after compaction or `/reload`, instead of stale pre-compaction usage or an unknown placeholder.
13
+
14
+ ## [0.12.2] - 2026-08-08
15
+
16
+ ### Fixed
17
+ - **Fullscreen footer height** — Return one blank footer line so the Powerline footer matches Pi fullscreen dock sizing at startup. Thanks to @acidnik for #144.
18
+ - **Global shell history fallback** — Cache unreadable global history files as empty until their fingerprint changes, so bash mode keeps working without logging a stack on every keypress. Thanks to @RomainMuller for #143.
19
+ - **Post-compaction queue delivery** — Snapshot the queue context before delayed delivery so a reload or session replacement cannot crash by reading a stale extension context. Thanks to @pascalandy for the report in nicobailon/pi-subagents#897.
20
+
21
+ ## [0.12.1] - 2026-08-04
22
+
23
+ ### Fixed
24
+ - **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.
25
+
26
+ ## [0.12.0] - 2026-08-03
27
+
28
+ ### Added
29
+ - **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.
30
+ - **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.
31
+
32
+ ### Fixed
33
+ - **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.
34
+
35
+ ## [0.11.0] - 2026-08-03
36
+
37
+ ### Added
38
+ - **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.
39
+ - **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.
40
+ - **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.
41
+
42
+ ## [0.10.0] - 2026-08-02
43
+
44
+ ### Changed
45
+ - **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.
46
+ - **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`.
47
+
48
+ ### Fixed
49
+ - **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.
50
+
51
+ ## [0.9.0] - 2026-07-31
52
+
53
+ ### Added
54
+ - **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.
55
+ - **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.
56
+
57
+ ### Changed
58
+ - **Native fixed input cutover** — Removed the extension-owned fixed editor and chat scrolling; Pi now owns native input and feed scrolling.
59
+
60
+ ### Fixed
61
+ - **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.
62
+
63
+ ## [0.8.1] - 2026-07-30
64
+
65
+ ### Changed
66
+ - **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.
67
+
68
+ ## [0.8.0] - 2026-07-29
69
+
70
+ ### Added
71
+ - **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.
72
+ - **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.
73
+ - **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.
74
+ - **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.
75
+ - **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.
76
+ - **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.
77
+
78
+ ### Changed
79
+ - **TypeScript cleanup** — Tightened local result and helper types around vibe generation, prompt history, context usage, and bash history reset paths.
80
+ - **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.
81
+ - **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.
82
+ - **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.
83
+
84
+ ### Fixed
85
+ - **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.
86
+ - **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.
87
+ - **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.
88
+ - **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.
89
+
90
+ ## [0.7.0] - 2026-07-14
91
+
92
+ ### Added
93
+ - **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.
94
+ - **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.
95
+ - **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.
96
+ - **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.
97
+ - **Contribution guide** — Added lightweight bug report, feature request, PR, testing, docs, and changelog guidance. Thanks to OCPdev25 for #49.
98
+ - **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.
99
+ - **Segment disabling** — Added `powerline.disabledSegments` to hide built-in or configured custom segments from any preset. Thanks to Brian Lange (@bjlange) for #88.
100
+ - **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.
101
+ - **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.
102
+ - **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.
103
+
104
+ ### Changed
105
+ - **Herdr and tmux scroll guidance** — Keeps fixed-editor mouse scrolling enabled by default and documents that host multiplexer scrollback needs `/powerline fixed-editor off`.
106
+ - **Bottom jump shortcut** — Uses `ctrl+alt+g` as the default fixed-editor jump-to-bottom shortcut instead of `ctrl+shift+g`.
107
+ - **Stash shortcut safety** — Literal `ß` is no longer consumed as stash by default; unambiguous Alt/Meta-S escape encodings still work.
108
+ - **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.
109
+ - **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.
110
+ - **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.
111
+ - **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.
112
+ - **Context usage display** — The context segment now shows used tokens, maximum tokens, and percentage together. Thanks to Fayi Femi-Balogun (@fayimora) for #92.
113
+ - **Maximum thinking style** — Pi's `max` thinking level now uses the same rainbow treatment as `high` and `xhigh`. Thanks to @AiraNadih for #94.
114
+
115
+ ### Fixed
116
+ - **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.
117
+ - **Welcome discovery noise** — Ignored vanished/dangling skill, extension, and prompt-template entries during welcome overlay discovery instead of printing stack traces.
118
+ - **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.
119
+ - **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.
120
+ - **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.
121
+ - **Context icon glyph** — Switched the Nerd Font context icon to a stable v3-friendly database glyph. Thanks to Michael Leonard (@LeonardMH) for #41.
122
+ - **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.
123
+ - **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.
124
+ - **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.
125
+
126
+ ## [0.6.1] - 2026-06-08
127
+
128
+ ### Fixed
129
+ - **Prompt history draft preservation** — Returning from prompt-history browsing with Down now restores the unsent editor draft instead of clearing it.
130
+
131
+ ## [0.6.0] - 2026-06-05
132
+
133
+ ### Changed
134
+ - **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.
135
+ - **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`.
136
+ - **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.
137
+
138
+ ### Fixed
139
+ - **Session-switch keyboard modes** — Preserved Kitty keyboard protocol and `modifyOtherKeys` across session switches so Shift+Enter keeps inserting newlines after resume/new/fork.
140
+ - **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.
141
+ - **Fixed-editor image scrolling** — Cleared stale Kitty image placements when the app-owned chat viewport moves so images scroll with text.
142
+ - **Stale extension contexts** — Ignored only Pi's stale-context render race during session replacement while preserving other render errors.
143
+ - **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.
144
+ - **Segment option config** — Parsed and merged documented segment options like `powerline.path.mode` over preset defaults.
145
+ - **Fixed-editor selection hit-testing** — Refreshed root viewport state before mouse selection hit-testing so copied text stays aligned after output changes.
146
+
147
+ ## [0.5.6] - 2026-05-26
148
+
149
+ ### Fixed
150
+ - **Fixed-editor mouse scrolling** — Reasserted terminal mouse reporting after fixed-editor writes so mouse-wheel scrolling keeps working when the fixed editor is enabled.
151
+ - **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.
152
+
153
+ ## [0.5.5] - 2026-05-26
154
+
155
+ ### Fixed
156
+ - **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.
157
+
5
158
  ## [0.5.4] - 2026-05-10
6
159
 
7
160
  ### Fixed
@@ -0,0 +1,16 @@
1
+ # Contributing
2
+
3
+ Thanks for helping improve `pi-powerline-footer`.
4
+
5
+ For bug reports, include the powerline version, Pi version, OS, terminal, your relevant `powerline` settings, what you expected, what happened, and exact reproduction steps. Screenshots are useful for rendering issues, but please also paste any terminal error text or stack trace.
6
+
7
+ For feature or config requests, describe the workflow you are trying to improve, the setting shape you expect to use, and whether the behavior should be enabled by default or opt-in.
8
+
9
+ For PRs, keep the change narrow and include tests for behavior changes when possible. Update `README.md` for user-facing settings or shortcuts, and update `CHANGELOG.md` under `[Unreleased]` with contributor credit when the change comes from an issue, PR, report, or review.
10
+
11
+ Before opening a PR, run:
12
+
13
+ ```bash
14
+ npm test
15
+ git diff --check
16
+ ```
@@ -6,29 +6,34 @@
6
6
 
7
7
  Customizes the default [pi](https://github.com/badlogic/pi-mono) editor with a powerline-style status bar, welcome overlay, and AI-generated "vibes" for loading messages. Inspired by [Powerlevel10k](https://github.com/romkatv/powerlevel10k) and [oh-my-pi](https://github.com/can1357/oh-my-pi).
8
8
 
9
- <img width="1261" height="817" alt="Image" src="https://github.com/user-attachments/assets/4cc43320-3fb8-4503-b857-69dffa7028f2" />
9
+ <img width="1261" height="817" alt="Example powerline UI" src="https://github.com/user-attachments/assets/4cc43320-3fb8-4503-b857-69dffa7028f2" />
10
+
10
11
 
11
12
  ## Features
12
13
 
13
14
  **Editor stash** — Press `Alt+S` to save your editor content and clear the editor, type a quick prompt, and your stashed text auto-restores when the agent finishes. Toggles between stash, pop, and update-existing-stash. A `stash` indicator appears in the powerline bar while text is stashed.
14
15
 
16
+ **Powerline Queue + Inbox** — Capture thoughts without interrupting the current agent. Type `# <idea>` and press Enter to save an idea instead of sending it; `# @global <idea>`, `# @current <idea>`, and `# @alias <idea>` route it. Messages typed during compaction are held by Powerline and delivered after successful compaction instead of disappearing into Pi's native queue. `/idea`, `/ideas`, and `/queue` provide a file-backed inbox for current-session prompts, project ideas, aliases, retries, clears, and manual delivery. Use `/ideas next` to work the oldest active idea in the current session, or `/ideas issue` to hand it to the current agent for safe GitHub issue triage. Active queue, idea, and blocked counts appear in the `queue` segment only when there is something to show.
17
+
15
18
  **Working Vibes** — AI-generated themed loading messages. Set `/vibe star trek` and your "Working..." becomes "Running diagnostics..." or "Engaging warp drive...". Supports any theme: pirate, zen, noir, cowboy, etc.
16
19
 
17
20
  **Welcome and guide** — A recurring Selesai guide appears on startup, new, resumed, and forked sessions. It maps workflow commands, delegation and research prompts, skills, handoff, recovery, and settings to concrete next steps. Use `/guide` to reopen it, `/guide compact` for a small header, `/guide off` to remember dismissal, or `/guide reset` to restore the full tour. New guide features are called out after upgrades; only the guide mode and version marker are persisted.
18
21
 
22
+ **Welcome overlay** — Branded splash screen shown as centered overlay on startup. Shows gradient logo, model info, keyboard tips, loaded AGENTS.md/extensions/skills/templates counts, an approximate initial system-prompt token count, and recent sessions. Auto-dismisses after 30 seconds or on any key press. Set `powerline.welcome` to `false` to disable it while keeping the footer enabled.
23
+
19
24
  **Rounded box design** — Status renders directly in the editor's top border, not as a separate footer.
20
25
 
21
- **Fixed editor cluster** — In interactive TUI sessions, chat/feed content scrolls above the fixed Pi working/status line, powerline rows, editor, ghost suggestions, bash transcript, and last-prompt/status rows. Scroll chat with the mouse wheel, PageUp/PageDown, Command+PageUp/PageDown, Ctrl+Shift+Up/Down, or message-jump shortcuts; the editor stays put. Drag text to copy it, drag selection to the viewport edge to scroll, double-click a line to select it, and right-click to open the terminal menu. Use `/powerline fixed-editor off` for Pi’s regular scrolling layout, or `/powerline mouse-scroll off` for native terminal selection.
26
+ **Native Pi layout** — Pi owns fixed input, feed scrolling, selection, and terminal behavior; this extension supplies powerline widgets and the custom bash/stash/editor integrations.
22
27
 
23
- **Live thinking level indicator** — Shows current thinking level (`think:off`, `think:med`, etc.) with per-level colors. High and xhigh levels use a rainbow effect inspired by Claude Code's ultrathink.
28
+ **Live thinking level indicator** — Shows current thinking level (`think:off`, `think:med`, etc.) with per-level colors. High, xhigh, and max levels use a rainbow effect inspired by Claude Code's ultrathink.
24
29
 
25
30
  **Smart defaults** — Nerd Font auto-detection for iTerm, WezTerm, Kitty, Ghostty, and Alacritty with ASCII fallbacks. Colors matched to oh-my-pi's dark theme.
26
31
 
27
32
  **Git integration** — Async status fetching with 1s cache TTL. Automatically invalidates on file writes/edits. Shows branch, staged (+), unstaged (*), and untracked (?) counts.
28
33
 
29
- **Context awareness** — Color-coded warnings at 70% (yellow) and 90% (red) context usage. During streaming, the context segment refreshes from live assistant usage instead of waiting for the next turn. Auto-compact indicator when enabled. If `pi-custom-compaction` is installed and enabled, the powerline automatically hides native context segments so the footer does not show stale post-summary usage.
34
+ **Context awareness** — Color-coded warnings above 70% (yellow) and above 90% (red) context usage. During streaming, the context segment refreshes from live assistant usage instead of waiting for the next turn. Auto-compact indicator when enabled. If `pi-custom-compaction` is installed and enabled, the powerline automatically hides native context segments so the footer does not show stale post-summary usage.
30
35
 
31
- **Token intelligence** — Smart formatting (1.2k, 45M), subscription detection (shows "(sub)" vs dollar cost).
36
+ **Token intelligence** — Smart formatting (1.2k, 45M), used/max/percentage context display, subscription detection, and configurable subscription cost display.
32
37
 
33
38
  **Sticky bash mode** — Toggle bash mode with `ctrl+shift+b` or `/bash-mode`. It keeps a managed shell session alive for the current pi session, shows a dedicated `shell_mode` segment, streams command output into an embedded transcript below the editor, and lets `cd` or exported state persist across commands.
34
39
 
@@ -44,26 +49,62 @@ Restart pi to activate.
44
49
 
45
50
  ## Usage
46
51
 
47
- Activates automatically. Toggle with `/powerline`, switch presets with `/powerline <name>`, fixed-editor mode with `/powerline fixed-editor on|off|toggle`, and wheel mode with `/powerline mouse-scroll on|off|toggle`.
52
+ Activates automatically. Toggle with `/powerline`, switch presets with `/powerline <name>`, and move the primary row with `/powerline placement above|below|toggle`.
53
+
54
+ Use `/cd <path>` to continue the current conversation from another working directory. It supports relative paths, absolute paths, `~`, `~/...`, and directory completions. With no argument, `/cd` prints the current Pi session directory. The command switches into a cwd-updated session file so Pi tools and the footer path segment agree after the change.
55
+
56
+ Powerline Queue + Inbox commands and capture shortcuts:
57
+
58
+ - `# <text>` — capture an idea for the current project without sending it to the agent
59
+ - `# @global <text>` — capture a global idea
60
+ - `# @current <text>` — capture an idea targeted to the current session
61
+ - `/queue alias <name> [path]` — save a project alias, defaulting to the current cwd when `path` is omitted
62
+ - `# @name <text>` — capture an idea for a saved project alias
63
+ - `/compact <text>` — compact now and queue `<text>` as the next prompt after successful compaction
64
+ - `/idea [@target] <text>` — command form of idea capture, useful for scripts and users who disable the sigil
65
+ - `/idea issue [id]` — hand the oldest active idea, or a specific idea, to the current agent for safe GitHub issue triage
66
+ - `/ideas` — open the captured-ideas picker
67
+ - `/ideas next` — send the oldest active idea to the current session
68
+ - `/ideas issue [id]` — ask the current agent to dedupe and file a GitHub issue only when the target repo is clear and owned/controlled
69
+ - `/ideas send <id>` — send an idea to the current session
70
+ - `/queue` — open the queued-prompt picker
71
+ - `/queue send [id]` / `/queue retry [id]` — deliver a queued item now
72
+ - `/queue clear <id|all>` — clear queued prompt items
73
+ - `/queue target <id> @name|global|current` — retarget a queued item
74
+
75
+ The default capture sigil is `#`. When the editor text starts with `# `, the prompt glyph changes to `#`; pressing Enter saves the idea, clears the editor, and leaves the original sigil text in editor history for quick recovery. Configure or disable this under `powerline.queue.captureSigil`:
76
+
77
+ ```json
78
+ {
79
+ "powerline": {
80
+ "queue": {
81
+ "captureSigil": "#"
82
+ }
83
+ }
84
+ }
85
+ ```
86
+
87
+ Set `captureSigil` to `false` if you often submit markdown headings and prefer `/idea` instead.
48
88
 
49
- Fixed editor is on by default.
89
+ Captured data is stored under the Pi agent directory in `powerline-footer/inbox.jsonl` and `powerline-footer/projects.json`. `inbox.jsonl` is a stable read surface for orchestrators and helper agents; each line is a queue item with `id`, `text`, `createdAt`, `updatedAt`, `source`, `target`, `intent`, `status`, and optional `error`. Writes should still go through Powerline commands or the store so locking and atomic writes are preserved. Ideas sent with `/ideas next` or `/ideas send <id>` include a small provenance header so the receiving agent can treat them as deferred captured context. `/idea issue` and `/ideas issue` do not file issues directly from the extension; they send a guarded handoff prompt that tells the current agent to dedupe open issues first, create a GitHub issue only for a clear owned/controlled repo, and ask before filing when the target is unclear.
50
90
 
51
- - `/powerline fixed-editor off` — return to Pi’s regular scrolling layout
52
- - `/powerline fixed-editor on` — re-enable the fixed editor
53
- - `/powerline fixed-editor toggle` — switch between the two
91
+ - `/powerline placement below` — move the primary powerline row below the editor
92
+ - `/powerline placement above` — restore the default placement
93
+ - `/powerline placement toggle` — switch between above and below
54
94
 
55
- You can also set it in `~/.pi/agent/settings.json` or project-local `.pi/settings.json`:
95
+ You can also set it in the agent settings file (`~/.selesai/agent/settings.json` by default, or under `SELESAI_CODING_AGENT_DIR`) or project-local `.selesai/settings.json`:
56
96
 
57
97
  ```json
58
98
  {
99
+ "showLastPrompt": true,
59
100
  "powerline": {
60
101
  "preset": "default",
61
- "fixedEditor": false
102
+ "placement": "below",
103
+ "welcome": true
62
104
  }
63
105
  }
64
106
  ```
65
107
 
66
- Use `"fixedEditor": true` to enable it again. Add `"mouseScroll": false` if you want native terminal selection instead of fixed-editor mouse handling.
67
108
 
68
109
  | Preset | Description |
69
110
  |--------|-------------|
@@ -76,7 +117,7 @@ Use `"fixedEditor": true` to enable it again. Add `"mouseScroll": false` if you
76
117
 
77
118
  **Environment:** `POWERLINE_NERD_FONTS=1` to force Nerd Fonts, `=0` for ASCII.
78
119
 
79
- Preset selection is saved to `~/.pi/agent/settings.json` under `powerline` and restored on startup.
120
+ Preset selection is saved under `powerline` in the agent settings file and restored on startup.
80
121
  Run `/powerline default` to switch back to the default preset.
81
122
 
82
123
  ### Custom items from extension statuses
@@ -119,7 +160,90 @@ You can promote any extension status key into its own dedicated powerline item.
119
160
  - `hideWhenMissing` (optional): hide item when no status is present (default `true`)
120
161
  - `excludeFromExtensionStatuses` (optional): omit this key from the aggregate `extension_statuses` segment (default `true`)
121
162
 
122
- If you still prefer the old style, `"powerline": "default"` continues to work.
163
+ If you still prefer the older string preset config shape, `"powerline": "default"` continues to work. String preset shorthand keeps `welcome` enabled and uses the default shortcut/cost/model display settings.
164
+
165
+ ### Disabling segments
166
+
167
+ Set `powerline.disabledSegments` to hide built-in or configured custom segments from the active preset:
168
+
169
+ ```json
170
+ {
171
+ "powerline": {
172
+ "preset": "default",
173
+ "disabledSegments": ["cost", "extension_statuses", "custom:ci"]
174
+ }
175
+ }
176
+ ```
177
+
178
+ Built-in names are listed under Segments below. Custom items use `custom:<id>`. Unknown names are ignored with a startup warning.
179
+
180
+ ### Custom layout
181
+
182
+ Use `powerline.layout` to override segment order and grouping while keeping the selected preset’s colors and segment options. Set `powerline.separator` when you want a separator style independent of the preset:
183
+
184
+ ```json
185
+ {
186
+ "powerline": {
187
+ "preset": "default",
188
+ "separator": "chevron",
189
+ "layout": {
190
+ "left": ["model", "thinking", "path", "git"],
191
+ "right": ["context_pct", "cost"],
192
+ "secondary": ["custom:ci"]
193
+ },
194
+ "customItems": [
195
+ { "id": "ci", "statusKey": "ci-status" }
196
+ ]
197
+ }
198
+ }
199
+ ```
200
+
201
+ A present `left`, `right`, or `secondary` array replaces that preset group exactly; an empty array clears it. Omitted groups keep the preset entries and automatically append custom items by their configured `position`. Explicitly listing a segment moves it out of omitted preset groups, and explicitly placed custom items are not auto-appended elsewhere. `disabledSegments` is applied after layout. `separator` accepts any style listed below; omit it to keep the preset’s separator.
202
+
203
+ Responsive behavior is unchanged: these groups control ordering and overflow priority, not permanently pinned terminal rows. `right` means “later primary segments,” not right-edge alignment. On wide terminals secondary entries can fit in the top bar; on narrow terminals primary overflow moves into the secondary line. Some segments are hidden when they have no value, so `thinking` appears only when the active session/model reports a non-`off` thinking level. Unknown entries are ignored with a startup warning. The old fixed `custom` preset has been removed; combine any preset with `layout` instead.
204
+
205
+ ### Demo settings
206
+
207
+ For a compact current footer setup:
208
+
209
+ ```json
210
+ {
211
+ "powerline": {
212
+ "preset": "default",
213
+ "path": { "mode": "basename" },
214
+ "model": { "display": "name" },
215
+ "cost": { "subscriptionDisplay": "subscription", "currency": "USD" }
216
+ }
217
+ }
218
+ ```
219
+
220
+ Use `"model": { "display": "qualified" }` when two providers expose models with the same display name.
221
+
222
+ `cost.currency` accepts `USD`, `CNY`, `EUR`, `GBP`, `JPY`, `CAD`, `AUD`, `CHF`, `INR`, or `KRW`. Pi reports costs in USD; non-USD display uses a keyless USD FX rate fetched in the background and cached for 24 hours under the Pi agent directory. If no cached rate is available yet, the cost segment renders `-- CODE` until a later footer refresh can use the fetched rate.
223
+
224
+ Subscription cost display accepts:
225
+
226
+ | Mode | Subscription + reported cost | Subscription + no reported cost |
227
+ |------|------------------------------|----------------------------------|
228
+ | `subscription` | `(sub)` | `(sub)` |
229
+ | `reported-cost` | `$0.12` | `(sub)` |
230
+ | `both` | `$0.12 (sub)` | `(sub)` |
231
+
232
+ Segment display formats (opt-in; defaults match the historical rendering):
233
+
234
+ | Segment option | Values | Default | Effect |
235
+ |---|---|---|---|
236
+ | `"context": { "format" }` | `"full"` / `"percent"` | `"full"` | `"percent"` shows a bare rounded `83%` (threshold-colored, no icon) instead of `12k/200k (6.2%)` |
237
+ | `"cache_read": { "format" }` | `"tokens"` / `"percent"` / `"both"` | `"tokens"` | `"percent"` shows the cache hit rate `cacheRead / (input + cacheRead)` instead of the raw token count; `"both"` shows raw tokens plus the hit rate, e.g. `cache in: 12k (80%)` |
238
+
239
+ ```json
240
+ {
241
+ "powerline": {
242
+ "context": { "format": "percent" },
243
+ "cache_read": { "format": "both" }
244
+ }
245
+ }
246
+ ```
123
247
 
124
248
  ## Bash mode
125
249
 
@@ -145,7 +269,7 @@ The managed shell is persistent for the current pi session. Command output appea
145
269
 
146
270
  ### Bash mode configuration
147
271
 
148
- In `~/.pi/agent/settings.json`:
272
+ In `~/.selesai/agent/settings.json` (or under `SELESAI_CODING_AGENT_DIR` when that environment variable is set):
149
273
 
150
274
  ```json
151
275
  {
@@ -159,7 +283,7 @@ In `~/.pi/agent/settings.json`:
159
283
 
160
284
  ## Editor Stash
161
285
 
162
- Use `Alt+S` / `Option+S` as a quick stash toggle while drafting. It keeps one active stash and clears the editor when stashing.
286
+ Use `Alt+S` / `Option+S` as a quick stash toggle while drafting. It keeps one active stash and clears the editor when stashing. Powerline listens for unambiguous Alt/Meta-S escape encodings by default. If your old terminal setup only emits the printable German sharp-S character for Option+S and you still want that to trigger stash, set `"stashSharpSShortcut": true` under `powerline`.
163
287
 
164
288
  | Editor | Stash | `Alt+S` result |
165
289
  |--------|-------|----------------|
@@ -170,7 +294,7 @@ Use `Alt+S` / `Option+S` as a quick stash toggle while drafting. It keeps one ac
170
294
 
171
295
  Auto-restore after an agent run only happens when the editor is still empty. If you typed meanwhile, the stash is preserved.
172
296
 
173
- The `stash` indicator appears in the powerline bar (on presets with `extension_statuses`). Active stash is still session-local and resets on session switch / disable, but stash history is persisted to `~/.pi/agent/powerline-footer/stash-history.json` so it survives restarts.
297
+ The `stash` indicator appears in the powerline bar (on presets with `extension_statuses`). Active stash is still session-local and resets on session switch / disable, but stash history is persisted to the agent dir at `powerline-footer/stash-history.json` so it survives restarts. By default the agent dir is `~/.selesai/agent`; set `SELESAI_CODING_AGENT_DIR` to move global powerline settings, stash history, sessions, vibes, skills, commands, and extension discovery with Pi.
174
298
 
175
299
  ### Stash history
176
300
 
@@ -184,26 +308,21 @@ Prompt history now has two sources:
184
308
  - stashed prompts — up to 12 recent stashed prompts (newest first)
185
309
  - recent project prompts — up to 50 recent user-submitted prompts pulled from pi sessions in the current project folder
186
310
 
187
- Selecting an entry inserts it into the editor. If the editor already has text, you can choose `Replace`, `Append`, or `Cancel`.
311
+ Selecting a stashed entry lets you insert it or promote it to an idea. Project prompt history entries insert into the editor. If the editor already has text, you can choose `Replace`, `Append`, or `Cancel`.
188
312
 
189
- ### Editor clipboard and chat shortcuts
313
+ ### Editor clipboard and navigation shortcuts
190
314
 
191
315
  - `ctrl+alt+c` — copy full editor content
192
316
  - `ctrl+alt+x` — cut full editor content (copy, then clear)
193
- - `cmd+up` — scroll the fixed-editor chat viewport up
194
- - `cmd+down` — scroll the fixed-editor chat viewport down
317
+ - `ctrl+alt+q` — open the queued-prompt picker
195
318
  - `cmd+shift+up` — move the editor cursor to the start of the first line
196
319
  - `cmd+shift+down` — move the editor cursor to the end of the last line
197
- - `ctrl+shift+u` — jump the fixed-editor chat viewport to the previous user message
198
- - `ctrl+shift+i` — jump the fixed-editor chat viewport to the next user message
199
- - `ctrl+alt+,` — jump the fixed-editor chat viewport to the previous LLM message
200
- - `ctrl+alt+.` — jump the fixed-editor chat viewport to the next LLM message
201
- - `ctrl+shift+g` — jump the fixed-editor chat viewport to the bottom
202
- Copy/cut actions do not modify stash state or stash history. Dragging files, folders, images, or screenshots from Finder into the custom editor inserts their path strings. Chat jumps require fixed-editor mode because they use its app-owned scroll viewport. Submitting editor text also returns that viewport to the bottom so new output stays in view.
320
+
321
+ Copy/cut actions do not modify stash state or stash history. Dragging files, folders, images, or screenshots from Finder into the custom editor inserts their path strings. Pi owns chat scrolling, selection, and fixed input behavior natively.
203
322
 
204
323
  ### Shortcut configuration
205
324
 
206
- You can override shortcut keys in `~/.pi/agent/settings.json`:
325
+ You can override shortcut keys in the agent settings file:
207
326
 
208
327
  ```json
209
328
  {
@@ -211,20 +330,19 @@ You can override shortcut keys in `~/.pi/agent/settings.json`:
211
330
  "stashHistory": "ctrl+alt+h",
212
331
  "copyEditor": "ctrl+alt+c",
213
332
  "cutEditor": "ctrl+alt+x",
214
- "jumpPreviousUserMessage": "ctrl+shift+u",
215
- "jumpNextUserMessage": "ctrl+shift+i",
216
- "jumpPreviousLlmMessage": "ctrl+alt+,",
217
- "jumpNextLlmMessage": "ctrl+alt+.",
218
- "jumpChatBottom": "ctrl+shift+g",
219
- "scrollChatUp": "cmd+up",
220
- "scrollChatDown": "cmd+down",
333
+ "ideaCapture": null,
334
+ "queueOpen": "ctrl+alt+q",
221
335
  "editorStart": "cmd+shift+up",
222
336
  "editorEnd": "cmd+shift+down"
223
337
  }
224
338
  }
225
339
  ```
226
340
 
227
- After changing bindings, run `/reload`. Invalid bindings, reserved key conflicts (like `Alt+S`), or duplicate conflicts automatically fall back to safe defaults. `cmd` and `command` are accepted aliases for Pi's `super` modifier for the documented Command navigation keys; unsupported Command-letter bindings such as `cmd+c` are ignored instead of matching plain text input. Some terminals, including Ghostty, bind Command+Arrow themselves; remap those terminal keys to send `\x1b[1;9A` / `\x1b[1;9B` for chat scrolling and `\x1b[1;10A` / `\x1b[1;10B` for editor-boundary navigation if you want Pi to receive them.
341
+ After changing bindings, run `/reload`. Invalid bindings, reserved key conflicts like `Alt+S`, or duplicate conflicts fall back to safe defaults. Set a binding to `null` or `""` to disable that action. `cmd` and `command` are accepted aliases for Pi's `super` modifier for the documented Command navigation keys.
342
+
343
+ ### Editor autocomplete composition
344
+
345
+ Powerline wraps Pi's autocomplete provider so bash mode can add shell-aware suggestions. When another editor extension was already installed, powerline now passes Pi's provider through that previous editor's `setAutocompleteProvider()` first and then wraps the resulting provider. This preserves prior autocomplete-provider wrappers where possible, but it is not full render/input composition between custom editors.
228
346
 
229
347
  ## Working Vibes
230
348
 
@@ -247,7 +365,7 @@ Transform boring "Working..." messages into themed phrases that match your style
247
365
 
248
366
  ### Configuration
249
367
 
250
- In `~/.pi/agent/settings.json`:
368
+ In the agent settings file:
251
369
 
252
370
  ```json
253
371
  {
@@ -270,13 +388,13 @@ In `~/.pi/agent/settings.json`:
270
388
 
271
389
  **File mode setup:**
272
390
  ```bash
273
- /vibe generate mafia 200 # Generate 200 vibes, save to ~/.pi/agent/vibes/mafia.txt
391
+ /vibe generate mafia 200 # Generate 200 vibes, save to the agent dir
274
392
  /vibe mode file # Switch to file mode
275
393
  /vibe mafia # Now uses the file
276
394
  ```
277
395
 
278
396
  **How file mode works:**
279
- 1. Vibes are loaded from `~/.pi/agent/vibes/{theme}.txt` into memory
397
+ 1. Vibes are loaded from `vibes/{theme}.txt` in the agent dir into memory
280
398
  2. Uses seeded shuffle (Mulberry32 PRNG) — cycles through all vibes before repeating
281
399
  3. New seed each session — different order every time you restart pi
282
400
  4. Zero latency, zero cost, works offline
@@ -305,6 +423,7 @@ The thinking segment shows live updates when you change thinking level:
305
423
  | medium | `think:med` | teal |
306
424
  | high | `think:high` | rainbow |
307
425
  | xhigh | `think:xhigh` | rainbow |
426
+ | max | `think:max` | rainbow |
308
427
 
309
428
  ## Path Display
310
429
 
@@ -314,13 +433,41 @@ The path segment supports three modes:
314
433
  |------|---------|-------------|
315
434
  | `basename` | `powerline-footer` | Just the directory name (default) |
316
435
  | `abbreviated` | `…/extensions/powerline-footer` | Full path with home abbreviated and length limit |
317
- | `full` | `~/.pi/agent/extensions/powerline-footer` | Complete path with home abbreviated |
436
+ | `full` | `~/.selesai/agent/extensions/powerline-footer` | Complete path with home abbreviated |
318
437
 
319
438
  Configure via preset options: `path: { mode: "full" }`
320
439
 
440
+ ## Git polling
441
+
442
+ By default the git segment polls both branch and dirty state. If background `git status --porcelain` calls interfere with your workflow, use branch-only polling:
443
+
444
+ ```json
445
+ {
446
+ "powerline": {
447
+ "git": { "polling": "branch" }
448
+ }
449
+ }
450
+ ```
451
+
452
+ Use `"off"` to disable extension-owned git polling entirely and only show the branch reported by Pi when available.
453
+
454
+ ## Git host icon
455
+
456
+ Set `git.hostIcon` to replace the branch icon with the origin remote's host logo:
457
+
458
+ ```json
459
+ {
460
+ "powerline": {
461
+ "git": { "hostIcon": true }
462
+ }
463
+ }
464
+ ```
465
+
466
+ The origin remote is detected (SSH or HTTPS) and mapped to an icon: GitHub (), GitLab (), Bitbucket (), or a generic git logo () for any other remote (self-hosted, Gitea, Codeberg, …). Repositories without an origin remote keep the plain branch icon (), as do ASCII (non–Nerd Font) setups. The remote is read once and cached, so this adds no per-render cost. Default is `false` (branch icon unchanged).
467
+
321
468
  ## Segments
322
469
 
323
- `model` · `thinking` · `shell_mode` · `path` · `git` · `subagents` · `token_in` · `token_out` · `token_total` · `cost` · `context_pct` · `context_total` · `time_spent` · `time` · `session` · `hostname` · `cache_read` · `cache_write`
470
+ `model` · `thinking` · `shell_mode` · `path` · `git` · `subagents` · `token_in` · `token_out` · `token_total` · `cost` · `context_pct` · `context_total` · `time_spent` · `time` · `session` · `hostname` · `cache_read` · `cache_write` · `extension_statuses`
324
471
 
325
472
  ## Separators
326
473
 
@@ -351,12 +498,11 @@ Colors are configurable via pi's theme system. Each preset defines its own color
351
498
 
352
499
  ### Custom Theme Override
353
500
 
354
- Create `~/.pi/agent/extensions/powerline-footer/theme.json`:
501
+ Create `extensions/powerline-footer/theme.json` in the agent dir (`~/.selesai/agent` by default, or `SELESAI_CODING_AGENT_DIR` when set):
355
502
 
356
503
  ```json
357
504
  {
358
505
  "colors": {
359
- "pi": "#ff5500",
360
506
  "model": "accent",
361
507
  "shellMode": "accent",
362
508
  "path": "#00afaf",
@@ -379,4 +525,6 @@ Colors can be:
379
525
 
380
526
  Icons can be any string, including `""` when you want to suppress a specific glyph entirely.
381
527
 
528
+ For npm package installs, this documented agent-dir file is separate from the package files under `~/.selesai/agent/npm/node_modules`. The extension reads the agent-dir override first, then falls back to a `theme.json` colocated with the loaded extension file. Use `/reload` or restart Pi after creating or editing `theme.json`.
529
+
382
530
  See `theme.example.json` for all available options.
@@ -416,7 +416,7 @@ export class BashCompletionEngine {
416
416
  }
417
417
 
418
418
  export class BashAutocompleteProvider implements AutocompleteProvider {
419
- getSuggestions(): AutocompleteSuggestions | null {
419
+ async getSuggestions(): Promise<AutocompleteSuggestions | null> {
420
420
  return null;
421
421
  }
422
422
 
@@ -456,7 +456,7 @@ function applyExtendedCompletion(lines: string[], cursorLine: number, item: Exte
456
456
  }
457
457
 
458
458
  export class OneOffBashAutocompleteProvider implements AutocompleteProvider {
459
- getSuggestions(): AutocompleteSuggestions | null {
459
+ async getSuggestions(): Promise<AutocompleteSuggestions | null> {
460
460
  return null;
461
461
  }
462
462
 
@@ -496,12 +496,27 @@ export class ModeAwareAutocompleteProvider implements AutocompleteProvider {
496
496
  this.isBashModeActive = isBashModeActive;
497
497
  }
498
498
 
499
- getSuggestions(
499
+ /**
500
+ * Forward trigger characters from the underlying providers. Without this the
501
+ * editor resets its trigger set to the defaults when this wrapper is installed
502
+ * (e.g. "$" is dropped), so inline completions like `$skill` never open a popup.
503
+ */
504
+ get triggerCharacters(): string[] | undefined {
505
+ const chars = new Set<string>();
506
+ for (const provider of [this.defaultProvider, this.bashProvider, this.oneOffBashProvider]) {
507
+ for (const character of provider?.triggerCharacters ?? []) {
508
+ chars.add(character);
509
+ }
510
+ }
511
+ return chars.size > 0 ? [...chars] : undefined;
512
+ }
513
+
514
+ async getSuggestions(
500
515
  lines: string[],
501
516
  cursorLine: number,
502
517
  cursorCol: number,
503
518
  options: { signal: AbortSignal; force?: boolean },
504
- ): AutocompleteSuggestions | null | Promise<AutocompleteSuggestions | null> {
519
+ ): Promise<AutocompleteSuggestions | null> {
505
520
  if (this.isBashModeActive()) {
506
521
  return this.bashProvider.getSuggestions(lines, cursorLine, cursorCol, options);
507
522
  }