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
+1 -19
View File
@@ -112,22 +112,4 @@ def test_history_persistence_across_turns(tmp_path: Path) -> None:
reloaded = project_manager.load_project(str(project_path))
active_disc = reloaded["discussion"]["active"]
h2 = reloaded["discussion"]["discussions"][active_disc]["history"]
assert len(h2) >= 2
def test_get_history_bleed_stats_basic() -> None:
"""Tests basic retrieval of history bleed statistics from the AI client."""
ai_client.set_provider("gemini", "gemini-2.5-flash-lite")
# Before any message, it might be 0 or based on an empty context
stats = ai_client.get_history_bleed_stats()
assert "provider" in stats
assert stats["provider"] == "gemini"
assert "current" in stats
assert "limit" in stats, "Stats dictionary should contain 'limit'"
# Test with a different limit
ai_client.set_model_params(0.0, 8192, 500)
stats = ai_client.get_history_bleed_stats()
assert "current" in stats, "Stats dictionary should contain 'current' token usage"
assert 'limit' in stats, "Stats dictionary should contain 'limit'"
assert stats['limit'] == 500
assert isinstance(stats['current'], int) and stats['current'] >= 0
assert len(h2) >= 2