feat(pi-extension): configurable status-line format#607
Open
Smith42 wants to merge 1 commit into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refines the status-bar configurability asked for in #324 — the
hideStatushalf already landed onmainbut 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, shortenponytail:, compact for narrow footers, drop the label) have to fork the extension or sethideStatusand lose the indicator entirely.Proposal
One template-style knob that mirrors the existing
hideStatus/quietStartupresolution pattern:PONYTAIL_STATUS_FORMAT, elsestatusFormatfield in~/.config/ponytail/config.json, else'{indicator} {emoji} {label} {modeIcon} {mode}'Placeholders (replaced with
String.replaceAll; unknown ones pass through literally so a typo renders rather than vanishes):{indicator}○{emoji}🐴{label}ponytail:(muted)ponytail:{modeIcon}lite, ⚡full, 🔥ultra🔥{mode}ULTRAThe default template reproduces the current line byte-for-byte, so existing setups are unchanged.
hideStatusstill 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 asgetHideStatus)pi-extension/index.js:syncStatus()renders the template;DEFAULT_STATUS_FORMATconstant co-located for testabilitypi-extension/test/extension.test.js: baseline-equality, env-var, config-file, unknown-placeholder pass-through testsREADME.md: placeholder table + examples under a new "Status-line format (pi)" subsectionTests
node --test pi-extension/test/extension.test.js→ 15/15 pass. Thetests/correctness.test.js"csv: correct pandas one-liner passes" failure is pre-existing on cleanmain(it exercises an external AI judge / pandas) and independent of this change.Notes
reviewmode is session-only and never a runtime default (already enforced onmain), so no new template exposure for it.