Comment by jen729w
3 hours ago
This is the way. Mine looks like `ctx: 0k / Fable 5 high`. When ctx ⪆ 200k, time to start a new session.
```statusline-command.sh
#!/bin/sh
input=$(cat)
model=$(echo "$input" | jq -r '.model.display_name // empty' | sed 's/ context)/)/')
effort=$(echo "$input" | jq -r '.effort.level // empty')
used=$(echo "$input" | jq -r '.context_window.total_input_tokens // empty')
out=""
[ -n "$used" ] && out="ctx: $(( used / 1000 ))k"
[ -n "$model" ] && out="$out / $model"
[ -n "$effort" ] && out="$out $effort"
# bright yellow + bold
printf '\033[1;93m%s\033[0m' "$out"```
No comments yet
Contribute on Hacker News ↗