Inline chat

更新时间:
复制 MD 格式

Inline chat allows developers to chat in the code editing area. Developers can ask questions, or modify code within a single file through natural language conversations.

Note

To experience the inline chat feature, update to version 2.5.3 in VS Code, 2.5.2 or above in JetBrains IDEs.

Open the inline chat window

After installing in your IDE, you can open the inline chat window in two ways:

  • Use the keyboard shortcut I (Ctrl Shift I).

  • In JetBrains IDEs only: Select code snippet in a file, and then click the icon in front of the code to open the inline chat window.

Action

macOS

Windows

Open the inline chat window

  •   I(For JetBrains IDEs and Visual Studio Code)

  •   I(For Qoder CN IDE)

  • Ctl Shift I(For JetBrains IDEs and Visual Studio Code)

  • Ctl  I(For Qoder CN IDE)

Select a chat mode

After opening the inline chat window and entering your request, you can interact with in two modes:

Important
  • In Qoder CN IDE and VS Code, only the Edit mode is supported when invoking the inline conversation window via shortcut keys.

  • In the JetBrains IDE plugin, both Edit and Ask modes are supported.

  • Edit: Enter your request in the chat window, then press Enter (Ctrl Enter). will modify the current code file based on your request, the selected code snippet, and relevant context.

  • Ask: Enter your request in the chat window, then press Enter (Ctrl Enter) to ask questions.

The following picture shows both the Edit mode and Ask mode are available in JetBrains IDEs.

image

Add context

In the inline chat window, type # (in VS Code or JetBrains IDEs) or @ (in Qoder CN IDE) to add relevant context, such as files, images, or enterprise knowledge base content. And will combine your request with selected contexts to modify the current code file or answer your questions.

Use commands

In the inline chat window, type / to select commands. Currently, /comment and /optimize are supported.

image

Example scenarios

Example 1: Modifying code snippets

When you need to modify a code file or snippet, select the code snippet and open the inline chat window. Enter code modification requirements, such as adding comments or refactoring code. will generate code changes in the code editor.

image

Example 2: Adding new code snippets

When you need to add a code snippet, open the inline chat window and enter your coding requirements. will generate the relevant code suggestions based on your request.

image

Example 3: Inquiring about code implementation within the project

When you need to instantly query certain methods in the current project during coding, open the inline chat window and provide the file and requirements you want to inquire about. You can quickly obtain this information from .

image