pi-bar 0.3.36 → 0.3.38

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 CHANGED
@@ -9,9 +9,9 @@
9
9
  claude-opus-4.7 ❯ think:med ❯ 2.6% / 1.0M ❯ Reviewing package structure ❯ plan:active ❯ queue:2
10
10
  ```
11
11
 
12
- ![pi-bar with low context usage](https://cdn.jsdelivr.net/npm/pi-bar@0.3.36/assets/screenshot-green.png)
13
- ![pi-bar with medium context usage](https://cdn.jsdelivr.net/npm/pi-bar@0.3.36/assets/screenshot-yellow.png)
14
- ![pi-bar with high context usage](https://cdn.jsdelivr.net/npm/pi-bar@0.3.36/assets/screenshot-red.png)
12
+ ![pi-bar with low context usage](https://cdn.jsdelivr.net/npm/pi-bar@0.3.38/assets/screenshot-green.png)
13
+ ![pi-bar with medium context usage](https://cdn.jsdelivr.net/npm/pi-bar@0.3.38/assets/screenshot-yellow.png)
14
+ ![pi-bar with high context usage](https://cdn.jsdelivr.net/npm/pi-bar@0.3.38/assets/screenshot-red.png)
15
15
 
16
16
  ## Why use it?
17
17
 
@@ -75,7 +75,7 @@ Or in pi settings: `bar.progressModel`. Otherwise pi-bar picks a fast model you
75
75
 
76
76
  ### Configure extension statuses
77
77
 
78
- Other pi extensions can publish small status badges. Pi-bar collects them into the `extensions` segment and separates each badge with the same `❯` divider used by other footer segments. Run `/bar` or `/bar status` inside pi to pick which ones to show:
78
+ Other pi extensions can publish small status badges. Pi-bar collects them into the `extensions` segment, strips embedded terminal colors, and separates each badge with the same `❯` divider used by other footer segments. Run `/bar` or `/bar status` inside pi to pick which ones to show:
79
79
 
80
80
  ```text
81
81
  /bar status
@@ -1525,18 +1525,18 @@ function formatExtensionStatuses(
1525
1525
  statuses: ReadonlyMap<string, string>,
1526
1526
  filter: StatusFilter,
1527
1527
  seenStatusKeys: Set<string>,
1528
- ): string | null {
1528
+ ): string[] | null {
1529
1529
  const parts = Array.from(statuses.entries())
1530
- .filter(([, text]) => text.trim().length > 0)
1530
+ .filter(([, text]) => stripTerminalControls(text).trim().length > 0)
1531
1531
  .filter(([key]) => {
1532
1532
  seenStatusKeys.add(key);
1533
1533
  return shouldShowStatus(key, filter);
1534
1534
  })
1535
- .map(([key, text]) => `${key}:${text}`);
1535
+ .map(([key, text]) =>
1536
+ `${stripTerminalControls(key)}:${stripTerminalControls(text)}`,
1537
+ );
1536
1538
 
1537
- return parts.length > 0
1538
- ? parts.join(` ${EXTENSION_STATUS_SEPARATOR} `)
1539
- : null;
1539
+ return parts.length > 0 ? parts : null;
1540
1540
  }
1541
1541
 
1542
1542
  function serializeStatusFilter(filter: StatusFilter): SerializedStatusFilter {
@@ -2088,7 +2088,7 @@ export default function (pi: ExtensionAPI) {
2088
2088
  render(width: number): string[] {
2089
2089
  const modelName = formatModelName(ctx.model?.id);
2090
2090
  const thinkingLevel = String(pi.getThinkingLevel());
2091
- const extensionStatuses = formatExtensionStatuses(
2091
+ const extensionStatusParts = formatExtensionStatuses(
2092
2092
  footerData?.getExtensionStatuses?.() ?? new Map(),
2093
2093
  statusFilter,
2094
2094
  seenStatusKeys,
@@ -2105,12 +2105,17 @@ export default function (pi: ExtensionAPI) {
2105
2105
  : "—";
2106
2106
  const progressText = progress.text();
2107
2107
 
2108
+ const extensionStatuses = extensionStatusParts
2109
+ ? extensionStatusParts
2110
+ .map((part) => theme.fg("text", part))
2111
+ .join(` ${theme.fg("dim", EXTENSION_STATUS_SEPARATOR)} `)
2112
+ : null;
2108
2113
  const segmentRenderers: Record<SegmentName, string | null> = {
2109
2114
  model: theme.fg("accent", modelName),
2110
2115
  thinking: theme.fg(thinkingColor(thinkingLevel), `think:${thinkingLevel}`),
2111
2116
  context: theme.fg(contextSegmentColor, contextText),
2112
- progress: progressText ? theme.fg("muted", progressText) : null,
2113
- extensions: extensionStatuses ? theme.fg("muted", extensionStatuses) : null,
2117
+ progress: progressText ? theme.fg("text", progressText) : null,
2118
+ extensions: extensionStatuses,
2114
2119
  };
2115
2120
 
2116
2121
  const separator = ` ${theme.fg("dim", SEGMENT_SEPARATOR)} `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-bar",
3
- "version": "0.3.36",
3
+ "version": "0.3.38",
4
4
  "description": "Pi footer/statusline showing active model, thinking level, context pressure, live progress updates, 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.36/assets/screenshot-yellow.png"
54
+ "image": "https://cdn.jsdelivr.net/npm/pi-bar@0.3.38/assets/screenshot-yellow.png"
55
55
  }
56
56
  }