Foreword
this article is based on Api13
if you're using the latest DevEcoStudio, you'll find that on the right side of the IDE, there's a very special option. CodeGenie , it is a self-contained tool for AI-assisted programming in DevEcoStudio. Its biggest function is to support intelligent knowledge quiz, as well as ArkTS code generation and universal card generation capabilities to help us improve coding efficiency.
Mode of use
new version of IDE
the new IDE comes with this function. Click on the Option CodeGenie on the right to enter the function page. Of course, you can also execute the shortcut Alt/Option + U to start quickly.
Legacy IDE
if your IDE does not have the CodeGenie option, it proves that it is not the latest version. At this time, if you do not want to upgrade the IDE but also want to try this feature, you can download the official plug-in and install it.
Official plugin download address:
https://developer.huawei.com/consumer/cn/download/deveco-codegenie
after downloading, the installation package does not need to be decompressed. After completion, you can install it according to the following steps.
In the DevEco Studio menu bar, click File > Settings (if your computer is macOS, the path is DevEco Studio > Preferences)> Plugins, click the Settings button> Install Plugin from Disk..., You can install the local plug-in.
Select the plug-in installation package you downloaded. After installation, click Restart IDE to Restart DevEco Studio.
Simple experience
if you are not logged in, click Sign in to log in after checking to agree to the privacy and security policy and terms of use. After logging in, click CodeGenie again in the sidebar to start the experience. Currently, CodeGenie has been connected to DeepSeek-R1 Intelligent Body. It can be said that in IDE, we can easily experience DeepSeek intelligent question and answer capability.
At present, there are two bright features, one is knowledge question and answer, one is code generation, in addition, you can also choose your own model, there are currently three, and support DeepSeek-R1 intelligence, it is not too convenient.
Small test cattle knife
for example, select the code generation option and enter a question of "Help me generate a carousel diagram above and a component of the list below". The response speed is very fast, and the generated code is really generated based on ArkUI. Besides the data, it hardly needs much change, which can be said to be very convenient.
I copied the generated code, and everyone can take a look at the quality of the generated code. It can be said that it can be put into use with almost no modification.
@Entry
@Component
struct Index {
private swiperController: SwiperController = new SwiperController();
private data: string[] = ['1', '2', '3', '4', '5'];
build() {
Column() {
Swiper(this.swiperController) {
ForEach(this.data, (item: string) => {
Text(item)
.width('100%')
.height('100%')
.fontSize(30)
.textAlign(TextAlign.Center)
.backgroundColor(Color.Pink);
});
}
.cachedCount(2)
.index(1)
.autoPlay(true)
.interval(2000)
.indicator(true)
.loop(true)
.duration(1000)
.itemSpace(0)
.curve(Curve.Linear);
List() {
ForEach(this.data, (item: string) => {
ListItem() {
Text(item)
.width('100%')
.height(100)
.fontSize(30)
.textAlign(TextAlign.Center)
.backgroundColor(Color.Pink);
};
});
}
.width('100%')
.height(200)
.listDirection(Axis.Vertical);
}
.width('100%')
.height('100%')
.backgroundColor(Color.White);
}
}
For the above code, we can copy, insert, and create a new file.
For example, if I click on the insert in the middle, it will be inserted into the selected place of our mouse:
intelligent Q & A
we have experienced the above code generation. Of course, it is the same as most AI functions and also supports intelligent question and answer. Here, you can answer difficult questions and analyze problems, which is very convenient.
Related Summary
smart answers and code generation, just one of the functions of CodeGenie, it also has three very important functions, this, we put in the next article for everyone to outline.
Through the above simple experience, I summarized the advantages of CodeGenie over other AI tools are:
First of all, the first one is accuracy. After all, ArkTs/ArkUI is a new language. In many AI tools, you have to enter the code related to generating Hongmeng, which is often not very accurate. Sometimes the donkey's head is out of line and the language needs to be continuously accurate before it can be slightly satisfied. After all, CodeGenie is its own IDE function. In terms of accuracy, it can be said to slap other AI.
The second is convenience. No matter which AI tool you generate, you need to copy it to the project. CodeGenie, because it is a self-contained function, can easily use it as you like when writing code, without leaving the development tool at all.
3, the third is, the next three functions, code generation and compilation error reporting intelligent analysis, as well as code intelligent interpretation, it is not too convenient.
To sum up, with CodeGenie, are there any other AI tools used in Hongmeng's development? I think it is totally unnecessary!
This article label: Hongmeng Development Tools/CodeGenie
Top comments (0)