# Reference: slash commands and keyboard shortcuts > Neutral description of the commands recognised at the terminal prompt of `mm`. They are matched on the whole trimmed line; anything else is sent to the model. ## Commands | Command | At the prompt | During a generation | |---------|---------------|---------------------| | `/quit` | Exits the program. | Cancels the generation, prints `Goodbye.`, exits. | | `/abort` | Prints `โš ๏ธ No generation in progress.` | Cancels the generation, prints `๐Ÿ›‘ Aborting...`; the commands already run stay in the history. | | `/compact` | Compresses the history now, regardless of the threshold; prints the `๐Ÿ—œ๏ธ` report, or `๐Ÿ—œ๏ธ nothing to compact` when no turn is older than `context.keepLastTurns`. | Sent to the model as a new message (see below). | | `/new` | Clears the history back to the system prompt, resets the loop detector and forgets the server's last token count; prints `๐Ÿ†• new session: N message(s) forgotten` (N counts every message except the system prompt). | Treated like any other text: cancels the generation, keeps its partial history, then runs as `/new` on that history. | An empty line at the prompt is ignored. ## `@path` in a question | Input | Effect | |-------|--------| | `@` at the start or after a space, bracket or quote | If the path exists (relative to the start directory, absolute, or `~/โ€ฆ`), a dim `๐Ÿ“Ž ` line is printed and `[attached file: ]` (or `[attached directory: โ€ฆ]`) is appended to the message the model receives. Trailing punctuation is ignored; each path is attached once. | | A `@` that names nothing on disk, or `@` glued to a word | Left as typed. | Details and examples: [Point the model at a file with `@path`](../how-to/attach-a-file.md). ## Any other text during a generation | Input | Behaviour | |-------|-----------| | A non-command line | Prints `๐Ÿ”„ New command received. Cancelling current task...`, cancels the current generation, keeps its partial history, then submits the new line as the next question. | ## Keyboard shortcuts | Key | At the prompt | During a generation | |-----|---------------|---------------------| | `Ctrl+C` | Prints `Goodbye.` and exits. | Prints `๐Ÿ›‘ Interrupted (Ctrl+C).` and cancels the generation; the prompt comes back. | | `Ctrl+D` (end of input) | Exits. | โ€” | ## Messages printed at the end of a turn | Message | Meaning | |---------|---------| | `๐Ÿ›‘ Generation aborted.` | The turn was cancelled (`/abort`, `Ctrl+C`). The question and any completed tool turns stay in the history. | | `[error: โ€ฆ]` | The provider explained a failure in one line; a question that got no answer is removed from the history. | | `โš™ N command(s)` | Number of `bash` commands that actually ran in the turn. | | `ยท ๐Ÿ“ N file op(s)` | Appended when file tools ran. | | `ยท ๐Ÿ“– N skill(s)` | Appended when skills were loaded. | | Numbered green list | The commands and file operations of the turn, one per line, when `displayCommands: true`. | ## ACP mode Two commands exist in ACP mode: `/new` and `/compact`. They are advertised to the editor through an `available_commands_update` notification and intercepted by `session/prompt` when the prompt text, trimmed, is exactly the command. Each answers with one `agent_message_chunk` carrying the line the terminal would print, then `stopReason: end_turn`; the model is not consulted. | Command | Over ACP | |---------|----------| | `/new` | Same as in the terminal: history back to the system prompt, token count forgotten; the session id, `cwd` and allow-always grants are kept. | | `/compact` | Same as in the terminal, always forced: `๐Ÿ—œ๏ธ compressed โ€ฆ`, `๐Ÿ—œ๏ธ nothing to compact: โ€ฆ` or `[compact: failed, history kept: โ€ฆ]`. Waits for a running turn to finish first. | `/quit` and `/abort` do not exist in ACP mode: the editor owns the process and ends it by closing stdin, and cancels a turn with its own stop key through `session/cancel`. See the [ACP reference](acp.md).