From b22003b6a86f16f3de6f77093fb94d8b89203dc2 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 10 Nov 2026 18:16:32 +0100 Subject: feat(llm): desktop-assistant usage as Local Agent The LLM usage card gets a third section, the desktop-assistant program from llm-cost-dashboard, with the same session and total stats as opencode. The per-program aggregation now takes the program. Co-Authored-By: Claude Opus 5.5 --- tests/test_llm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_llm.py b/tests/test_llm.py index 48e49fe..3820249 100644 --- a/tests/test_llm.py +++ b/tests/test_llm.py @@ -33,7 +33,7 @@ class Down(unittest.TestCase): class Up(unittest.TestCase): - def test_aggregates_opencode_and_ignores_other_programs(self): + def test_aggregates_opencode_and_assistant_apart(self): data = {"/api/claude_limits": [{"context_pct": 12}], "/api/claude_session": {"session": {"models": [{"model": "claude-opus-4"}]}}, "/api/summary": [ @@ -64,6 +64,9 @@ class Up(unittest.TestCase): self.assertEqual(st["opencode"]["session_cost"], 0.5) self.assertEqual(st["opencode"]["session_calls"], 4) self.assertEqual(st["opencode"]["session_tokens"], 500) + self.assertEqual(st["assistant"]["cost"], 9.0) + self.assertEqual(st["assistant"]["calls"], 9) + self.assertIsNone(st["assistant"]["model"]) def test_handles_the_real_latest_shape(self): data = {"/api/claude_limits": {"latest": {"context_pct": 42, "five_hour_pct": 10}}, -- cgit v1.2.3