feat(logs): Improve MMA log visibility and filtering
This commit is contained in:
@@ -307,7 +307,7 @@ class App:
|
||||
else:
|
||||
log_raw = list(self._comms_log)
|
||||
if self.ui_focus_agent:
|
||||
self._comms_log_cache = [e for e in log_raw if e.get("source_tier") == self.ui_focus_agent]
|
||||
self._comms_log_cache = [e for e in log_raw if e.get("source_tier", "").startswith(self.ui_focus_agent)]
|
||||
else:
|
||||
self._comms_log_cache = log_raw
|
||||
self._comms_log_dirty = False
|
||||
@@ -315,7 +315,7 @@ class App:
|
||||
if self._tool_log_dirty:
|
||||
log_raw = list(self._tool_log)
|
||||
if self.ui_focus_agent:
|
||||
self._tool_log_cache = [e for e in log_raw if e.get("source_tier") == self.ui_focus_agent]
|
||||
self._tool_log_cache = [e for e in log_raw if e.get("source_tier", "").startswith(self.ui_focus_agent)]
|
||||
else:
|
||||
self._tool_log_cache = log_raw
|
||||
self._tool_log_dirty = False
|
||||
@@ -1868,6 +1868,10 @@ class App:
|
||||
imgui.text_colored(C_LBL, f"#{i_display}")
|
||||
imgui.same_line()
|
||||
imgui.text_colored(vec4(160, 160, 160), ts)
|
||||
ticket_id = entry.get("mma_ticket_id")
|
||||
if ticket_id:
|
||||
imgui.same_line()
|
||||
imgui.text_colored(vec4(255, 120, 120), f"[{ticket_id}]")
|
||||
imgui.same_line()
|
||||
d_col = DIR_COLORS.get(direction, C_VAL)
|
||||
imgui.text_colored(d_col, direction)
|
||||
|
||||
@@ -498,6 +498,7 @@ def run_worker_lifecycle(ticket: Ticket, context: WorkerContext, context_files:
|
||||
|
||||
old_comms_cb = ai_client.comms_log_callback
|
||||
def worker_comms_callback(entry: dict) -> None:
|
||||
entry["mma_ticket_id"] = ticket.id
|
||||
if event_queue:
|
||||
kind = entry.get("kind")
|
||||
payload = entry.get("payload", {})
|
||||
@@ -515,7 +516,7 @@ def run_worker_lifecycle(ticket: Ticket, context: WorkerContext, context_files:
|
||||
old_comms_cb(entry)
|
||||
|
||||
ai_client.comms_log_callback = worker_comms_callback
|
||||
ai_client.set_current_tier("Tier 3")
|
||||
ai_client.set_current_tier(f"Tier 3 (Worker): {ticket.id}")
|
||||
try:
|
||||
comms_baseline = len(ai_client.get_comms_log())
|
||||
response = ai_client.send(
|
||||
|
||||
Reference in New Issue
Block a user