使用手册VS2019用户可以看此链接 VS2019 users welcome tohttps://marketplace.visualstudio.com/items?itemName=aminer.CodeGeeXVisualStudio2019 版本更新请看插件的发行说明 Version updates can be viewed through the Release notes.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. 支持按词采纳 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". 支持补全功能控制 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. 支持主动请求补全 Supports proactive request for completion通过右键菜单-CodeGeeX-请求补全触发,快捷键Alt+Q。 Trigger completion requests via the right-click menu - CodeGeeX - Request Completion or "Alt+Q". 支持建议模式设置 Support suggested mode settings默认的Multiple模式,有更多的采纳方式,需要关闭[显示整行完成]来避免重影问题。Traditional模式,可以解决各种重影问题,使用时需要开启[显示整行完成]。 The default Multiple mode has more adoption methods and requires turning off [Show whole line completion] to avoid ghosting issues. The Traditional mode can solve various ghosting problems and requires enabling [Show whole line completion] when in use. 根据注释生成代码 Convert comments to codeCodeGeeX可以针对一段自然语言的注释内容,生成相关的代码片段 。特别是对于能够使用一句话描述清楚的、常见的算法片段、函数段、方法段等。 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. 自动为代码添加注释 Automatically adding comments to codeCodeGeeX可以轻松为代码添加中(英)文注释。 在编辑器中选中代码,点击鼠标右键。在右键菜单中点击“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.
生成单元测试 Create unit testsCodeGeeX可以针对一段函数( 方法), 生成其对应的单元测试代码。 在编辑器中选中代码,点击鼠标右键。在右键菜单中点击“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.
代码解释 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.
问题解释和代码修复 Explain Problem & Fix Code除了解释,CodeGeeX还提供了更为直接的解释和修复建议功能,可以从螺丝头提示或灯泡提示中找到他。 In addition to explanations, CodeGeeX also provides more directs "Explain problem" and "Fix code" features in the screw head hint and the light bulb hint. 内联聊天 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. 支持设置快捷键 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. 智能问答 Ask CodeGeeXCodeGeeX的智能问答支持模型选择,你可以选择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. 联网问答 Ask Web勾选[联网]则会切换成联网模式,从网络中检索出答案,并包含引文链接 Checking [Web] will switch to the online mode, retrieve answers from the network, and include citation links. 在侧边栏的智能问答输入框中用“/”调出预置命令:In the Smart Q&A input box in the sidebar, use "/" to bring up the preset commands: 切换模型 Change Model自定义配置 Custom Options@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. 工具箱 Code Interpreter支持文件处理、数据分析、图表生成、图像处理; Supports file processing, data analysis, chart generation, image processing,and more. 支持的语言、框架和IDEs Supported languages, frameworks, and IDEsCodeGeeX支持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帮助与反馈 Help & Feedback微信公众号&用户群 WeChat user group
提交反馈 Submit feedback |