From 6f1e00b647159c8173dee5e766c310c7edac7172 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Tue, 24 Feb 2026 22:01:07 -0500 Subject: [PATCH] fix(conductor): Apply review suggestions for track 'gui2_parity_20260224' --- gui_2.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gui_2.py b/gui_2.py index 408fa4a..670dc5b 100644 --- a/gui_2.py +++ b/gui_2.py @@ -36,15 +36,18 @@ def save_config(config: dict): with open(CONFIG_PATH, "wb") as f: tomli_w.dump(config, f) + def hide_tk_root() -> Tk: root = Tk() root.withdraw() root.wm_attributes("-topmost", True) return root + # Color Helpers def vec4(r, g, b, a=1.0): return imgui.ImVec4(r/255, g/255, b/255, a) + C_OUT = vec4(100, 200, 255) C_IN = vec4(140, 255, 160) C_REQ = vec4(255, 220, 100) @@ -65,6 +68,7 @@ HEAVY_KEYS = {"message", "text", "script", "output", "content"} DISC_ROLES = ["User", "AI", "Vendor API", "System"] AGENT_TOOL_NAMES = ["run_powershell", "read_file", "list_directory", "search_files", "get_file_summary", "web_search", "fetch_url"] + def truncate_entries(entries: list[dict], max_pairs: int) -> list[dict]: if max_pairs <= 0: return [] @@ -73,6 +77,7 @@ def truncate_entries(entries: list[dict], max_pairs: int) -> list[dict]: return entries return entries[-target_count:] + def _parse_history_entries(history: list[str], roles: list[str] | None = None) -> list[dict]: known = roles if roles is not None else DISC_ROLES entries = [] @@ -80,6 +85,7 @@ def _parse_history_entries(history: list[str], roles: list[str] | None = None) - entries.append(project_manager.str_to_entry(raw, known)) return entries + class ConfirmDialog: _next_id = 0 def __init__(self, script: str, base_dir: str): @@ -94,7 +100,10 @@ class ConfirmDialog: self._event.wait() return self._approved, self._script + class App: + """The main ImGui interface orchestrator for Manual Slop.""" + def __init__(self): self.config = load_config() @@ -1870,6 +1879,7 @@ class App: theme.apply_current() def run(self): + """Initializes the ImGui runner and starts the main application loop.""" theme.load_from_config(self.config) self.runner_params = hello_imgui.RunnerParams()