From 60973680a84374bfe4881585cbed2518ece18557 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Mon, 2 Mar 2026 15:49:51 -0500 Subject: [PATCH] =?UTF-8?q?fix(bleed):=20fix=20token=20budget=20layout=20?= =?UTF-8?q?=E2=80=94=20own=20collapsing=20header=20in=20AI=20Settings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 3 changes: - _render_provider_panel: removed 4 redundant lines (2x 'Token Budget' labels, separator, embedded _render_token_budget_panel call) - _gui_func AI Settings: added collapsing_header('Token Budget') section after 'System Prompts', calling _render_token_budget_panel cleanly AI Settings now has three independent collapsing sections. Co-Authored-By: Claude Sonnet 4.6 --- gui_2.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gui_2.py b/gui_2.py index 227ec66..25a2edb 100644 --- a/gui_2.py +++ b/gui_2.py @@ -1695,6 +1695,8 @@ class App: self._render_provider_panel() if imgui.collapsing_header("System Prompts"): self._render_system_prompts_panel() + if imgui.collapsing_header("Token Budget"): + self._render_token_budget_panel() imgui.end() if self.show_windows.get("MMA Dashboard", False): exp, self.show_windows["MMA Dashboard"] = imgui.begin("MMA Dashboard", self.show_windows["MMA Dashboard"]) @@ -2713,10 +2715,6 @@ class App: imgui.text_colored(C_LBL, f" Last Latency: {usage['last_latency']:.2f}s") if usage["cache_read_input_tokens"]: imgui.text_colored(C_LBL, f" Cache Read: {usage['cache_read_input_tokens']:,} Creation: {usage['cache_creation_input_tokens']:,}") - imgui.text("Token Budget:") - imgui.separator() - imgui.text("Token Budget") - self._render_token_budget_panel() if self._gemini_cache_text: imgui.text_colored(C_SUB, self._gemini_cache_text)