> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
> Use this file to discover all available pages before exploring further.

# @Mention

Add context to AI conversations to help AI understand your needs and generate code that follows your project standards. You can add code files, project folders, local attachments, and project rules.

## Ways to add context

| Method            | Action                                                                           | Description                                                              |
| ----------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| **Click button**  | Click the context selector button `@` in the lower-right corner of the input box | Opens the selector window to browse all context types                    |
| **Type @**        | Type `@` and continue typing                                                     | Searches files, folders, and rules in real time with highlighted matches |
| **Drag or paste** | Drag files or images to the chat box                                             | Supports md, xmind, xlsx, docx, pdf, jpg, png                            |

## Context types

| Type             | Purpose                            | Common scenarios                                                    |
| ---------------- | ---------------------------------- | ------------------------------------------------------------------- |
| **@file**        | Reference code files or rule files | Query implementations, refactor code, understand modules            |
| **@folder**      | Reference entire directories       | Refactor module structure, generate tests, cross-file queries       |
| **@attachments** | Reference local files or images    | Generate code from mockups, analyze documents, process spreadsheets |
| **@rule**        | Reference project rules            | Generate code following team styles, enforce standards              |

## @file

Reference code files in your project. Supports querying and modification.

### How to add

* Type `@file` and enter the file name to search
* Drag files from the file explorer to the chat box

> Rule files (such as files in the `.qoder/rules` directory) can also be found via `@file` search.

## @folder

Reference entire directories. Useful when you need to understand or modify a group of related files.

### How to add

Type `@folder` and enter the directory name to search

## @attachments

Reference local files or images to let AI analyze document content, generate code from designs, or process spreadsheet data.

### Supported file types

| Type         | Formats       | Scenarios                                               |
| ------------ | ------------- | ------------------------------------------------------- |
| Images       | jpg, png      | Generate frontend code, analyze layouts, extract text   |
| Documents    | md, pdf, docx | Analyze content, extract information, generate comments |
| Spreadsheets | xlsx          | Analyze data structures, generate processing code       |
| Mind maps    | xmind         | Understand architecture, generate code frameworks       |

### How to add

* Type `@attachments` to select local files
* Drag or paste files directly to the chat box
* Images are displayed separately at the top of the input box with preview support

## @rule

Reference project rules to make AI follow specific coding styles, framework conventions, or business standards.

Rules are embedded in every model call as persistent, reusable context. They're ideal for defining coding styles, naming conventions, and framework usage patterns that need to stay consistent across your entire project.

### How to add

* Type `@rule` to select configured rules
* When the rule list is empty, create new rules directly via the quick entry without going to the settings page

> Rule files (such as `.md` files in the `.qoder/rules` directory) can be referenced as `@rule` (persistent context) or found via `@file` search (regular file).

## Add to Chat

Files (including code files and Spec files) support fine-grained selection for adding context. You can select any content snippet in a file and add it to the current conversation by:

* Clicking **Add to Chat** in the floating menu
* Using the shortcut `Command+L` (macOS) / `Ctrl+L` (Windows/Linux)

The selected content will be attached as context to the input box, helping the agent understand your intent more precisely.

## **Best practices**

### **Combine context types**

Combine different context types in one prompt:

```
@src/api.js @tests/api.test.js @rule coding-style
Add test cases for this API module and ensure they follow team coding standards
```

### **Leverage recommendations**

After typing `@`, Qoder displays commonly used files at the top of the list:

* **Current file**: The file you're editing
* **Recently opened**: The 2 most recently accessed files

Click recommended files to add them quickly without searching.

### **Use instant search**

After typing `@` and continuing to type, Qoder searches matching files, folders, and rules in real time with highlighted matching characters.
