SmartCode AI Coding Assistant (VSCode)

SmartCode offers a user-friendly AI Coding Assistant extension for VSCode, supporting a wide range of full-stack programming languages, including JavaScript, Node.js, Java, Kotlin, Python, Go, C#, and more. It provides features such as AI code completion, code generation, refactoring, navigation, and code analysis, helping developers enhance coding efficiency, reduce costs, and improve quality. This document guides users through the basic steps of installing the SmartCode plugin and logging into the AISE system. It also explains the plugin update mechanism and configuration settings.

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

After obtaining the above information, please follow steps below:

  1. Open the browser and enter [AISE Service URL].

  2. Enter your [AISE account], and you can see the following page.

用户登录首页

  1. Click on the Applications | Marketplace in the left menu, and you can see the following page.

应用市场首页

  1. 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

Install Extension and AISE Service URL config

  1. 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.

VSCode 插件安装

  1. 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.

VSCode 插件安装

  1. Configure [AISE Service URL]. If your extensions is a universal vsix, you may need to configure the Service URL before using it.

Click Open Settings in the above figure, or click the SmartCode icon and select Settings in the popped-up menu.

VSCode SmartCode 配置入口

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].

VSCode SmartCode 配置服务地址

Login

After configuring the service URL as above, users can log in to the system with their own [AISE account].

  1. Click the SmartCode icon on the status bar and select Login in the popped-up menu.

VSCode SmartCode 登录

  1. VSCode will prompt the user to open the browser or log in manually by copying the login address. Click the “Open” button.

VSCode SmartCode 登录

  1. 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.

Obtain the extension information

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.

  1. 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.

插件升级

  1. 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.

插件升级

  1. Click Reload to complete the entire upgrade process.