You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add worktree segment for --worktree sessions
Display worktree info when Claude Code sends worktree data in JSON
input. Shows worktree name in curly braces {name} by default.
Configurable via worktree:show=name|branch|path|origin or
comma-separated combo. Path and origin apply ~ home shortening.
New theme color text_worktree (Nord15 purple dark, muted purple light).
-**Lines ~2086**: `main()` — entry point, handles demo modes and normal stdin flow
@@ -63,7 +63,7 @@ Key sections in `claude-code-status-line.py` (~2,200 lines):
63
63
-**Bayesian shrinkage**: the observed burn rate is blended toward the on-track rate using a hyperbolic trust curve `f = elapsed / (halftrust + elapsed)`, so early-window noise is dampened. Config: `usage_burndown:halftrust=16` (default 16h — at 16h elapsed, 50/50 blend).
64
64
-**Relevance filter**: burndown is suppressed when the predicted "sooner" gap is too small relative to remaining time, using a power curve `days_remaining^coeff` (in hours). This avoids noisy predictions early in the window. Config: `usage_burndown:coeff=1.4` (default). At 6.5 days left requires ~13h sooner, at 1 day ~1h, at 0.5 days ~24min.
65
65
-`model` segment supports `effort` option: `model:effort=short` shows single letter (`H`/`M`/`L`), `model:effort=full` shows full word (`high`/`medium`/`low`), `model:effort=` disables effort display. Default: `full`. Effort read from `CLAUDE_CODE_EFFORT_LEVEL` env var → `~/.claude/settings.json``effortLevel` → `"high"`.
66
-
- Config: `usage_burndown:verbosity=short:coeff=1.4:halftrust=16`. Short uses compact compound durations (`5d2h30m`), `~` instead of `about`, `->` instead of `then`, drops `usage`, `out ~` instead of `may run out about`; `git_status` shows working directory state using symbols: `+` staged, `!` modified, `x` deleted, `r` renamed, `?` untracked, `=` conflicted, `$` stashed, `>` ahead, `<` behind, `<>` diverged; `added_dirs` shows directories added via `/add-dir` (from `workspace.added_dirs` JSON field), sorted alphabetically, joined by separator. Config: `added_dirs:basename_only=1:separator=,` (defaults: full path with `~` home shortening, ` • ` separator). Theme color: `text_added_dirs` (dark: Nord3 muted gray `#4C566A`, light: medium gray `#7B8394`).
66
+
- Config: `usage_burndown:verbosity=short:coeff=1.4:halftrust=16`. Short uses compact compound durations (`5d2h30m`), `~` instead of `about`, `->` instead of `then`, drops `usage`, `out ~` instead of `may run out about`; `git_status` shows working directory state using symbols: `+` staged, `!` modified, `x` deleted, `r` renamed, `?` untracked, `=` conflicted, `$` stashed, `>` ahead, `<` behind, `<>` diverged; `added_dirs` shows directories added via `/add-dir` (from `workspace.added_dirs` JSON field), sorted alphabetically, joined by separator. Config: `added_dirs:basename_only=1:separator=,` (defaults: full path with `~` home shortening, ` • ` separator). Theme color: `text_added_dirs` (dark: Nord3 muted gray `#4C566A`, light: medium gray `#7B8394`); `worktree` shows worktree info when `worktree` field is present in JSON input (from `--worktree` sessions). Displays in curly braces `{name}`. Config: `worktree:show=name` (default), supports `name`, `branch`, `path`, `origin` or comma-separated combo like `show=name,branch`. `path` and `origin` apply `~` home shortening. `origin` maps to JSON `original` field. Theme color: `text_worktree` (dark: Nord15 purple `#B48EAD`, light: muted purple `#8B6B85`).
67
67
-**Configuration**: global settings via `SL_THEME`, `SL_USAGE_CACHE_DURATION`, `SL_UPDATE_CACHE_DURATION`, `SL_UPDATE_RETRY_DURATION`, `SL_UPDATE_CUSTOM_RETRY_DURATION`, `SL_UPDATE_VERSION_CMD`, `SL_UPDATE_VERSION_SOURCE`, `SL_SHOW_STATUSLINE_UPDATE`, `SL_THEME_FILE`. All per-segment config (bar width, gauge style, hide default branch, basename-only directory) via colon-separated options in `SL_SEGMENTS`.
68
68
-**Update checker**: fetches latest version from npm registry (`@anthropic-ai/claude-code`) or custom command (`SL_UPDATE_VERSION_CMD`), compares with `claude --version` output. Custom command retries 3 times with 1s delay, then falls back to npm. Returns `(version, source)` tuple where source is `npm`, `custom`, or `npm_fallback`. Cached to `~/.claude/.update_cache.json` — success cached for `UPDATE_CACHE_DURATION` (1h), custom source failures retry after `UPDATE_CUSTOM_RETRY_DURATION` (2min), total failures retry after `UPDATE_RETRY_DURATION` (10min). Falls back to stale cache when offline.
69
69
-**Self-update**: `--self-update` flag downloads latest version from GitHub and replaces the script atomically. Status line update notifications appear on a separate line below the main output with the update command. Controlled by `SL_SHOW_STATUSLINE_UPDATE` (default on).
0 commit comments