# 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).
