The Inline Composer
The inline composer is the assistant you reach without leaving the sentence you are writing. Press Cmd + K in a markdown document and a small prompt box opens at your cursor. Ask for a paragraph and it writes it in place. Select text first and ask for a rewrite, which arrives as a diff you accept or reject.
Opening it
Cmd + K in the markdown editor (Ctrl + K on Windows and Linux). What it does next depends on whether you have text selected, and on which key you send the prompt with.
| You have | You press | What happens |
|---|---|---|
| No selection | Enter | The answer streams straight into the document at your cursor, and the box closes when it is done |
| No selection | Alt + Enter | The answer appears in the popover only. An Insert button places it if you want it |
| A selection | Enter | The composer rewrites the selection in place and shows the result as an inline diff for you to accept or reject |
| A selection | Alt + Enter | The composer uses the selection as context for a question and answers in the popover |
Esc closes the box, Shift + Enter gives you a newline in the prompt. On macOS, Alt is the Option key.
Reviewing a rewrite
A selection rewrite does not overwrite your text silently. The old version is marked in red, the replacement in green, and a small widget offers Accept and Reject. The keyboard works too: Alt + Y accepts, Alt + N rejects. Rejecting restores your original text exactly.
The composer expands the selection to whole blocks before the rewrite, so a rewrite that starts mid sentence still replaces whole paragraphs and leaves no fragments behind.
What it can do
Before it writes, the composer can search the web, look things up on GitHub and Wikipedia, and read and search your own files. "Summarise what we decided in the meeting notes" is a reasonable ask. You can also point it at specific files with an @ mention, exactly as in the chat panel. See Context and Mentions.
Its effort preset and your credit balance are in the footer of the popover, and they work the same way as in the chat. See AI Credits and Usage.
How it differs from the chat panel
| Inline composer | Chat panel | |
|---|---|---|
| Shape | One prompt, one answer | A conversation you come back to |
| Output | Text in the document you are editing | Files anywhere in your workspace |
| Can it change other files | No | Yes, in Write+Read mode |
| Durable | No. It runs while the page is open | Yes. Close the tab and it keeps going |
| Review | Inline accept or reject, immediately | Diffs plus a changeset card per run |
| History | Not saved | Saved, with a history list |
| Attachments | Not supported | Images and PDFs |
Notes
The inline composer lives in the markdown editor. Code files, drawings and boards do not have it.
It requires a plan, like the rest of the AI features.
Cmd + K is the composer, not the command palette. The palette is Cmd + P for files and Cmd + Shift + P for commands. See Keyboard Shortcuts.
Next steps
The AI AssistantWhat the built-in assistant is, what it can touch, and the two modes.
The Markdown EditorLive WYSIWYG editing, slash commands, and how saving works.
Context and MentionsMention files, attach images and PDFs, and control what the assistant sees.
AI Credits and UsageHow AI usage is metered, the effort presets, and where to see spend.