Z.ai (ai-glm, ai-eltex) streams message_start with input_tokens=0 and sends the real usage only in the final message_delta, so while a request runs Claude Code passes used_percentage=0 and ctx: dropped to 0%. Keep the last non-zero value per session_id in ~/.cache/ai-setup/ctx_last_<id> and show it instead of the zero. /clear starts a new session id, so it still shows 0 there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
13 KiB
Executable File
13 KiB
Executable File