pi-caveman 1.0.8 → 1.0.9
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 +2 -2
- package/extensions/caveman.ts +4 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -62,7 +62,7 @@ The config dialog lets you:
|
|
|
62
62
|
- **Default level** — Set a level that activates automatically on every new session (e.g. `full` to always start in caveman mode)
|
|
63
63
|
- **Show status bar** — Toggle the animated campfire indicator in the footer
|
|
64
64
|
|
|
65
|
-
Settings are saved to `~/.pi/agent/caveman.json` and persist across all sessions.
|
|
65
|
+
Settings are saved to `~/.pi/agent/caveman.json` by default and persist across all sessions. If `XDG_CONFIG_HOME` is set, the path becomes `$XDG_CONFIG_HOME/pi/agent/caveman.json`; `PI_CODING_AGENT_DIR` overrides both.
|
|
66
66
|
|
|
67
67
|
### Status Bar
|
|
68
68
|
|
|
@@ -82,7 +82,7 @@ When active, a status bar displays caveman level and an animated campfire flicke
|
|
|
82
82
|
|
|
83
83
|
## How It Works
|
|
84
84
|
|
|
85
|
-
The extension hooks `before_agent_start` to append caveman communication rules to the system prompt at the selected intensity. Within a session, the active level is stored as a custom session entry and restored on resume. Across sessions, persistent config (`~/.pi/agent/caveman.json`) provides the default level and status bar preference. Auto-clarity rules tell the model to drop caveman mode for security warnings or irreversible actions.
|
|
85
|
+
The extension hooks `before_agent_start` to append caveman communication rules to the system prompt at the selected intensity. Within a session, the active level is stored as a custom session entry and restored on resume. Across sessions, persistent config (`~/.pi/agent/caveman.json` by default, or `$XDG_CONFIG_HOME/pi/agent/caveman.json` when `XDG_CONFIG_HOME` is set; `PI_CODING_AGENT_DIR` overrides both) provides the default level and status bar preference. Auto-clarity rules tell the model to drop caveman mode for security warnings or irreversible actions.
|
|
86
86
|
|
|
87
87
|
## Warning
|
|
88
88
|
|
package/extensions/caveman.ts
CHANGED
|
@@ -236,13 +236,16 @@ export default function caveman(pi: ExtensionAPI) {
|
|
|
236
236
|
|
|
237
237
|
function syncStatus(ctx: Pick<ExtensionContext, "ui">) {
|
|
238
238
|
stopAnimation();
|
|
239
|
-
const theme = ctx.ui.theme;
|
|
240
239
|
|
|
241
240
|
if (level === "off" || !config.showStatus) {
|
|
242
241
|
ctx.ui.setStatus("caveman", "");
|
|
243
242
|
return;
|
|
244
243
|
}
|
|
245
244
|
|
|
245
|
+
// Hosts like pi-web-ui expose setStatus without a TUI theme — bail instead of throwing on theme.fg.
|
|
246
|
+
if (!ctx.ui.theme?.fg) return;
|
|
247
|
+
const theme = ctx.ui.theme;
|
|
248
|
+
|
|
246
249
|
const anim = ANIMATIONS[level];
|
|
247
250
|
const setFrame = (frame: string) => {
|
|
248
251
|
ctx.ui.setStatus("caveman", frame + " " + theme.fg("muted", "caveman level: ") + theme.fg("text", anim.label));
|
package/package.json
CHANGED