omp-statusliney 1.0.1 → 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/README.md +21 -21
- package/package.json +4 -4
- package/src/widgets/builtin.ts +3 -1
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# omp-statusliney
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+

|
|
4
4
|
|
|
5
|
-
|
|
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
|
|
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
|
|
82
|
-
| Context
|
|
83
|
-
| Session
|
|
84
|
-
| Environment
|
|
85
|
-
| Custom
|
|
86
|
-
| Layout
|
|
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
|
|
124
|
-
|
|
125
|
-
| `src/index.ts`
|
|
126
|
-
| `src/takeover.ts`
|
|
127
|
-
| `src/frame.ts`
|
|
128
|
-
| `src/layout.ts`
|
|
129
|
-
| `src/config.ts`, `src/store.ts` | Config schema, validation, atomic save, file watch
|
|
130
|
-
| `src/presets.ts`
|
|
131
|
-
| `src/widgets/`
|
|
132
|
-
| `src/ui/`
|
|
133
|
-
| `test/`
|
|
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.
|
|
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.
|
|
56
|
-
"@oh-my-pi/pi-tui": "18.
|
|
57
|
-
"@oh-my-pi/pi-utils": "18.
|
|
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
|
},
|
package/src/widgets/builtin.ts
CHANGED
|
@@ -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
|
-
|
|
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,
|