feat(gui): Add External Editor configuration panel to AI Settings

- Added _render_external_editor_panel method to display configured editors
- Shows default editor marker and diff args
- Displays config file locations for user reference
- Integrated as 'External Editor' section in AI Settings
This commit is contained in:
2026-05-07 19:12:28 -04:00
parent c711d26eac
commit d2beb79563
2 changed files with 45 additions and 18 deletions
+25
View File
@@ -871,6 +871,8 @@ class App:
self._render_system_prompts_panel()
if imgui.collapsing_header("RAG Settings"):
self._render_rag_panel()
if imgui.collapsing_header("External Editor"):
self._render_external_editor_panel()
self._render_agent_tools_panel()
imgui.end()
if self.ui_separate_usage_analytics and self.show_windows.get("Usage Analytics", False):
@@ -4834,6 +4836,29 @@ def hello():
if imgui.button("Rebuild Index"):
self.controller.event_queue.put('click', 'btn_rebuild_rag_index')
def _render_external_editor_panel(self) -> None:
from src.external_editor import get_default_launcher
launcher = get_default_launcher()
editors = launcher.config.editors
default_name = launcher.config.default_editor
imgui.text("Configured Editors:")
if not editors:
imgui.text_colored(vec4(1, 0.5, 0, 1), " No editors configured")
imgui.text("Add editors in config.toml:")
imgui.text(" [tools.text_editors]")
imgui.text(' vscode = "C:\\\\path\\\\to\\\\code.exe"')
else:
for name, editor in editors.items():
is_default = name == default_name
marker = " (default)" if is_default else ""
imgui.text(f" {name}{marker}: {editor.path}")
if editor.diff_args:
imgui.text(f" diff args: {editor.diff_args}")
imgui.text("")
imgui.text("Configuration:")
imgui.text(" Global: config.toml [tools.text_editors]")
imgui.text(" Project: manual_slop.toml default_editor")
def _render_agent_tools_panel(self) -> None:
if imgui.collapsing_header("Active Tool Presets & Biases", imgui.TreeNodeFlags_.default_open):
imgui.text("Tool Preset")