diff --git a/src/gui_2.py b/src/gui_2.py index 351c343b..89f26cb8 100644 --- a/src/gui_2.py +++ b/src/gui_2.py @@ -1807,7 +1807,7 @@ def render_main_interface(app: App) -> None: if app.is_viewing_prior_session: app._comms_log_cache = app.prior_session_entries else: log_raw = list(app._comms_log) - if app.ui_focus_agent: app._comms_log_cache = [e for e in log_raw if e.get("source_tier", "").startswith(app.ui_focus_agent)] + if app.ui_focus_agent: app._comms_log_cache = [e for e in log_raw if CommsLogEntry.from_dict(e).source_tier.startswith(app.ui_focus_agent)] else: app._comms_log_cache = log_raw app._comms_log_dirty = False @@ -1815,7 +1815,7 @@ def render_main_interface(app: App) -> None: if app.is_viewing_prior_session: app._tool_log_cache = app.prior_tool_calls else: log_raw = list(app._tool_log) - if app.ui_focus_agent: app._tool_log_cache = [e for e in log_raw if e.get("source_tier", "").startswith(app.ui_focus_agent)] + if app.ui_focus_agent: app._tool_log_cache = [e for e in log_raw if CommsLogEntry.from_dict(e).source_tier.startswith(app.ui_focus_agent)] else: app._tool_log_cache = log_raw app._tool_log_dirty = False @@ -5096,12 +5096,13 @@ def render_comms_history_panel(app: App) -> None: imgui.push_id(f"comms_entry_{i}") i_display = i + 1 - ts = entry.get("ts", "00:00:00") - direction = entry.get("direction", "??") + ce = CommsLogEntry.from_dict(entry) + ts = ce.ts or "00:00:00" + direction = ce.direction or "??" kind = entry.get("kind", entry.get("type", "??")) provider = entry.get("provider", "?") - model = entry.get("model", "?") - tier = entry.get("source_tier", "main") + model = ce.model or "?" + tier = ce.source_tier payload = entry.get("payload", {}) if not payload and kind not in ("request", "response", "tool_call", "tool_result"): payload = entry # legacy @@ -5799,7 +5800,7 @@ def render_tool_calls_panel(app: App) -> None: app.show_windows["Text Viewer"] = True imgui.table_next_column() - imgui.text_colored(C_SUB(), f"[{entry['source_tier'] if 'source_tier' in entry else 'main'}]") + imgui.text_colored(C_SUB(), f"[{CommsLogEntry.from_dict(entry).source_tier}]") imgui.table_next_column() script_preview = script.replace("\n", " ")[:150]