1# Inline Assistant
2
3## Using the Inline Assistant
4
5You can use `ctrl-enter` to open the Inline Assistant nearly anywhere you can enter text: editors, the agent panel, the prompt library, channel notes, and even within the terminal panel.
6
7The Inline Assistant allows you to send the current selection (or the current line) to a language model and modify the selection with the language model's response.
8
9You can use `ctrl-enter` to open the inline assistant nearly anywhere you can write text: editors, the Agent Panel, the Rules Library, channel notes, and even within the terminal panel.
10
11You can also perform multiple generation requests in parallel by pressing `ctrl-enter` with multiple cursors, or by pressing `ctrl-enter` with a selection that spans multiple excerpts in a multibuffer.
12
13## Context
14
15You can give the Inline Assistant context the same way you can in the agent panel, allowing you to provide additional instructions or rules for code transformations with @-mentions.
16
17A useful pattern here is to create a thread in the [Agent Panel](./agent-panel.md), and then use the `@thread` command in the Inline Assistant to include the thread as context for the Inline Assistant transformation.
18
19The Inline Assistant is limited to normal mode context windows (see [Models](./models.md) for more).
20
21## Prefilling Prompts
22
23To create a custom keybinding that prefills a prompt, you can add the following format in your keymap:
24
25```json
26[
27 {
28 "context": "Editor && mode == full",
29 "bindings": {
30 "ctrl-shift-enter": [
31 "assistant::InlineAssist",
32 { "prompt": "Build a snake game" }
33 ]
34 }
35 }
36]
37```