Skip to content

feat(pi-extension): configurable status-line format#607

Open
Smith42 wants to merge 1 commit into
DietrichGebert:mainfrom
Smith42:feat/statusline-format
Open

feat(pi-extension): configurable status-line format#607
Smith42 wants to merge 1 commit into
DietrichGebert:mainfrom
Smith42:feat/statusline-format

Conversation

@Smith42

@Smith42 Smith42 commented Jul 16, 2026

Copy link
Copy Markdown

Refines the status-bar configurability asked for in #324 — the hideStatus half already landed on main but is unreleased; this adds the format half so the line can be restyled without disabling ponytail.

Problem

syncStatus() hardcodes the indicator string ○ 🐴 ponytail: ⚡ FULL. Users who want the always-on ruleset but a different footprint (drop the mascot, shorten ponytail:, compact for narrow footers, drop the label) have to fork the extension or set hideStatus and lose the indicator entirely.

Proposal

One template-style knob that mirrors the existing hideStatus / quietStartup resolution pattern:

  • env PONYTAIL_STATUS_FORMAT, else
  • statusFormat field in ~/.config/ponytail/config.json, else
  • built-in default '{indicator} {emoji} {label} {modeIcon} {mode}'

Placeholders (replaced with String.replaceAll; unknown ones pass through literally so a typo renders rather than vanishes):

Placeholder Replaced with Example
{indicator} ○ idle, ● accent when a turn runs
{emoji} the 🐴 mascot 🐴
{label} ponytail: (muted) ponytail:
{modeIcon} 🌿 lite, ⚡ full, 🔥 ultra 🔥
{mode} level uppercased (text color) ULTRA

The default template reproduces the current line byte-for-byte, so existing setups are unchanged. hideStatus still wins when both are set.

Examples

{ "statusFormat": "{indicator} PT {mode}" }
PONYTAIL_STATUS_FORMAT='{indicator} {mode} 🐴' pi …

Changes

  • hooks/ponytail-config.js: getStatusFormat() (BOM-stripped read, same env/config precedence as getHideStatus)
  • pi-extension/index.js: syncStatus() renders the template; DEFAULT_STATUS_FORMAT constant co-located for testability
  • pi-extension/test/extension.test.js: baseline-equality, env-var, config-file, unknown-placeholder pass-through tests
  • README.md: placeholder table + examples under a new "Status-line format (pi)" subsection

Tests

node --test pi-extension/test/extension.test.js → 15/15 pass. The tests/correctness.test.js "csv: correct pandas one-liner passes" failure is pre-existing on clean main (it exercises an external AI judge / pandas) and independent of this change.

Notes

  • Backward compatible: no config file → identical output.
  • review mode is session-only and never a runtime default (already enforced on main), so no new template exposure for it.
  • Surface area is one new config key + one env var; no new abstractions, following the repo's lazy-minimal config style.

Add statusFormat (config or PONYTAIL_STATUS_FORMAT env) as a template
with {indicator} {emoji} {label} {modeIcon} {mode} placeholders, so the
footprint can be restyled without disabling ponytail. The default
template reproduces the existing '○ 🐴 ponytail: ⚡ FULL' line
byte-for-byte, so nothing changes for users who don't set it.

Complements the already-merged hideStatus knob (DietrichGebert#324): hideStatus still
wins when both are set, statusFormat customizes the line otherwise.

- hooks/ponytail-config.js: getStatusFormat()
- pi-extension/index.js: syncStatus() renders the template
- pi-extension/test: baseline + env + config + unknown-placeholder tests
- README: placeholder table and examples
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant