magi-code 0.77.1

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 command 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 conventions

- Production classifiers emit explicit commands; controller reducers apply effects. The mutable key-handler wrappers in `mod.rs` are test-only adapters.
- Let the top modal consume keys/mouse before global shortcuts. Hit tests must use the same viewport geometry as rendering.
- Derive help labels and key behavior from `keybindings.rs`, not separate binding lists.
- Preserve prompt selection, paste boundaries, multiline submit behavior, and command ordering when changing classification.
- Reuse `../autocomplete.rs` for matching/replacement and `../selection.rs` for byte-range selection models.
- File completion canonicalizes cwd, never follows directory symlinks, and returns sorted, deduplicated relative paths. Keep both candidate and visited-entry caps.
- Respect the supplied `.gitignore` toggle. The ignore-aware walker explicitly includes hidden files and disables global git ignores/excludes; do not document a nonexistent hidden-file setting.
- Raw terminal capture belongs upstream in the controller bridge. Clipboard/prompt/path contents must not become debug logs.