---
metadata:
  - name: generator
    content: Diplodoc Platform v5.63.0
alternate:
  - https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/operations/chat-context.md
  - https://vibe.sourcecraft.dev/portal/docs/ru/code-assistant/operations/chat-context.md
  - href: https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/operations/chat-context.md
    type: text/markdown
    title: Markdown version
  - href: https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/llms.txt
    rel: describedby
title: Managing chat context in SourceCraft Code Assistant
description: How to manage chat context in Code Assistant.
---
> **Documentation Index:** Fetch the complete configuration index at https://vibe.sourcecraft.dev/portal/docs/en/llms.txt


# Managing SourceCraft Code Assistant chat context in the JetBrains IDE

{% note warning %}

This page describes the chat context features in the JetBrains IDE. For the chat context features in Visual Studio Code, see [Managing SourceCraft Code Assistant chat context in Visual Studio Code](https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/operations/agent/context-mentions.md).

{% endnote %}

_Context_ is auxiliary information that Code Assistant uses to generate relevant and consistent chat responses.

## Adding information to context {#add-to-context}

1. <!-- source: en/_includes/code-assistant/open-chat-jb.md -->
   In the editor's right-hand panel, click ![image](../../_assets/code-assistant/chat-logo.svg) **SourceCraft Code Assistant Chat**.
   <!-- endsource: en/_includes/code-assistant/open-chat-jb.md -->
1. In the message input window, click ![image](../../_assets/console-icons/at.svg) **Add Files and Folders to Context**.
1. Select a file or directory.

    {% note warning %}

    When you select a directory, only its top-level files will be included in the context.

    {% endnote %}

## Viewing the current context {#current-context}

In the message input window, click ![image](../../_assets/console-icons/paperclip.svg).

## Viewing used context {#used-context}

Below the title of your message (**Me**), click ![image](../../_assets/console-icons/chevron-right.svg) to the right of **Used references**.

#### Useful links {#see-also}

* [Getting started with SourceCraft Code Assistant](https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/index.md)
* [SourceCraft Code Assistant overview](https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/concepts/index.md)
* [SourceCraft Code Assistant chat interface in the JetBrains IDE](https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/operations/chat.md)
* [Quick actions in SourceCraft Code Assistant](https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/operations/quick-actions.md)