{
  "statusLine": {
    "type": "command",
    "command": "input=$(cat); user=$(whoami); cwd=$(echo \"$input\" | jq -r '.workspace.current_dir' | sed \"s|$HOME|~|g\"); model=$(echo \"$input\" | jq -r '.model.display_name'); time=$(date +%H:%M); remaining=$(echo \"$input\" | jq -r '.context_window.remaining_percentage // empty'); transcript=$(echo \"$input\" | jq -r '.transcript_path'); todo_count=$([ -f \"$transcript\" ] && grep -c '\"type\":\"todo\"' \"$transcript\" 2>/dev/null || echo 0); cd \"$(echo \"$input\" | jq -r '.workspace.current_dir')\" 2>/dev/null; branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo ''); status=''; [ -n \"$branch\" ] && { [ -n \"$(git status --porcelain 2>/dev/null)\" ] && status='*'; }; progress_bar() { local percent=$1; local width=20; local filled=$((percent * width / 100)); local empty=$((width - filled)); local bar=\"\"; local i; for ((i=0; i<filled; i++)); do bar=\"${bar}█\"; done; for ((i=0; i<empty; i++)); do bar=\"${bar}░\"; done; echo \"$bar\"; }; get_ctx_color() { local percent=$1; if [ \"$percent\" -ge 70 ]; then echo '\\033[38;2;64;160;43m'; elif [ \"$percent\" -ge 30 ]; then echo '\\033[38;2;223;142;29m'; else echo '\\033[38;2;220;53;69m'; fi }; get_bar_color() { local percent=$1; if [ \"$percent\" -ge 70 ]; then echo '\\033[38;2;40;167;69m'; elif [ \"$percent\" -ge 30 ]; then echo '\\033[38;2;255;193;7m'; else echo '\\033[38;2;220;53;69m'; fi }; R='\\033[0m'; B='\\033[38;2;30;102;245m'; G='\\033[38;2;64;160;43m'; Y='\\033[38;2;223;142;29m'; M='\\033[38;2;136;57;239m'; C='\\033[38;2;23;146;153m'; T='\\033[38;2;76;79;105m'; printf \"${C}${user}${R}:${B}${cwd}${R}\"; [ -n \"$branch\" ] && printf \" ${G}${branch}${Y}${status}${R}\"; if [ -n \"$remaining\" ]; then ctx_color=$(get_ctx_color \"$remaining\"); bar_color=$(get_bar_color \"$remaining\"); bar=$(progress_bar \"$remaining\"); printf \" ${ctx_color}[${bar_color}${bar}${ctx_color}] ${remaining}%%${R}\"; fi; printf \" ${T}${model}${R} ${Y}${time}${R}\"; [ \"$todo_count\" -gt 0 ] && printf \" ${C}todos:${todo_count}${R}\"; echo",
    "description": "Custom status line with context progress bar showing: user:path branch* [██████████████░░░░░░] 73% model time todos:N"
  }
}