claude-pace 0.8.3 → 0.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/claude-pace.sh +5 -4
  2. package/package.json +1 -1
package/claude-pace.sh CHANGED
@@ -135,14 +135,14 @@ IFS=$'\t' read -r MODEL DIR PCT CTX COST EFF HAS_RL U5 U7 R5 R7 < <(
135
135
  '[(.model.display_name//"?"),(.workspace.project_dir//"."),
136
136
  (.context_window.used_percentage//0|floor),(.context_window.context_window_size//0),
137
137
  (.cost.total_cost_usd//0),
138
- ($cfg[0].effortLevel//"default"),
138
+ (.effort.level//$cfg[0].effortLevel//"default"),
139
139
  (if .rate_limits then 1 else 0 end),
140
140
  (.rate_limits.five_hour.used_percentage//null|if type=="number" then floor else "--" end),
141
141
  (.rate_limits.seven_day.used_percentage//null|if type=="number" then floor else "--" end),
142
142
  (.rate_limits.five_hour.resets_at//0),
143
143
  (.rate_limits.seven_day.resets_at//0)]|@tsv' <<<"$input"
144
144
  )
145
- case "${EFF:-default}" in low) EF='' ;; high) EF='' ;; xhigh) EF='' ;; max) EF='' ;; *) EF='' ;; esac
145
+ case "${EFF:-default}" in low) EF='low' ;; high) EF='high' ;; xhigh) EF='xhigh' ;; max) EF='max' ;; *) EF='medium' ;; esac
146
146
 
147
147
  # ── Context label (needed by MODEL_SHORT and line 2) ──
148
148
  if ((CTX >= 1000000)); then
@@ -154,9 +154,10 @@ else CL=""; fi
154
154
  # ── MODEL_SHORT: strip redundant context label ──
155
155
  MODEL=${MODEL/ context)/)}
156
156
  [[ "$CTX" -gt 0 && "$MODEL" != *"("* ]] && MODEL="${MODEL} (${CL})"
157
- # Truncate long model names to keep padding within 0-5 chars.
157
+ # Cap "MODEL EF" at 28 chars; 28 fits the longest effort word ('medium', 6 chars)
158
+ # plus a typical "Sonnet 4.6 (200K)" without ellipsis.
158
159
  _ML="${MODEL} ${EF}"
159
- ((${#_ML} > 22)) && MODEL="${MODEL:0:$((22 - 2 - ${#EF}))}…"
160
+ ((${#_ML} > 28)) && MODEL="${MODEL:0:$((28 - 2 - ${#EF}))}…"
160
161
 
161
162
  # ── Progress Bar ──
162
163
  F=$((PCT / 10))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-pace",
3
- "version": "0.8.3",
3
+ "version": "0.8.5",
4
4
  "description": "Claude Code statusline and rate limit tracker. Pure Bash + jq, single file.",
5
5
  "bin": {
6
6
  "claude-pace": "cli.js"