bots-garden/mini-mepublic Fork
⑂ feature/llmman-provider
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.

Download ZIP
🛟 Updated. 9136e38 · on feature/llmman-provider · k33g · Sep 21, 2026
use-the-window-mode.md · 78 lines · 7.1 KBmarkdown
Blame HistoryOpen raw

How to use the window mode (mm -tui)

This guide shows how to run mini-me as a single full-screen window — the conversation above, a box to type in below — instead of the line-by-line REPL. It assumes you already run mm from a project directory.

Steps

  1. Start the window from the project directory:

    mm -tui agent.dmr.yaml
    

    Or set tui: true in the YAML and start mm as usual. The banner that the line mode prints is shown as the first line of the conversation.

  2. Type your question in the box at the bottom and press Enter. A long line wraps at word boundaries inside the box (a word longer than a row is cut at the edge); the box keeps its three rows and scrolls them so the cursor's row stays visible, and ↑/↓ move the cursor from row to row. For a second paragraph, press Ctrl-J (or Alt-Enter where your terminal reports it) instead of Enter. A pasted block is inserted whole, never sent; a long one is collapsed into a [Pasted #1 · …] token (see below).

  3. Watch the answer stream into the conversation. Each tool call is one framed line — ‣ bash ls -1 ✓ done 0.03s — followed by its output, folded to previewLines lines; the +/- lines of a file edit are coloured.

  4. Press Esc to stop a running turn. Typing a new question and pressing Enter while a turn runs also stops it; the new question runs once the old one has settled.

  5. Type / at the start of the box to open the command picker: ↑/↓ choose, Tab completes, Enter sends a complete command. /help (or F1) lists the commands and keys in the conversation.

  6. Leave with /quit, at any moment — during a turn too. Ctrl-C cancels a running turn and quits when nothing is running.

  7. If a turn will not stop — the engine stopped answering, a tool is blocked — press Esc once more: the window says ⚠️ The turn is not answering the cancellation — press Ctrl-C (or /quit) to leave mm. Then /quit, or a second Ctrl-C, closes the window without waiting for it. The session file keeps everything up to the last completed turn.

Variants

  • Ask before every bash and file tool. Set permissions: ask in the YAML. The box is replaced by the question ? bash: rm -rf build and three keys answer it: a allow once, s allow this tool for the session, r (or Esc) reject. A rejected tool tells the model [command rejected by the user]. The default, auto, runs tools as the line mode always has.
  • Point the model at a file. @path works exactly as in the line mode: existing paths are attached and echoed as 📎 lines. See Point the model at a file with @path.
  • Keep and resume sessions. With sessions.enabled: true, the header shows the session id being saved; /sessions and /resume work as in the line mode. See Keep sessions and resume them.
  • Scroll the conversation. PgUp/PgDn page; Tab moves the focus to the conversation so ↑/↓, Home and End scroll it; End resumes following the end. Ctrl-L clears the displayed conversation without touching the history. The mouse wheel scrolls only after F2 (see below).
  • Not a terminal. mm -tui | tee log.txt, or any run where stdin or stdout is not a terminal, prints [tui: stdin or stdout is not a terminal — running the line mode] and runs the line mode. Nothing else changes.

Copy text out of the window

The window leaves the mouse to the terminal: click and drag selects text exactly as in any terminal, and your terminal's copy shortcut copies it. The status bar says F2 mouse: off. Press F2 to hand the mouse to the window instead — the wheel then scrolls the conversation and the status bar says mouse: on (Shift+drag selects); in most terminals, holding Shift while dragging still selects. F2 again gives the mouse back.

To copy an answer without selecting it:

Input Copies
/copy or Ctrl-Y The last answer, as raw text: no 🤖 prefix, no wrapping, no tool frames.
/copy 2 The answer before the last one (3 the one before that, and so on).
/copy all The whole conversation as plain text: questions prefixed with > , answers raw, tool calls as one heading line plus their output.

The confirmation names the road taken, 📋 copied 1 240 chars (pbcopy), because two exist and they are not equally reliable:

  1. A native tool found on PATH: pbcopy on macOS, wl-copy on Wayland, xclip or xsel on X11. This is the reliable path on a Mac.
  2. Otherwise OSC 52, the escape sequence some terminals honour to set the clipboard. It works over SSH and in iTerm2 (allow it under Preferences → General → Selection), Ghostty, kitty and WezTerm; macOS Terminal.app ignores it silently. With no tool and no terminal, /copy says ⚠️ no clipboard: ….

The line mode has /copy and /copy 2 too, through the same roads; /copy all is window-only, since the terminal's scrollback is already selectable there.

Paste long text

A pasted block is never sent by itself: its line breaks become new lines in the box. When the block is longer than the box — more than 3 lines, or more than 200 characters — the box shows a single token instead of the text:

> explain this stack trace [Pasted #1 · 42 lines · 1.2k chars] and the fix in [Pasted #2 · 5 lines · 310 chars]

The token behaves as one character: ←/→ step over it, Backspace or Delete removes it whole together with the pasted text, and you keep typing around it. Several pastes in one message are numbered in the order you pasted them.

On Enter, the model receives your sentence with each token replaced by the full pasted text, byte for byte, line breaks included. Nothing is shortened or summarised. The conversation, on the other hand, keeps showing the token, so a long paste does not push the exchange off the screen; the persisted session and /copy all carry the full question.

Two details follow from "a paste is data you brought, not something you typed":

  • @path mentions inside a pasted block are not looked up; only the ones you typed yourself attach a file (see @path).
  • A /command inside a paste is text for the model, not a command.

Pastes shorter than the threshold are inserted as text, exactly as before. Bracketed paste must be supported by the terminal for any of this to work: Terminal.app, iTerm2, Ghostty and kitty support it; inside tmux, a paste is passed through as bracketed only when the outer terminal and tmux both support it (tmux does since 1.8; set -g needs no option for pass-through, but a paste-buffer without -p sends the text as plain keys, which then arrive as typed characters and are inserted one by one).

See also

 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# How to use the window mode (`mm -tui`)

This guide shows how to run mini-me as a single full-screen window — the conversation above, a box to type in below — instead of the line-by-line REPL. It assumes you already run `mm` from a project directory.

## Steps

1. Start the window from the project directory:

   ```bash
   mm -tui agent.dmr.yaml
   ```

   Or set `tui: true` in the YAML and start `mm` as usual. The banner that the line mode prints is shown as the first line of the conversation.

2. Type your question in the box at the bottom and press **Enter**. A long line wraps at word boundaries inside the box (a word longer than a row is cut at the edge); the box keeps its three rows and scrolls them so the cursor's row stays visible, and ↑/↓ move the cursor from row to row. For a second paragraph, press **Ctrl-J** (or Alt-Enter where your terminal reports it) instead of Enter. A pasted block is inserted whole, never sent; a long one is collapsed into a `[Pasted #1 · …]` token (see below).

3. Watch the answer stream into the conversation. Each tool call is one framed line — `‣ bash  ls -1  ✓ done  0.03s` — followed by its output, folded to `previewLines` lines; the `+`/`-` lines of a file edit are coloured.

4. Press **Esc** to stop a running turn. Typing a new question and pressing Enter while a turn runs also stops it; the new question runs once the old one has settled.

5. Type `/` at the start of the box to open the command picker: ↑/↓ choose, **Tab** completes, **Enter** sends a complete command. `/help` (or **F1**) lists the commands and keys in the conversation.

6. Leave with `/quit`, at any moment — during a turn too. **Ctrl-C** cancels a running turn and quits when nothing is running.

7. If a turn will not stop — the engine stopped answering, a tool is blocked — press **Esc** once more: the window says `⚠️ The turn is not answering the cancellation — press Ctrl-C (or /quit) to leave mm.` Then `/quit`, or a second **Ctrl-C**, closes the window without waiting for it. The session file keeps everything up to the last completed turn.

## Variants

- **Ask before every `bash` and file tool.** Set `permissions: ask` in the YAML. The box is replaced by the question `? bash: rm -rf build` and three keys answer it: `a` allow once, `s` allow this tool for the session, `r` (or Esc) reject. A rejected tool tells the model `[command rejected by the user]`. The default, `auto`, runs tools as the line mode always has.
- **Point the model at a file.** `@path` works exactly as in the line mode: existing paths are attached and echoed as `📎` lines. See [Point the model at a file with `@path`](attach-a-file.md).
- **Keep and resume sessions.** With `sessions.enabled: true`, the header shows the session id being saved; `/sessions` and `/resume` work as in the line mode. See [Keep sessions and resume them](keep-sessions.md).
- **Scroll the conversation.** PgUp/PgDn page; **Tab** moves the focus to the conversation so ↑/↓, Home and End scroll it; End resumes following the end. **Ctrl-L** clears the displayed conversation without touching the history. The mouse wheel scrolls only after **F2** (see below).
- **Not a terminal.** `mm -tui | tee log.txt`, or any run where stdin or stdout is not a terminal, prints `[tui: stdin or stdout is not a terminal — running the line mode]` and runs the line mode. Nothing else changes.

## Copy text out of the window

The window leaves the mouse to the terminal: click and drag selects text exactly as in any terminal, and your terminal's copy shortcut copies it. The status bar says `F2 mouse: off`. Press **F2** to hand the mouse to the window instead — the wheel then scrolls the conversation and the status bar says `mouse: on (Shift+drag selects)`; in most terminals, holding Shift while dragging still selects. F2 again gives the mouse back.

To copy an answer without selecting it:

| Input | Copies |
|-------|--------|
| `/copy` or **Ctrl-Y** | The last answer, as raw text: no `🤖` prefix, no wrapping, no tool frames. |
| `/copy 2` | The answer before the last one (`3` the one before that, and so on). |
| `/copy all` | The whole conversation as plain text: questions prefixed with `> `, answers raw, tool calls as one heading line plus their output. |

The confirmation names the road taken, `📋 copied 1 240 chars (pbcopy)`, because two exist and they are not equally reliable:

1. A native tool found on `PATH`: `pbcopy` on macOS, `wl-copy` on Wayland, `xclip` or `xsel` on X11. This is the reliable path on a Mac.
2. Otherwise **OSC 52**, the escape sequence some terminals honour to set the clipboard. It works over SSH and in iTerm2 (allow it under *Preferences → General → Selection*), Ghostty, kitty and WezTerm; **macOS Terminal.app ignores it silently**. With no tool and no terminal, `/copy` says `⚠️ no clipboard: …`.

The line mode has `/copy` and `/copy 2` too, through the same roads; `/copy all` is window-only, since the terminal's scrollback is already selectable there.

## Paste long text

A pasted block is never sent by itself: its line breaks become new lines in the box. When the block is longer than the box — **more than 3 lines, or more than 200 characters** — the box shows a single token instead of the text:

```
> explain this stack trace [Pasted #1 · 42 lines · 1.2k chars] and the fix in [Pasted #2 · 5 lines · 310 chars]
```

The token behaves as one character: ←/→ step over it, **Backspace** or **Delete** removes it whole together with the pasted text, and you keep typing around it. Several pastes in one message are numbered in the order you pasted them.

On **Enter**, the model receives your sentence with each token replaced by the full pasted text, byte for byte, line breaks included. Nothing is shortened or summarised. The conversation, on the other hand, keeps showing the token, so a long paste does not push the exchange off the screen; the persisted session and `/copy all` carry the full question.

Two details follow from "a paste is data you brought, not something you typed":

- `@path` mentions **inside** a pasted block are not looked up; only the ones you typed yourself attach a file (see [`@path`](attach-a-file.md)).
- A `/command` inside a paste is text for the model, not a command.

Pastes shorter than the threshold are inserted as text, exactly as before. Bracketed paste must be supported by the terminal for any of this to work: Terminal.app, iTerm2, Ghostty and kitty support it; inside **tmux**, a paste is passed through as bracketed only when the outer terminal and tmux both support it (tmux does since 1.8; `set -g` needs no option for pass-through, but a `paste-buffer` without `-p` sends the text as plain keys, which then arrive as typed characters and are inserted one by one).

## See also

- [Command line](../reference/cli.md) — the `-tui` flag and the window-mode specifics
- [Slash commands](../reference/slash-commands.md) — the keys of the window
- [Configuration file](../reference/configuration.md) — `tui` and `permissions`
- [Architecture: one loop, three front ends](../explanation/architecture.md) — why the window is a third front end on the same sink