magi-code 0.80.2

Repository-aware CLI coding agent for terminal work
Documentation
# Input agent guide

## Where to look

| Task | Location |
| --- | --- |
| Commands, action/display split, viewports | `mod.rs` |
| Binding truth and help labels | `keybindings.rs` |
| Enter/send and multiline parsing | `submit_command.rs` |
| Slash, skill, context, file candidates | `autocomplete_sources.rs` |
| Modal ownership and settings scope | `modal.rs` |
| Hit testing and selection intent | `mouse.rs` |
| Terminal clipboard handoff | `clipboard.rs` |

## Local contracts

- Production classifiers emit commands; controller reducers apply effects. Mutable key-handler wrappers in `mod.rs` are test adapters.
- Let the top modal consume input before global shortcuts. Hit tests must share rendering geometry, including small viewports.
- Derive help labels and behavior from `keybindings.rs`, not independent binding lists.
- Preserve prompt selection, paste boundaries, multiline submission, and command ordering.
- Reuse `../autocomplete.rs` for matching/replacement and `../selection.rs` for byte-range selection models.
- File completion canonicalizes cwd and delegates walking to `crate::tools::autocomplete_file_paths`. Pass the `.gitignore` toggle and both candidate/visited-entry limits; keep traversal policy in that shared tool helper rather than adding a TUI walker.
- Convert only paths under the canonical root to slash-normalized relative candidates, then sort and deduplicate. Walking/canonicalization failure produces no candidates.
- Raw terminal capture belongs in `../controller/input_bridge.rs`. Clipboard, prompt, and path contents must not become debug logs.