Private
Public Access
0
0

feat(gui): wire Command Palette into App class with Ctrl+Shift+P

This commit is contained in:
2026-06-02 21:52:57 -04:00
parent 6a564a5e65
commit 211949d2c3
+14
View File
@@ -145,6 +145,8 @@ class App:
self._snapshot_debounce: float = 1.5
self._pending_snapshot: bool = False
self._is_applying_snapshot: bool = False
# --- Command Palette ---
self.show_command_palette: bool = False
# --- Initialization ---
self.controller.init_state()
from src.hot_reloader import HotReloader, HotModule
@@ -739,6 +741,15 @@ class App:
io = imgui.get_io()
if io.key_ctrl and io.key_alt and imgui.is_key_down(imgui.Key.r):
self._trigger_hot_reload()
if (io.key_ctrl and io.key_shift
and not io.key_alt and not io.key_super
and imgui.is_key_pressed(imgui.Key.p)):
self.show_command_palette = not self.show_command_palette
if self.show_command_palette:
if hasattr(self, '_command_palette_query'):
self._command_palette_query = ""
if hasattr(self, '_command_palette_selected'):
self._command_palette_selected = 0
render_custom_title_bar(self)
render_shader_live_editor(self)
@@ -1248,6 +1259,9 @@ def render_main_interface(app: App) -> None:
render_save_preset_modal(app)
render_save_workspace_profile_modal(app)
render_add_context_files_modal(app)
from src.command_palette import render_palette_modal
from src.commands import registry as _cmd_registry
render_palette_modal(app, _cmd_registry.all())
render_preset_manager_window(app)
render_tool_preset_manager_window(app)
render_persona_editor_window(app)