@narumitw/pi-statusline 0.18.0 → 0.21.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 CHANGED
@@ -4,12 +4,12 @@
4
4
 
5
5
  `@narumitw/pi-statusline` is a native [Pi coding agent](https://pi.dev) extension that replaces Pi's footer with a beautiful, information-rich terminal statusline.
6
6
 
7
- Use it to monitor model selection, thinking level, git branch, working directory, active tools, context usage, token totals, estimated cost, time, and statuses from other Pi extensions.
7
+ Use it to monitor provider, model selection, thinking level, git branch, working directory, active tools, context usage, token totals, estimated cost, time, and statuses from other Pi extensions.
8
8
 
9
9
  ## ✨ Features
10
10
 
11
11
  - Replaces the default Pi footer with a compact preset-based statusline.
12
- - Shows model, thinking level, git branch/status, project directory, active tool, context usage, tokens, cost, and clock.
12
+ - Shows provider, model, thinking level, git branch/status, project directory, active tool, context usage, tokens, cost, and clock.
13
13
  - Displays compact statuses published through Pi's generic extension status API.
14
14
  - Owns extension status icons through optional JSON config, including per-extension icon suppression with `""`.
15
15
  - Warns when the same extension package is installed from multiple sources.
@@ -88,6 +88,7 @@ During the `PI_CAFFEINATE_ICON` deprecation window, a leading emoji from `pi-caf
88
88
  The default `tokyo-night` statusline uses a Starship-inspired `░▒▓` / `` powerline layout and includes:
89
89
 
90
90
  - `π` brand marker.
91
+ - 🔌 current provider.
91
92
  - 🤖 current model.
92
93
  - 🧠 thinking level.
93
94
  - 📁 current project directory.
@@ -117,7 +118,7 @@ Examples:
117
118
  ## 🧠 Use cases
118
119
 
119
120
  - Track agent context usage during long coding sessions.
120
- - See which model and thinking level are active.
121
+ - See which provider, model, and thinking level are active.
121
122
  - Monitor token totals and estimated cost.
122
123
  - Keep git branch and project directory visible.
123
124
  - Make Pi terminal sessions easier to scan at a glance.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narumitw/pi-statusline",
3
- "version": "0.18.0",
3
+ "version": "0.21.0",
4
4
  "description": "Pi extension that replaces the footer with an information-rich statusline.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -30,10 +30,10 @@
30
30
  },
31
31
  "devDependencies": {
32
32
  "@biomejs/biome": "2.5.3",
33
- "@earendil-works/pi-coding-agent": "0.80.3",
34
- "@earendil-works/pi-tui": "0.80.3",
33
+ "@earendil-works/pi-coding-agent": "0.80.10",
34
+ "@earendil-works/pi-tui": "0.80.10",
35
35
  "@types/node": "26.1.1",
36
- "typescript": "6.0.3"
36
+ "typescript": "7.0.2"
37
37
  },
38
38
  "repository": {
39
39
  "type": "git",
package/presets/types.ts CHANGED
@@ -2,6 +2,7 @@ import type { ThemeColor } from "@earendil-works/pi-coding-agent";
2
2
 
3
3
  export type SegmentName =
4
4
  | "brand"
5
+ | "provider"
5
6
  | "model"
6
7
  | "thinking"
7
8
  | "cwd"
package/src/render.ts CHANGED
@@ -100,6 +100,8 @@ function buildSegment(
100
100
  switch (name) {
101
101
  case "brand":
102
102
  return segment(name, "π", "accent", "header", true);
103
+ case "provider":
104
+ return segment(name, `🔌 ${ctx.model?.provider ?? "no-provider"}`, color, "header");
103
105
  case "model":
104
106
  return segment(name, `🤖 ${shortenModel(ctx.model?.id ?? "no-model")}`, color, "header");
105
107
  case "thinking":
@@ -164,7 +166,7 @@ function pickColor(config: StatuslineConfig, index: number): ThemeColor {
164
166
  }
165
167
 
166
168
  function thinkingColor(level: ThinkingLevel): ThemeColor {
167
- switch (level) {
169
+ switch (level as string) {
168
170
  case "off":
169
171
  return "dim";
170
172
  case "minimal":
@@ -177,6 +179,10 @@ function thinkingColor(level: ThinkingLevel): ThemeColor {
177
179
  return "thinkingHigh";
178
180
  case "xhigh":
179
181
  return "thinkingXhigh";
182
+ case "max":
183
+ return "thinkingMax" as ThemeColor;
184
+ default:
185
+ return "dim";
180
186
  }
181
187
  }
182
188
 
package/src/settings.ts CHANGED
@@ -10,6 +10,7 @@ const LEGACY_SETTINGS_FILE = "pi-statusline-settings.json";
10
10
  const DEFAULT_PRESET: StatuslinePresetName = "tokyo-night";
11
11
  const DEFAULT_SEGMENTS: SegmentName[] = [
12
12
  "brand",
13
+ "provider",
13
14
  "model",
14
15
  "thinking",
15
16
  "cwd",