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
Warning
The Code Assistant plugin is now available for Visual Studio Code
-
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.
To re-authenticate in the plugin or log in as a different Yandex Cloud user, enter
>Yandex Code Assistant
in the top search bar. In the list that appears, select Yandex Code Assistant: Login. -
Allow Visual Studio Code to open the authentication page in your browser.
-
In your browser, go to the Yandex Cloud management console
and click Open app in the pop-up window. -
Go back to Visual Studio Code.
-
If the plugin is enabled and ready to go, you will see
Click this icon to view the username of the Yandex Cloud account authenticated in the plugin. You can find the username in the Logged in as
-
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.
Note
The plugin is installed in the IDE as a ZIP archive. Do not unpack the archive you downloaded.
Some browsers, such as Safari on macOS, automatically unpack the downloaded archives. To download the plugin file exactly as an archive, right-click the link with the plugin, select Download Linked File As..., and click Save.
-
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.
To re-authenticate in the plugin or log in as a different Yandex Cloud user, click
in the top right corner of the editor, enterYandex Code Assistant
in the window that opens, and select Yandex Code Assistant: Login. -
In your browser, go to the Yandex Cloud management console
. -
Go back to the IDE.
-
If the plugin is enabled and ready to go, you will see Yandex CA in the editor's bottom panel.
Click this button to view the username of the Yandex Cloud account authenticated in the plugin. You can find the username in the Logged in as
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
- Scala
- SQL
- Swift
Autocompletion may also work for other languages. For languages that are less represented in public repositories, the number and quality of autocompletion prompts will be lower.
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:
Log out of the Yandex Cloud profile
To log out of your Yandex Cloud profile in the Code Assistant plugin:
In Visual Studio Code, there are two ways to log out of your profile:
-
In the editor’s bottom panel, click
and select Logout from the list that opens. -
In the top search bar, enter
>Yandex Code Assistant
. In the list that appears, select Yandex Code Assistant: Logout.
In the top right corner of the editor, click Yandex Code Assistant
in the window that opens, and select Yandex Code Assistant: Logout.
To re-authenticate in the plugin, follow the instructions described in step 3 of Install and configure 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.