From 7fe251d61326e30d26f06f06d8ed4549b29654df Mon Sep 17 00:00:00 2001 From: Bryce M <52695653+bmage8923@users.noreply.github.com> Date: Thu, 18 Jun 2026 10:15:28 -0600 Subject: [PATCH 1/2] =?UTF-8?q?feat(statusline):=20add=20mode=20=C2=B7=20a?= =?UTF-8?q?lgorithm-tier=20=C2=B7=20model-effort=20row?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds one row under STATE showing, at a glance: - PAI mode: NATIVE vs ALGORITHM (active highlighted) - Active Algorithm tier E1-E5 (dim when not in algorithm mode) - Model reasoning effort: LOW/MEDIUM/HIGH/MAX Mode + tier are read from MEMORY/STATE/work.json matched by sessionUUID; model effort comes from Claude Code's native statusline JSON .effort.level (no new state/plumbing). Renders in normal width only, degrades gracefully (defaults native/standard; absent effort -> all dim). No other lines touched. --- .../v5.0.0/.claude/PAI/statusline-command.sh | 84 ++++++++++++++++++- 1 file changed, 83 insertions(+), 1 deletion(-) diff --git a/Releases/v5.0.0/.claude/PAI/statusline-command.sh b/Releases/v5.0.0/.claude/PAI/statusline-command.sh index 68bce90cf1..7da23bdf3b 100755 --- a/Releases/v5.0.0/.claude/PAI/statusline-command.sh +++ b/Releases/v5.0.0/.claude/PAI/statusline-command.sh @@ -220,7 +220,10 @@ eval "$(jq -r ' "native_usage_sonnet=" + (if .rate_limits.seven_day_sonnet then (.rate_limits.seven_day_sonnet.used_percentage // .rate_limits.seven_day_sonnet.utilization // 0 | tostring) else "null" end) + "\n" + "native_usage_extra_enabled=" + (.rate_limits.extra_usage.is_enabled // false | tostring) + "\n" + "native_usage_extra_limit=" + (.rate_limits.extra_usage.monthly_limit // 0 | tostring) + "\n" + - "native_usage_extra_used=" + (.rate_limits.extra_usage.used_credits // 0 | tostring) + "native_usage_extra_used=" + (.rate_limits.extra_usage.used_credits // 0 | tostring) + "\n" + + "model_effort=" + (.effort.level // "" | @sh) + "\n" + + "fast_mode_flag=" + (.fast_mode // false | tostring) + "\n" + + "thinking_enabled=" + (.thinking.enabled // false | tostring) ' 2>/dev/null <<< "$input")" # Ensure defaults for critical numeric values @@ -1210,6 +1213,85 @@ for _i in "${!_dims[@]}"; do done printf "\n" sep + +# ═══════════════════════════════════════════════════════════════════════════════ +# LINE: MODE · ALGORITHM TIER · MODEL EFFORT +# PAI mode (NATIVE/ALGORITHM) + active Algorithm tier (E1-E5) read from +# work.json by sessionUUID; model reasoning effort (LOW/MEDIUM/HIGH/MAX) from +# Claude Code's native input JSON `.effort.level`. Active items bright, rest dim. +# ═══════════════════════════════════════════════════════════════════════════════ + +# Source PAI mode + effort tier from work.json registry, matched on sessionUUID. +# Newest non-complete session wins. Defaults keep the row sane when absent. +pai_mode="native" +pai_effort="standard" +_WORK_JSON="$PAI_DIR/MEMORY/STATE/work.json" +if [ -n "$session_id" ] && [ -f "$_WORK_JSON" ]; then + eval "$(jq -r --arg sid "$session_id" ' + ([.sessions[]? | select(.sessionUUID == $sid and .phase != "complete")] + | sort_by(.updatedAt) | last) as $s + | if $s then + "pai_mode=" + ($s.currentMode // "native" | @sh) + "\n" + + "pai_effort=" + ($s.effort // "standard" | @sh) + else empty end + ' "$_WORK_JSON" 2>/dev/null)" +fi + +# Map effort word → Algorithm tier number (0 = no tier / not in algorithm mode) +case "$(printf '%s' "$pai_effort" | tr '[:upper:]' '[:lower:]')" in + e1|standard) algo_tier=1 ;; + e2|extended) algo_tier=2 ;; + e3|advanced) algo_tier=3 ;; + e4|deep) algo_tier=4 ;; + e5|comprehensive) algo_tier=5 ;; + *) algo_tier=0 ;; +esac + +# Mode/tier colors — active bright, inactive dim slate +_ALG_ON='\033[38;2;96;165;250m' # bright blue — active mode +_ALG_OFF='\033[38;2;71;85;105m' # slate-600 — inactive +_TIER_ON='\033[38;2;134;239;172m' # green — active tier pip +_TIER_OFF='\033[38;2;71;85;105m' # slate-600 — inactive pip + +_is_algo=false +[ "$pai_mode" = "algorithm" ] && _is_algo=true +if [ "$_is_algo" = true ]; then + _native_c="$_ALG_OFF"; _algo_c="$_ALG_ON" +else + _native_c="$_ALG_ON"; _algo_c="$_ALG_OFF" + algo_tier=0 # tiers only meaningful in algorithm mode +fi + +printf "${SLATE_500}⊞${RESET} ${_native_c}NATIVE${RESET} ${_algo_c}ALGORITHM${RESET}" +for _t in 1 2 3 4 5; do + if [ "$algo_tier" = "$_t" ]; then + printf " ${_TIER_ON}%s${RESET}" "$_t" + else + printf " ${_TIER_OFF}%s${RESET}" "$_t" + fi +done + +# Model reasoning effort — active label colored by intensity, rest dim +_eff_lc="$(printf '%s' "${model_effort:-}" | tr '[:upper:]' '[:lower:]')" +_eff_levels=(low medium high max) +_eff_labels=(LOW MEDIUM HIGH MAX) +printf " ${SLATE_600}│${RESET} ${SLATE_500}🔒 LEVEL:${RESET}" +for _li in "${!_eff_levels[@]}"; do + if [ "$_eff_lc" = "${_eff_levels[$_li]}" ]; then + case "${_eff_levels[$_li]}" in + low) _ec='\033[38;2;134;239;172m' ;; # green + medium) _ec='\033[38;2;253;224;71m' ;; # yellow + high) _ec='\033[38;2;251;146;60m' ;; # orange + max) _ec='\033[38;2;251;113;133m' ;; # rose + *) _ec="$_ALG_ON" ;; + esac + printf " ${_ec}%s${RESET}" "${_eff_labels[$_li]}" + else + printf " ${_ALG_OFF}%s${RESET}" "${_eff_labels[$_li]}" + fi +done +printf "\n" +sep printf "${SLATE_400}CC:${RESET} ${PAI_A}${cc_version}${RESET} ${SLATE_600}│${RESET} ${SLATE_500}PAI:${PAI_A}${PAI_VERSION}${RESET} ${SLATE_400}ALG:${PAI_A}${ALGO_VERSION}${RESET} ${SLATE_600}│${RESET} ${WIELD_ACCENT}SK:${RESET} ${SLATE_300}${public_skills}${RESET}${SLATE_600}🌐${RESET} ${SLATE_500}${private_skills}${RESET}${SLATE_600}🏠${RESET} ${SLATE_600}│${RESET} ${WIELD_WORKFLOWS}WF:${RESET} ${SLATE_300}${workflows_count}${RESET} ${SLATE_600}│${RESET} ${WIELD_HOOKS}HK:${RESET} ${SLATE_300}${hooks_count}${RESET}\n" sep From e8b29f422f0dca60eab8a630b88dd973c2e9fb2a Mon Sep 17 00:00:00 2001 From: Bryce M <52695653+bmage8923@users.noreply.github.com> Date: Thu, 18 Jun 2026 15:22:54 -0600 Subject: [PATCH 2/2] fix(statusline): add XHIGH to model-effort row Anthropic models support low/medium/high/xhigh/max reasoning effort, but the LEVEL row only rendered low/medium/high/max. Add XHIGH (red, between HIGH orange and MAX rose) so the active label resolves correctly when effort.level is xhigh. --- Releases/v5.0.0/.claude/PAI/statusline-command.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Releases/v5.0.0/.claude/PAI/statusline-command.sh b/Releases/v5.0.0/.claude/PAI/statusline-command.sh index 7da23bdf3b..6b905fae4e 100755 --- a/Releases/v5.0.0/.claude/PAI/statusline-command.sh +++ b/Releases/v5.0.0/.claude/PAI/statusline-command.sh @@ -1217,7 +1217,7 @@ sep # ═══════════════════════════════════════════════════════════════════════════════ # LINE: MODE · ALGORITHM TIER · MODEL EFFORT # PAI mode (NATIVE/ALGORITHM) + active Algorithm tier (E1-E5) read from -# work.json by sessionUUID; model reasoning effort (LOW/MEDIUM/HIGH/MAX) from +# work.json by sessionUUID; model reasoning effort (LOW/MEDIUM/HIGH/XHIGH/MAX) from # Claude Code's native input JSON `.effort.level`. Active items bright, rest dim. # ═══════════════════════════════════════════════════════════════════════════════ @@ -1273,8 +1273,8 @@ done # Model reasoning effort — active label colored by intensity, rest dim _eff_lc="$(printf '%s' "${model_effort:-}" | tr '[:upper:]' '[:lower:]')" -_eff_levels=(low medium high max) -_eff_labels=(LOW MEDIUM HIGH MAX) +_eff_levels=(low medium high xhigh max) +_eff_labels=(LOW MEDIUM HIGH XHIGH MAX) printf " ${SLATE_600}│${RESET} ${SLATE_500}🔒 LEVEL:${RESET}" for _li in "${!_eff_levels[@]}"; do if [ "$_eff_lc" = "${_eff_levels[$_li]}" ]; then @@ -1282,6 +1282,7 @@ for _li in "${!_eff_levels[@]}"; do low) _ec='\033[38;2;134;239;172m' ;; # green medium) _ec='\033[38;2;253;224;71m' ;; # yellow high) _ec='\033[38;2;251;146;60m' ;; # orange + xhigh) _ec='\033[38;2;239;68;68m' ;; # red max) _ec='\033[38;2;251;113;133m' ;; # rose *) _ec="$_ALG_ON" ;; esac