Command terminal and AI

Run app commands and set up a connection profile for AI chat.

Open the terminal

Ctrl+Space, or View → Command Terminal, opens a separate window. Typing / lists the available commands.

OperationKey or command
Select a suggestion / complete it↑ ↓ / Tab
Run it / add a line breakEnter / Shift+Enter
Close the suggestions / the windowEsc
Save/save
Search in the document/find
Export PDF/exportpdf
Clear the log/clear

If your input method editor (IME) intercepts Ctrl+Space, assign another shortcut under Settings → Shortcuts.

Set up an AI connection

Before using AI chat, configure a connection to a service or local server that supports the OpenAI-compatible Chat Completions format.

  1. Open Settings → External Tools → AI Chat and add a connection profile.
  2. Enter the endpoint, the model name and, where required, the API key given by the service.
  3. Use Fetch Models to confirm the connection and list the available models.
  4. Choose Use this profile and save the settings.
  5. In the terminal, type /ai summarise the main points of this document and send it.

The endpoint has to be HTTPS. HTTP is allowed only for a loopback address on the same PC. The terms and pricing of an AI service are set by that service.

The document you currently have open is attached automatically to every request. Your message, the referenced files, the conversation history and the instructions in the profile are sent as well. Check the current tab and the connection before you send.

Ask about specific documents

@ attaches further files. To get suggestions for them, open a folder in the file explorer first.

/ai @docs/spec.md summarise the differences between the spec and this document

@notes.md refers to a file in the open folder, and @/notes.md refers to an open tab. Put paths containing spaces in quotes, as in @"my notes.md". Each message can reference up to five text files, with a maximum size of 2 MB per file.

Bring a reply into the document

CommandWhat it does
/aiShows the reply in the terminal
/ai-fileSaves the reply as a new .md file and opens it
/ai-editReplaces the selected text in the editor with the reply. If nothing is selected, it replaces the entire document referenced with @

/ai-edit does not save the file automatically. Review the replacement before saving; press Ctrl+Z to undo it. If you switch tabs or edit the selected text while waiting for a reply, the reply may open in a new tab instead of replacing the original text.

To stop a request in progress, choose Cancel in the log. Only one AI request can run at a time.

Switch conversations and models

CommandWhat it is for
/ai-newStarts a new conversation. Previously saved sessions are kept
/ai-resumeResumes a saved conversation
/ai-searchSearches conversation names and text, and resumes one
/ai-change-modelSwitches to another connection profile
/ai-statusShows the connection, the model and the size of the context in use

Input without a leading / is not sent by default. Turn on Send input without / to AI chat only if you want that. AI is also unavailable while the license does not allow editing.

Shortcuts are listed with their default assignments. If you have changed them, check the current keys in the in-app help (F12).