pi-bar 0.3.17 → 0.3.18
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/status-footer.ts +19 -8
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
claude-opus-4.7 ❯ think:med ❯ 2.6% / 1.0M ❯ Inspecting package structure ❯ plan:active
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-

|
|
13
13
|
|
|
14
14
|
## Why use it?
|
|
15
15
|
|
|
@@ -48,7 +48,7 @@ Allowed segments are `model`, `thinking`, `context`, `tldr`, and `extensions`. T
|
|
|
48
48
|
|
|
49
49
|
### Configure live TLDR
|
|
50
50
|
|
|
51
|
-
pi-bar shows a concise live TLDR of the current task in the footer. It generates TLDRs from recent prompt, assistant, and deterministic code-compressed tool facts (for example `bash ... ok`, `grep ... 4 matches`,
|
|
51
|
+
pi-bar shows a concise live TLDR of the current task in the footer. It generates TLDRs from recent prompt, assistant, and deterministic code-compressed tool facts (for example `bash ... ok`, `grep ... 4 matches`, `edit file`, or `custom_tool key=value`). It resets when you navigate the session tree so stale summaries do not follow you across branches. Set `PI_BAR_SHOW` without `tldr` to hide it.
|
|
52
52
|
|
|
53
53
|
Override the TLDR model with:
|
|
54
54
|
|
|
@@ -308,6 +308,24 @@ function compactValue(value: unknown, maxChars: number): string | undefined {
|
|
|
308
308
|
return text ? truncateText(compactText(text), maxChars) : undefined;
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
+
function compactInputArgs(input: Record<string, unknown>, maxChars: number): string | undefined {
|
|
312
|
+
const args = Object.entries(input)
|
|
313
|
+
.sort(([a], [b]) => a.localeCompare(b))
|
|
314
|
+
.map(([key, value]) => {
|
|
315
|
+
const formatted = compactValue(value, 80);
|
|
316
|
+
return formatted ? `${key}=${formatted}` : undefined;
|
|
317
|
+
})
|
|
318
|
+
.filter((arg): arg is string => Boolean(arg));
|
|
319
|
+
|
|
320
|
+
let result = "";
|
|
321
|
+
for (const arg of args) {
|
|
322
|
+
const next = result ? `${result} ${arg}` : arg;
|
|
323
|
+
if (next.length > maxChars) break;
|
|
324
|
+
result = next;
|
|
325
|
+
}
|
|
326
|
+
return result || undefined;
|
|
327
|
+
}
|
|
328
|
+
|
|
311
329
|
function compactToolInput(toolName: string, input: Record<string, unknown> | undefined): string {
|
|
312
330
|
if (!input) return toolName;
|
|
313
331
|
|
|
@@ -334,14 +352,7 @@ function compactToolInput(toolName: string, input: Record<string, unknown> | und
|
|
|
334
352
|
case "ls":
|
|
335
353
|
return path ? `ls ${path}` : "ls";
|
|
336
354
|
default: {
|
|
337
|
-
const args =
|
|
338
|
-
.slice(0, 3)
|
|
339
|
-
.map(([key, value]) => {
|
|
340
|
-
const formatted = compactValue(value, 80);
|
|
341
|
-
return formatted ? `${key}=${formatted}` : undefined;
|
|
342
|
-
})
|
|
343
|
-
.filter(Boolean)
|
|
344
|
-
.join(" ");
|
|
355
|
+
const args = compactInputArgs(input, 240);
|
|
345
356
|
return args ? `${toolName} ${args}` : toolName;
|
|
346
357
|
}
|
|
347
358
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-bar",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.18",
|
|
4
4
|
"description": "Pi footer/statusline showing active model, thinking level, context pressure, live TLDR, and extension statuses.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -51,6 +51,6 @@
|
|
|
51
51
|
"extensions": [
|
|
52
52
|
"./extensions/status-footer.ts"
|
|
53
53
|
],
|
|
54
|
-
"image": "https://cdn.jsdelivr.net/npm/pi-bar@0.3.
|
|
54
|
+
"image": "https://cdn.jsdelivr.net/npm/pi-bar@0.3.18/assets/screenshot.png"
|
|
55
55
|
}
|
|
56
56
|
}
|