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

# Adding context

> Use @ mentions and drag and drop to pull files, errors, terminal output, git changes, and web content directly into your conversations with Cline.

Cline works best when it has the right context — not just more context. @ mentions let you pull in exactly the files, errors, terminal output, or documentation that matter for your current task. No copying, no pasting, no switching windows.

You can add context two ways:

* Type `@` in the chat input and select from the picker
* Click the **+** button in the bottom-left corner to browse files, images, or mentions

<Tip>
  Watch [Adding context with @ mentions](https://youtu.be/7j6R75Dvj1Y) to see it in action.
</Tip>

## Quick reference

| What you want       | Syntax              | Example                    |
| ------------------- | ------------------- | -------------------------- |
| File contents       | `@/path/to/file`    | `@/src/index.ts`           |
| Folder contents     | `@/path/to/folder/` | `@/src/components/`        |
| Workspace errors    | `@problems`         | `@problems`                |
| Terminal output     | `@terminal`         | `@terminal`                |
| Uncommitted changes | `@git-changes`      | `@git-changes`             |
| Specific commit     | `@<commit-hash>`    | `@a1b2c3d`                 |
| Web page            | `@<url>`            | `@https://react.dev/learn` |

## File mentions

Reference any file with `@/path/to/file`. Cline sees the complete file contents, including imports, related functions, and surrounding context.

```text theme={null}
Can you refactor the error handling in @/src/api/users.ts?
```

## Folder mentions

Reference an entire directory with `@/path/to/folder/` (note the trailing slash). Cline sees the folder structure and all file contents within it.

```text theme={null}
Explain how the components in @/src/components/auth/ work together.
```

<Note>
  In multi-root workspaces, prefix paths with the workspace name: `@workspace-name:/path/to/file`
</Note>

## Problem mentions

Use `@problems` to share all errors and warnings from your workspace's Problems panel directly with Cline.

```text theme={null}
@problems Can you fix these TypeScript errors?
```

## Terminal mentions

Use `@terminal` to share recent terminal output. Useful for debugging build errors, test failures, or unexpected command output.

```text theme={null}
@terminal The build is failing. What's wrong?
```

## Git mentions

Reference uncommitted changes with `@git-changes`:

```text theme={null}
@git-changes Review my changes before I commit.
```

Reference specific commits with `@<commit-hash>` (7–40 character hex string):

```text theme={null}
What did @a1b2c3d change?
```

## URL mentions

Reference web content with a full URL prefixed by `@`. Cline fetches the page and reads it as part of the conversation.

```text theme={null}
Implement the pattern described in @https://react.dev/learn/scaling-up-with-reducer-and-context
```

This is particularly useful for pulling in the latest library documentation, API references, or design specs without leaving your editor.

## Combining mentions

You can combine multiple @ mentions in a single message for comprehensive context:

```text theme={null}
I'm getting these errors: @problems

Here's my component: @/src/components/Form.jsx
And the API endpoint: @/src/api/users.js

The error happens when I submit: @terminal

I think this commit might have caused it: @a1b2c3d
```

## Drag and drop

Drag files directly into the chat input to add them to your conversation.

<Note>
  In VS Code, hold **Shift** while dragging files into the chat input.
</Note>

Dragging workspace files automatically creates file mentions. You can also drag files from Finder or File Explorer directly into Cline.

**Supported file types:** Text files from your workspace, plus images, PDFs, CSVs, and Excel files from your file system.

<Note>
  Images require a multimodal model. Check the model selector to confirm your current model supports image inputs.
</Note>

## Reviewing file changes

When Cline edits a file, it presents a diff view showing exactly what changed. You can:

* **Accept** the change to apply it
* **Reject** the change to discard it
* **Edit the diff directly** to adjust the proposed change before accepting
* **Provide feedback in chat** to ask Cline to try a different approach

Cline also monitors linter and compiler errors as it works. If an edit introduces a missing import or syntax error, Cline can detect and fix it automatically before moving on.

## Context menu commands

Right-click on selected code to access Cline without typing. This is the fastest way to get help with specific code because it automatically includes the selected text and file location as context.

### Code editor commands

<CardGroup cols={2}>
  <Card title="Add to Cline" icon="message-plus">
    Ask questions about code, get suggestions, or start a conversation with specific code as context.
  </Card>

  <Card title="Fix with Cline" icon="wrench">
    Quick fixes for errors, bugs, or issues in the selected code. Also appears in the lightbulb Quick Fix menu when your cursor is on an error.
  </Card>

  <Card title="Explain with Cline" icon="book-open">
    Understand unfamiliar code, complex logic, or code you're reviewing.
  </Card>

  <Card title="Improve with Cline" icon="sparkles">
    Get refactoring suggestions, performance improvements, or cleaner implementations.
  </Card>
</CardGroup>

### Terminal commands

Right-click in the terminal and select **Add to Cline** to get help with:

* Build errors and failed commands
* Test failures and stack traces
* Configuration issues
* Any terminal output you need help interpreting

### Source control commands

In the Source Control panel, use **Generate Commit Message** to create AI-powered commit messages from your staged changes. Cline analyzes the diff and writes a descriptive message following conventional commit patterns.
