Getting started with Yandex Code Assistant
Note
The service is at the Preview stage.
Code Assistant is an AI-driven developer assistant based on large language models (LLM)s
To get started with the service:
Prepare your cloud
Note
If your organization in Yandex Cloud already has access to Code Assistant, proceed to installing and configuring the plugin.
-
Go to the management console
and log in to Yandex Cloud or sign up if not signed up yet. -
Select the organization the users of which will work with Code Assistant, or create a new one.
-
You can request access to Code Assistant on this page or by contacting your account manager.
Once your request is processed, you will get an email to the mailbox linked to your Yandex Cloud account. This email will confirm your access.
Note
All organization users can access Code Assistant.
Install and configure the plugin
-
Download the Code Assistant plugin
for Visual Studio Code .If you cannot download it for any reason, contact your system administrator so that they open network access to Yandex Cloud resources.
-
Install the plugin:
-
Open Visual Studio Code.
-
Open Command Palette by pressing Ctrl + Shift + P for Windows or Linux or Command + Shift + P for macOS.
-
Enter
Extensions: Install from VSIX...
and select the plugin file you downloaded before.The installation process will finish saying
Completed installing extension
.
You can also install Code Assistant through the Visual Studio Code CLI
using this command:code --install-extension <path_to_plugin>
-
-
To get started with Code Assistant, get authenticated in Yandex Cloud:
- In the No active session found. Log in please pop-up window, click Go to browser.
- Allow Visual Studio Code to open the authentication page in your browser.
- In your browser, go to the Yandex Cloud management console
. - Go back to Visual Studio Code.
Code Assistant is now enabled, ready to go, and displayed in the bottom panel of the editor as
Warning
The supported IDE versions are 2024.1 and 2024.2.
-
Download the Code Assistant plugin for your JetBrains IDE
version:If you cannot download it for any reason, contact your system administrator so that they open network access to Yandex Cloud resources.
-
Install the plugin:
- Open the IDE.
- Open settings by pressing Ctrl + Alt + S for Windows or Linux or Command + , for macOS.
- Go to Plugins.
- Click
and select Install Plugin from Disk.... - Select the plugin file you downloaded previously.
- Confirm that you would like to use a third-party plugin and click OK.
-
To get started with Code Assistant, get authenticated in Yandex Cloud:
- In the Yandex Code Assistant OAuth pop-up window, click Yandex Code Assist: Login.
- In your browser, go to the Yandex Cloud management console
. - Go back to the IDE.
The Code Assist plugin started
message means the plugin is active and ready for use.
Tip
If the plugin failed to start, or you do not see suggestions from Code Assistant, try restarting the IDE.
Test the plugin
Note
To work with Code Assistant, you will need continuous internet access.
The smart autocompletion mode explicitly supports code autocompletion for the following programming languages and frameworks:
- C++
- Go
- Java
- JavaScript/TypeScript
- Kotlin
- Python
- Swift
The autocompletion may also work for other languages.
Code Assistant analyzes your code context and provides the following types of suggestions:
- Automatic.
- User-triggered (Ctrl + Space). In Visual Studio Code, you can also use Ctrl + Enter.
How to work with Code Assistant:
-
Open the IDE and create a test file named
server.cpp
with the following contents:// simple web-server to work with sockets #include <iostream> #include <string> #include <sys/socket.h> #include <netinet/in.h> #include <unistd.h> using namespace std; int main() { }
-
In the
int main()
section, start typing something, e.g.,//create socket
. See the Code Assistant suggestion:... int main() { //create socket int sockfd = socket(AF_INET, SOCK_STREAM, 0); }
-
Select an action for the suggestion:
Visual Studio CodeJetBrains IDE- Click Tab to accept the suggestion.
- To start accepting the suggestion word by word, press Ctrl + → for Windows or Linux or Command + → for macOS.
- To discard the suggestion, press Esc.
- If there are multiple suggestions, you can switch between them using Alt + [ and Alt + ] for Windows or Linux or Option + [ and Option + ] for macOS.
- Click Tab to accept the suggestion.
- To discard the suggestion, press Esc.
You can also watch our Code Assistant video tutorial here.
Manage the plugin
Enable or disable auto suggestions
You can enable or disable auto suggestions only in Visual Studio Code.
- Click
in the Visual Studio Code bottom panel. - In the list that opens, select
Enable autotrigger or Disable autotrigger.
Update the plugin
Download the Code Assistant current version
- Download the appropriate Code Assistant plugin for your JetBrains IDE version:
- Install the plugin.
Remove the plugin
- Open the list of installed plugins by pressing Ctrl + Shift + X for Windows or Linux or Command + Shift + X for macOS.
- In the Yandex Code Assistant row, click
and select Uninstall.
- Open settings by pressing Ctrl + Alt + S for Windows or Linux or Command + , for macOS.
- Go to the Plugins section and select the Yandex Code Assistant plugin.
- In the plugin description section, click
and select Uninstall. - Confirm deletion and click OK.