pi-bar 0.3.35 → 0.3.37

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
@@ -6,12 +6,12 @@
6
6
  **Never accidentally run Opus on a typo again.** pi-bar keeps your model, thinking level, context pressure, a live progress update, and any extension statuses visible in pi's footer.
7
7
 
8
8
  ```text
9
- claude-opus-4.7 ❯ think:med ❯ 2.6% / 1.0M ❯ Reviewing package structure ❯ plan:active │ queue:2
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.35/assets/screenshot-green.png)
13
- ![pi-bar with medium context usage](https://cdn.jsdelivr.net/npm/pi-bar@0.3.35/assets/screenshot-yellow.png)
14
- ![pi-bar with high context usage](https://cdn.jsdelivr.net/npm/pi-bar@0.3.35/assets/screenshot-red.png)
12
+ ![pi-bar with low context usage](https://cdn.jsdelivr.net/npm/pi-bar@0.3.37/assets/screenshot-green.png)
13
+ ![pi-bar with medium context usage](https://cdn.jsdelivr.net/npm/pi-bar@0.3.37/assets/screenshot-yellow.png)
14
+ ![pi-bar with high context usage](https://cdn.jsdelivr.net/npm/pi-bar@0.3.37/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 `│`. 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 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
@@ -132,7 +132,7 @@ const DEFAULT_WARNING_THRESHOLD = 70;
132
132
  const DEFAULT_ERROR_THRESHOLD = 90;
133
133
 
134
134
  const SEGMENT_SEPARATOR = "❯";
135
- const EXTENSION_STATUS_SEPARATOR = "│";
135
+ const EXTENSION_STATUS_SEPARATOR = SEGMENT_SEPARATOR;
136
136
 
137
137
  function formatTokens(n: number): string {
138
138
  if (n >= 1_000_000) {
@@ -1525,7 +1525,7 @@ 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
1530
  .filter(([, text]) => text.trim().length > 0)
1531
1531
  .filter(([key]) => {
@@ -1534,9 +1534,7 @@ function formatExtensionStatuses(
1534
1534
  })
1535
1535
  .map(([key, text]) => `${key}:${text}`);
1536
1536
 
1537
- return parts.length > 0
1538
- ? parts.join(` ${EXTENSION_STATUS_SEPARATOR} `)
1539
- : null;
1537
+ return parts.length > 0 ? parts : null;
1540
1538
  }
1541
1539
 
1542
1540
  function serializeStatusFilter(filter: StatusFilter): SerializedStatusFilter {
@@ -2088,7 +2086,7 @@ export default function (pi: ExtensionAPI) {
2088
2086
  render(width: number): string[] {
2089
2087
  const modelName = formatModelName(ctx.model?.id);
2090
2088
  const thinkingLevel = String(pi.getThinkingLevel());
2091
- const extensionStatuses = formatExtensionStatuses(
2089
+ const extensionStatusParts = formatExtensionStatuses(
2092
2090
  footerData?.getExtensionStatuses?.() ?? new Map(),
2093
2091
  statusFilter,
2094
2092
  seenStatusKeys,
@@ -2105,12 +2103,17 @@ export default function (pi: ExtensionAPI) {
2105
2103
  : "—";
2106
2104
  const progressText = progress.text();
2107
2105
 
2106
+ const extensionStatuses = extensionStatusParts
2107
+ ? extensionStatusParts
2108
+ .map((part) => theme.fg("muted", part))
2109
+ .join(` ${theme.fg("dim", EXTENSION_STATUS_SEPARATOR)} `)
2110
+ : null;
2108
2111
  const segmentRenderers: Record<SegmentName, string | null> = {
2109
2112
  model: theme.fg("accent", modelName),
2110
2113
  thinking: theme.fg(thinkingColor(thinkingLevel), `think:${thinkingLevel}`),
2111
2114
  context: theme.fg(contextSegmentColor, contextText),
2112
2115
  progress: progressText ? theme.fg("muted", progressText) : null,
2113
- extensions: extensionStatuses ? theme.fg("muted", extensionStatuses) : null,
2116
+ extensions: extensionStatuses,
2114
2117
  };
2115
2118
 
2116
2119
  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.35",
3
+ "version": "0.3.37",
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.35/assets/screenshot-yellow.png"
54
+ "image": "https://cdn.jsdelivr.net/npm/pi-bar@0.3.37/assets/screenshot-yellow.png"
55
55
  }
56
56
  }