All Products
Search
Document Center

AI Coding Assistant Lingma:Context

Last Updated:Sep 23, 2025

Lingma supports rich context in AI Chat, such as code files, directories, images, and Git commits. You can combine this context with your own prompts to describe your requests.

Add context

In AI Chat, you can add context in three ways:

  1. Click the add context button in the input box to open the context selection window.

  2. Type # or @ in the input box to open the context selection window. Continue typing to search for files.

    Note
    • Use @ in the Lingma IDE and JetBrains IDE plug-in to open the context selection window.

    • Use # in Visual Studio Code to open the context selection window.

  3. For code files and images, you can drag and drop or copy and paste the content to add it as context (for JetBrains IDEs only).

Among #file (@file), #folder (@folder), #gitCommit (@gitCommit), #teamDocs, and #rule (@rule), you can choose one, then search and select desired content of which multi-selections are supported.

If you use JetBrains IDEs, you can also drag the added context tags into your natural language description to easily combine inputs.

image

Supported context types

Lingma provides multiple context options. You can combine different context types with each other or with your own input to create your request.

Supported context types include the following: file, folder, image, codebase, teamDocs, codeChanges, gitCommit, and rule. Each type is described in the following sections.

Important

Lingma IDE does not currently support the teamDocs type.

#file

To ask questions about or modify one or more files, you can type #file in the input box to select code files. You can select multiple files from the list with your mouse. If you use JetBrains IDEs, you can also add code files as context by dragging and dropping or copying and pasting.

Note the following when adding files as context:

  • After you select a code file, related files are automatically recommended. You can click a file name to add it.

  • To emphasize a file in your request, you can type # to select it.

image

#folder

To ask questions about or modify a specific code module, such as for batch operations such as searching, refactoring, adding comments, or generating unit tests, you can select the required project folder.

image

#image

To generate code, fix issues, or create visual representations using an image, you can open the context selection window and click #image to add a picture. You can also copy and paste an image or a screenshot directly. For example, you can generate a frontend page based on a design image.

image

#codeChanges

To ask questions about, search, or modify code changes in the current Git staging area, you can add #codeChanges as context. For example, before you push to a Git repository, you can ask Lingma to review and optimize the code or add unit tests.

image

#gitCommit

To ask questions about code changes in a specific Git commit, you can add the required commit details using #gitCommit. For example, you can select one or more Git commit records for tasks such as troubleshooting, bug fixing, or generating unit tests.

image

#teamDocs

To use your enterprise knowledge base for Q&A or code generation, you can add the knowledge base using #teamDocs. Lingma automatically retrieves information to use as a reference when interacting with the model. For example, use your team's component specifications to generate code.

image

#rule

System prompts use rules as persistent and reusable context. It is embedded in every model call. This ensures that the model's behavior and output remain consistent when performing tasks such as code generation, code refactoring, and pipeline automation.