pi-zentui 0.22.3 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -25
- package/docs/configuration.md +734 -0
- package/docs/footer-format.md +169 -0
- package/extensions/zentui/accent-rail-editor.ts +13 -2
- package/extensions/zentui/codex-quota-display.ts +34 -0
- package/extensions/zentui/codex-quota.ts +296 -0
- package/extensions/zentui/component-colors.ts +158 -0
- package/extensions/zentui/component-settings.ts +99 -0
- package/extensions/zentui/config.ts +289 -100
- package/extensions/zentui/editor-metadata-format.ts +55 -20
- package/extensions/zentui/editor-mouse.ts +94 -0
- package/extensions/zentui/editor-transfer.ts +14 -0
- package/extensions/zentui/extension-status.ts +29 -13
- package/extensions/zentui/footer-layout.ts +5 -4
- package/extensions/zentui/footer-text.ts +11 -0
- package/extensions/zentui/footer.ts +198 -65
- package/extensions/zentui/format.ts +9 -0
- package/extensions/zentui/index.ts +146 -4
- package/extensions/zentui/minimalist-editor.ts +79 -24
- package/extensions/zentui/presets.ts +77 -0
- package/extensions/zentui/runtime.ts +59 -29
- package/extensions/zentui/selector-border.ts +9 -3
- package/extensions/zentui/settings-command.ts +1045 -649
- package/extensions/zentui/settings-keys.ts +59 -0
- package/extensions/zentui/settings-list-selection.ts +30 -0
- package/extensions/zentui/settings-previews.ts +10 -4
- package/extensions/zentui/style.ts +6 -0
- package/extensions/zentui/thinking-experimental.ts +62 -10
- package/extensions/zentui/ui.ts +200 -65
- package/extensions/zentui/user-message-styles.ts +65 -34
- package/extensions/zentui/user-message.ts +172 -34
- package/extensions/zentui/working-line-extension-segments.ts +115 -0
- package/extensions/zentui/working-line.ts +98 -22
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
## What is this?
|
|
16
16
|
|
|
17
|
-
Zentui gives Pi surfaces
|
|
17
|
+
Zentui gives Pi surfaces independently selectable treatments:
|
|
18
18
|
|
|
19
19
|
- **Editor** — Opencode, Opencode copy-friendly, Accent Rail, and Minimalist input treatments
|
|
20
20
|
- **User messages** — framed, framed copy-friendly, compact, and labeled transcript messages
|
|
@@ -37,6 +37,8 @@ Editor, User messages, Thinking (Experimental), Working line, and selector borde
|
|
|
37
37
|
|
|
38
38
|
The Starship Footer shows directory, Git, runtime, context, tokens, and cost. Optional segments include model/provider, package version, session duration, `user@host`, time, OS, Git commit, Git metrics, and third-party extension statuses. The layout is segment-driven by default and supports a complete Starship-style format template.
|
|
39
39
|
|
|
40
|
+
When the Working line is enabled, third-party extensions can publish keyed text segments through Pi's shared event bus. Zentui composes those segments into the owned row so Classic and KITT animate across them with the built-in content. See the [Working-line extension integration](https://github.com/lmilojevicc/pi-zentui/blob/main/docs/configuration.md#working-line-extension-integration) reference.
|
|
41
|
+
|
|
40
42
|
Zentui detects a broad set of runtime and language modules, preserves Nerd Font icons with an ASCII mode, and can source colors from the active Pi theme or directly from the terminal palette.
|
|
41
43
|
|
|
42
44
|
## Screenshots
|
|
@@ -89,42 +91,58 @@ pi install git:github.com/lmilojevicc/pi-zentui
|
|
|
89
91
|
|
|
90
92
|
## Configure
|
|
91
93
|
|
|
92
|
-
Run `/zentui` inside Pi to configure Appearance, Editor, User messages, Thinking (Experimental), Working line, Footer, Segments
|
|
94
|
+
Run `/zentui` inside Pi to configure Appearance, Editor, User messages, Thinking (Experimental), Working line, and Footer. With Starship selected, Footer contains **Segments →**, **Git →**, and **Extension statuses →** child pages. Use `Tab` and `Shift+Tab` to switch sections; compact help follows your configured selection keys. Every section has a direct route (for example, `/zentui footer`). `/zentui segments`, `/zentui git`, and `/zentui extensions` open the Footer child pages when Starship is active; under Native or Hidden they open Footer with a requires-Starship explanation, without changing style or saved preferences. The configured cancel key returns from a child to Footer; at the top level it closes settings. Extension statuses are published keyed Footer statuses, not extension management or Working line integrations. Inactive options retain their saved preferences. Most changes apply live. Active Streaming can switch live to Rail or Tree, and Rail and Tree can switch live between each other. Entering Streaming from a structural mode, first enable, and re-enable after a live disable require restarting Pi. Configuration is saved to:
|
|
93
95
|
|
|
94
96
|
```text
|
|
95
97
|
~/.pi/agent/zentui.json
|
|
96
98
|
```
|
|
97
99
|
|
|
98
|
-
|
|
100
|
+
### Component presets
|
|
101
|
+
|
|
102
|
+
Choose **Appearance → Preset** in `/zentui`, or run `/zentui preset <id>`:
|
|
103
|
+
|
|
104
|
+
| ID | Editor (enabled) | Footer | User messages |
|
|
105
|
+
| --- | --- | --- | --- |
|
|
106
|
+
| `opencode` | Opencode | Starship | Framed |
|
|
107
|
+
| `opencode-copy-friendly` | Opencode (copy-friendly) | Starship | Framed (copy-friendly) |
|
|
108
|
+
| `rail` | Accent Rail | Starship | Compact (accent rail) |
|
|
109
|
+
| `minimalist` | Minimalist | Hidden (zero rows) | Zentui styling disabled |
|
|
110
|
+
|
|
111
|
+
Presets apply once, saving only these component selections. Colors, color sources, style options, icons, Footer segments/formats, selector borders, Working line, and Thinking remain unchanged. Minimalist preserves the dormant message style and leaves Pi's native message presentation alone. Hidden suppresses the Footer; it is not Native.
|
|
112
|
+
|
|
113
|
+
The displayed preset is derived from your current selections: individual changes may show **Custom**, and returning to a matching combination restores its name. No `preset` config key is saved or reapplied at startup. Defaults are unchanged and match Opencode. Selecting a preset keeps settings open for further adjustments. Editor installation waits until the panel closes; if editor ownership prevents application, the saved choice may require reloading Pi.
|
|
114
|
+
|
|
115
|
+
### Minimal overrides
|
|
116
|
+
|
|
117
|
+
Installation enables Opencode Editor, Framed User messages, Zentui selector borders, and Starship Footer. Working line and Thinking (Experimental) remain disabled. Missing fields retain those defaults; there is no automatic migration. Auto icons assume a Nerd Font without detecting one; ASCII changes icons, not the entire UI.
|
|
118
|
+
|
|
119
|
+
Change only what you need. For example, this changes only the Editor's accent:
|
|
99
120
|
|
|
100
121
|
```json
|
|
101
122
|
{
|
|
102
123
|
"components": {
|
|
103
|
-
"editor": {
|
|
104
|
-
"enabled": true,
|
|
105
|
-
"style": "accent-rail"
|
|
106
|
-
},
|
|
107
|
-
"userMessages": {
|
|
108
|
-
"enabled": true,
|
|
109
|
-
"style": "framed"
|
|
110
|
-
},
|
|
111
|
-
"thinkingSteps": {
|
|
112
|
-
"enabled": false,
|
|
113
|
-
"mode": "tree"
|
|
114
|
-
},
|
|
115
|
-
"workingLine": {
|
|
116
|
-
"enabled": false
|
|
117
|
-
},
|
|
118
|
-
"footer": {
|
|
119
|
-
"style": "starship"
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
"icons": {
|
|
123
|
-
"mode": "auto"
|
|
124
|
+
"editor": { "colors": { "accent": "bold blue" } }
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
127
|
```
|
|
127
128
|
|
|
129
|
+
Each owner's **Color overrides** action edits raw styles independently. **Reset / inherit** deletes the local key; an empty string intentionally removes styling. Shared `colors` remain live historical fallbacks before **and after** migration. Color sources remain independent too.
|
|
130
|
+
|
|
131
|
+
To adopt **only User messages**, explicitly leave the other default-enabled surfaces alone:
|
|
132
|
+
|
|
133
|
+
```json
|
|
134
|
+
{
|
|
135
|
+
"components": {
|
|
136
|
+
"editor": { "enabled": false },
|
|
137
|
+
"userMessages": { "enabled": true, "style": "framed" },
|
|
138
|
+
"selectorBorders": { "enabled": false },
|
|
139
|
+
"footer": { "style": "native" }
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Disabled/Native leaves Pi or a predecessor in control. Hidden instead intentionally owns zero Footer rows. Ordinary saves snapshot only the edited owner. `/zentui migrate` is a separate confirmed all-owner selection/source/style-option snapshot; it preserves aliases, unknown fields, and shared color inheritance, and never copies generated palettes. See the configuration reference for exact owner color keys and reset behavior.
|
|
145
|
+
|
|
128
146
|
Detailed reference:
|
|
129
147
|
|
|
130
148
|
- [Configuration, component styles, defaults, runtime detection, and compatibility](https://github.com/lmilojevicc/pi-zentui/blob/main/docs/configuration.md)
|
|
@@ -144,7 +162,7 @@ Useful shortcuts:
|
|
|
144
162
|
/zentui format clear
|
|
145
163
|
```
|
|
146
164
|
|
|
147
|
-
**Thinking (Experimental)** uses one private `AssistantMessageComponent` renderer for Rail, Tree, and Streaming, tested against exact Pi versions 0.80.5, 0.82.1, 0.83.0, 0.84.0,
|
|
165
|
+
**Thinking (Experimental)** uses one private `AssistantMessageComponent` renderer for Rail, Tree, and Streaming, tested against exact Pi versions 0.80.5, 0.82.1, 0.83.0, 0.84.0, 0.84.4, and 0.85.1. It is disabled by default and may break after Pi updates. Zentui installs an enabled startup mode before transcript restoration. A healthy installed controller lets active Streaming switch live to Rail or Tree, and lets Rail and Tree switch live between each other, without reinstalling its patch. Entering Streaming from Rail or Tree saves the choice but keeps the active structural mode until restart. Disabling live restores native thinking and releases Streaming resources. First enable and re-enable after a live disable are also restart-gated. Mode changes while disabled only preconfigure the next enable. Startup failures, missing constructors, incompatible private child layouts, parser limits, theme/render/width errors, and displaced patch ownership fail open to complete native thinking. If cleanup throws while leaving Streaming, disabling still restores native thinking and a structural selection still becomes active; the successful change warns that Streaming is unavailable for the rest of the session.
|
|
148
166
|
|
|
149
167
|
Rail shows every parsed label in each native contiguous thinking run (`│ Label`, with only the open final phase shown as `│ • Label`). Tree independently shows the latest five labels in each run (`├─ · Label`, settled `└─ · Label`, open `└─ • Label`); it never aggregates across intervening text or tool blocks. Rail and Tree follow Pi's thinking visibility. Complete strict SGR styling is stripped before parsing; every other terminal control and unsafe or unstructured content keeps the complete run native. Labels are rendered by fresh host-shaped Pi Markdown instances before cropping, so emphasis, code, links, HTML, LaTeX, custom transforms, and native `thinkingText` styling remain host-controlled. Every label occupies one terminal row: ANSI/OSC/grapheme-aware cropping adds `…` only when needed. Native horizontal padding stays external. Connectors are styled directly with the current theme's `accent` callback on every render, so custom themes control them independently. Hidden native thinking remains hidden and keeps Pi's native hidden label.
|
|
150
168
|
|
|
@@ -152,6 +170,8 @@ Streaming retains Pi's host-rendered final five rows under `Thinking 7.1s`, fold
|
|
|
152
170
|
|
|
153
171
|
Pi 0.84 also provides a native fullscreen TUI with a sticky editor and Footer. Pi 0.84.4 is covered by a fullscreen live-transition PTY smoke in addition to the standard matrix. Zentui does not enable fullscreen automatically; select it from Pi's `/settings`, set `"tuiMode": "fullscreen"` in Pi settings, or launch Pi with `--tui-mode fullscreen`.
|
|
154
172
|
|
|
173
|
+
**Codex quota (opt-in):** Show remaining 5-hour/weekly quota for `openai-codex` through independent Editor and Starship Footer settings, both off by default. See [configuration and private-endpoint limitations](./docs/configuration.md#codex-account-quota), including `$codex_quota` for custom templates.
|
|
174
|
+
|
|
155
175
|
## Requirements
|
|
156
176
|
|
|
157
177
|
- [Pi](https://pi.dev) coding agent 0.80.5 or newer
|