@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.
- package/package.json +1 -1
- package/tokenline.sh +7 -4
package/package.json
CHANGED
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
|
-
|
|
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
|