omp-statusliney 1.0.0 → 1.0.2

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jakub Bordáš
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # omp-statusliney
2
2
 
3
- A fully customizable statusline for [Oh My Pi](https://omp.sh) (`omp`). It replaces the built-in statusline completely, including the startup prepaint, and draws a multi-line bar like ccstatusline. It keeps all 27 built-in segments and adds 25 new widgets.
3
+ ![A two-line statusliney bar: model, path, git branch and diff stats on line one; context bar, token counts, cache hit rate and cost on line two](docs/social-preview.png)
4
4
 
5
- ![A two-line statusliney bar: model, path, git branch and diff stats on line one; context bar, token counts, cache hit rate and cost on line two](docs/statusline.png)
5
+ A fully customizable statusline for [Oh My Pi](https://omp.sh) (`omp`). It replaces the built-in statusline completely, including the startup prepaint, and draws a multi-line bar like ccstatusline. It keeps every built-in segment (28 as of omp 18.18, including the `cache` prompt-cache marker) and adds 25 new widgets.
6
6
 
7
7
  ## Requirements
8
8
 
@@ -75,15 +75,15 @@ The bar follows omp's theme and symbol preset (all glyphs and colors come from t
75
75
 
76
76
  ### Widgets
77
77
 
78
- | Category | Widgets |
79
- |---|---|
78
+ | Category | Widgets |
79
+ | ------------ | --------------------------------------------------------------------------------------------------------------------- |
80
80
  | omp built-in | every built-in segment (`pi`, `model`, `path`, `git`, `pr`, `cost`, `context_pct`, `session_name`, `usage`, `vim`, …) |
81
- | Git | `git_ahead_behind`, `git_sha`, `git_changes`, `git_stash`, `git_clean` |
82
- | Context | `context_gauge` (the built-in context rule), `context_bar`, `context_remaining`, `quota_bar` |
83
- | Session | `cost_rate`, `turns`, `compactions`, `session_clock`, `tool` |
84
- | Environment | `jobs`, `thinking`, `provider`, `omp_version`, `terminal_width`, `memory` |
85
- | Custom | `text`, `custom_command` (first output line, cached), `link` (OSC 8) |
86
- | Layout | `separator`, `flex` |
81
+ | Git | `git_ahead_behind`, `git_sha`, `git_changes`, `git_stash`, `git_clean` |
82
+ | Context | `context_gauge` (the built-in context rule), `context_bar`, `context_remaining`, `quota_bar` |
83
+ | Session | `cost_rate`, `turns`, `compactions`, `session_clock`, `tool` |
84
+ | Environment | `jobs`, `thinking`, `provider`, `omp_version`, `terminal_width`, `memory` |
85
+ | Custom | `text`, `custom_command` (first output line, cached), `link` (OSC 8) |
86
+ | Layout | `separator`, `flex` |
87
87
 
88
88
  ## Local development
89
89
 
@@ -120,17 +120,17 @@ bun run typecheck # tsc --noEmit
120
120
 
121
121
  ### Project layout
122
122
 
123
- | Path | Purpose |
124
- |---|---|
125
- | `src/index.ts` | Plugin entry: events, ticker, `/statusliney-settings` command |
126
- | `src/takeover.ts` | Patches omp's `StatusLineComponent`, captures the live segment context, scrubs the startup cache |
127
- | `src/frame.ts` | Placement, surfaces, hook rows, per-frame rendering |
128
- | `src/layout.ts` | Pure line layout: groups, separators, flex fill, overflow |
129
- | `src/config.ts`, `src/store.ts` | Config schema, validation, atomic save, file watch |
130
- | `src/presets.ts` | Built-in mirror and named presets |
131
- | `src/widgets/` | Widget contract, registry and widget implementations |
132
- | `src/ui/` | Settings overlay and its views |
133
- | `test/` | Bun tests |
123
+ | Path | Purpose |
124
+ | ------------------------------- | ------------------------------------------------------------------------------------------------ |
125
+ | `src/index.ts` | Plugin entry: events, ticker, `/statusliney-settings` command |
126
+ | `src/takeover.ts` | Patches omp's `StatusLineComponent`, captures the live segment context, scrubs the startup cache |
127
+ | `src/frame.ts` | Placement, surfaces, hook rows, per-frame rendering |
128
+ | `src/layout.ts` | Pure line layout: groups, separators, flex fill, overflow |
129
+ | `src/config.ts`, `src/store.ts` | Config schema, validation, atomic save, file watch |
130
+ | `src/presets.ts` | Built-in mirror and named presets |
131
+ | `src/widgets/` | Widget contract, registry and widget implementations |
132
+ | `src/ui/` | Settings overlay and its views |
133
+ | `test/` | Bun tests |
134
134
 
135
135
  ### Debugging
136
136
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omp-statusliney",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Fully customizable statusline for Oh My Pi (omp)",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -52,9 +52,9 @@
52
52
  }
53
53
  },
54
54
  "devDependencies": {
55
- "@oh-my-pi/pi-coding-agent": "18.12.2",
56
- "@oh-my-pi/pi-tui": "18.12.2",
57
- "@oh-my-pi/pi-utils": "18.12.2",
55
+ "@oh-my-pi/pi-coding-agent": "18.18.1",
56
+ "@oh-my-pi/pi-tui": "18.18.1",
57
+ "@oh-my-pi/pi-utils": "18.18.1",
58
58
  "@types/bun": "latest",
59
59
  "typescript": "^5.9.0"
60
60
  },
@@ -34,6 +34,7 @@ const SEGMENT_INFO: Record<StatusLineSegmentId, { name: string; description: str
34
34
  cache_read: { name: "Cache read", description: "Cache-read tokens" },
35
35
  cache_write: { name: "Cache write", description: "Cache-write tokens" },
36
36
  cache_hit: { name: "Cache hit", description: "Cache hit ratio" },
37
+ cache: { name: "Prompt cache", description: "Prompt-cache marker: dim while warm, warning once it went cold" },
37
38
  session_name: { name: "Session title", description: "Session title (hidden on the band composer row)" },
38
39
  usage: { name: "Usage limits", description: "Provider usage-limit windows" },
39
40
  collab: { name: "Collab", description: "Collaboration host/guest participants" },
@@ -85,7 +86,8 @@ function segmentContext(id: StatusLineSegmentId, item: WidgetItem, env: RenderEn
85
86
  }
86
87
 
87
88
  function segmentWidget(id: StatusLineSegmentId): WidgetDef {
88
- const info = SEGMENT_INFO[id];
89
+ // omp may ship segments newer than this table; never let one break the plugin load.
90
+ const info = SEGMENT_INFO[id] ?? { name: id, description: "omp statusline segment" };
89
91
  return {
90
92
  type: id,
91
93
  name: info.name,