fix(bleed): fix token budget layout — own collapsing header in AI Settings
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 <noreply@anthropic.com>
This commit is contained in:
6
gui_2.py
6
gui_2.py
@@ -1695,6 +1695,8 @@ class App:
|
|||||||
self._render_provider_panel()
|
self._render_provider_panel()
|
||||||
if imgui.collapsing_header("System Prompts"):
|
if imgui.collapsing_header("System Prompts"):
|
||||||
self._render_system_prompts_panel()
|
self._render_system_prompts_panel()
|
||||||
|
if imgui.collapsing_header("Token Budget"):
|
||||||
|
self._render_token_budget_panel()
|
||||||
imgui.end()
|
imgui.end()
|
||||||
if self.show_windows.get("MMA Dashboard", False):
|
if self.show_windows.get("MMA Dashboard", False):
|
||||||
exp, self.show_windows["MMA Dashboard"] = imgui.begin("MMA Dashboard", self.show_windows["MMA Dashboard"])
|
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")
|
imgui.text_colored(C_LBL, f" Last Latency: {usage['last_latency']:.2f}s")
|
||||||
if usage["cache_read_input_tokens"]:
|
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_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:
|
if self._gemini_cache_text:
|
||||||
imgui.text_colored(C_SUB, self._gemini_cache_text)
|
imgui.text_colored(C_SUB, self._gemini_cache_text)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user