The inline composer is the assistant you reach without leaving the sentence you are writing. Press <kbd>Cmd</kbd> + <kbd>K</kbd> 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

<kbd>Cmd</kbd> + <kbd>K</kbd> in the markdown editor (<kbd>Ctrl</kbd> + <kbd>K</kbd> 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 | <kbd>Enter</kbd> | The answer streams straight into the document at your cursor, and the box closes when it is done |
| No selection | <kbd>Alt</kbd> + <kbd>Enter</kbd> | The answer appears in the popover only. An **Insert** button places it if you want it |
| A selection | <kbd>Enter</kbd> | The composer rewrites the selection in place and shows the result as an inline diff for you to accept or reject |
| A selection | <kbd>Alt</kbd> + <kbd>Enter</kbd> | The composer uses the selection as context for a question and answers in the popover |

<kbd>Esc</kbd> closes the box, <kbd>Shift</kbd> + <kbd>Enter</kbd> gives you a newline in the prompt. On macOS, <kbd>Alt</kbd> 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: <kbd>Alt</kbd> + <kbd>Y</kbd> accepts, <kbd>Alt</kbd> + <kbd>N</kbd> 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 |

> [!TIP]
> Use the inline composer for writing: expanding an outline, tightening a paragraph, drafting a table, translating a section. Use the chat panel when the job spans files, needs several steps, or should be reviewable later. See [[The AI Assistant]].

## 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.
- <kbd>Cmd</kbd> + <kbd>K</kbd> is the composer, not the command palette. The palette is <kbd>Cmd</kbd> + <kbd>P</kbd> for files and <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> for commands. See [[Keyboard Shortcuts]].

## Next steps

:::cards
- [[The AI Assistant]] — What the built-in assistant is, what it can touch, and the two modes.
- [[The Markdown Editor]] — Live WYSIWYG editing, slash commands, and how saving works.
- [[Context and Mentions]] — Mention files, attach images and PDFs, and control what the assistant sees.
- [[AI Credits and Usage]] — How AI usage is metered, the effort presets, and where to see spend.
:::
