diff --git a/manualslop_layout.ini b/manualslop_layout.ini index ac88bce..068bfa6 100644 --- a/manualslop_layout.ini +++ b/manualslop_layout.ini @@ -74,8 +74,8 @@ Collapsed=0 DockId=0xAFC85805,2 [Window][Theme] -Pos=0,32 -Size=1355,1768 +Pos=0,37 +Size=2011,2123 Collapsed=0 DockId=0x00000005,3 @@ -102,26 +102,26 @@ Collapsed=0 DockId=0x0000000D,0 [Window][Discussion Hub] -Pos=1357,32 -Size=1523,1768 +Pos=2013,37 +Size=1827,2123 Collapsed=0 DockId=0x00000006,0 [Window][Operations Hub] -Pos=0,32 -Size=1355,1768 +Pos=0,37 +Size=2011,2123 Collapsed=0 DockId=0x00000005,2 [Window][Files & Media] -Pos=1357,32 -Size=1523,1768 +Pos=2013,37 +Size=1827,2123 Collapsed=0 DockId=0x00000006,1 [Window][AI Settings] -Pos=0,32 -Size=1355,1768 +Pos=0,37 +Size=2011,2123 Collapsed=0 DockId=0x00000005,0 @@ -406,14 +406,14 @@ Collapsed=0 DockId=0x00000006,1 [Window][Project Settings] -Pos=0,32 -Size=1355,1768 +Pos=0,37 +Size=2011,2123 Collapsed=0 DockId=0x00000005,1 [Window][Undo/Redo History] -Pos=2256,413 -Size=460,1312 +Pos=2420,28 +Size=460,1772 Collapsed=0 DockId=0x00000002,0 @@ -549,13 +549,13 @@ Column 1 Weight=1.0000 [Table][0x1DA1F4A6,2] RefScale=29 Column 0 Weight=1.0000 -Column 1 Width=545 +Column 1 Width=543 [Table][0x5B562C13,3] -RefScale=29 +RefScale=20 Column 0 Weight=1.0000 -Column 1 Width=145 -Column 2 Width=271 +Column 1 Width=100 +Column 2 Width=186 [Table][0x17AC2E33,4] RefScale=20 @@ -566,22 +566,22 @@ Column 3 Width=40 [Table][0x62A953DF,5] RefScale=29 -Column 0 Width=62 +Column 0 Width=60 Column 1 Weight=1.0000 -Column 2 Width=102 -Column 3 Width=134 -Column 4 Width=103 +Column 2 Width=101 +Column 3 Width=133 +Column 4 Width=102 [Docking][Data] DockNode ID=0x00000008 Pos=3125,170 Size=593,1157 Split=Y DockNode ID=0x00000009 Parent=0x00000008 SizeRef=1029,147 Selected=0x0469CA7A DockNode ID=0x0000000A Parent=0x00000008 SizeRef=1029,145 Selected=0xDF822E02 -DockSpace ID=0xAFC85805 Window=0x079D3A04 Pos=0,32 Size=2880,1768 Split=X +DockSpace ID=0xAFC85805 Window=0x079D3A04 Pos=0,37 Size=3840,2123 Split=X DockNode ID=0x00000003 Parent=0xAFC85805 SizeRef=2254,1183 Split=X DockNode ID=0x0000000B Parent=0x00000003 SizeRef=404,1186 Split=X Selected=0xF4139CA2 DockNode ID=0x00000007 Parent=0x0000000B SizeRef=1512,858 Split=X Selected=0x8CA2375C - DockNode ID=0x00000005 Parent=0x00000007 SizeRef=1355,1681 CentralNode=1 Selected=0x8CA2375C - DockNode ID=0x00000006 Parent=0x00000007 SizeRef=1523,1681 Selected=0x6F2B5B04 + DockNode ID=0x00000005 Parent=0x00000007 SizeRef=1051,1681 CentralNode=1 Selected=0x418C7449 + DockNode ID=0x00000006 Parent=0x00000007 SizeRef=1827,1681 Selected=0x6F2B5B04 DockNode ID=0x0000000E Parent=0x0000000B SizeRef=1777,858 Selected=0x418C7449 DockNode ID=0x0000000D Parent=0x00000003 SizeRef=435,1186 Selected=0x363E93D6 DockNode ID=0x00000004 Parent=0xAFC85805 SizeRef=460,1183 Split=X Selected=0x3AEC3498 diff --git a/src/gui_2.py b/src/gui_2.py index 797ed7f..3e34af9 100644 --- a/src/gui_2.py +++ b/src/gui_2.py @@ -789,14 +789,13 @@ class App: if self.is_viewing_prior_session: imgui.push_style_color(imgui.Col_.window_bg, vec4(50, 40, 20)) pushed_prior_tint = True - #region: Absurd Try Scope try: - self.perf_monitor.start_frame() self._autofocus_response_tab = self.controller._autofocus_response_tab - # Process GUI task queue + + #region: Process GUI task queue # DEBUG: Check if tasks exist before processing if hasattr(self, 'controller') and hasattr(self.controller, '_pending_gui_tasks'): pending_count = len(self.controller._pending_gui_tasks) @@ -807,6 +806,8 @@ class App: self._process_pending_history_adds() if self.controller._process_pending_tool_calls(): self._tool_log_dirty = True + #endregion: Process GUI task queue + self._render_track_proposal_modal() self._render_patch_modal() self._render_base_prompt_diff_modal() @@ -815,6 +816,7 @@ class App: self._render_preset_manager_window() self._render_tool_preset_manager_window() self._render_persona_editor_window() + # Auto-save (every 60s) now = time.time() if now - self._last_autosave >= self._autosave_interval: @@ -1028,6 +1030,7 @@ class App: imgui.end() #endregion: AI Settings + #region: Seprate Task Dag to Tier 4 if self.ui_separate_task_dag and self.show_windows.get("Task DAG", False): exp, opened = imgui.begin("Task DAG", self.show_windows["Task DAG"]) self.show_windows["Task DAG"] = bool(opened) @@ -1062,6 +1065,7 @@ class App: if exp: self._render_tier_stream_panel("Tier 4", "Tier 4 (QA)") imgui.end() + #endregion: Separate Task Dag to Tier 4 if self.show_windows.get("Theme", False): self._render_theme_panel() @@ -1147,6 +1151,7 @@ class App: imgui.end() #endregion: Operations Hub + #region: Separate Message, Response, Tool Calls, External Tools if self.ui_separate_message_panel and self.show_windows.get("Message", False): exp, opened = imgui.begin("Message", self.show_windows["Message"]) self.show_windows["Message"] = bool(opened) @@ -1179,13 +1184,15 @@ class App: if self.perf_profiling_enabled: self.perf_monitor.start_component("_render_log_management") self._render_log_management() if self.perf_profiling_enabled: self.perf_monitor.end_component("_render_log_management") - + #endregion: Separate Message, Response, Tool Calls, External Tools + if self.show_windows.get("Diagnostics", False): self._render_diagnostics_panel() - + self.perf_monitor.end_frame() - - # ---- Modals / Popups + + # Modals / Popups + with self._pending_dialog_lock: dlg = self._pending_dialog if dlg: @@ -1194,6 +1201,7 @@ class App: self._pending_dialog_open = True else: self._pending_dialog_open = False + if imgui.begin_popup_modal("Approve PowerShell Command", None, imgui.WindowFlags_.always_auto_resize)[0]: if not dlg: imgui.close_current_popup() @@ -1228,12 +1236,14 @@ class App: self._pending_dialog = None imgui.close_current_popup() imgui.end_popup() + if self._pending_ask_dialog: if not self._ask_dialog_open: imgui.open_popup("Approve Tool Execution") self._ask_dialog_open = True else: self._ask_dialog_open = False + if imgui.begin_popup_modal("Approve Tool Execution", None, imgui.WindowFlags_.always_auto_resize)[0]: if not self._pending_ask_dialog or self._ask_tool_data is None: imgui.close_current_popup() @@ -1256,7 +1266,8 @@ class App: self._handle_reject_ask() imgui.close_current_popup() imgui.end_popup() - # MMA Step Approval Modal + + #region: MMA Step Approval Modal if self._pending_mma_approvals: if not self._mma_approval_open: imgui.open_popup("MMA Step Approval") @@ -1292,7 +1303,9 @@ class App: self._handle_mma_respond(approved=False) imgui.close_current_popup() imgui.end_popup() - # MMA Spawn Approval Modal + #endregion: MMA Step Approval Modal + + #region: MMA Spawn Approval Modal if self._pending_mma_spawns: if not self._mma_spawn_open: imgui.open_popup("MMA Spawn Approval") @@ -1302,6 +1315,7 @@ class App: self._mma_spawn_context = self._pending_mma_spawns[0].get("context_md", "") else: self._mma_spawn_open = False + if imgui.begin_popup_modal("MMA Spawn Approval", None, imgui.WindowFlags_.always_auto_resize)[0]: if not self._pending_mma_spawns: imgui.close_current_popup() @@ -1336,7 +1350,9 @@ class App: self._handle_mma_respond(approved=False, abort=True) imgui.close_current_popup() imgui.end_popup() - # Cycle Detected Popup + #endregion: MMA Spawn Approval Modal + + #region: Cycle Detected Popup if imgui.begin_popup_modal("Cycle Detected!", None, imgui.WindowFlags_.always_auto_resize)[0]: imgui.text_colored(imgui.ImVec4(1, 0.3, 0.3, 1), "The dependency graph contains a cycle!") imgui.text("Please remove the circular dependency.") @@ -1425,14 +1441,14 @@ class App: if to_remove != -1: self.ui_editing_slices_file.custom_slices.pop(to_remove) imgui.separator() - + # Toolbar if imgui.button("Copy"): imgui.set_clipboard_text(self.text_viewer_content) imgui.same_line() _, self.text_viewer_wrap = imgui.checkbox("Word Wrap", self.text_viewer_wrap) imgui.separator() - + renderer = markdown_helper.get_renderer() tv_type = getattr(self, "text_viewer_type", "text") @@ -1463,10 +1479,13 @@ class App: else: imgui.input_text_multiline("##tv_c", self.text_viewer_content, imgui.ImVec2(-1, -1), imgui.InputTextFlags_.read_only) imgui.end() - # Inject File Modal + #endregion: Cycle Detected Popup + + #region: Inject File Modal if getattr(self, "show_inject_modal", False): imgui.open_popup("Inject File") self.show_inject_modal = False + if imgui.begin_popup_modal("Inject File", None, imgui.WindowFlags_.always_auto_resize)[0]: files = self.project.get('files', {}).get('paths', []) imgui.text("Select File to Inject:") @@ -1506,8 +1525,10 @@ class App: if imgui.button("Cancel", imgui.ImVec2(120, 0)): imgui.close_current_popup() imgui.end_popup() - + #endregion: Inject File Modal + self._render_ast_inspector_modal() + #endregion: Absurd Try Scope except Exception as e: print(f"ERROR in _gui_func: {e}") @@ -2907,6 +2928,7 @@ class App: imgui.separator() + #region: Screenshots if imgui.collapsing_header("Screenshots"): for i, s in enumerate(self.screenshots): imgui.text(s) @@ -2940,6 +2962,7 @@ class App: if getattr(self, "ui_active_context_preset", ""): self.delete_context_preset(self.ui_active_context_preset) self.ui_active_context_preset = "" + #endregion Screenshots def _render_snapshot_tab(self) -> None: if imgui.begin_tab_bar("snapshot_tabs"):