# Chat

Talk to Lyna AI to build, change and explain your project. Start from suggestions, send messages and commands, follow each step live on any tab, read code and data in the answers, and undo any change.

The chat panel on the right of the editor is where you work with Lyna AI. It reads your project, edits files, runs and checks the preview, and shows every step as it goes.

The chat panel with a user message, the AI's steps, a version card and the composer.

## What you can do

- Start a chat from suggestions built from your project.
- Ask for a feature, a fix or an explanation in plain words.
- Pick a chat mode (Build, Plan or Ask), a model and, on some models, a thinking effort.
- Run commands, skills and connectors with `/`. They show as colored tags.
- Attach images, screenshots and Figma frames, or dictate with your voice.
- Add files, folders, web addresses, Git changes and problems with `@`.
- Point Lyna AI at a component, a block or a site template of Lyna's library with `@`.
- Follow each step while Lyna AI works, and send more messages without waiting.
- Reload the page, switch conversations or open another tab: a running reply keeps going.
- Read code and database results in the answers, and copy them.
- Like or dislike an answer, and say why one did not help.
- Answer Lyna AI's questions and approve sensitive actions.
- Preview, revert or bookmark the version each turn creates.
- Keep several conversations and go back to any of them.

## Start a chat

A new chat starts from your project. Just above the message box, a question asks what Lyna should build, plan or explain (it follows the mode you picked), one line says how your project is doing (its pages, the page on screen, anything to fix) and a short list of suggestions made for this project follows. A suggestion can be **Fix 2 errors in the preview**, **Fix 3 broken links**, **Change the selected button** or **Improve the Home page**. When there is nothing to fix, you get suggestions such as **Plan a new feature** and **Review my project**.

A new chat with the question about the project, the line on its state and the Suggestions list above the message box.

- Pick a suggestion to put its message in the composer. Read it, finish it if you want, then send it. Nothing is sent until you press `Enter`.
- Move through the list with the arrow keys and press `Enter` to pick a suggestion; `Tab` goes to the message box.
- A suggestion marked **Fix now** is the one that starts at once: it sends the errors to Lyna AI to fix.
- In Design mode, the first line of the list reminds you to click an element on the page; once you select one, it becomes a suggestion to change it.
- When you come back to a project, **Continue** opens your last conversation.

Start a fresh conversation with **New Chat**, `Cmd/Ctrl + L`, or `/clear`. Your earlier conversations stay in **Chat History**, grouped by day, with a search.

## The composer

| Control                  | What it does                                                                                                   |
| ------------------------ | -------------------------------------------------------------------------------------------------------------- |
| **Mode menu**            | Switch between **Build**, **Plan** and **Ask**. See [Chat modes](/features/ai/chat-modes).                     |
| **Model picker**         | Choose the model for this project. See [Models and providers](/features/ai/models-and-providers).              |
| **Thinking effort**      | On models that support it. See [Effort](/features/ai/effort).                                                  |
| **+ menu**               | Knowledge, file reference, attachments, skills, image and video generation, and **Keep working when I leave**. |
| **Voice input**          | Dictate your message.                                                                                          |
| **Send / Stop response** | Send your message, or stop Lyna AI while it works.                                                             |

Press `Enter` to send and `Shift + Enter` for a new line.

### Commands, skills and connectors as tags

Type `/` to open the menu of commands and skills. A command you type, such as `/plan`, turns into a colored tag as soon as Lyna knows it, so you can see that it will run. The color tells you what kind it is:

| Color  | Kind                                  |
| ------ | ------------------------------------- |
| Blue   | A built-in command                    |
| Purple | A skill                               |
| Green  | A connector (a tool server you added) |
| Orange | A command you or your team wrote      |

The composer with a blue command tag typed in the text and a purple skill tag above the message.

A skill you pick from the menu joins your message as a tag above the text. Remove it with its remove button, with the mouse or the keyboard. A tag you typed goes away whole with one press of `Backspace` or `Delete`. After you send, your message in the chat shows the same tags. See [Slash commands](/features/ai/slash-commands) and [Skills](/features/ai/skills).

## Give context

- **Select an element** on the canvas before you write. Lyna AI gets that element as context, so "change this image" means the image you selected. `Cmd/Ctrl + Shift + L` adds the selection to the chat.
- **Mention** files and more with `@`. See [Mentions and context](/features/ai/mentions-and-context).
- **Reference** a component, a block or a site template of Lyna's library with `@`, after a look at its live preview. See [References with @](/features/ai/references).
- **Attach** an image or a screenshot. See [Attachments and screenshots](/features/ai/attachments-and-screenshots).

## While Lyna AI works

Each step shows in the chat as it happens: the files Lyna AI reads, the edits it makes with their changes, the checks it runs on the preview, and a short summary of its reasoning when the model gives one. Finished steps fold into a group with their counts, so a long turn stays easy to read. A step that fails stays open.

A reply in progress with its thinking status, a group of finished steps and a file edit card with its added and removed lines.

In **Build**, Lyna AI's replies speak of your pages, sections and content rather than of files and checks. It names files and checks when your message talks about code, or when you work in Code mode.

To stop the turn, choose **Stop response**. The work already done is kept.

### Files Lyna AI reads

A step that reads files names them, such as **Read 2 files**, with one chip per file. Open it to see each file with its path and the lines Lyna AI read, numbered as in your code. The buttons beside a file open it in Code at those lines, or copy it. A long file folds, and a button such as **Show all 120 lines** opens every line.

### Send more while it works

You can send more messages without waiting. Choose how they are handled in **Settings > AI > Chat behavior > Follow-up mode**:

- **Queue**: your messages wait above the composer and are sent one by one when Lyna AI is done. While Lyna AI works, the send button shows **Add to queue**, and on a computer the empty message box reminds you of the keys: **Enter** to queue, **Cmd+Enter** (**Ctrl+Enter** on Windows and Linux) to send now.
- **Steer**: your message joins the current work, and Lyna AI reads it at its next step, so you can change direction without losing what it did. A message that can't join, such as one with an attachment, waits in the queue instead.

Each queued message shows its place in line, and always has one button that sends it now, whose name says what that does:

- **Send now** sends it at once when nothing is running, or adds it to the current work: Lyna AI reads it after the current step.
- **Stop and send** shows when the current work can't take it, such as a message with an attachment: Lyna AI stops, keeps what it already did, and reads your message next.
- **Skip the question and send** shows while Lyna AI waits for your answer to a question: the question is left unanswered and your message goes in its place.
- **Decline and send** shows while a step waits for your approval: the step doesn't run, and your message goes next.
- **Retry** shows when a message couldn't be sent.

Its menu holds **Edit** and **Remove**, and **Stop and send** when you'd rather stop the work than add to it. **Edit** changes the message where it is: press **Enter** to save or **Esc** to cancel. With two messages or more, drag one by its handle, or press **Alt** and an arrow key, to change the order; the order stays the same if you reload the page. **Clear**, above the messages, removes them all, and **Undo** brings them all back.

To send what you typed now, press **Cmd+Enter** on a Mac or **Ctrl+Enter** on Windows and Linux while Lyna AI works or waits for your answer. Only your new message goes, the way a queued message's button would send it, and the queued messages keep their order.

When you press **Stop**, or when a reply fails or stops because your credits ran out, the queue is paused: it says **Queue paused**, and nothing is sent on its own. Press **Resume** to send the messages again in their order, or send one by its own button.

While Lyna AI works through a plan, the next message in line shows a thin progress line, and the status under the reply counts the steps done, such as **2/5 · 12s**.

Two queued messages above the composer, each with its Send, Edit and Cancel buttons.

## Reload, switch or open another tab

Each conversation keeps its own reply, and what you do with the page never cuts it short:

- **Switch conversations.** A reply keeps going while you open another conversation. Come back and it is still live, or finished. The History marks each conversation whose reply runs, and none of them can be deleted until its reply ends: the menu says **Wait for the reply to finish**.

- **Reload the page, or open the project in another tab or on another device** with your account. Lyna AI keeps working, and the new page shows the reply live, with its **Stop response** button. Until the reply ends, the message box says **Still running. You can send once it ends.**

- **The page you left** shows **Project taken over** and **This project was opened on another device. Refresh to continue here.**, with **Continue here** to bring the project back to that page. It shows no card that says the reply stopped: the reply goes on in the newest page.

- **A teammate's reply.** When another member of the project started the reply, you follow it live, but you cannot stop it or send a message: the message box says **This reply is running in another tab. You can follow it here.**

- **A server problem.** A reply cut by a problem on Lyna's servers picks up again on its own from its last saved step, within about 20 seconds while the chat is open, or when you come back within 30 minutes; after that the chat shows **Continue**. See [When a reply cannot finish](/features/ai/questions-approvals-and-errors#when-a-reply-cannot-finish).

One rule decides on every page: a reply you started is yours, and its Stop works wherever you open the project; a reply another person started is theirs, and you watch it.

A reply still stops when the project restarts on a new cloud machine, or when another session takes the reply over. Its card then says **This turn stopped: the project moved to a new machine, or another session took over the reply. Send your message again to go on.**

When you leave the project, by closing its last tab or going back to your projects, the reply stops at its next step. To let Lyna AI finish, turn on **Keep working when I leave** in the **+** menu before you send: it applies to your next message, for up to 30 minutes.

A few steps run in the browser that sent the message. When that browser is gone, the reply says **This reply waits for a step that runs in the browser that sent it.** Choose **Continue here** to run the step on this page.

## Every action gets an answer

Send, an answer to a question, **Stop response**, **Retry** and an approval each do what you asked, or say in one line why they did not. A button never stays busy without an outcome. For example:

| You choose                                         | When it cannot run now, the chat says                          |
| -------------------------------------------------- | -------------------------------------------------------------- |
| Send while the conversation loads                  | **This conversation is still loading. Try again in a moment.** |
| **Retry** while Lyna AI works                      | **Lyna is still working. You can retry once the reply ends.**  |
| **Stop response** when nothing runs                | **Nothing is running, so there is nothing to stop.**           |
| An answer to a question that a newer one replaced  | **A newer question replaced this one.**                        |
| An approval of a request that a newer one replaced | **A newer request replaced this one.**                         |

When your answer to a question does not leave, the question comes back with your picks kept, and says **Your answer was not sent. Your pick is kept: try again.**

## Code and data in answers

Lyna AI answers in the language you write in. When you write in English or French, its replies, its cards and their buttons, the follow-up suggestions and the line that closes a build use it, whatever the language of the app. It talks about your pages, sections and text rather than files and code, unless you ask about code or work in Code mode.

### Code cards

Code in an answer shows in the same card as the code panel, with colors for the language and a **Copy code** button. A database query shows its SQL with **Copy SQL**.

An answer with a code card showing highlighted code and the Copy code button.

### Data tables

When Lyna AI reads data from your database, the result shows as a table: one column per field, with a sign for its type (text, number, date, yes or no). Open a row to see every field. Choose **Copy as CSV** or **Copy as JSON** to take the rows with you. On a narrow panel, each row shows as a short card.

A database query result in the chat as a table of rows, with the row count and the Copy as CSV and Copy as JSON buttons.

## Rate an answer

Under each answer, choose **Like** or **Dislike**. On a phone, both are in **More**. After **Dislike**, **Help us improve** asks why the answer did not help: pick one or more reasons (**The design isn't right**, **The feature doesn't work**, **Forgot what I said before**, **Didn't communicate well** or **Other**), add a comment if you want, then choose **Send**. Choose **Skip** to keep the dislike with no reason. Choose **Dislike** again to remove it.

## Questions, approvals and errors

When Lyna AI needs a choice from you, it asks in a card above the message box, in every mode, never as a question buried in its text. Before it changes something outside your project's files, such as your database, it shows what it will do and waits for your approval. When your app has errors, a bar above the composer lists them with a **Fix** button. Each of these cards has its own guide: [Questions, approvals and errors](/features/ai/questions-approvals-and-errors).

### One card at a time

The cards that wait for you stand in one place just above the message box, one at a time: a decision first (an approval, then a question), then a credits pause (**Ready to continue** or **Add credits to continue**), then the steps of a plan. The cards waiting behind the one shown peek out under its edge. When a new card arrives, it takes that place: the message box stays where it is, and the conversation keeps its last line in view.

An approval card above the message box, with the edge of a waiting question card peeking out under it, and the conversation above.

While Lyna AI works, the live step card names the files the step writes and the plan it builds, up to three, then **+2 more files**, which opens the turn's details. The card grows only when a row arrives, and its top never moves. Its title names the step it is on, such as writing files or running a check. The live status line sits under the card for the whole reply, so the card stays put. A short sentence Lyna AI writes between steps keeps the place it took when it arrived; once the turn ends, its last sentence shows as the answer.

## Versions and undo

Each turn that changes files ends with a version card. Choose **Preview** to look at that version, **Revert to this version** to go back, or **Bookmark this version**. On your own messages you can **Retry**, **Edit** or **Copy**. See [Version history](/features/projects/version-history).

The version card at the end of a turn with the Preview, Revert to this version and bookmark buttons.

## What Lyna checks for you

Every message is checked before Lyna AI reads it, and every turn is checked when it ends. Most of the time you see nothing. When a check acts, a short note in the chat says what happened and what you can do.

| Situation                                               | What it means for you                                                                                                                                                                                                                                                                      |
| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| You paste a key or a token in a message                 | It is hidden before Lyna AI reads it, so it never lands in your code or your history. To give your app a secret, add it in [Secrets](/features/cloud/secrets).                                                                                                                             |
| A turn writes a secret into your code                   | The chat asks you to move it to your edge function secrets before you publish, so visitors cannot read it.                                                                                                                                                                                 |
| A web page or a file Lyna AI reads contains orders      | Lyna AI treats what it reads as information, never as instructions. It asks you before any sensitive action.                                                                                                                                                                               |
| You send messages very fast, or a very long message     | The note says how long to wait, or how to shorten it.                                                                                                                                                                                                                                      |
| A request looks like phishing, impersonation or malware | Lyna AI refuses it.                                                                                                                                                                                                                                                                        |
| You paste plain HTML                                    | Lyna builds React apps. Your HTML is used as the design and turned into React components, so the page stays editable. If a turn breaks the app's setup, the broken files go back to their last working version.                                                                            |
| A first build or a redesign is done                     | Lyna AI looks at the page on a computer and on a phone screen and fixes what it finds, such as text too small to read, a button with no name or a first screen that cuts off the main action. A card shows the two screens and what was fixed. When the check cannot run, a note says why. |
| A turn uses an icon name that does not exist            | Lyna swaps it for the closest real icon, and a brand logo (GitHub, Instagram, X) for the matching logo it adds to your project, so your app keeps building. The chat says what was swapped.                                                                                                |

> [!NOTE]
>
> **Long conversations**
>
> Every message adds to what Lyna AI must read. When a conversation gets long, Lyna summarizes its older part for Lyna AI, and every message stays on your screen. Use `/compact` to summarize it yourself, or start a new chat. Use `/context` to see how full the conversation is. See [Chat history and context](/features/ai/chat-history-and-context).

## Shortcuts

| Action                  | Shortcut               |
| ----------------------- | ---------------------- |
| New AI chat             | `Cmd/Ctrl + L`         |
| Add selection to chat   | `Cmd/Ctrl + Shift + L` |
| Open the chat mode menu | `Cmd/Ctrl + .`         |
| Toggle Plan mode        | `Shift + Tab`          |
| Toggle chat panel       | `Cmd/Ctrl + \`         |
| Chat full screen        | `Cmd/Ctrl + Shift + \` |

## Related

- [Questions, approvals and errors](/features/ai/questions-approvals-and-errors): Answer Lyna AI, approve changes and fix errors.
- [Chat modes](/features/ai/chat-modes): Build, Plan and Ask.
- [References with @](/features/ai/references): Build with a component, a block or a template of Lyna's library.
- [Slash commands](/features/ai/slash-commands): Every command you can type with /.
- [Prompting best practices](/prompting/best-practices): Write prompts that work.
- [Credits per turn](/features/ai/credits-per-turn): What a turn costs.
