@heyhuynhgiabuu/pi-pretty 0.5.2 → 0.6.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 +21 -0
- package/bun.lock +598 -0
- package/package.json +6 -8
- package/pi-pretty.example.json +6 -0
- package/release-notes/v0.5.3.md +29 -0
- package/src/config.ts +250 -0
- package/src/fff.ts +147 -0
- package/src/helpers.ts +124 -0
- package/src/image.ts +129 -0
- package/src/index.ts +157 -1980
- package/src/render.ts +402 -0
- package/src/tools/bash.ts +115 -0
- package/src/tools/find.ts +87 -0
- package/src/tools/grep.ts +99 -0
- package/src/tools/ls.ts +66 -0
- package/src/tools/metrics.ts +40 -0
- package/src/tools/multi-grep.ts +171 -0
- package/src/tools/read.ts +112 -0
- package/src/types.ts +227 -0
- package/test/bash-rendering.test.ts +104 -1
package/README.md
CHANGED
|
@@ -133,9 +133,30 @@ Use them when:
|
|
|
133
133
|
|
|
134
134
|
## Configuration
|
|
135
135
|
|
|
136
|
+
### Config file: `~/.pi/agent/pi-pretty.json`
|
|
137
|
+
|
|
138
|
+
Place a JSON file alongside Pi's `settings.json` to customize tool output backgrounds:
|
|
139
|
+
|
|
140
|
+
```json
|
|
141
|
+
{
|
|
142
|
+
"background": {
|
|
143
|
+
"tool": "#1e1e2e",
|
|
144
|
+
"error": "#2a1e1e"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
- `background.tool` — background color for normal tool output boxes (default: terminal default).
|
|
150
|
+
- `background.error` — background color for error tool output (defaults to `tool` background).
|
|
151
|
+
|
|
152
|
+
Config values take priority over theme-provided backgrounds (`toolBg` / `toolErrorBg`). To override the config directory, set `PRETTY_CONFIG_DIR` env var.
|
|
153
|
+
|
|
154
|
+
### Environment variables
|
|
155
|
+
|
|
136
156
|
Optional environment variables:
|
|
137
157
|
|
|
138
158
|
- `PRETTY_THEME` (overrides `~/.pi/agent/settings.json` `theme`; otherwise pi-pretty falls back to that setting before `github-dark`)
|
|
159
|
+
- `PRETTY_CONFIG_DIR` — directory to read `pi-pretty.json` from (default: `~/.pi/agent/`)
|
|
139
160
|
- `PRETTY_MAX_HL_CHARS` (default: `80000`)
|
|
140
161
|
- `PRETTY_MAX_PREVIEW_LINES` (default: `80`)
|
|
141
162
|
- `PRETTY_CACHE_LIMIT` (default: `128`)
|