bots-garden/mini-mepublic Fork 0
d72271127802973540c648bfb372176cdaaa8e4f
Commits
Clone
git clone https://git.rickub.com/bots-garden/mini-me.git
git clone ssh://git@rickub.com/bots-garden/mini-me.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

💾 Saved. d722711 · on d72271127802973540c648bfb372176cdaaa8e4f · k33g · 7h ago
slash-commands.md · 58 lines · 3.9 KBmarkdown
Blame HistoryOpen raw

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
@<path> at the start or after a space, bracket or quote If the path exists (relative to the start directory, absolute, or ~/…), a dim 📎 <absolute path> line is printed and [attached file: <absolute path>] (or [attached directory: …]) is appended to the message the model receives. Trailing punctuation is ignored; each path is attached once.
A @<path> that names nothing on disk, or @ glued to a word Left as typed.

Details and examples: Point the model at a file with @path.

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.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# 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 |
|-------|--------|
| `@<path>` at the start or after a space, bracket or quote | If the path exists (relative to the start directory, absolute, or `~/…`), a dim `📎 <absolute path>` line is printed and `[attached file: <absolute path>]` (or `[attached directory: …]`) is appended to the message the model receives. Trailing punctuation is ignored; each path is attached once. |
| A `@<path>` 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).