diff --git a/README.ja.md b/README.ja.md index 611651a..fe4e13c 100644 --- a/README.ja.md +++ b/README.ja.md @@ -27,7 +27,7 @@ npx skills add webup/skills-cc -s webup-statusline -g #### ルック&フィール -フルセット(全カラム)、残量 49%、セッションコスト $0.42、`effortLevel: high`、出力スタイル `Explanatory`、ワークツリー内: +フルセット(全カラム)、残量 49%、セッションコスト $0.42、`effort: high`、出力スタイル `Explanatory`、ワークツリー内: Dracula テーマ全カラムの例 @@ -41,7 +41,7 @@ npx skills add webup/skills-cc -s webup-statusline -g -余裕ありセッション — 残量 88%、`effortLevel: medium`、出力スタイル default(非表示): +余裕ありセッション — 残量 88%、`effort: medium`、出力スタイル default(非表示): Gruvbox テーマ余裕セッションの例 @@ -75,7 +75,7 @@ npx skills add webup/skills-cc -s webup-statusline -g | `model` | アクティブモデル名 | 常時 | | `context` | コンテキスト進捗バー + % — **残量に応じて色が変化** | 常時 | | `cost` | セッション API 支出 `$X.XX`(ゴールド、例:`$0.42`) | `cost.total_cost_usd` が四捨五入して ≥ $0.01 の時 | -| `effort` | 推論努力レベル — **強度で色分け**(`low`/`medium`/`high`/`xhigh`/`max` 対応) | `~/.claude/settings.json` で `effortLevel` が設定されている時 | +| `effort` | 推論努力レベル — **強度で色分け**(`low`/`medium`/`high`/`xhigh`/`max` 対応) | `effort.level` が存在する時 | | `style` | 出力スタイル名(例:`Explanatory`、`Learning`)— Claude のブランドカラーに合わせたパープル | `output_style.name` が `default` 以外の時 | | `dir` | リポジトリディレクトリ名(ワークツリー内では元リポジトリ名) | 常時 | | `worktree` | 太字の **`worktree:`** ラベル | git ワークツリー内のみ(入力 JSON または `git` CLI で検出) | diff --git a/README.md b/README.md index 39f7a3d..92299f6 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Generate and install a custom Claude Code status line. Pick your **columns**, pi #### What it looks like -Full setup (all columns), 49% context remaining, session cost $0.42, `effortLevel: high`, output style `Explanatory`, inside a worktree: +Full setup (all columns), 49% context remaining, session cost $0.42, `effort: high`, output style `Explanatory`, inside a worktree: Dracula theme with all columns: purple model, yellow context bar, gold cost, bold-red effort, purple output style, cyan dir, pink worktree, orange git branch @@ -41,7 +41,7 @@ Full setup (all columns), 49% context remaining, session cost $0.42, `effortLeve -Healthy session — 88% remaining, `effortLevel: medium`, default output style (hidden): +Healthy session — 88% remaining, `effort: medium`, default output style (hidden): Gruvbox theme healthy session: teal model, green context bar at 12% used, yellow effort medium, green dir, blue git main @@ -75,7 +75,7 @@ Healthy session — 88% remaining, `effortLevel: medium`, default output style ( | `model` | Active model name | Always | | `context` | Context window progress bar + percentage — **color scales with remaining capacity** | Always | | `cost` | Session API spend as `$X.XX` in gold (e.g. `$0.42`) | When `cost.total_cost_usd` rounds to ≥ $0.01 | -| `effort` | Reasoning effort level — **colored by intensity** (supports `low`/`medium`/`high`/`xhigh`/`max`) | When `effortLevel` is set in `~/.claude/settings.json` | +| `effort` | Reasoning effort level — **colored by intensity** (supports `low`/`medium`/`high`/`xhigh`/`max`) | When `effort.level` is present | | `style` | Output style name (e.g. `Explanatory`, `Learning`) — shown in purple to match Claude's brand hue | When `output_style.name` is anything other than `default` | | `dir` | Repo directory basename (original repo when inside a worktree) | Always | | `worktree` | Bold **`worktree:`** label | Only inside a git worktree (detected via input JSON or `git` CLI) | diff --git a/README.zh.md b/README.zh.md index 4d71114..ec8ddc9 100644 --- a/README.zh.md +++ b/README.zh.md @@ -27,7 +27,7 @@ npx skills add webup/skills-cc -s webup-statusline -g #### 效果预览 -完整字段,剩余 49%,累计消费 $0.42,`effortLevel: high`,输出样式 `Explanatory`,工作树内: +完整字段,剩余 49%,累计消费 $0.42,`effort: high`,输出样式 `Explanatory`,工作树内: Dracula 主题全字段示例 @@ -41,7 +41,7 @@ npx skills add webup/skills-cc -s webup-statusline -g -轻松状态 —— 剩余 88%、`effortLevel: medium`,输出样式 default(隐藏): +轻松状态 —— 剩余 88%、`effort: medium`,输出样式 default(隐藏): Gruvbox 主题轻松状态 @@ -75,7 +75,7 @@ npx skills add webup/skills-cc -s webup-statusline -g | `model` | 活跃模型名 | 始终显示 | | `context` | 上下文进度条 + 百分比 —— **颜色随剩余容量变化** | 始终显示 | | `cost` | 会话累计消费 `$X.XX`(金色,例如 `$0.42`) | 当 `cost.total_cost_usd` 四舍五入后 ≥ $0.01 | -| `effort` | 推理努力度 —— **按强度着色**(支持 `low`/`medium`/`high`/`xhigh`/`max`) | 当 `~/.claude/settings.json` 中设置了 `effortLevel` | +| `effort` | 推理努力度 —— **按强度着色**(支持 `low`/`medium`/`high`/`xhigh`/`max`) | 当 `effort.level` 存在时 | | `style` | 输出样式名(例如 `Explanatory`、`Learning`)—— 紫色呼应 Claude 品牌色 | 当 `output_style.name` 不是 `default` 时 | | `dir` | 仓库目录名(在工作树中显示原仓库名) | 始终显示 | | `worktree` | 加粗的 **`worktree:`** 标签 | 仅在 git 工作树中(通过输入 JSON 或 `git` CLI 检测) | diff --git a/scripts/verify_context.py b/scripts/verify_context.py index 43e7a54..6675195 100644 --- a/scripts/verify_context.py +++ b/scripts/verify_context.py @@ -77,7 +77,7 @@ def main(): errors.append(f"FAIL missing model field in {label}") if el == "context" and "remaining_percentage" not in script: errors.append(f"FAIL missing context field in {label}") - if el == "effort" and "effortLevel" not in script: + if el == "effort" and "effort.level" not in script: errors.append(f"FAIL missing effort field in {label}") if el == "git" and "branch --show-current" not in script: errors.append(f"FAIL missing git field in {label}") diff --git a/skills/webup-statusline/SKILL.md b/skills/webup-statusline/SKILL.md index 76cc9a3..f7b47ab 100644 --- a/skills/webup-statusline/SKILL.md +++ b/skills/webup-statusline/SKILL.md @@ -58,7 +58,7 @@ npx -y bun ${SKILL_DIR}/scripts/generate.mjs --elements model,context,effort,git | `model` | Active model name (e.g. "Opus 4.7") | `model.display_name` | | `context` | Progress bar + percentage — **color changes with remaining capacity** | `context_window.remaining_percentage` | | `cost` | Session API spend formatted as `$X.XX` in gold — hidden when rounds to `$0.00` | `cost.total_cost_usd` from input JSON | -| `effort` | Reasoning effort level — **color changes with level** | `effortLevel` in `~/.claude/settings.local.json` → `~/.claude/settings.json` | +| `effort` | Reasoning effort level — **color changes with level** | `effort.level` from input JSON | | `style` | Output style name (e.g. Explanatory, Learning) — hidden when "default" | `output_style.name` from input JSON | | `git` | Git branch name (yellow when dirty) | `worktree.branch` → git CLI | | `dir` | Repo basename (original repo when in a worktree) | `worktree.original_repo_dir` → `workspace.current_dir` | diff --git a/skills/webup-statusline/scripts/generate.mjs b/skills/webup-statusline/scripts/generate.mjs index ad784c6..6d49225 100644 --- a/skills/webup-statusline/scripts/generate.mjs +++ b/skills/webup-statusline/scripts/generate.mjs @@ -220,13 +220,9 @@ function buildScript() { p("ctx_window_size=$(echo \"$input\" | jq -r '.context_window.context_window_size // empty')") } if (elements.includes('effort')) { - p('# Read effort level from settings (local overrides global)') - p('effort=""') - p('for f in "$HOME/.claude/settings.local.json" "$HOME/.claude/.claude/settings.local.json" "$HOME/.claude/settings.json"; do') - p(' if [ -z "$effort" ] && [ -f "$f" ]; then') - p(' effort=$(jq -r \'.effortLevel // empty\' "$f" 2>/dev/null)') - p(' fi') - p('done') + p('# Effort comes from the session JSON. settings.json only holds a configured') + p('# default, which is absent unless the user set one explicitly.') + p("effort=$(echo \"$input\" | jq -r '.effort.level // empty')") } if (elements.includes('dir') || elements.includes('git')) { p("current_dir=$(echo \"$input\" | jq -r '.workspace.current_dir // \"\"')")