fixing latency bugs on gui thread

This commit is contained in:
2026-03-07 14:05:57 -05:00
parent fcff00f750
commit aaed011d9e
2 changed files with 2 additions and 0 deletions

View File

@@ -2089,6 +2089,7 @@ def send(
) -> str: ) -> str:
monitor = performance_monitor.get_monitor() monitor = performance_monitor.get_monitor()
if monitor.enabled: monitor.start_component("ai_client.send") if monitor.enabled: monitor.start_component("ai_client.send")
_append_comms("OUT", "request", {"prompt": user_message, "system": _get_combined_system_prompt()})
with _send_lock: with _send_lock:
if _provider == "gemini": if _provider == "gemini":
res = _send_gemini( res = _send_gemini(

View File

@@ -159,6 +159,7 @@ class AppController:
"output_tokens": 0, "output_tokens": 0,
"cache_read_input_tokens": 0, "cache_read_input_tokens": 0,
"cache_creation_input_tokens": 0, "cache_creation_input_tokens": 0,
"total_tokens": 0,
"last_latency": 0.0 "last_latency": 0.0
} }
self.mma_tier_usage: Dict[str, Dict[str, Any]] = { self.mma_tier_usage: Dict[str, Dict[str, Any]] = {