refactor(ai_client): remove unused history management and bleed stats helpers

This commit is contained in:
2026-05-10 11:43:50 -04:00
parent 05d0121e71
commit c888e78691
5 changed files with 5 additions and 211 deletions
-7
View File
@@ -47,13 +47,6 @@ def test_add_bleed_derived_headroom_clamped_to_zero() -> None:
result = ai_client._add_bleed_derived(d)
assert result["headroom"] == 0
def test_get_history_bleed_stats_returns_all_keys_unknown_provider() -> None:
"""get_history_bleed_stats must return a valid dict even if provider is unknown."""
ai_client.set_provider("unknown", "unknown")
stats = ai_client.get_history_bleed_stats()
for key in ["provider", "limit", "current", "percentage", "estimated_prompt_tokens", "headroom", "would_trim", "sys_tokens", "tool_tokens", "history_tokens"]:
assert key in stats
def test_app_token_stats_initialized_empty(app_instance: Any) -> None:
"""App._token_stats should start empty."""
assert app_instance.controller._token_stats == {}