# Mentions and context

Type @ to add files, folders, a web page, your Git changes or current problems to a message, so the AI looks in the right place. The same menu adds components, blocks, templates, people and agents.

Use `@` to point the AI at the files, pages and changes your message is about. The AI can search your project on its own, but pointing it to the right place makes answers faster and more precise.

The @ menu with the Files, Folders, URL, Git Changes and Problems options.

## What you can add with @

| Option          | What it adds                                      |
| --------------- | ------------------------------------------------- |
| **Files**       | One or more files from your project.              |
| **Folders**     | A whole folder.                                   |
| **URL**         | A web page. Lyna fetches it and adds its content. |
| **Git Changes** | Your current staged and unstaged changes.         |
| **Problems**    | The current errors and warnings from diagnostics. |

## Add a mention

1. ### Type @

   In the composer, type `@`. The menu opens on **All**. Choose **Files, folders and links** at the end of the list, or press `→` until **Files**. A word with a `/` or a `.` after the `@`, such as `@src/routes` or `@button.tsx`, opens the file list at once.
2. ### Pick an option

   Use the arrow keys to move and `Enter` to select.
3. ### Choose what to add

   Search for the file or folder, or paste the URL and choose **Add**.

The mention appears in your message. You can add several.

## Components, blocks, templates, people and agents

The same `@` menu lists the components, blocks and site templates of Lyna's library, with a picture and a live preview of each, the people of the project and your agents. Pick one to build with that exact item, to mention a teammate or to give an agent the task. See [References with @](/features/ai/references).

## Other ways to give context

- **Select an element on the canvas** before you write. The AI gets the element and its code location.
- **Add to AI chat** with `Cmd/Ctrl + Shift + L` to send the current selection.
- **Attach a screenshot** or an image. See [Attachments and screenshots](/features/ai/attachments-and-screenshots).
- **Knowledge, rules and memory** give the AI lasting context on every turn. See [Knowledge and memory](/features/ai/knowledge-and-memory) and [Rules](/features/ai/rules).

## See how full the context is

Everything you mention fills the model's context window, along with the conversation itself. The context meter, right above the message box, shows how much of the window your next message will use, for example **119k / 200k**. Its bar has two parts: what is sent with every message (Lyna's instructions) and your conversation.

The context meter above the message box, with its two parts and the count of tokens used.

Its label says what happens next, such as **Compacts soon** or **Compacts next message**. Select the meter, or type `/context`, to see what fills the context, part by part.

When the conversation gets full, Lyna compacts it on its own: it replaces the older part with a summary and keeps your latest messages. To do it yourself, type `/compact`. To start fresh, choose **New Chat**: your earlier conversations stay in the History.

Every label of the meter, the context details and compaction are explained in [Chat history and context](/features/ai/chat-history-and-context).

> [!NOTE]
>
> **Mention less, not more**
>
> Add only what the task needs. A focused mention of two files works better than a whole folder.

## Related

- [Chat](/features/ai/chat): Everything in the chat panel.
- [References with @](/features/ai/references): Build with a component, a block or a template of Lyna's library.
- [Knowledge and memory](/features/ai/knowledge-and-memory): Context that lasts.
- [Chat history and context](/features/ai/chat-history-and-context): The context meter, compaction and past conversations.
- [Prompting best practices](/prompting/best-practices): Write focused prompts.
