AI Update: تغییرات فوتر توکن‌ها را اعمال کن

This commit is contained in:
Antigravity Bot
2026-08-30 16:09:44 +03:30
parent b4da1686f3
commit edba59c9f6
2 changed files with 12 additions and 11 deletions
+4 -3
View File
@@ -138,13 +138,14 @@ def format_context_stats(
pct = min(100.0, max(0.0, (active_tokens / max_context) * 100)) if max_context else 0
pct_str = f"{int(round(pct))}%"
display_tokens = active_tokens if (active_tokens > 0 and active_tokens <= total_tokens) else total_tokens
tok_str = format_token_count(display_tokens) if display_tokens > 0 else "0"
display_input = active_tokens if (active_tokens > 0) else input_tokens
ti_str = format_token_count(display_input) if display_input > 0 else "0"
to_str = format_token_count(output_tokens) if output_tokens > 0 else "0"
dur_str = format_duration_compact(duration) if duration > 0 else "<1s"
line1 = f"<code>{escape_html(p_name)} {escape_html(m_label)}</code>"
line2 = f"<code>CL:{pct_str} T:{tok_str} D:{dur_str}</code>"
line2 = f"<code>CL:{pct_str} Ti:{ti_str} To:{to_str} D:{dur_str}</code>"
return f"{line1}\n{line2}"