Skip to content

Commit 9363a23

Browse files
lroolleclaude
andcommitted
fix: model abbreviation without settings.json, add agent install prompt
The else branch (no configured_model) used the generic family name "opus" instead of abbreviating model_id. On CI and fresh installs where ~/.claude/settings.json has no model override, "claude-opus-4-6[1m]" displayed as "opus[1m]" instead of "opus4.6[1m]". Now tries abbreviate_model_id on model_id before falling back to family name. Also add a one-shot Claude Code prompt to README for agent-assisted install. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 2641b0a commit 9363a23

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ Restart Claude Code (or send a message) and the statusline appears.
2828

2929
**Requires:** Bash, `jq`, `curl`.
3030

31+
### Install via Claude Code
32+
33+
Paste this into Claude Code and it will set everything up:
34+
35+
```
36+
Install claude-code-statusline: download https://raw.githubusercontent.com/thevibeworks/claude-code-statusline/main/statusline.sh to ~/.claude/statusline.sh, make it executable, and add a statusLine command entry to ~/.claude/settings.json pointing to it with padding 0.
37+
```
38+
3139
<details><summary>Manual install / inspect first</summary>
3240

3341
```bash

statusline.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1211,7 +1211,13 @@ if [ -n "$configured_model" ]; then
12111211
model_text="${model_text}[1m]"
12121212
fi
12131213
else
1214-
model_text="$runtime_model"
1214+
base_id="${model_id%%\[*\]}"
1215+
abbreviated=$(abbreviate_model_id "$base_id")
1216+
if [ "$abbreviated" != "$base_id" ]; then
1217+
model_text="$abbreviated"
1218+
else
1219+
model_text="$runtime_model"
1220+
fi
12151221
if is_1m_model; then
12161222
model_text="${model_text}[1m]"
12171223
fi

0 commit comments

Comments
 (0)