@leo-alvarenga/pi-zen-frame 0.11.0 → 0.12.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 +88 -80
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,63 +1,75 @@
|
|
|
1
|
-
# pi-zen-frame
|
|
1
|
+
# @leo-alvarenga/pi-zen-frame
|
|
2
2
|
|
|
3
|
-
A [pi-coding-agent](https://github.com/earendil-works/pi) extension that gives the TUI editor a
|
|
4
|
-
|
|
5
|
-
- **Frame** — a box (`╭ ╮ ╰ ╯ │ ─`) with live status segments embedded in the top/bottom border.
|
|
6
|
-
- **Header** — an optional Claude-welcome-style top box: logo (left, 40%) + model/provider and cwd/git info (right, 60%, split in two halves).
|
|
7
|
-
- **Working messages** — randomized messages in pi's built-in working loader, swapped on a configurable interval (on by default).
|
|
8
|
-
- **Theme native** — every color is a pi `ThemeColor`, so it follows your active pi theme.
|
|
3
|
+
A [`pi-coding-agent`](https://github.com/earendil-works/pi) extension that gives the TUI editor a clean, minimalist layout with customizable status indicators and frames.
|
|
9
4
|
|
|
10
5
|

|
|
11
6
|
|
|
12
|
-
##
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Clean Frame**: Clean editor frame with segments placed above and below it to easily see relevant info
|
|
10
|
+
- **Header Box**: Optional Claude-style welcome panel displaying a logo, model/provider info, current working directory, and Git status
|
|
11
|
+
- **Working Messages**: Randomized loading status messages during response generation, updated on a configurable timer
|
|
12
|
+
- **Native Theme Support**: Uses pi `ThemeColor` tokens to automatically align with your active theme
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
Run the following command:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
pi install @leo-alvarenga/pi-zen-frame
|
|
22
|
+
```
|
|
13
23
|
|
|
14
|
-
|
|
15
|
-
a local checkout or registry:
|
|
24
|
+
Or add `pi-zen-frame` to your pi packages list in `~/.pi/agent/settings.json`:
|
|
16
25
|
|
|
17
26
|
```jsonc
|
|
18
|
-
// ~/.pi/agent/settings.json
|
|
19
27
|
{
|
|
20
|
-
"packages": ["npm:@leo-alvarenga/pi-zen-frame"
|
|
28
|
+
"packages": ["npm:@leo-alvarenga/pi-zen-frame"],
|
|
21
29
|
}
|
|
22
30
|
```
|
|
23
31
|
|
|
24
|
-
|
|
32
|
+
Then, restart pi or run `/reload` in the console.
|
|
25
33
|
|
|
26
|
-
|
|
34
|
+
---
|
|
27
35
|
|
|
28
|
-
|
|
36
|
+
## Configuration
|
|
37
|
+
|
|
38
|
+
Configuration is loaded from `~/.pi/agent/pi-zen-frame.json`. All properties are optional.
|
|
29
39
|
|
|
30
40
|
```jsonc
|
|
31
41
|
{
|
|
32
|
-
//
|
|
42
|
+
// Fallback accent color for frame border and active segments
|
|
33
43
|
"accentColor": "accent",
|
|
34
44
|
|
|
35
|
-
// Master mute:
|
|
36
|
-
// Toggle at runtime with /zen_mode or the piZenFrame.zenMode keybinding.
|
|
45
|
+
// Master mute: renders all segments in muted tones except agent-mode
|
|
37
46
|
"zenMode": true,
|
|
38
47
|
|
|
39
48
|
"header": {
|
|
40
49
|
"enable": true,
|
|
41
|
-
"logo": ["
|
|
42
|
-
"heading": "
|
|
43
|
-
"subheading": "
|
|
50
|
+
"logo": ["█████████ ", "███ ███ ", "██████ ", "███ ███"],
|
|
51
|
+
"heading": "Welcome back!",
|
|
52
|
+
"subheading": "Ready for your next session? Terminal warm, context clean, tools ready to execute",
|
|
44
53
|
"logoColor": "text",
|
|
45
|
-
"accentColor": "customMessageLabel"
|
|
54
|
+
"accentColor": "customMessageLabel",
|
|
46
55
|
},
|
|
47
56
|
|
|
48
57
|
"frame": {
|
|
49
58
|
"enable": true,
|
|
50
|
-
|
|
59
|
+
|
|
60
|
+
// Minimum terminal width required to render the border frame
|
|
51
61
|
"minWidth": 20,
|
|
52
62
|
|
|
53
|
-
//
|
|
63
|
+
// Padding inside the frame
|
|
54
64
|
"paddingTop": 1,
|
|
55
65
|
"paddingBottom": 1,
|
|
56
66
|
"paddingX": 1,
|
|
67
|
+
|
|
68
|
+
// Outer margin around the frame
|
|
57
69
|
"marginTop": 0,
|
|
58
70
|
"marginBottom": 0,
|
|
59
71
|
|
|
60
|
-
//
|
|
72
|
+
// Toggle individual status segments
|
|
61
73
|
"showCwd": true,
|
|
62
74
|
"showModel": true,
|
|
63
75
|
"showContext": true,
|
|
@@ -65,84 +77,80 @@ zen editor reads `~/.pi/agent/pi-zen-frame.json`. All keys are optional; default
|
|
|
65
77
|
"showSpinner": false,
|
|
66
78
|
"showAgentMode": true,
|
|
67
79
|
|
|
68
|
-
//
|
|
80
|
+
// Color options: "border", "accentColor", or "agentMode"
|
|
69
81
|
"borderColor": "border",
|
|
70
82
|
|
|
71
|
-
//
|
|
83
|
+
// Input prompt prefix glyph and color settings
|
|
72
84
|
"prefix": "❯",
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
//
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
// color is set.
|
|
86
|
-
"colors": { "model": "accent", "cwd": "accent" }
|
|
85
|
+
"prefixColor": "muted", // Options: "agentMode", "frameBorder", or any ThemeColor
|
|
86
|
+
|
|
87
|
+
// Override default Nerd-Font glyphs
|
|
88
|
+
"icons": {
|
|
89
|
+
// Keys: folder, model, context, thinking, gitDirty, gitBranch
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
// Per-segment foreground color overrides (supersedes default theme colors)
|
|
93
|
+
"colors": {
|
|
94
|
+
"model": "accent",
|
|
95
|
+
"cwd": "accent",
|
|
96
|
+
},
|
|
87
97
|
},
|
|
88
98
|
|
|
89
|
-
// Randomized messages shown
|
|
90
|
-
// "Working..." line while streaming). A new random message is picked
|
|
91
|
-
// every `intervalMs`; no repeats until the pool is exhausted. Default on.
|
|
99
|
+
// Randomized status messages shown while streaming responses
|
|
92
100
|
"workingMessage": {
|
|
93
101
|
"enable": true,
|
|
94
102
|
"intervalMs": 3000,
|
|
95
|
-
"messages": [
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
- `/zen_mode` — toggle zen mode (all segments muted except agent-mode).
|
|
103
|
-
- Toggle keybinding: `piZenFrame.zenMode`, default `ctrl+shift+z`. Rebind or
|
|
104
|
-
disable it in `~/.pi/agent/keybindings.json`:
|
|
105
|
-
|
|
106
|
-
```jsonc
|
|
107
|
-
// ~/.pi/agent/keybindings.json
|
|
108
|
-
{
|
|
109
|
-
"piZenFrame.zenMode": "ctrl+shift+z", // or [] to disable; /zen_mode still works
|
|
103
|
+
"messages": [
|
|
104
|
+
"Exploring the seas",
|
|
105
|
+
"Tinkering with strange objects",
|
|
106
|
+
"Analyzing patterns",
|
|
107
|
+
],
|
|
108
|
+
},
|
|
110
109
|
}
|
|
111
110
|
```
|
|
112
111
|
|
|
113
|
-
|
|
112
|
+
---
|
|
114
113
|
|
|
115
|
-
##
|
|
114
|
+
## Structure & Status Segments
|
|
116
115
|
|
|
117
|
-
The editor
|
|
116
|
+
The editor window features status indicators embedded along the frame borders:
|
|
118
117
|
|
|
119
|
-
|
|
118
|
+
| Location | Segment | Description |
|
|
119
|
+
| ---------------- | -------------- | --------------------------------------------------------------------- |
|
|
120
|
+
| **Top Left** | **model** | Active model name and provider |
|
|
121
|
+
| | **reasoning** | Current reasoning effort level, tinted with pi thinking tokens |
|
|
122
|
+
| | **spinner** | Active phase indicator (`thinking`, `outputting`, `toolcall`, `exec`) |
|
|
123
|
+
| **Top Right** | **ctx** | Context usage percentage and token counts with color alerts |
|
|
124
|
+
| **Bottom Left** | **agent mode** | Active agent indicator pill from `pi-agent-manager` |
|
|
125
|
+
| **Bottom Right** | **cwd** | Shortened path, active Git branch, and uncommitted file counts |
|
|
120
126
|
|
|
121
|
-
|
|
122
|
-
- **reasoning** — current thinking level, tinted with pi's own thinking token (`thinkingLow` … `thinkingXhigh`).
|
|
123
|
-
- **spinner** — streaming phase (`thinking` / `outputting` / `toolcall` / `exec`), replaces the left slot while active.
|
|
127
|
+
---
|
|
124
128
|
|
|
125
|
-
|
|
129
|
+
## Commands & Keybindings
|
|
126
130
|
|
|
127
|
-
- **
|
|
131
|
+
- **Toggle Command**: `/zen_mode` — Toggles Zen mode on and off.
|
|
132
|
+
- **Default Keybinding**: `ctrl+shift+z`
|
|
128
133
|
|
|
129
|
-
|
|
134
|
+
To rebind or disable the hotkey, update `~/.pi/agent/keybindings.json`:
|
|
130
135
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
136
|
+
```jsonc
|
|
137
|
+
{
|
|
138
|
+
"piZenFrame.zenMode": "ctrl+shift+z", // Set to [] to disable the shortcut
|
|
139
|
+
}
|
|
140
|
+
```
|
|
134
141
|
|
|
135
|
-
|
|
142
|
+
Run `/reload` after modifying your keybindings.
|
|
136
143
|
|
|
137
|
-
|
|
144
|
+
---
|
|
138
145
|
|
|
139
|
-
##
|
|
146
|
+
## Directory Layout
|
|
140
147
|
|
|
141
148
|
```
|
|
142
149
|
extensions/
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
150
|
+
├── index.ts # Extension entry point: config initialization and events
|
|
151
|
+
├── config/ # Types, defaults, and settings normalization
|
|
152
|
+
├── components/ # Header, frame border, and status segment modules
|
|
153
|
+
├── editor/ # FrameEditor component for layout rendering
|
|
154
|
+
└── utils/ # Helpers for Git status, paths, and agent modes
|
|
155
|
+
|
|
148
156
|
```
|
package/package.json
CHANGED
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
"name": "@leo-alvarenga/pi-zen-frame",
|
|
3
3
|
"description": "A pi-coding-agent extension that gives the TUI editor a simple yet polished look and feel",
|
|
4
4
|
"author": "Leonardo A. Alvarenga",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.12.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": "github.com/leo-alvarenga/pi-mono",
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"access": "public"
|
|
10
10
|
},
|
|
11
11
|
"keywords": [
|
|
12
|
+
"pi-extension",
|
|
12
13
|
"pi-package",
|
|
13
14
|
"pi"
|
|
14
15
|
],
|