How It Works
The--- delimiter (three or more dashes) controls multiline mode:
- Open: Type
---on a line by itself and press Enter - Write: Each Enter adds a new line (does not submit)
- Close and send: Type
---again on a line by itself
The delimiter accepts 3 or more dashes (
---, ----, -----, etc.). They all work the same way.Examples by Mode
Chat Mode (main prompt)
Coder Mode (waiting for user response)
When the AI in/coder mode asks a question and waits for your response, you can also use multiline:
Agent Mode
The same mechanism works in/agent mode when the system requests user input.
Cancelling Multiline
| Mode | How to cancel | Result |
|---|---|---|
| Chat | Ctrl+C | Discards all accumulated text, shows [multiline cancelled] |
| Agent/Coder | Ctrl+C | Cancels the current operation (default Ctrl+C behavior) |
Continuation Prompt
While multiline mode is active, the prompt changes to show the line number:When to Use
Complex Instructions
When your request has multiple requirements or constraints that are clearer organized on separate lines.
Detailed Responses
When the AI asks something in Coder mode and you need to provide several pieces of information at once (database, host, credentials, etc.).
Structured Context
When you want to send a specification, task list, or bug description formatted in multiple lines.
Code Snippets
When you need to paste or type a code snippet as part of the message.
Technical Details
- The
MultilineBuffercomponent is shared across all modes - In Chat mode, go-prompt displays the continuation prompt via
changeLivePrefix - In Agent/Coder mode,
readMultiline()reads from the centralizedstdinLineschannel - Empty lines (Enter without text) are included normally in the multiline content
- The opening and closing delimiters are not included in the final text