Docstrings: SSDL + ASCII Layout Map for Personas, Providers, and Command Palette
This commit is contained in:
@@ -19,6 +19,6 @@ phase_2 = { status = "in_progress", checkpoint_sha = "", name = "Personas, Provi
|
||||
t1_1 = { status = "completed", commit_sha = "", description = "Document Preset Managers and Windows (render_save_preset_modal, render_preset_manager_content, render_preset_manager_window, render_tool_preset_manager_content, render_tool_preset_manager_window)" }
|
||||
|
||||
# Phase 2: Personas, Providers & Command Palette
|
||||
t2_1 = { status = "pending", commit_sha = "", description = "Document Personas & Providers (render_persona_editor_window, render_persona_selector_panel, render_provider_panel)" }
|
||||
t2_2 = { status = "pending", commit_sha = "", description = "Document Command Palette (render_palette_modal in src/command_palette.py)" }
|
||||
t2_3 = { status = "pending", commit_sha = "", description = "Register track and update status in tracks.md" }
|
||||
t2_1 = { status = "completed", commit_sha = "", description = "Document Personas & Providers (render_persona_editor_window, render_persona_selector_panel, render_provider_panel)" }
|
||||
t2_2 = { status = "completed", commit_sha = "", description = "Document Command Palette (render_palette_modal in src/command_palette.py)" }
|
||||
t2_3 = { status = "in_progress", commit_sha = "", description = "Register track and update status in tracks.md" }
|
||||
|
||||
@@ -123,6 +123,20 @@ def _execute(app: Any, command: Command) -> None:
|
||||
|
||||
|
||||
def render_palette_modal(app: Any, commands: List[Command]) -> None:
|
||||
"""Renders the interactive Command Palette modal. Exposes a text input query bar
|
||||
and lists matching commands with fuzzy matching, supporting keyboard navigation (Up/Down/Enter/Esc).
|
||||
|
||||
SSDL: `[I:query_input] -> [B:results_list] => [B:execute_command]`
|
||||
|
||||
ASCII Layout Map:
|
||||
+==================== Command Palette ===================+
|
||||
| |query_text| |
|
||||
| +-----------------------------------------------------+ |
|
||||
| | > [category-a] Command Title A (selected) | |
|
||||
| | [category-b] Command Title B | |
|
||||
| +-----------------------------------------------------+ |
|
||||
+========================================================+
|
||||
"""
|
||||
if not getattr(app, "show_command_palette", False):
|
||||
return
|
||||
|
||||
|
||||
+58
-1
@@ -1549,6 +1549,7 @@ def main() -> None:
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
|
||||
def render_main_interface(app: App) -> None:
|
||||
"""Top-level per-frame orchestrator. Dispatches every subsystem in the correct order:
|
||||
error/stale overlay tints, perf bookends, GUI task draining, modal rendering,
|
||||
@@ -2586,10 +2587,36 @@ def render_agent_tools_panel(app: App) -> None:
|
||||
imgui.tree_pop()
|
||||
|
||||
def render_provider_panel(app: App) -> None:
|
||||
"""Renders the LLM provider configuration panel. Allows selection of API providers,
|
||||
r"""Renders the LLM provider configuration panel. Allows selection of API providers,
|
||||
active models, hyper-parameters (temperature, max tokens, Top-P), history limits, and Gemini CLI binaries.
|
||||
|
||||
SSDL: `[I:providers] -> [B:provider_combo] -> [B:model_listbox] -> [B:parameters_sliders] => [B:cli_path_browse]`
|
||||
|
||||
ASCII Layout Map:
|
||||
+---------------------------------------------------------+
|
||||
| Provider |
|
||||
| [gemini v] [Local] |
|
||||
| [V2 Badges: JSON/STRUCT/SYS/TOOL/C_IN/C_OUT/C_TRM...] |
|
||||
| --- |
|
||||
| Model |
|
||||
| +-----------------------------------------------------+ |
|
||||
| | gemini-1.5-pro | |
|
||||
| | gemini-1.5-flash * | |
|
||||
| +-----------------------------------------------------+ |
|
||||
| --- |
|
||||
| Parameters |
|
||||
| [======= ] 0.70 Temp: |0.70| |
|
||||
| [=========== ] 4096 Top-P: [1.00] |
|
||||
| [====== ] 8192 MaxTok: [8192] |
|
||||
| History Truncation Limit: |900000| |
|
||||
| (If gemini_cli active): |
|
||||
| --- |
|
||||
| Gemini CLI |
|
||||
| Session ID: cba123 |
|
||||
| [Reset CLI Session] |
|
||||
| Binary Path: |
|
||||
| [C:\tools\gemini.exe_______________________] [Browse] |
|
||||
+---------------------------------------------------------+
|
||||
"""
|
||||
if app.perf_profiling_enabled: app.perf_monitor.start_component("_render_provider_panel")
|
||||
imgui.text("Provider")
|
||||
@@ -2675,6 +2702,12 @@ def render_persona_selector_panel(app: App) -> None:
|
||||
overriding system parameters (models, presets, prompts, bias profiles) and loading preset contexts.
|
||||
|
||||
SSDL: `[I:personas] -> [B:persona_combo] => [B:manage_personas]`
|
||||
|
||||
ASCII Layout Map:
|
||||
+---------------------------------------------------------+
|
||||
| Persona |
|
||||
| [assistant v] [Manage Personas] |
|
||||
+---------------------------------------------------------+
|
||||
"""
|
||||
if app.perf_profiling_enabled: app.perf_monitor.start_component("_render_persona_selector_panel")
|
||||
imgui.text("Persona")
|
||||
@@ -3214,6 +3247,30 @@ def render_persona_editor_window(app: App, is_embedded: bool = False) -> None:
|
||||
(prompts, preferred models list, tool presets, aggregation strategy, etc).
|
||||
|
||||
SSDL: `[I:personas_list] -> [B:new_persona] -> [I:settings_editor] -> [I:models_list] -> [I:system_prompt_box] => [B:save_delete]`
|
||||
|
||||
ASCII Layout Map:
|
||||
+========================== Persona Editor ========================+
|
||||
| [New Persona] |
|
||||
| --- |
|
||||
| | assistant | Editing Persona: assistant |
|
||||
| | researcher | --- |
|
||||
| | Name: |assistant| |
|
||||
| | Scope: (o) Global ( ) Project |
|
||||
| | --- |
|
||||
| | > Preferred Models |
|
||||
| | [+] 1. gemini - flash (T:0.7, P:1.0, M:0) |
|
||||
| | [-] 2. anthropic - claude-3-opus |
|
||||
| | Provider: [anthropic v] |
|
||||
| | Model: [claude-3-opus v] |
|
||||
| | Temp: [0.7] Max Tokens: [4096] |
|
||||
| | [Add Model] |
|
||||
| | > System Prompt |
|
||||
| | +---------------------------------------+ |
|
||||
| | | You are a helpful assistant... | |
|
||||
| | +---------------------------------------+ |
|
||||
| ---------------------------------------------------------------- |
|
||||
| [Save] [Delete] [Close] |
|
||||
+==================================================================+
|
||||
"""
|
||||
if not app.show_persona_editor_window and not is_embedded: return
|
||||
if not is_embedded:
|
||||
|
||||
Reference in New Issue
Block a user