Skip to content
| Marketplace
Sign in
Visual Studio>Tools>CodeGeeX
CodeGeeX

CodeGeeX

Zhipu AI

|
12,265 installs
| (5) | Free
CodeGeeX is an AI-based coding assistant, which can suggest code in the current or following lines. It is powered by a large-scale multilingual code generation model with 13 billion parameters, pretrained on a large code corpus of more than 20 programming languages.CodeGeeX is...
Download

image.png

使用手册

💡 欢迎使用CodeGeeX!

VS2022用户可以看此链接 VS2022 users welcome to

https://marketplace.visualstudio.com/items?itemName=aminer.CodeGeeXVisualStudio

1.1.4.3修复了上一版本偶发的打开文档编辑器卡顿问题,提高整体流畅性,请及时更新。

v1.1.4.3 fixes the occasional freezing issue when opening the document editor in the previous version, improving overall fluency. Please update in time.

版本更新请看插件的发行说明 Version updates can be viewed through the Release notes.

image__18.png

CodeGeeX是什么?What's CodeGeeX?

CodeGeeX是一款基于大模型的智能编程助手,它可以实现代码的生成与补全,自动为代码添加注释,不同编程语言的代码间实现互译,针对技术和代码问题的智能问答,当然还包括代码解释,生成单元测试,实现代码审查,修复代码bug等非常丰富的功能。

CodeGeeX is an AI-based coding assistant. It is powered by a large-scale multilingual code generation model, lots of features including generates and completes code, automatically adds comments, translates code between different programming languages, provides intelligent answers to technical and code-related questions, code explanation, unit test generation, code review, bug fixing and so on.

你可以用CodeGeeX来做什么?What can you do with CodeGeeX?

自动生成代码 Automated Code Generation

在编码过程中,CodeGeeX可以根据上下文代码的内容,推理出接下来可能的代码输入。如果认为推理出的代码内容合适,使用快捷键Tab对生成的代码进行采纳,被采纳的代码即会高亮显示并留存在光标后;如果认为内容不合适,任意键可以取消推荐的内容,继续手动编码。

CodeGeeX provides autocomplete-style suggestions when you coding. You can receive suggestions with the “Tab” key, either by starting to write the code you want to use.

image__1.png

支持按词采纳 Support word-by-word adoption

可以通过Ctrl+→只采纳一个词

You can only adopt one word with Ctrl+→.

支持按行采纳 Support line-by-line adoption

可以通过Ctrl+↓只采纳一行。

You can only adopt one line with Ctrl+↓.

支持切换补全建议 Supports toggling completion suggestions

可以通过Ctrl+←切换补全建议,前提需要在CodeGeeX选项中配置候选词数量。这3项都支持设置快捷键,详见后续的"支持设置快捷键"。

You can switch between completion suggestions using Ctrl+←, provided that the number of candidate words is configured in the CodeGeeX options.All three of these support the setting of shortcut keys; for details, see the upcoming section on "Shortcut Key Settings Supported".

image__31.png

支持补全功能控制 Supports completion feature control 当前编辑栏可以通过右键菜单-CodeGeeX-开启/关闭补全控制,快捷键Alt+Z。全局环境可以通过选项-CodeGeeX-补全开关控制。

The current edition window can control completion through the right-click menu - CodeGeeX - Enable/Disable Current Completion or "Alt+Q". For the global environment, completion can be toggled through Options - CodeGeeX - Completion Switch.

image__16.png

image__17.png

支持主动请求补全 Supports proactive request for completion

通过右键菜单-CodeGeeX-请求建议触发,快捷键Alt+Q。

Trigger completion requests via the right-click menu - CodeGeeX - Ask For Suggestion or "Alt+Q".

image__19.png

根据注释生成代码 Convert comments to code

CodeGeeX可以针对一段自然语言的注释内容,生成相关的代码片段 。特别是对于能够使用一句话描述清楚的、常见的算法片段、函数段、方法段等。

CodeGeeX can generate code by writing a natural language comment describing what you want the code to do. Especially for common algorithmic segments, function blocks, or method sections that can be described in a single sentence.

image__2.png

自动为代码添加注释 Automatically adding comments to code

CodeGeeX可以轻松为代码添加中(英)文注释。 在编辑器中选中代码,点击鼠标右键。在右键菜单中点击“CodeGeeX” ,然后点击下一级菜单“生成注释”即可。

CodeGeeX can automatically adds comments to code in both Chinese and English. Select the code in the editor, right-click your mouse. From the right-click menu, select "CodeGeeX", then click on the submenu "Add Comment" to generate the comment. image__3.png

生成单元测试 Create unit tests

CodeGeeX可以针对一段函数( 方法), 生成其对应的单元测试代码。 在编辑器中选中代码,点击鼠标右键。在右键菜单中点击“CodeGeeX” ,然后点击下一级菜单“生成单测”即可。也可以通过侧边栏的对话框,输入“/test”,生成其对应的单元测试代码。

An important use case of CodeGeeX is to take some of the drudgery out of writing unit tests. Select the code in the editor, right-click your mouse. From the right-click menu, select "CodeGeeX", then click on the submenu "unit tests" to generate the comment.

image__4.png

代码解释 Explain Code

代码解释是开发者非常喜爱的功能之一,CodeGeeX设置了多个入口,在编程过程中可以更加便利的使用。

Code explanation is one of the most favorite features for developers,and CodeGeeX has multiple entry points for convenient use during programming. image__9.png

问题解释和代码修复 Explain Problem & Fix Code

除了解释,CodeGeeX还提供了更为直接的解释和修复建议功能,可以从灯泡提示中找到他。

In addition to explanations, CodeGeeX also provides more directs "Explain problem" and "Fix code" features in the light bulb hint.

image__22.png image__21.png

内联聊天 Inline Chat

右键菜单中包含[内联聊天]功能(建议设置一个快捷键方便使用),可以选取代码后右键执行或者直接右键执行。执行后弹出一个对话框,可以直接点击快速操作按钮,也可以在对话框输入想执行的内容,等待AI处理后,会返回一个比对窗口。此时可以在窗口中进行一定修改后,选择[接受]或者[取消]。AI处理过程中,可以从左下角的任务中心窗口中查看任务进程或取消此次操作。

There is a “Inline Chat” button in the context menu (it is recommended to set a shortcut key for easy use). You can select code and then right-click to execute, or directly right-click to execute. After execution, a dialog box will pop up where you can directly click the quick action buttons, or input the content you want to execute in the dialog box. After the AI processes it, a diff window will be returned. At this point, you can make some modifications in the window and then choose to [Accept] or [Cancel].During the AI processing, you can view the task progress or cancel the operation from the task center window in the lower left corner.

image__20.png

image__25.png

image__26.png

image__27.png

image__28.png

支持项目问答 Project Q&A

支持基于项目进行问答,先从设置里面配置好工作区范围,在对话框中可以通过@workspace或者点亮右下角文件图标,进行项目问答,共分成授权,上传,问答三个步骤。不需要时,通过右键菜单进行删除。上传时会筛选出最多1000个文件加密传至云端,后续基于云端文件进行分析。

Support project-based Q&A. First, configure the workspace range in the settings. In the dialog box, you can initiate project Q&A by mentioning @workspace or clicking the file icon in the lower right corner. The process consists of three steps: authorization, uploading, and Q&A. When it’s no longer needed, you can delete it via the right-click menu. During upload, a maximum of 1000 files will be encrypted and sent to the cloud for subsequent analysis based on cloud files.

image__13.png

image__32.png

支持本地模式 Supports local mode

支持局域网模型,可以通过本地模式配置,用局域网模型代替云端模型进行交互,完成局域网环境下的代码补全,问答,修复等功能。

Support LAN model, which can be configured through local mode to replace cloud model for interaction, completing functions such as code completion, Q&A, and debugging in a LAN environment.

image__39.png

image__38.png

image__37.png

支持设置快捷键 Supports setting shortcut keys

支持建议采纳,开启/关闭当前补全,生成注释等按钮的快捷键设置。在选项-环境-键盘中进行设置,以避免按键冲突,发行说明里面介绍了命令名称和对应功能。

Supports setting shortcut keys to avoid key conflicts for actions such as accepting suggestions, toggling current completion, and generating comments. These settings can be done in Options - Environment - Keyboard.The release notes introduce the command names and their corresponding functions.

20240606-204656.jpg

智能问答 Ask CodeGeeX

CodeGeeX的智能问答支持模型选择,你可以选择Pro版模型或者Lite版的模型,点击CodeGeeX目录,打开 CodeGeeX 侧边栏(聊天窗),点击侧边栏上方的“Ask CodeGeeX”标签, 即可进入问答模式。也可以在编辑器中选中代码,通过鼠标点击右键,选择“CodeGeeX”,在下级菜单中选择“向CodeGeeX提问”打开侧边栏,侧边栏颜色跟随Visual Studio主题色变换,大小可以通过ctrl+鼠标滚轮或者+,-键调节。

Ask CodeGeeX supports model selection. You can choose between the Pro version model or the Lite version model. Click on the CodeGeeX plugin icon to open the CodeGeeX sidebar. Then, click on the "Ask CodeGeeX" tab at the top of the sidebar to use. You can also select code in the editor, right-click with your mouse, choose "CodeGeeX," and then select "Ask CodeGeeX" from the submenu to open the sidebar.The color of the sidebar changes according to the Visual Studio accent color, and the size can be adjusted by ctrl+mouse wheel or the +,-key.

image__5.png

联网问答 Ask Web

勾选[联网]则会切换成联网模式,从网络中检索出答案,并包含引文链接

Checking [Web] will switch to the online mode, retrieve answers from the network, and include citation links.

image__29.png

在侧边栏的智能问答输入框中用“/”调出预置命令:

In the Smart Q&A input box in the sidebar, use "/" to bring up the preset commands:

image__6.png

切换模型 Change Model

image__7.png

自定义配置 Custom Options

image__30.png

@Repo 针对开源代码仓库的智能问答 RAG

用@Repo 功能对开源代码仓库进行提问,模型会根据检索到的相关背景知识生成回答,大幅减轻生成内容的幻觉性。 开源代码库的检索增强生成功能,目前已经支持超过100+个热门开源代码仓库,用户也可以自行提交希望支持的开源项目。

The @Repo feature allows users to ask questions about open-source code repositories.The enhanced search capability for open-source code repositories supports over 100+ popular repositories, and users can also submit their desired open-source projects for support.

image__23.png

工具箱 Code Interpreter

支持文件处理、数据分析、图表生成、图像处理;

Supports file processing, data analysis, chart generation, image processing,and more.

image__24.png

支持的语言、框架和IDEs Supported languages, frameworks, and IDEs

CodeGeeX支持100+种编程语言及开发框架,适配多种主流IDE平台,包括VSCode,JetBrains IDEs,HBuilderX,DeepIn-IDE等。

CodeGeeX supports 100+ programming languages and development frameworks, compatible with various mainstream IDE platforms, including VSCode, JetBrains IDEs, HBuilderX, DeepIn-IDE, and more.

支持语言的完整列表

即刻开始免费使用CodeGeeX Get started now!Free!

CodeGeeX在主流IDE平台,以插件产品的形态提供给所有开发者免费使用。

CodeGeeX is available for free to all developers as a plugin product on your IDEs.

在 Visual Studio、插件市场搜索“CodeGeeX”即可;

Search for "CodeGeeX" in the Visual Studio、VSCode、JetBrains IDEs 、HBuilderX、Open VSX and other IDEs' plug-in marketplace;

前往官网获取更多信息 Go to the Official WebSite For More Information

https://codegeex.cn/

帮助与反馈 Help & Feedback

微信公众号&用户群 WeChat user group

image__10.png

image__11.png

官方邮箱 official email :codegeex@zhipuai.cn

提交反馈 Submit feedback

image__12.png

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft