Commit aea1c2e
authored
v0.42.0:
After v0.41.1 removed the intrusive sessionTitle overwrite, the
cumulative-savings badge lives in the additive statusline (the
caveman-style channel that sits alongside the session name and
live-updates every render). But wiring it meant hand-editing
~/.claude/settings.json. The user asked: can't we auto-enable it?
We can — but NOT by silently writing the user's config (that's the
sessionTitle mistake again: clobbering a statusLine the user may have
set for caveman or a custom badge). So this is an explicit,
non-destructive opt-in command.
`token-pilot install-statusline` decides by current state
(reusing ecosystem-check's classifier):
- not-configured → write the chain command (merges into
existing settings, preserving every other key)
- configured-caveman-only / tp-only → upgrade to the chain wrapper
so BOTH badges render side by side
- configured-chain → no-op
- configured-other → LEFT UNTOUCHED; prints how to switch, or
--force to replace a custom statusLine
- unknown (bad JSON) → not modified; prints manual guidance
The chain command is version-agnostic (globs the newest plugin dir),
so it survives plugin upgrades.
Wiring: src/cli/install-statusline.ts (decideStatuslineAction pure +
classifyStatuslineAt path-injectable, both fully tested) · index.js
case install-statusline · typo-guard. The `doctor` not-configured
nudge now points at this one command instead of a JSON recipe.
Verified e2e against the dist: fresh write preserves other settings
keys; re-run is a no-op; a custom statusLine is never clobbered.
Tests: 1349/1349 pass (+16).
Build: clean (25 agents under 0.42.0).token-pilot install-statusline — one-command badge setup (#41)1 parent d152ddb commit aea1c2e
35 files changed
Lines changed: 383 additions & 44 deletions
File tree
- .claude-plugin
- agents
- src
- cli
- tests/cli
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
0 commit comments