CodeGeeX version 2.0 major upgrade: directly operate the code through chat dialogue

CodeGeeX version 2.0 is officially launched! From the naming point of view, this is a major version upgrade.

Last month, CodeGeeX added an intelligent question and answer (Ask CodeGeeX) function to the plug-ins of VSCode and JetBrains IDEs, allowing users to solve technical problems through question and answer dialogue in the IDE. This week, this feature has a new update! In the official version of CodeGeeX2.0, the Q&A is deeply integrated with the IDE programming environment, and the code can be directly operated through chat dialogue.file

The new way of use in the new version is through the shortcut operation of several preset common commands.

1. "/explain"

When you write code, want to know how a certain piece of generated code is interpreted? Then you can type the shortcut command: "/explain" in the "Ask CodeGeeX" dialog box, and a floating layer will appear in the dialog area on the left sidebar, displaying all the codes in the code generation area on the right side, and modify these codes Explain, while replying in the conversation interface.file

file

If you only need to explain some of the code snippets, you can select the code in the code generation area, and a floating layer will appear in the dialog area on the left sidebar, displaying the selected code at the same time. In the floating layer of the dialog area, use the command line: "/explain" to trigger the shortcut command operation, which can help you generate a code explanation for this section, and reply in the dialog interface.

If there is a default language setting, the reply will be in the default language. If the language is not set, there will be a function for the user to choose Chinese or English in the chat interface.

2. "/comment"

Likewise, when you want to comment a piece of generated code line by line? Then you can select the code in the code generation area, and a floating layer will appear in the dialog area on the left sidebar, displaying the selected code at the same time. In the floating layer of the dialog area, use the command line: "/comment" to trigger the shortcut command operation, and you can directly add comments to this code line by line. The content of the comment will be updated in the code generation area, and it will also be replied in the dialog area at the same time.file

If there is a default language setting, the reply will be in the default language. If the language is not set, there will be a function for the user to choose Chinese or English in the chat interface. Behind this function, it is realized by calling the CodeGeeX code interpretation model.

3. "/fixbug"

When you encounter an error while writing code, select the code in the code generation area of ​​the CodeGeeX plug-in, and a floating layer will appear in the dialog area on the left sidebar, displaying the selected code at the same time. In the floating layer of the dialog area, use the command line: "/fixbug" to trigger the shortcut command operation, which can directly help you find the problem in this code and fix the error, and highlight the area where the code is repaired, which is convenient For code comparison, the generated code can be copied or directly inserted into the editing area.file

In addition to the above commands, you can also ask any questions about the selected code. For example, "What are the security issues in this code?" "How to optimize the efficiency of this code?" The online experience function of fixbug has also been launched on the CodeGeeX official website.

4. Sidebar interaction optimization

In addition, a number of optimizations have been made to the sidebar interaction and frame structure in the new version. Including using Tab structure to optimize the labels of "Smart Q&A" and "Code Translation".file

file

Tips For the above operation method, take the VSCode plug-in launched first as an example. The JetBrains IDEs plug-in will be updated later. Welcome everyone to experience the new version and give feedback on the experience in our user community.

This article is published by OpenWrite, a multi-post platform for blogging !

Guess you like

Origin blog.csdn.net/mp817/article/details/131087303