Nhảy tới nội dung
Phiên bản: 1.0.0

Code Context

1. Using the Code Context Feature

Code Context Upload

The Code Context feature allows you to upload code files that are currently open in your workspace to the CodeVista context system. This provides context for features like code chatting, command prompting, and predefined workflows. Follow these steps to use the Code Context feature:

  1. Open the Code Context Interface

    • In CodeVista, click the "Code Context" button in the navigation bar.

      Untitled

      Image: Code context

    • The Code Context interface will appear.

      Untitled

      Image: Code context interface

  2. Upload Code Files

    • In the Code Context interface, check the boxes next to the code files you want to upload.

    • After selecting the files, click the "Apply" button.

      Untitled

      Image: Upload Code Files

    • CodeVista will upload and process the selected files.

  3. Manage Uploaded FilesWhile you make changes to your code files, it's likely that you would like to sync the latest file changes to the "Code Context". You can do this by clicking on the "Sync" icon

    Untitled

    Image: 3.3.3.1 Manage Uploaded Files

    Or you can also turn on the "Auto-sync context" to automatic apply changes to the code context.To delete a file from the CodeVista system, check the boxes next to the files and click "Apply" to remove the file from code context.

    Untitled

    Image: 3.3.3.2 Auto-sync context

    After uploading and processing your code files, you can use other CodeVista features like code chatting, command prompting, or predefined workflows with the context from the uploaded code files.

2. Use code context Inline

After CodeVista finished indexing the code context, the code entities within the uploaded files will be available for the Action Commands

Below are some supported code entities:

@file:fileName

@function:functionName

@class:className

Untitled

Image: 3.4.1.1 Using code context inline

You can chain an Action Command to the indexed entities:

For example:**Explain the purpose of** @function:get_image_download_link

Untitled

Image: 3.4.1.2 Using code context inline

By mastering the grammar of Action Commands and Code Entities, you can significantly improve your workflow efficiency.