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 haveYou pressWhat happens
No selectionEnterThe answer streams straight into the document at your cursor, and the box closes when it is done
No selectionAlt + EnterThe answer appears in the popover only. An Insert button places it if you want it
A selectionEnterThe composer rewrites the selection in place and shows the result as an inline diff for you to accept or reject
A selectionAlt + EnterThe 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 composerChat panel
ShapeOne prompt, one answerA conversation you come back to
OutputText in the document you are editingFiles anywhere in your workspace
Can it change other filesNoYes, in Write+Read mode
DurableNo. It runs while the page is openYes. Close the tab and it keeps going
ReviewInline accept or reject, immediatelyDiffs plus a changeset card per run
HistoryNot savedSaved, with a history list
AttachmentsNot supportedImages 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

682 words