fix(external-editor): Move panel to Operations Hub, fix config key lookup
- Moved External Editor panel from AI Settings to External Tools tab in Operations Hub - Fixed default_editor lookup to use nested [tools.default_editor] structure - Added example entries for vscode, notepadpp, 10xEditor, rider, sublime - Improved panel UI with section header and clearer formatting
This commit is contained in:
+34
-6
@@ -1,4 +1,4 @@
|
||||
[ai]
|
||||
[ai]
|
||||
provider = "minimax"
|
||||
model = "MiniMax-M2.5"
|
||||
temperature = 0.0
|
||||
@@ -50,17 +50,17 @@ separate_external_tools = false
|
||||
Message = false
|
||||
Response = false
|
||||
"Tool Calls" = false
|
||||
Theme = false
|
||||
Theme = true
|
||||
"Log Management" = true
|
||||
Diagnostics = false
|
||||
"External Tools" = false
|
||||
"External Tools" = true
|
||||
"Shader Editor" = false
|
||||
"Undo/Redo History" = true
|
||||
"Undo/Redo History" = false
|
||||
|
||||
[theme]
|
||||
palette = "Nord Dark"
|
||||
font_path = "fonts/Inter-Regular.ttf"
|
||||
font_size = 16.0
|
||||
font_path = "C:/projects/manual_slop/assets/fonts/MapleMono-Regular.ttf"
|
||||
font_size = 20.0
|
||||
scale = 1.0
|
||||
transparency = 1.0
|
||||
child_transparency = 1.0
|
||||
@@ -85,3 +85,31 @@ chunk_overlap = 200
|
||||
[rag.vector_store]
|
||||
provider = "mock"
|
||||
collection_name = "manual_slop"
|
||||
|
||||
[tools.text_editors]
|
||||
# Add your external editors here
|
||||
# Format: editor_name = "C:\\path\\to\\executable.exe"
|
||||
# Or use the structured format with diff_args
|
||||
|
||||
[tools.text_editors.vscode]
|
||||
path = "C:\\path\\to\\code.exe"
|
||||
diff_args = ["--diff"]
|
||||
|
||||
[tools.text_editors.notepadpp]
|
||||
path = "C:\\Program Files\\Notepad++\\notepad++.exe"
|
||||
diff_args = ["-multiInst", "-nosession"]
|
||||
|
||||
[tools.text_editors.ten_x_editor]
|
||||
path = "C:\\path\\to\\10xEditor.exe"
|
||||
diff_args = []
|
||||
|
||||
[tools.text_editors.rider]
|
||||
path = "C:\\path\\to\\rider64.exe"
|
||||
diff_args = []
|
||||
|
||||
[tools.text_editors.sublime]
|
||||
path = "C:\\Program Files\\Sublime Text\\sublime_text.exe"
|
||||
diff_args = []
|
||||
|
||||
[tools.default_editor]
|
||||
default_editor = "vscode"
|
||||
|
||||
@@ -50,7 +50,7 @@ def get_default_launcher() -> ExternalEditorLauncher:
|
||||
from src import models
|
||||
config = models.load_config()
|
||||
editors_config = config.get("tools", {}).get("text_editors", {})
|
||||
default_editor = config.get("tools", {}).get("default_editor")
|
||||
default_editor = config.get("tools", {}).get("default_editor", {}).get("default_editor")
|
||||
ext_config = ExternalEditorConfig.from_dict({
|
||||
"editors": editors_config,
|
||||
"default_editor": default_editor,
|
||||
|
||||
+21
-10
@@ -871,8 +871,6 @@ 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):
|
||||
@@ -974,6 +972,9 @@ class App:
|
||||
if not self.ui_separate_external_tools:
|
||||
if imgui.begin_tab_item("External Tools")[0]:
|
||||
self._render_external_tools_panel()
|
||||
imgui.separator()
|
||||
imgui.text("")
|
||||
self._render_external_editor_panel()
|
||||
imgui.end_tab_item()
|
||||
if imgui.begin_tab_item("Workspace Layouts")[0]:
|
||||
imgui.text("Experimental: Auto-switch layout by Tier")
|
||||
@@ -4841,23 +4842,33 @@ def hello():
|
||||
launcher = get_default_launcher()
|
||||
editors = launcher.config.editors
|
||||
default_name = launcher.config.default_editor
|
||||
imgui.text("Configured Editors:")
|
||||
imgui.text_colored(vec4(0.7, 0.7, 0.7, 1), "External Editor for Diff Viewing")
|
||||
imgui.separator()
|
||||
if not editors:
|
||||
imgui.text_colored(vec4(1, 0.5, 0, 1), " No editors configured")
|
||||
imgui.text("")
|
||||
imgui.text("Add editors in config.toml:")
|
||||
imgui.text(" [tools.text_editors]")
|
||||
imgui.text(' vscode = "C:\\\\path\\\\to\\\\code.exe"')
|
||||
imgui.text_colored(vec4(0.5, 0.8, 1, 1), ' [tools.text_editors.vscode]')
|
||||
imgui.text(' path = "C:\\\\path\\\\to\\\\code.exe"')
|
||||
imgui.text(' diff_args = ["--diff"]')
|
||||
imgui.text("")
|
||||
imgui.text_colored(vec4(0.5, 0.8, 1, 1), ' [tools.text_editors.notepadpp]')
|
||||
imgui.text(' path = "C:\\\\Program Files\\\\Notepad++\\\\notepad++.exe"')
|
||||
imgui.text(' diff_args = ["-multiInst", "-nosession"]')
|
||||
imgui.text("")
|
||||
imgui.text("Then set default in [tools.default_editor]")
|
||||
else:
|
||||
imgui.text("Configured Editors:")
|
||||
for name, editor in editors.items():
|
||||
is_default = name == default_name
|
||||
marker = " (default)" if is_default else ""
|
||||
imgui.text(f" {name}{marker}: {editor.path}")
|
||||
imgui.text_colored(vec4(0.3, 0.9, 0.3, 1), f" {name}{marker}")
|
||||
imgui.text(f" path: {editor.path}")
|
||||
if editor.diff_args:
|
||||
imgui.text(f" diff args: {editor.diff_args}")
|
||||
imgui.text(f" diff: {editor.diff_args}")
|
||||
imgui.text("")
|
||||
imgui.text("Configuration:")
|
||||
imgui.text(" Global: config.toml [tools.text_editors]")
|
||||
imgui.text(" Project: manual_slop.toml default_editor")
|
||||
imgui.text_colored(vec4(0.7, 0.7, 0.7, 1), "Config: config.toml [tools.text_editors]")
|
||||
imgui.text_colored(vec4(0.7, 0.7, 0.7, 1), "Override: manual_slop.toml default_editor")
|
||||
|
||||
def _render_agent_tools_panel(self) -> None:
|
||||
if imgui.collapsing_header("Active Tool Presets & Biases", imgui.TreeNodeFlags_.default_open):
|
||||
|
||||
Reference in New Issue
Block a user