SmartCode AI Coding Assistant (VSCode)
Suggestion
All first time users complete steps in this document to ensure that the SmartCode plugin can be configured and used correctly.Install, Config and Login
This document provides instructions for users on how to install the SmartCode plugin and log into the AISE system. Additionally, it explains the plugin update mechanism and configuration settings.
Get Installer
The SmartCode VSCode plugin, as the AI Coding Assistant plugin provided by the AISE system for Visual Studio Code, can be obtained through the AISE service. You need to first obtain the following information from the AISE administrator specified by your organization:
- AISE Service URL
- Your AISE Account
Tip
Trial Environment:AISE offers an online trial system for users who wish to experience and evaluate the AISE system. If you are interested, please click the link below to fill out the form, and we will contact you with the trial environment address and account details. AISE Trial Application: AISE Trial Application
After obtaining the above information, please follow steps below:
-
Open the browser and enter [AISE Service URL].
-
Enter your [AISE account], and you can see the following page.
- Click on the Applications | Marketplace in the left menu, and you can see the following page.
- According to the IDE you are using, click the Download button on the corresponding application to download the latest extension installation package. The VSCode installation package is in vsix format.
Extension Install and Update
Visual Studio Code Compatibility
The SmartCode for VSCode plugin supports VSCode 1.75 and above. If the VSCode you are using is lower than this version, please upgrade it by yourself before installing SmartCode. For detailed product information about the SmartCode for VSCode plugin, please refer to SmartCode for VSCode Plugin Product Spec。Install Extension and AISE Service URL config
- After the download is completed, open Visual Studio Code, click the Extensions icon on the left toolbar, select Install from VSIX in the … menu in the upper right corner, and select the vsix file downloaded in the previous step in the popped-up file selection dialog to complete the installation.
- After the installation is completed, similar screen will appear, and the words SmartCode will be displayed on the status bar, indicating that the installation is successful.
- Configure [AISE Service URL]. If your extensions is a universal vsix, you may need to configure the Service URL before using it.
Tip
For the enterprise SKU vsix, the [AISE Service URL] of the your private deployment has been built in the version delivered by AISE, and the following configuration is not required.Click Open Settings in the above figure, or click the SmartCode icon and select Settings in the popped-up menu.
This will open the built-in settings page of VSCode and filter to the SmartCode-related configuration items at the same time. Find the AISE Service URL configuration item among them and enter your address. If your address is correct, the bottom status bar will become the status of SmartCode [Please log in].
Login
After configuring the service URL as above, users can log in to the system with their own [AISE account].
- Click the SmartCode icon on the status bar and select Login in the popped-up menu.
- VSCode will prompt the user to open the browser or log in manually by copying the login address. Click the “Open” button.
Tip
If clicking Open cannot automatically open the browser, then you can click the Copy button and then manually open the browser to log in. On some operating systems, a similar situation may occur if the “default browser” is not configured correctly. At this time, just paste the copied address into the opened browser to log in.
As long as the user completes the login on the browser through the login address copied here, and the extension is able to connect to the server without network issue, the login can be completed normally.
- Use your [AISE account] to complete the login in the opened browser. If the browser shows the following information, it means that the login is successful. SmartCode should detect the login status within a few seconds and complete the login by itself. The complete login process video is as follows.
提示
The login method with Microsoft Entra ID is used in the video. The AISE system can support the unified login SSO ability of various enterprise accounts through the standard OAuth2 protocol. For detailed information about this function, please refer to AISE SSO Integration。Obtain the extension information
Tip
Obtaining complete plugin information helps our support staff to locate problems and improve the product.The SmartCode plugin provides About menu, which contains the basic information of the plugin and the IDE, and this information is helpful for locating problems. Users can open it by clicking the SmartCode icon on the status bar and selecting About.
The popped-up view contains a Copy button, which can be used to copy all the information.
Configuration
The plugin configuration of SmartCode for VSCode is divided into two parts: general configuration and Chat configuration. The general configuration is located in the built-in configuration system of VSCode; the Chat configuration is embedded in the SmartCode Chat interface to provide users with more flexible configuration capabilities.
Manage General Configuration
To manage the general configuration, you can click the SmartCode status bar icon and select Configuration to enter the following interface.
The currently supported configuration items and function descriptions are as follows.
Item | Description |
---|---|
Smartcode:Language SmartCode Language |
Controls the default language used by the large model to reply in Chat, and supports: • Chinese (default) • English Note: This configuration can be different from the interface language of VSCode, allowing users to interact with the Chinese large model on the English version of VSCode. |
Smartcode:Version Check Mode SmartCode Automatic update mode |
Controls the automatic update behavior of SmartCode • Always (default) - Always prompt the user when a new version appears, and the user chooses to install • AlwaysUpdateQuite - Immediately download and update when a new version appears, and only prompt the user to restart the VSCode application to update • Manual - Will not automatically check for new versions, and the user triggers the new version check and update action through Version Check in the menu. |
Smartcode:Version Check Notification SmartCode Automatic update notification prompt mode |
Controls the notification behavior of SmartCode to the user when a new version is detected • On (default) - Immediately notify the user when a new version is detected • Off - Do not notify the user • OffUntilRestart - Stop notifying until the next restart of VSCode Note: The new version notification provides a button that allows the user to set it to Off or OffUntilRestart. |
Smartcode:Aise Host AISE Service URL |
Controls the server address connected by the SmartCode plugin Note: The enterprise version plugin generally has a built-in server address. |
Smartcode:Enable Code completion control |
For the code completion feature, it allows users to control to enable or disable the code completion feature in a certain development language. It needs to be implemented by manually editing the setting.json. |
Smartcode:Inline Suggest:Enable Whether to provide in-line code completion. |
Controls whether to enable the code completion function. |
Smartcode:Editor: Enable Auto Completions Automatically display in-line code completion. |
Controls whether the completion content is automatically displayed in the editor. |
Smartcode:Emoji Enabled Simplified version of Emoji symbols as Git commit information. |
Controls whether to use Emoji symbols when generating commit comments. |
Smartcode:Full Git Moji Spec Complete GitEmoji symbols as Git commit information. |
Controls whether to use the complete GitEmoji symbols when generating commit comments. |
Manage Chat Configuration
Click the settings icon in the upper right corner of the Chat window to enter the Chat configuration page.
当前支持的配置项和功能说明如下
Item | Description |
---|---|
LLM Model | Controls the large model instance used in the current conversation. The AISE service allows configuring multiple large model instances and allows administrators to configure the conversation model visible to the user in the department control panel. What is listed in this list is the large model instance available to the current user. |
AI assistant | Controls the AI assistant role set for the large model in the current conversation. The AISE service allows administrators to set different AI assistant role behaviors for different users, that is, the system message setting (System Message) of the large model. Through the system message, the current role setting of the model can be controlled to ensure that the model behavior complies with the enterprise organization strategy. The AISE service also allows users to set their own AI assistant role used by themselves through AISE Service |
Behavior | Controls the behavior pattern of the large model and provides the following options • Precise (default) - Applicable to most software development scenarios to ensure that the content generated by the model under the same prompt remains as consistent as possible • Balanced - Moderately relaxes the freedom of the model and is suitable for scenarios that require trying different choices, and the possibility of the model generating different generated content under the same prompt increases appropriately • Creativity - Allows the model to play and create. |
Response length (Token) | Controls the maximum token length of the generated content for each large model request, and provides the following options • 400 (default) • 800 • 1000 • 2500 Note: Since the maximum generated token width supported by different models is different, this setting needs to be adjusted appropriately according to the current model’s ability. |
History | Controls whether to add historical messages for the current large model request, and provides the following options • Automatic (default): Automatically add as many historical messages as possible according to the remaining tokens in the current user’s context • Do not include: Disable historical messages, and each conversation is independent. |
Automatic upgrade
The SmartCode for VSCode plugin, in cooperation with the AISE Base Service, supports the automatic upgrade ability. This function does not depend on the VSCode plugin market, and can realize the push and automatic update of the new version of the plugin within the enterprise, and allows users or administrators to conduct detailed control over the upgrade behavior. The version detection or upgrade process is as follows.
- When the user restarts VSCode, SmartCode will automatically connect to the server to check if there is an upgradable new version. Users can also manually trigger it by clicking the SmartCode icon in the status bar and choosing Version Check in the popped-up menu. Once a new version is detected, the following message will pop up to prompt the user. The user can choose Upgrade or Cancel this upgrade.
- After the user clicks the Upgrade button, SmartCode will automatically download the new version installation package in the background and update the plugin in the current environment. After the upgrade is completed, there will be the following prompt.
- Click Reload to complete the entire upgrade process.