fix(tui): clean up token counting in subagent display (#1344)

Co-authored-by: Letta Code <noreply@letta.com>
This commit is contained in:
Charles Packer
2026-03-10 18:36:37 -07:00
committed by GitHub
parent ffe204aafc
commit a387724b05

View File

@@ -5,6 +5,7 @@
*/ */
import { getModelShortName, resolveModel } from "../../agent/model"; import { getModelShortName, resolveModel } from "../../agent/model";
import { OPENAI_CODEX_PROVIDER_NAME } from "../../providers/openai-codex-provider"; import { OPENAI_CODEX_PROVIDER_NAME } from "../../providers/openai-codex-provider";
import { formatCompact } from "./format";
/** /**
* Format tool count and token statistics for display * Format tool count and token statistics for display
@@ -26,11 +27,7 @@ export function formatStats(
return toolStr; return toolStr;
} }
const tokenStr = return `${toolStr} · ${formatCompact(totalTokens)} tokens`;
totalTokens >= 1000
? `${(totalTokens / 1000).toFixed(1)}k`
: String(totalTokens);
return `${toolStr} · ${tokenStr} tokens`;
} }
/** /**