@inbrace-tech/tokenline 1.5.1 → 1.5.2

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/package.json +1 -1
  2. package/tokenline.sh +7 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inbrace-tech/tokenline",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "A cache-aware statusline for AI coding CLIs — installs tokenline.sh and wires it into your Claude Code settings.",
5
5
  "bin": {
6
6
  "tokenline": "dist/cli.js"
package/tokenline.sh CHANGED
@@ -888,9 +888,9 @@ render_subagent_rows() {
888
888
  # the rows line up under each other.
889
889
  local -a ids types glyphs models efforts elapsed ctx cache activity descs
890
890
  local w_type=0 w_model=0 w_effort=0 w_elapsed=0 w_ctx=0 w_cache=0 w_act=0
891
- local line id name type status desc start_ms tokens window model effort aid
891
+ local line id name type status desc start_ms tokens window model effort agent_type aid
892
892
  for line in "${rows[@]}"; do
893
- IFS="$_sa_sep" read -r id name type status desc start_ms tokens window model effort <<< "$line"
893
+ IFS="$_sa_sep" read -r id name type status desc start_ms tokens window model effort agent_type <<< "$line"
894
894
  [ -z "$id" ] && continue
895
895
 
896
896
  aid="${id#agent-}"
@@ -903,7 +903,10 @@ render_subagent_rows() {
903
903
  # cache still matters — show it as running (activity, blinking COLD).
904
904
  [ "$sa_mode" = "waiting-bg" ] && status="running"
905
905
 
906
- local t="${type:-$name}"
906
+ # `type` is the task kind (always "local_agent" for a subagent); the
907
+ # subagent's own type ("Explore", "code-reviewer") is `agentType`, which
908
+ # only newer Claude Code versions send. Fall back to name, then kind.
909
+ local t="${agent_type:-${name:-$type}}"
907
910
  t=$(fit "${t:-agent}" 24)
908
911
 
909
912
  # A finished subagent's clock stops at its last turn, not at "now".
@@ -1029,7 +1032,7 @@ maybe_render_subagents() {
1029
1032
  | [ (.id // ""), (.name // ""), (.type // ""), (.status // ""),
1030
1033
  (.description // .label // ""), (.startTime // 0),
1031
1034
  (.tokenCount // 0), (.contextWindowSize // 0),
1032
- (.model // ""), (.effort // "") ]
1035
+ (.model // ""), (.effort // ""), (.agentType // "") ]
1033
1036
  | map(clean) | join("\u001f"))
1034
1037
  else empty end' 2>/dev/null)
1035
1038
  [[ "$extracted" == subagents* ]] || return 1