diff --git a/gui_2.py b/gui_2.py index a09cf80..845b75b 100644 --- a/gui_2.py +++ b/gui_2.py @@ -86,6 +86,9 @@ class App: self.current_provider: str = ai_cfg.get("provider", "gemini") self.current_model: str = ai_cfg.get("model", "gemini-2.0-flash") self.available_models: list[str] = [] + self.temperature: float = ai_cfg.get("temperature", 0.0) + self.max_tokens: int = ai_cfg.get("max_tokens", 8192) + self.history_trunc_limit: int = ai_cfg.get("history_trunc_limit", 8000) projects_cfg = self.config.get("projects", {}) self.project_paths: list[str] = list(projects_cfg.get("paths", [])) @@ -176,6 +179,8 @@ class App: self._is_script_blinking = False self._script_blink_start_time = 0.0 + self._scroll_disc_to_bottom = False + session_logger.open_session() ai_client.set_provider(self.current_provider, self.current_model) ai_client.confirm_and_run_callback = self._confirm_and_run @@ -376,7 +381,13 @@ class App: disc_sec["auto_add"] = self.ui_auto_add_history def _flush_to_config(self): - self.config["ai"] = {"provider": self.current_provider, "model": self.current_model} + self.config["ai"] = { + "provider": self.current_provider, + "model": self.current_model, + "temperature": self.temperature, + "max_tokens": self.max_tokens, + "history_trunc_limit": self.history_trunc_limit, + } self.config["ai"]["system_prompt"] = self.ui_global_system_prompt self.config["projects"] = {"paths": self.project_paths, "active": self.active_project_path} theme.save_to_config(self.config) @@ -441,6 +452,8 @@ class App: self._pending_comms.clear() with self._pending_history_adds_lock: + if self._pending_history_adds: + self._scroll_disc_to_bottom = True for item in self._pending_history_adds: if item["role"] not in self.disc_roles: self.disc_roles.append(item["role"]) @@ -453,22 +466,22 @@ class App: _, self.show_windows[w] = imgui.menu_item(w, "", self.show_windows[w]) imgui.end_menu() if imgui.begin_menu("Project"): - if imgui.menu_item("Save All")[0]: + if imgui.menu_item("Save All", "", False)[0]: self._flush_to_project() self._save_active_project() self._flush_to_config() save_config(self.config) self.ai_status = "config saved" - if imgui.menu_item("Reset Session")[0]: + if imgui.menu_item("Reset Session", "", False)[0]: ai_client.reset_session() ai_client.clear_comms_log() self._tool_log.clear() self._comms_log.clear() self.ai_status = "session reset" self.ai_response = "" - if imgui.menu_item("Generate MD Only")[0]: + if imgui.menu_item("Generate MD Only", "", False)[0]: try: - md, path, _ = self._do_generate() + md, path, *_ = self._do_generate() self.last_md = md self.last_md_path = path self.ai_status = f"md written: {path.name}" @@ -535,7 +548,10 @@ class App: if imgui.button("Add Project"): r = hide_tk_root() - p = filedialog.askopenfilename(title="Select Project .toml", filetypes=[("TOML", "*.toml"), ("All", "*.*")]) + p = filedialog.askopenfilename( + title="Select Project .toml", + filetypes=[("TOML", "*.toml"), ("All", "*.*")], + ) r.destroy() if p and p not in self.project_paths: self.project_paths.append(p) @@ -626,7 +642,10 @@ class App: if imgui.button("Add Screenshot(s)"): r = hide_tk_root() - paths = filedialog.askopenfilenames() + paths = filedialog.askopenfilenames( + title="Select Screenshots", + filetypes=[("Images", "*.png *.jpg *.jpeg *.gif *.bmp *.webp"), ("All", "*.*")], + ) r.destroy() for p in paths: if p not in self.screenshots: self.screenshots.append(p) @@ -779,6 +798,9 @@ class App: imgui.separator() imgui.pop_id() + if self._scroll_disc_to_bottom: + imgui.set_scroll_here_y(1.0) + self._scroll_disc_to_bottom = False imgui.end_child() imgui.end() @@ -809,6 +831,11 @@ class App: ai_client.reset_session() ai_client.set_provider(self.current_provider, m) imgui.end_list_box() + imgui.separator() + imgui.text("Parameters") + ch, self.temperature = imgui.slider_float("Temperature", self.temperature, 0.0, 2.0, "%.2f") + ch, self.max_tokens = imgui.input_int("Max Tokens (Output)", self.max_tokens, 1024) + ch, self.history_trunc_limit = imgui.input_int("History Truncation Limit", self.history_trunc_limit, 1024) imgui.end() # ---- Message @@ -820,7 +847,7 @@ class App: if imgui.button("Gen + Send"): if not (self.send_thread and self.send_thread.is_alive()): try: - md, path, file_items = self._do_generate() + md, path, file_items, stable_md, disc_text = self._do_generate() self.last_md = md self.last_md_path = path self.last_file_items = file_items @@ -833,6 +860,7 @@ class App: csp = filter(bool, [self.ui_global_system_prompt.strip(), self.ui_project_system_prompt.strip()]) ai_client.set_custom_system_prompt("\n\n".join(csp)) + def do_send(): if self.ui_auto_add_history: with self._pending_history_adds_lock: @@ -865,7 +893,7 @@ class App: imgui.same_line() if imgui.button("MD Only"): try: - md, path, _ = self._do_generate() + md, path, *_ = self._do_generate() self.last_md = md self.last_md_path = path self.ai_status = f"md written: {path.name}" @@ -1247,22 +1275,29 @@ class App: if font_path and Path(font_path).exists(): hello_imgui.load_font(font_path, font_size) + def _post_init(self): + theme.apply_current() + def run(self): theme.load_from_config(self.config) - + self.runner_params = hello_imgui.RunnerParams() self.runner_params.app_window_params.window_title = "manual slop" self.runner_params.app_window_params.window_geometry.size = (1680, 1200) self.runner_params.imgui_window_params.enable_viewports = True self.runner_params.imgui_window_params.default_imgui_window_type = hello_imgui.DefaultImGuiWindowType.provide_full_screen_dock_space + self.runner_params.ini_folder_type = hello_imgui.IniFolderType.current_folder + self.runner_params.ini_filename = "manualslop_layout.ini" self.runner_params.callbacks.show_gui = self._gui_func self.runner_params.callbacks.load_additional_fonts = self._load_fonts + self.runner_params.callbacks.post_init = self._post_init self._fetch_models(self.current_provider) immapp.run(self.runner_params) # On exit + ai_client.cleanup() # Destroy active API caches to stop billing self._flush_to_project() self._save_active_project() self._flush_to_config() diff --git a/manual_slop.toml b/manual_slop.toml index 694bc96..442219d 100644 --- a/manual_slop.toml +++ b/manual_slop.toml @@ -12,7 +12,20 @@ output_dir = "./md_gen" [files] base_dir = "C:/projects/manual_slop" paths = [ - "C:/projects/manual_slop/docs/Readme.md", + "config.toml", + "ai_client.py", + "aggregate.py", + "gemini.py", + "gui.py", + "pyproject.toml", + "C:/projects/manual_slop/shell_runner.py", + "C:/projects/manual_slop/session_logger.py", + "C:/projects/manual_slop/file_cache.py", + "C:/projects/manual_slop/theme.py", + "C:/projects/manual_slop/project_manager.py", + "C:/projects/manual_slop/mcp_client.py", + "C:/projects/manual_slop/summarize.py", + "C:\\projects\\manual_slop\\docs\\**\\*", ] [screenshots] @@ -26,7 +39,7 @@ roles = [ "Vendor API", "System", ] -active = "test for gemini conductor" +active = "docs" auto_add = true [discussion.discussions."Support files or mcp, or proper dynamic context uptake."] @@ -148,8 +161,8 @@ history = [ ] [discussion.discussions.docs] -git_commit = "68e895cb8a0144061d1e3b959b7c9f7f98a0c7ed" -last_updated = "2026-02-23T11:05:22" +git_commit = "" +last_updated = "2026-02-22T22:55:04" history = [ "@2026-02-22T17:05:29\nUser:\nUpdate docs with latest state of the codebase files. ai_client.py and aggregate.py both recieved updates.", "@2026-02-22T17:06:43\nVendor API:\n[GEMINI QUOTA EXHAUSTED]\n\n429 RESOURCE_EXHAUSTED. {'error': {'code': 429, 'message': 'Resource has been exhausted (e.g. check quota).', 'status': 'RESOURCE_EXHAUSTED'}}", @@ -159,83 +172,4 @@ history = [ "@2026-02-22T17:22:33\nAI:\n(User annotation, ai did some basic scavaging but was interrupted by bad tool prompt bug)", "@2026-02-22T17:23:07\nUser:\napologies you were trying to do a tool call and my panel glitched when I attempted to maximize the view, we problably need to also fix that (gui.py related).", "@2026-02-22T17:25:34\nAI:\nLet me read the current state of the relevant files to understand what happened and what needs to be updated.\n\nGood. Now I have the full picture. There are two tasks:\n\n1. **Update the docs** (`guide_architecture.md`, `guide_tools.md`, `docs/Readme.md`) to reflect the current state of `ai_client.py` (web tools, Gemini cache management, etc.)\n2. **Fix the GUI bug** — the `_show_text_viewer` callback crashes when called from a button inside the ConfirmDialog, because the `user_data` lambda captures the tag string but the `dpg.get_value()` call on that tag may fail or the wrong value gets passed.\n\nLet me look at the specific bug area in `gui.py` more carefully. The issue is in `ConfirmDialog.show()` — the `[+ Maximize]` button callback uses `dpg.get_value(u)` where `u` is the tag string `f\"{self._tag}_script\"`. But `_show_text_viewer` receives `u` as the tag, not the value. Let me check:\n\nIn `ConfirmDialog.show()`:\n```python\ndpg.add_button(\n label=\"[+ Maximize]\", \n user_data=f\"{self._tag}_script\",\n callback=lambda s, a, u: _show_text_viewer(\"Confirm Script\", dpg.get_value(u))\n)\n```\n\nThis looks correct actually — `u` is the tag, and `dpg.get_value(u)` reads from it. The issue is more likely that when the panel \"glitches\" during maximize, the `_show_text_viewer` function tries to configure `win_text_viewer` but the viewer window may not exist yet at that point, or the `text_viewer_content` tag doesn't exist. Let me look at `_show_text_viewer` — it checks `dpg.does_item_exist(\"win_text_viewer\")` but if the window doesn't exist it silently does nothing. That's actually the bug — when the text viewer window doesn't exist yet (e.g., first call before `_build_ui` completes, or if DPG hasn't rendered it yet), the function silently fails.\n\nBut more likely the crash is that `dpg.get_value(u)` is being called where `u` is `None` or the tag doesn't exist at the moment of click. The safest fix is to capture the value at button-creation time rather than reading it at click time for the ConfirmDialog case, and also add a guard in `_show_text_viewer` to create the window if it doesn't exist.\n\nActually, re-reading the user's report: \"my panel glitched when I attempted to maximize the view\" — this sounds like the Text Viewer window was opened but something went wrong with its content or the ConfirmDialog was dismissed/deleted before the viewer could read from it.\n\nThe real issue: when the user clicks `[+ Maximize]` in the ConfirmDialog, the lambda calls `dpg.get_value(f\"{self._tag}_script\")`. But if the dialog was already closed (or the item deleted), this will throw. The fix is to capture the value at callback time safely with a try/except, or better — pass the actual text content as `user_data` instead of the tag.\n\nLet me fix `ConfirmDialog.show()` to pass the script text directly as `user_data`:\n\nNow I have the full picture. I can see the bug clearly:\n\n**The bug in `ConfirmDialog.show()`**: The `[+ Maximize]` button's callback is `lambda s, a, u: _show_text_viewer(\"Confirm Script\", dpg.get_value(u))`. When the user clicks `[+ Maximize]`, `dpg.get_value(u)` reads the current value from the `input_text` widget tagged `f\"{self._tag}_script\"`. This works fine... **unless** the ConfirmDialog window was already deleted (approved/rejected) before the viewer was opened, or if the `win_text_viewer` doesn't exist yet at that point.\n\nBut the actual crash path is more subtle: the `[+ Maximize]` buttons in `win_script_output` use `callback=lambda s, a, u: _show_text_viewer(\"Last Script\", dpg.get_value(u))` where `u` is the string tag `\"last_script_text\"`. When word-wrap is ON, `last_script_text` is hidden (`show=False`) but still exists — so `dpg.get_value` works. But if the user somehow triggers this when the item doesn't exist, it crashes.\n\nThe real fix needed: The `[+ Maximize]` buttons in `win_script_output` should read from the actual stored value, not from `dpg.get_value(tag)` — because the wrap/no-wrap pair means the visible widget might be the wrap one, not the input_text. The `_tool_log` has the actual data. Also, the `ConfirmDialog` maximize button should capture the text value at call time, not via tag lookup.\n\nLet me fix both issues in `gui.py`:\n\n1. **`ConfirmDialog.show()`** — capture script text directly as `user_data` instead of reading via tag at click time.\n2. **`win_script_output` `[+ Maximize]` buttons** — read from the stored `_tool_log` last entry or use a safe fallback that checks both the input_text and wrap widget.\n\nI can see the first fix didn't apply — the file still has the old `ConfirmDialog` code. The `Replace()` failed silently because the here-string whitespace didn't match exactly. I'll use a targeted line-based approach instead.\n\nGood, I can see the exact text. The issue is the trailing space after `\"[+ Maximize]\", `. Let me do a precise replacement:\n\nGood, the ConfirmDialog fix is applied. Now I need to fix the second bug: the `[+ Maximize]` buttons in `win_script_output` use `dpg.get_value(u)` where `u` is the tag string. When word-wrap is ON, the `input_text` widget is hidden (`show=False`) — `dpg.get_value` on a hidden item still works in DPG, but the issue is that the wrap widget (`last_script_text_wrap`) is a `dpg.add_text` (not an `input_text`), so `dpg.get_value` on it returns an empty string. The fix is to read from `self._tool_log` directly via a stored reference, or better — store the last script/output as instance variables and pass them directly as `user_data`.\n\nThe cleanest fix: change the `[+ Maximize]` buttons in `win_script_output` to use a method-based callback that reads from `self._tool_log[-1]` at click time, rather than reading from a potentially-hidden widget.\n\nI'll add two helper methods to `App` and update the button callbacks:\n\nGood, I can see the current state. Now I need to fix the `win_script_output` `[+ Maximize]` buttons. The problem: when word-wrap is ON, `last_script_text` is hidden (`show=False`) but `dpg.get_value()` on a hidden `input_text` still works fine in DPG. However, the issue is that `dpg.get_value(\"last_script_output\")` returns `\"\"` when the widget is hidden in some DPG versions, OR the tag-based lookup `dpg.get_value(u)` is being called where `u` is the tag string — but the wrap variant is a `dpg.add_text` (not `input_text`), so if somehow the wrong widget is targeted, it returns empty.\n\nThe cleanest fix: update `_append_tool_log` to also store `self._last_script` and `self._last_output`, then change the `[+ Maximize]` buttons in `win_script_output` to use `self._last_script` / `self._last_output` via bound method callbacks instead of `dpg.get_value(tag)`.\n\nGood, the gui.py changes are in. Now I need to fix the remaining issue in `win_script_output` — the `[+ Maximize]` buttons still use `dpg.get_value(u)` where `u` is a tag string. When word-wrap is ON, `last_script_text` is hidden and `dpg.get_value` on a hidden `input_text` returns `\"\"` in DPG. The fix is to change those buttons to use `self._last_script` and `self._last_output` directly via bound method callbacks.\n\nGood, `gui.py` is correct. Now I need to update the docs and `MainContext.md`. Let me do the docs updates now, and the MainContext.md update after.\n\nThe `gui.py` changes are confirmed correct. Now let me update the three docs files and `MainContext.md` to reflect the current state of `ai_client.py` (web tools added, Gemini cache management, etc.) and the `gui.py` bug fix.", - "@2026-02-22T17:26:12\nUser:\nSure, update the docs!", - "@2026-02-22T17:27:55\nAI:\nGood, I have everything I need. Now I'll update all three docs files and MainContext.md. Let me write them all in parallel.\n\nThe replacement didn't take — the file still has the old aggregation section. The pattern matching failed silently. I'll use a Python helper script to do the rewrite reliably.\n\nGood, the architecture doc is updated. Now let me update `guide_tools.md`, `Readme.md`, and `MainContext.md` in parallel.\n\nNow updating `Readme.md` and `MainContext.md`:\n\nNow let me update `MainContext.md` to document the `gui.py` bug fix:\n\nAll done. Here's a summary of everything that was changed:\n\n---\n\n### `gui.py` — Bug Fixes\n\n**Root cause:** Three `[+ Maximize]` buttons were reading text via `dpg.get_value(tag)` at click time, which fails in two scenarios: (a) the ConfirmDialog is dismissed before the viewer opens (item deleted), and (b) word-wrap is ON so the `input_text` widget is hidden and returns `\"\"` in some DPG versions.\n\n**Fix 1 — `ConfirmDialog.show()`:**\n- `user_data` changed from `f\"{self._tag}_script\"` (a tag string) → `self._script` (the actual text)\n- Callback changed from `lambda s,a,u: _show_text_viewer(..., dpg.get_value(u))` → `lambda s,a,u: _show_text_viewer(..., u)`\n- Text is now baked in at button-creation time; safe to click after dialog is closed\n\n**Fix 2 — `win_script_output` `[+ Maximize]` buttons:**\n- Added `self._last_script` and `self._last_output` instance vars, populated in `_append_tool_log()`\n- Both buttons now use `self._last_script` / `self._last_output` directly — no DPG widget tag lookups at all\n\n---\n\n### Docs Updated\n\n- **`guide_architecture.md`** — Aggregation section corrected: `summary_only=False` by default (full file contents, not summaries), `run()` returns a 3-tuple, `build_file_items()` avoids double I/O\n- **`guide_tools.md`** — Security section clarified: filesystem tools are access-controlled, web tools (`web_search`, `fetch_url`) are unrestricted; tool list restructured into two groups\n- **`docs/Readme.md`** — Files section corrected; Text Viewer section updated with note about the `[+ Maximize]` fix and the ConfirmDialog fix\n- **`MainContext.md`** — `gui.py` bullet updated; new `Updates (2026-02-22 — gui.py [+ Maximize] bug fix)` section added", ] - -[discussion.discussions."test for gemini conductor"] -git_commit = "ccdba69214aea169a4e707da7b425ae0c6139fca" -last_updated = "2026-02-23T16:40:30" -history = [ - "User:\nadded a file to yoru exposed files read it.", - "User:\nI have read the `MainContext.md` file. It contains extensive documentation about the \"Manual Slop\" project.\n\nWas `MainContext.md` the file you were referring to? If not, please specify the file's name or path.", - "User:\ntesting to see if you can still run powershell even though I disabled the capability...", - "User:\nI cannot directly run PowerShell scripts. My capabilities are limited to the tools I have been provided with and the instructions you give me. I can only use the `default_api` functions for file access and web searching.", - "User:\n[PERFORMANCE ALERT] Frame time high: 906.5ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 194.0ms; Input lag high: 156.2ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 117.4ms; Input lag high: 156.2ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 206.5ms; Input lag high: 156.2ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 817.2ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 679.9ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 701.5ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 111.9ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 113.7ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 106.9ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 119.9ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 106.0ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 873.7ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 821.3ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 119.2ms; Input lag high: 251.6ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 685.6ms. Please consider optimizing recent changes or reducing load.", - "User:\nStress test entry 20 Stress test entry 20 Stress test entry 20 Stress test entry 20 Stress test entry 20 Stress test entry 20 Stress test entry 20 Stress test entry 20 Stress test entry 20 Stress test entry 20", - "User:\nStress test entry 21 Stress test entry 21 Stress test entry 21 Stress test entry 21 Stress test entry 21 Stress test entry 21 Stress test entry 21 Stress test entry 21 Stress test entry 21 Stress test entry 21", - "User:\nStress test entry 22 Stress test entry 22 Stress test entry 22 Stress test entry 22 Stress test entry 22 Stress test entry 22 Stress test entry 22 Stress test entry 22 Stress test entry 22 Stress test entry 22", - "User:\nStress test entry 23 Stress test entry 23 Stress test entry 23 Stress test entry 23 Stress test entry 23 Stress test entry 23 Stress test entry 23 Stress test entry 23 Stress test entry 23 Stress test entry 23", - "User:\nStress test entry 24 Stress test entry 24 Stress test entry 24 Stress test entry 24 Stress test entry 24 Stress test entry 24 Stress test entry 24 Stress test entry 24 Stress test entry 24 Stress test entry 24", - "User:\nStress test entry 25 Stress test entry 25 Stress test entry 25 Stress test entry 25 Stress test entry 25 Stress test entry 25 Stress test entry 25 Stress test entry 25 Stress test entry 25 Stress test entry 25", - "User:\nStress test entry 26 Stress test entry 26 Stress test entry 26 Stress test entry 26 Stress test entry 26 Stress test entry 26 Stress test entry 26 Stress test entry 26 Stress test entry 26 Stress test entry 26", - "User:\nStress test entry 27 Stress test entry 27 Stress test entry 27 Stress test entry 27 Stress test entry 27 Stress test entry 27 Stress test entry 27 Stress test entry 27 Stress test entry 27 Stress test entry 27", - "User:\nStress test entry 28 Stress test entry 28 Stress test entry 28 Stress test entry 28 Stress test entry 28 Stress test entry 28 Stress test entry 28 Stress test entry 28 Stress test entry 28 Stress test entry 28", - "User:\nStress test entry 29 Stress test entry 29 Stress test entry 29 Stress test entry 29 Stress test entry 29 Stress test entry 29 Stress test entry 29 Stress test entry 29 Stress test entry 29 Stress test entry 29", - "User:\nStress test entry 30 Stress test entry 30 Stress test entry 30 Stress test entry 30 Stress test entry 30 Stress test entry 30 Stress test entry 30 Stress test entry 30 Stress test entry 30 Stress test entry 30", - "User:\nStress test entry 31 Stress test entry 31 Stress test entry 31 Stress test entry 31 Stress test entry 31 Stress test entry 31 Stress test entry 31 Stress test entry 31 Stress test entry 31 Stress test entry 31", - "User:\nStress test entry 32 Stress test entry 32 Stress test entry 32 Stress test entry 32 Stress test entry 32 Stress test entry 32 Stress test entry 32 Stress test entry 32 Stress test entry 32 Stress test entry 32", - "User:\nStress test entry 33 Stress test entry 33 Stress test entry 33 Stress test entry 33 Stress test entry 33 Stress test entry 33 Stress test entry 33 Stress test entry 33 Stress test entry 33 Stress test entry 33", - "User:\nStress test entry 34 Stress test entry 34 Stress test entry 34 Stress test entry 34 Stress test entry 34 Stress test entry 34 Stress test entry 34 Stress test entry 34 Stress test entry 34 Stress test entry 34", - "User:\nStress test entry 35 Stress test entry 35 Stress test entry 35 Stress test entry 35 Stress test entry 35 Stress test entry 35 Stress test entry 35 Stress test entry 35 Stress test entry 35 Stress test entry 35", - "User:\nStress test entry 36 Stress test entry 36 Stress test entry 36 Stress test entry 36 Stress test entry 36 Stress test entry 36 Stress test entry 36 Stress test entry 36 Stress test entry 36 Stress test entry 36", - "User:\nStress test entry 37 Stress test entry 37 Stress test entry 37 Stress test entry 37 Stress test entry 37 Stress test entry 37 Stress test entry 37 Stress test entry 37 Stress test entry 37 Stress test entry 37", - "User:\nStress test entry 38 Stress test entry 38 Stress test entry 38 Stress test entry 38 Stress test entry 38 Stress test entry 38 Stress test entry 38 Stress test entry 38 Stress test entry 38 Stress test entry 38", - "User:\nStress test entry 39 Stress test entry 39 Stress test entry 39 Stress test entry 39 Stress test entry 39 Stress test entry 39 Stress test entry 39 Stress test entry 39 Stress test entry 39 Stress test entry 39", - "User:\nStress test entry 40 Stress test entry 40 Stress test entry 40 Stress test entry 40 Stress test entry 40 Stress test entry 40 Stress test entry 40 Stress test entry 40 Stress test entry 40 Stress test entry 40", - "User:\nStress test entry 41 Stress test entry 41 Stress test entry 41 Stress test entry 41 Stress test entry 41 Stress test entry 41 Stress test entry 41 Stress test entry 41 Stress test entry 41 Stress test entry 41", - "User:\nStress test entry 42 Stress test entry 42 Stress test entry 42 Stress test entry 42 Stress test entry 42 Stress test entry 42 Stress test entry 42 Stress test entry 42 Stress test entry 42 Stress test entry 42", - "User:\nStress test entry 43 Stress test entry 43 Stress test entry 43 Stress test entry 43 Stress test entry 43 Stress test entry 43 Stress test entry 43 Stress test entry 43 Stress test entry 43 Stress test entry 43", - "User:\nStress test entry 44 Stress test entry 44 Stress test entry 44 Stress test entry 44 Stress test entry 44 Stress test entry 44 Stress test entry 44 Stress test entry 44 Stress test entry 44 Stress test entry 44", - "User:\nStress test entry 45 Stress test entry 45 Stress test entry 45 Stress test entry 45 Stress test entry 45 Stress test entry 45 Stress test entry 45 Stress test entry 45 Stress test entry 45 Stress test entry 45", - "User:\nStress test entry 46 Stress test entry 46 Stress test entry 46 Stress test entry 46 Stress test entry 46 Stress test entry 46 Stress test entry 46 Stress test entry 46 Stress test entry 46 Stress test entry 46", - "User:\nStress test entry 47 Stress test entry 47 Stress test entry 47 Stress test entry 47 Stress test entry 47 Stress test entry 47 Stress test entry 47 Stress test entry 47 Stress test entry 47 Stress test entry 47", - "User:\nStress test entry 48 Stress test entry 48 Stress test entry 48 Stress test entry 48 Stress test entry 48 Stress test entry 48 Stress test entry 48 Stress test entry 48 Stress test entry 48 Stress test entry 48", - "User:\nStress test entry 49 Stress test entry 49 Stress test entry 49 Stress test entry 49 Stress test entry 49 Stress test entry 49 Stress test entry 49 Stress test entry 49 Stress test entry 49 Stress test entry 49", - "@2026-02-23T15:28:40\nSystem:\n[PERFORMANCE ALERT] Frame time high: 210.4ms. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T15:29:20\nSystem:\n[PERFORMANCE ALERT] Frame time high: 266.8ms. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T15:29:48\nSystem:\n[PERFORMANCE ALERT] Frame time high: 734.8ms. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T15:30:27\nSystem:\n[PERFORMANCE ALERT] Frame time high: 160.9ms. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T16:03:29\nSystem:\n[PERFORMANCE ALERT] Frame time high: 862.8ms. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T16:04:08\nSystem:\n[PERFORMANCE ALERT] Frame time high: 146.3ms. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T16:17:39\nSystem:\n[PERFORMANCE ALERT] Frame time high: 790.9ms. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T16:18:19\nSystem:\n[PERFORMANCE ALERT] Frame time high: 170.3ms. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T16:18:49\nSystem:\n[PERFORMANCE ALERT] Frame time high: 371.8ms. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T16:19:29\nSystem:\n[PERFORMANCE ALERT] Frame time high: 158.2ms. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T16:19:59\nSystem:\n[PERFORMANCE ALERT] Frame time high: 221.8ms. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T16:29:49\nSystem:\n[PERFORMANCE ALERT] Frame time high: 795.2ms. Please consider optimizing recent changes or reducing load.", -] - -[agent.tools] -run_powershell = true -read_file = true -list_directory = true -search_files = true -get_file_summary = true -web_search = true -fetch_url = true diff --git a/manualslop_layout.ini b/manualslop_layout.ini new file mode 100644 index 0000000..f9dc2b1 --- /dev/null +++ b/manualslop_layout.ini @@ -0,0 +1,116 @@ +;;; !!! This configuration is handled by HelloImGui and stores several Ini Files, separated by markers like this: + ;;;<<>>;;; + +;;;<<>>;;; +[Window][Debug##Default] +Pos=60,60 +Size=400,400 +Collapsed=0 + +[Window][Projects] +Pos=209,396 +Size=387,337 +Collapsed=0 +DockId=0x00000014,0 + +[Window][Files] +Pos=0,0 +Size=207,1200 +Collapsed=0 +DockId=0x00000011,0 + +[Window][Screenshots] +Pos=209,0 +Size=387,171 +Collapsed=0 +DockId=0x00000015,0 + +[Window][Discussion History] +Pos=598,128 +Size=712,619 +Collapsed=0 +DockId=0x0000000E,0 + +[Window][Provider] +Pos=209,913 +Size=387,287 +Collapsed=0 +DockId=0x0000000A,0 + +[Window][Message] +Pos=598,749 +Size=712,451 +Collapsed=0 +DockId=0x0000000C,0 + +[Window][Response] +Pos=209,735 +Size=387,176 +Collapsed=0 +DockId=0x00000010,0 + +[Window][Tool Calls] +Pos=1312,733 +Size=368,144 +Collapsed=0 +DockId=0x00000008,0 + +[Window][Comms History] +Pos=1312,879 +Size=368,321 +Collapsed=0 +DockId=0x00000006,0 + +[Window][System Prompts] +Pos=1312,0 +Size=368,731 +Collapsed=0 +DockId=0x00000007,0 + +[Window][Theme] +Pos=209,173 +Size=387,221 +Collapsed=0 +DockId=0x00000016,0 + +[Window][Text Viewer - Entry #7] +Pos=379,324 +Size=900,700 +Collapsed=0 + +[Docking][Data] +DockSpace ID=0xAFC85805 Window=0x079D3A04 Pos=138,161 Size=1680,1200 Split=X + DockNode ID=0x00000011 Parent=0xAFC85805 SizeRef=207,1200 Selected=0x0469CA7A + DockNode ID=0x00000012 Parent=0xAFC85805 SizeRef=1559,1200 Split=X + DockNode ID=0x00000003 Parent=0x00000012 SizeRef=1189,1200 Split=X + DockNode ID=0x00000001 Parent=0x00000003 SizeRef=387,1200 Split=Y Selected=0x8CA2375C + DockNode ID=0x00000009 Parent=0x00000001 SizeRef=405,911 Split=Y Selected=0x8CA2375C + DockNode ID=0x0000000F Parent=0x00000009 SizeRef=405,733 Split=Y Selected=0x8CA2375C + DockNode ID=0x00000013 Parent=0x0000000F SizeRef=405,394 Split=Y Selected=0x8CA2375C + DockNode ID=0x00000015 Parent=0x00000013 SizeRef=405,171 Selected=0xDF822E02 + DockNode ID=0x00000016 Parent=0x00000013 SizeRef=405,221 Selected=0x8CA2375C + DockNode ID=0x00000014 Parent=0x0000000F SizeRef=405,337 Selected=0xDA22FEDA + DockNode ID=0x00000010 Parent=0x00000009 SizeRef=405,176 Selected=0x0D5A5273 + DockNode ID=0x0000000A Parent=0x00000001 SizeRef=405,287 Selected=0xA07B5F14 + DockNode ID=0x00000002 Parent=0x00000003 SizeRef=800,1200 Split=Y + DockNode ID=0x0000000B Parent=0x00000002 SizeRef=1010,747 Split=Y + DockNode ID=0x0000000D Parent=0x0000000B SizeRef=1010,126 CentralNode=1 + DockNode ID=0x0000000E Parent=0x0000000B SizeRef=1010,619 Selected=0x5D11106F + DockNode ID=0x0000000C Parent=0x00000002 SizeRef=1010,451 Selected=0x66CFB56E + DockNode ID=0x00000004 Parent=0x00000012 SizeRef=368,1200 Split=Y Selected=0xDD6419BC + DockNode ID=0x00000005 Parent=0x00000004 SizeRef=261,877 Split=Y Selected=0xDD6419BC + DockNode ID=0x00000007 Parent=0x00000005 SizeRef=261,731 Selected=0xDD6419BC + DockNode ID=0x00000008 Parent=0x00000005 SizeRef=261,144 Selected=0x1D56B311 + DockNode ID=0x00000006 Parent=0x00000004 SizeRef=261,321 Selected=0x8B4EBFA6 + +;;;<<>>;;; +;;;<<>>;;; +[Layout] +Name=Default +[StatusBar] +Show=false +ShowFps=true +[Theme] +Name=DarculaDarker +;;;<<>>;;; +{"gImGuiSplitIDs":{"MainDockSpace":2949142533}} diff --git a/theme_2.py b/theme_2.py index fedffe1..2f15470 100644 --- a/theme_2.py +++ b/theme_2.py @@ -5,7 +5,7 @@ Theming support for manual_slop GUI — imgui-bundle port. Replaces theme.py (DearPyGui-specific) with imgui-bundle equivalents. Palettes are applied via imgui.get_style().set_color_() calls. Font loading uses hello_imgui.load_font(). -Scale uses imgui.get_io().font_global_scale. +Scale uses imgui.get_style().font_scale_main. """ from imgui_bundle import imgui, hello_imgui @@ -238,11 +238,11 @@ def apply(palette_name: str): def set_scale(factor: float): - """Set the global font scale factor.""" + """Set the global font/UI scale factor.""" global _current_scale _current_scale = factor - io = imgui.get_io() - io.font_global_scale = factor + style = imgui.get_style() + style.font_scale_main = factor def save_to_config(config: dict): @@ -263,6 +263,12 @@ def load_from_config(config: dict): _current_font_size = float(t.get("font_size", 16.0)) _current_scale = float(t.get("scale", 1.0)) + # Don't apply here — imgui context may not exist yet. + # Call apply_current() after imgui is initialised. + + +def apply_current(): + """Apply the loaded palette and scale. Call after imgui context exists.""" apply(_current_palette) set_scale(_current_scale)