chore(conductor): Add new track 'External Text Editor Integration for Approvals'
This commit is contained in:
@@ -40,7 +40,6 @@ This file tracks all major tracks for the project. Each track has its own detail
|
||||
6. [ ] **Track: GUI Path Configuration in Context Hub**
|
||||
*Link: [./tracks/gui_path_config_20260308/](./tracks/gui_path_config_20260308/)*
|
||||
*Goal: Add path configuration UI to Context Hub. Allow users to view and edit configurable paths directly from the GUI.*
|
||||
|
||||
---
|
||||
|
||||
### Manual UX Controls
|
||||
@@ -53,8 +52,17 @@ This file tracks all major tracks for the project. Each track has its own detail
|
||||
*Link: [./tracks/saved_tool_presets_20260308/](./tracks/saved_tool_presets_20260308/)*
|
||||
*Goal: Make agent tools have presets. Add flags for tools related to their level of approval (auto, ask). Move tools to ai settings. Put tools in dynamic TOML-defined categories (Python, General, etc.). Tool Presets added to mma agent role options.*
|
||||
|
||||
9. [ ] **Track: External Text Editor Integration for Approvals**
|
||||
*Link: [./tracks/external_editor_integration_20260308/](./tracks/external_editor_integration_20260308/)*
|
||||
*Goal: Add support to open files modified by agents in external editors (10xNotepad/VSCode) for native diffing and manual editing during the tool approval flow.*
|
||||
|
||||
9. [ ] **Track: Manual UX Validation & Review**
|
||||
---
|
||||
|
||||
## Phase 3: Future Horizons
|
||||
*Initialized: 2026-03-06*
|
||||
*Updated: 2026-03-08*
|
||||
|
||||
1. [ ] **Track: Manual UX Validation & Review**
|
||||
*Link: [./tracks/manual_ux_validation_20260302/](./tracks/manual_ux_validation_20260302/)*
|
||||
|
||||
---
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# Track external_editor_integration_20260308 Context
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Implementation Plan](./plan.md)
|
||||
- [Metadata](./metadata.json)
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"track_id": "external_editor_integration_20260308",
|
||||
"type": "feature",
|
||||
"status": "new",
|
||||
"created_at": "2026-03-08T13:06:00Z",
|
||||
"updated_at": "2026-03-08T13:06:00Z",
|
||||
"description": "Add support to open files modified by agents in 10xNotepad or VSCode for diffing and manual editing during the approval flow."
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
# Implementation Plan: External Text Editor Integration for Approvals
|
||||
|
||||
## Phase 1: Configuration & Data Modeling
|
||||
- [ ] Task: Define the schema for external editor configuration.
|
||||
- [ ] Update `src/models.py` (or equivalent configuration parsing logic) to include a `text_editors` dictionary and `default_editor` string.
|
||||
- [ ] Task: Integrate configuration parsing.
|
||||
- [ ] Update `config.toml` loading to support a `[tools.text_editors]` section mapping names to paths/commands.
|
||||
- [ ] Update `manual_slop.toml` loading to support a project-level `default_editor` override.
|
||||
- [ ] 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)
|
||||
|
||||
## 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)
|
||||
|
||||
## 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)
|
||||
@@ -0,0 +1,34 @@
|
||||
# Specification: External Text Editor Integration for Approvals
|
||||
|
||||
## Overview
|
||||
This feature adds the ability to open files modified by AI agents in external text editors (such as VSCode or 10xNotepad) directly from the tool approval popup. This allows users to leverage their preferred editor's native diffing and editing capabilities before confirming an agent's changes.
|
||||
|
||||
## Functional Requirements
|
||||
- **Editor Configuration:**
|
||||
- **Global Paths:** `config.toml` will store a mapping of editor names to their executable paths (with common defaults for VSCode and 10xNotepad).
|
||||
- **Global Default:** `config.toml` will define a global default editor to use.
|
||||
- **Project Override:** `manual_slop.toml` will allow setting a project-specific default editor, overriding the global default.
|
||||
- **Approval Popup Integration:**
|
||||
- Add an "Open in External Editor" button to the tool execution confirmation modal (specifically for file modification tools like `write_file`, `replace`, etc.).
|
||||
- **Native Diff Viewing:**
|
||||
- When the button is clicked, the application will attempt to launch the configured external editor in a diff view mode (if supported by the editor's CLI arguments).
|
||||
- This will likely require saving the agent's proposed changes to a temporary file to compare against the original file.
|
||||
- **Approval Workflow:**
|
||||
- The user reviews and optionally modifies the changes in the external editor.
|
||||
- The user must save their changes in the external editor.
|
||||
- The user must then return to the Manual Slop GUI and click the standard "Approve" (or "Run") button on the popup to proceed with the execution. (The application must ensure it reads the *potentially modified* temporary file if the user edited it, or otherwise handle the updated state correctly before applying).
|
||||
|
||||
## Non-Functional Requirements
|
||||
- **Extensibility:** The configuration should easily allow adding new editors and their specific CLI diff arguments in the future.
|
||||
- **Robustness:** Gracefully handle cases where the configured editor path is invalid or the editor fails to launch.
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Users can define multiple text editor paths in `config.toml`.
|
||||
- [ ] Users can set a default editor globally and override it per-project.
|
||||
- [ ] The approval popup for file modifications includes an "Open in External Editor" button.
|
||||
- [ ] Clicking the button launches the selected editor, showing a diff between the original file and the proposed changes (where supported).
|
||||
- [ ] Users can modify the proposed changes in the external editor, save them, and then approve the changes in the GUI to apply the modified version.
|
||||
|
||||
## Out of Scope
|
||||
- Automatically detecting when the external editor closes to trigger auto-approval.
|
||||
- Complex three-way merge resolution within Manual Slop itself (relying entirely on the external tool for merge conflict resolution if it arises).
|
||||
Reference in New Issue
Block a user