@say8425/cc-statusline 3.1.0 → 4.0.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 +43 -2
- package/dist/index.js +220 -325
- package/package.json +17 -13
- package/dist/viewer/index.html +0 -199
- package/dist/viewer/main.js +0 -2842
package/README.md
CHANGED
|
@@ -54,8 +54,9 @@ Add the following to `~/.claude/settings.json`:
|
|
|
54
54
|
- **Session Time**: Current session elapsed time
|
|
55
55
|
- **Cost**: Session cost in USD
|
|
56
56
|
- **Context**: Token usage with percentage (color-coded)
|
|
57
|
+
- **Model**: Current model name and reasoning effort (e.g., `Fable 5 high`; effort shown only for models that support it), with an `⚡ultra` badge when ultracode is enabled in your Claude Code settings and the session reports `xhigh` effort
|
|
57
58
|
- **Git Diff**: File count, insertions, deletions
|
|
58
|
-
- **Clickable Diff Viewer**: Click `✏️` to open a local diff viewer
|
|
59
|
+
- **Clickable Diff Viewer**: Click `✏️` to open a local diff viewer in your browser, powered by [diffdeck](https://github.com/say8425/diffdeck) (installed automatically as a dependency) — file tree, working-tree / vs-base modes, watch mode (auto-refresh), file folding, and in-app search (`Cmd/Ctrl+F`) across the full diff, including deleted lines
|
|
59
60
|
- **PR URL**: Clickable OSC 8 hyperlink
|
|
60
61
|
- **Worktree Support**: Shows real project name when running in a `cc --worktree` session
|
|
61
62
|
- **TrueColor**: Dynamic colors based on thresholds
|
|
@@ -74,6 +75,7 @@ Add the following to `~/.claude/settings.json`:
|
|
|
74
75
|
| ⏱️ | Session elapsed time |
|
|
75
76
|
| 💰 | Session cost in USD |
|
|
76
77
|
| 🧠 | Context window usage |
|
|
78
|
+
| 🤖 | Current model and effort |
|
|
77
79
|
| ⏳ | Limit reset time |
|
|
78
80
|
| 📊 | 5-hour utilization % |
|
|
79
81
|
| ⏰ | Weekly limit reset time |
|
|
@@ -81,6 +83,42 @@ Add the following to `~/.claude/settings.json`:
|
|
|
81
83
|
| ✏️ | Uncommitted changes (click to open diff viewer) |
|
|
82
84
|
| 📎 | Pull request link |
|
|
83
85
|
|
|
86
|
+
## Diff Viewer
|
|
87
|
+
|
|
88
|
+
Click `✏️` in the statusline to open a local diff viewer in your browser. The viewer itself is provided by [diffdeck](https://github.com/say8425/diffdeck) ([`@say8425/diffdeck`](https://www.npmjs.com/package/@say8425/diffdeck) on npm), installed automatically as a runtime dependency of cc-statusline — the statusline spawns it as a background daemon and links to it from the `✏️` entry point.
|
|
89
|
+
|
|
90
|
+

|
|
91
|
+
|
|
92
|
+
> [!TIP]
|
|
93
|
+
> **Pairs well with [cmux](https://cmux.com)** — the viewer opens right in cmux's [browser side panel](https://cmux.com/docs/browser-automation), so your diff sits next to your terminal instead of in a separate window. cmux's built-in diff viewer felt clunky to use, which is part of why this one exists.
|
|
94
|
+
|
|
95
|
+
- **Two diff modes**: `Working tree` (vs HEAD) and `vs <base>` (merge-base against the PR target or default branch). After you commit, the entry point stays alive as `✏️ vs <base>` — clicking it opens the viewer in base mode, so your diff never disappears mid-review.
|
|
96
|
+
|
|
97
|
+

|
|
98
|
+
|
|
99
|
+
- **Image diff**: changed binary images (png/jpg/gif/webp/avif/bmp/ico) render inline in the diff flow, in the same order as the file tree — side-by-side Old/New panels on a checkerboard background, foldable like any other file
|
|
100
|
+
|
|
101
|
+

|
|
102
|
+
- **Unified / Split** view toggle
|
|
103
|
+
- **Watch mode**: auto-refresh (~2s polling) that detects changes while preserving scroll position
|
|
104
|
+
- **File tree**: left/right placement and flatten (collapse empty directories) toggles
|
|
105
|
+
- **File folding**: click any file header to collapse/expand; lockfiles and files with more than 1,500 changed lines start collapsed
|
|
106
|
+
- **In-app search** (`Cmd/Ctrl+F`): searches the entire diff including deleted lines, with match navigation and highlighting
|
|
107
|
+
- **Copy path**: hover a file header to copy the file's relative path
|
|
108
|
+
- **Include untracked** files toggle
|
|
109
|
+
|
|
110
|
+
### How It Works (Diff Viewer)
|
|
111
|
+
|
|
112
|
+
The statusline spawns diffdeck as a background daemon on demand at `127.0.0.1:49573` whenever the repo has something to show. Requests are token-protected and bound to localhost.
|
|
113
|
+
|
|
114
|
+
| Environment variable | Effect |
|
|
115
|
+
| -------------------- | ------ |
|
|
116
|
+
| `CC_STATUSLINE_DIFF_PORT` | Change the port (default: `49573`) |
|
|
117
|
+
| `CC_STATUSLINE_DIFF_DISABLE=1` | Disable the diff viewer entirely |
|
|
118
|
+
|
|
119
|
+
> [!TIP]
|
|
120
|
+
> Open the viewer through the `✏️` link instead of a bookmark — the link always carries a fresh token and makes sure the server is running.
|
|
121
|
+
|
|
84
122
|
## Usage Metrics
|
|
85
123
|
|
|
86
124
|
Shows usage information from Claude Code's stdin JSON input.
|
|
@@ -119,8 +157,11 @@ bun test --coverage
|
|
|
119
157
|
# Type check
|
|
120
158
|
bun run typecheck
|
|
121
159
|
|
|
122
|
-
# Lint
|
|
160
|
+
# Lint (oxlint, type-aware)
|
|
123
161
|
bun run lint
|
|
162
|
+
|
|
163
|
+
# Format (oxfmt)
|
|
164
|
+
bun run format
|
|
124
165
|
```
|
|
125
166
|
|
|
126
167
|
## Color Thresholds
|