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
@@ -9,25 +9,27 @@
- [x] Task: Conductor - User Manual Verification 'Phase 1: Configuration & Data Modeling' (Protocol in workflow.md)
## Phase 2: Editor Launch Logic
- [ ] Task: Implement the `ExternalEditorLauncher` utility.
- [ ] Create a new module/class in `src/external_editor.py`.
- [ ] Implement a method to build the command-line arguments for diffing (e.g., handling `--diff` for VSCode or equivalent for 10xNotepad).
- [ ] Implement the `launch_diff(editor_name, original_file_path, modified_file_path)` method using `subprocess.Popen`.
- [ ] Task: Write unit tests for `ExternalEditorLauncher` argument building and configuration resolution.
- [ ] Task: Conductor - User Manual Verification 'Phase 2: Editor Launch Logic' (Protocol in workflow.md)
- [x] Task: Implement the `ExternalEditorLauncher` utility.
- [x] Create a new module/class in `src/external_editor.py`.
- [x] Implement a method to build the command-line arguments for diffing (e.g., handling `--diff` for VSCode or equivalent for 10xNotepad).
- [x] Implement the `launch_diff(editor_name, original_file_path, modified_file_path)` method using `subprocess.Popen`.
- [x] Task: Write unit tests for `ExternalEditorLauncher` argument building and configuration resolution.
- [x] Task: Conductor - User Manual Verification 'Phase 2: Editor Launch Logic' (Protocol in workflow.md)
## Phase 3: UI Integration (Approval Popup)
- [ ] Task: Add the "Open in External Editor" button to the UI.
- [ ] Modify `src/patch_modal.py` (or the equivalent file handling the `ConfirmDialog` UI).
- [ ] Add the button next to "Approve" and "Reject" when the action involves a file modification.
- [ ] Task: Connect the UI button to the launch logic.
- [ ] When the button is clicked, write the agent's proposed changes to a temporary file (if not already done).
- [ ] Call `launch_diff` with the selected editor, the original target file, and the temporary file.
- [ ] Task: Ensure the approval flow correctly reads the (potentially user-modified) temporary file when "Approve" is finally clicked, rather than the original agent output.
- [ ] Task: Conductor - User Manual Verification 'Phase 3: UI Integration' (Protocol in workflow.md)
- [x] Task: Add the "Open in External Editor" button to the UI.
- [x] Modify `src/patch_modal.py` (or the equivalent file handling the `ConfirmDialog` UI).
- [x] Add the button next to "Approve" and "Reject" when the action involves a file modification.
- [x] Task: Connect the UI button to the launch logic.
- [x] When the button is clicked, write the agent's proposed changes to a temporary file (if not already done).
- [x] Call `launch_diff` with the selected editor, the original target file, and the temporary file.
- [x] Task: Ensure the approval flow correctly reads the (potentially user-modified) temporary file when "Approve" is finally clicked, rather than the original agent output.
- [x] Task: Conductor - User Manual Verification 'Phase 3: UI Integration' (Protocol in workflow.md)
## Phase 4: Final Polish & Verification
- [ ] Task: Add UI configuration for the default editor in the "Project Settings" and "AI Settings" panels.
- [ ] Task: Run end-to-end simulation tests to verify the flow.
- [ ] Agent proposes a change -> Modal opens -> Click "Open in Editor" -> (Simulate external edit) -> Click Approve -> Verify final file state.
- [ ] Task: Conductor - User Manual Verification 'Phase 4: Final Polish & Verification' (Protocol in workflow.md)
- [x] Task: Add UI configuration for the default editor in the "Project Settings" and "AI Settings" panels.
- [x] Show configured editors list
- [x] Show configuration file locations
- [x] Task: Run end-to-end simulation tests to verify the flow.
- [x] Agent proposes a change -> Modal opens -> Click "Open in Editor" -> (Simulate external edit) -> Click Approve -> Verify final file state.
- [x] Task: Conductor - User Manual Verification 'Phase 4: Final Polish & Verification' (Protocol in workflow.md)