Document settings hubs and diagnostics in gui_2.py and complete track
Add SQLite-style inline docstrings to render_ai_settings_hub, render_agent_tools_panel, and render_diagnostics_panel under simplified granularity per user request. Mark track sqlite_docs_gui_2_20260612 as complete.
This commit is contained in:
@@ -1844,6 +1844,20 @@ def render_usage_analytics_panel(app: App) -> None:
|
||||
if app.perf_profiling_enabled: app.perf_monitor.end_component("_render_usage_analytics_panel")
|
||||
|
||||
def render_diagnostics_panel(app: App) -> None:
|
||||
"""
|
||||
Renders the Diagnostics panel, displaying performance telemetry metrics.
|
||||
Shows frame time, FPS, event queue throughput, and memory usage.
|
||||
|
||||
State Mutations:
|
||||
Updates app.perf_profiling_enabled and visibility in app.show_windows["Diagnostics"].
|
||||
|
||||
DAG Context / Render Flow:
|
||||
Called by: render_main_interface()
|
||||
Calls: app.perf_monitor.get_metrics()
|
||||
|
||||
Threading & Safety:
|
||||
Must run synchronously on the Main Thread.
|
||||
"""
|
||||
if app.perf_profiling_enabled: app.perf_monitor.start_component("_render_diagnostics_panel")
|
||||
with imscope.window("Diagnostics", app.show_windows.get("Diagnostics", False)) as (exp, opened):
|
||||
app.show_windows["Diagnostics"] = bool(opened)
|
||||
@@ -2339,6 +2353,22 @@ def render_path_field(label: str, attr: str, key: str, tooltip: str):
|
||||
#region: AI Settings
|
||||
|
||||
def render_ai_settings_hub(app: App) -> None:
|
||||
"""
|
||||
Groups and renders all AI-related configuration panels in a unified hub sidebar.
|
||||
Includes persona selection, LLM provider settings, system prompts, RAG switches, and tools.
|
||||
|
||||
State Mutations:
|
||||
None directly (delegated to child panels).
|
||||
|
||||
DAG Context / Render Flow:
|
||||
Called by: render_main_interface()
|
||||
Calls: render_persona_selector_panel(), render_provider_panel(),
|
||||
render_system_prompts_panel(), render_rag_panel(),
|
||||
render_agent_tools_panel()
|
||||
|
||||
Threading & Safety:
|
||||
Must run synchronously on the Main Thread.
|
||||
"""
|
||||
render_persona_selector_panel(app)
|
||||
if imgui.collapsing_header("Provider & Model"): render_provider_panel(app)
|
||||
if imgui.collapsing_header("System Prompts"): render_system_prompts_panel(app)
|
||||
@@ -2435,6 +2465,20 @@ def render_system_prompts_panel(app: App) -> None:
|
||||
ch, app.ui_project_system_prompt = imgui.input_text_multiline("##psp", app.ui_project_system_prompt, imgui.ImVec2(-1, 100))
|
||||
|
||||
def render_agent_tools_panel(app: App) -> None:
|
||||
"""
|
||||
Renders active tool presets and configuration options.
|
||||
Allows selecting tool presets, toggling individual capability flags, and showing bias managers.
|
||||
|
||||
State Mutations:
|
||||
Modifies app.ui_active_tool_preset and local UI flags.
|
||||
|
||||
DAG Context / Render Flow:
|
||||
Called by: render_ai_settings_hub()
|
||||
Calls: app._get_active_capabilities()
|
||||
|
||||
Threading & Safety:
|
||||
Must run synchronously on the Main Thread.
|
||||
"""
|
||||
caps = app._get_active_capabilities()
|
||||
if not caps.tool_calling:
|
||||
if imgui.collapsing_header("Active Tool Presets & Biases", imgui.TreeNodeFlags_.default_open):
|
||||
|
||||
Reference in New Issue
Block a user