CodeArts 编码智能助手 VSCode插件安装使用指南
CodeArts 编码智能助手简介
CodeArts 编码智能助手致力于打造现代化开发新范式, 通过将自然语言转化为规范可阅读/无开源漏洞的编程语言, 提升开发者编码效率, 助力企业快速响应市场不确定性。
基础特性
- 代码生成
- 研发问答
- 代码注释
- 代码调试
- 单元测试
- 代码解释
- 代码优化
插件特性
- 在问答框自由问答
- 编码中停顿时自动触发(默认关闭,需在设置中打开)
- 任意时刻主动触发
快捷键
- @: 在输入框中使用智能体
- /: 在输入框中使用提示词
- #:在输入框中选择知识库内容
- Alt(Option)+U:打开问答对话框
- Enter:在函数/方法签名下触发自动生成
- Tab:接纳代码生成结果
- Esc:取消代码生成
- Alt(Option)+]:查看下一个推荐
- Alt(Option)+[:查看上一个推荐
- Alt(Option)+C:主动触发多行代码生成
- Alt(Option)+X:主动触发单行代码生成
- Alt(Option)+R:重新生成代码
- Alt(Option)+I:将代码添加到聊天窗
快捷指令
- /explain: 解释选中的代码
- /comment: 为选中的代码生成方法注释或行间注释
- /debug: 诊断选中的代码
- /tests: 为选中的代码生成单元测试
- /optimize:优化选中的代码
- /clear: 当你在会话中时,清空上下文记忆
- /help: 学习如何使用CodeArts 编码智能助手
功能介绍
代码生成:在任意位置使用热键 Alt(Option)+C 可以触发多行代码生成;在设置里可打开 回车触发 以及 停顿触发 使用其他功能触发方式。同时也支持代码单行生成,快捷键为Alt + X。(VSCode 1.78.0以及以上版本暂不支持流式生成)
代码解释:选中合适的代码片段,点击右键在“CodeArts 编码智能助手”下选中“代码解释”功能,快速分析代码并自动生成文档,提高阅读代码的速度和效率。
代码注释:选中合适的代码片段,点击右键在“CodeArts 编码智能助手”下选中“代码注释”功能,快速分析代码,自动生成有意义的完整注释,增加代码可读性,同一个代码库注释风格的一致性,提高研发问题的解决效率。
代码调试:选中合适的代码片段,点击右键在“CodeArts 编码智能助手”下选中“代码调试”功能,调试代码在用户调试运行时,根据提示的错误日志和需要修复的代码,使用大模型生成解决方案,帮助用户解决该问题。
单元测试:选中合适的代码片段,点击右键在“CodeArts 编码智能助手”下选中“单元测试”功能,能够自动创建单元测试用例,提高测试覆盖率,确保每个功能和场景都被测试到。
代码优化:选择需要优化的代码,点击右键在“CodeArts 编码智能助手”下选中代码优化功能,对代码进行检查,并提供优化建议,提升代码质量。
研发知识问答:在交互框中进行研发相关提问,提高研发问题的解决效率。
快捷功能:使用热键 Alt(Option)+U 或打开右边工具栏,点击输入框内敲下“/”可看到快捷功能使用选择。
CodeArts 编码智能助手服务声明
本服务声明(以下简称“本声明”、“本协议”)将为您介绍在使用华为云服务时所享有的权利、履行的义务和责任。请您认真阅读、充分理解各条款内容,特别是免除责任、责任限制等对您的权益有重大影响的条款,该类条款我们已为您以粗体字的形式予以提示。
您理解并同意,您使用本协议中的任何服务即视为您已充分阅读并同意接受本声明中的“通用服务条款”及所使用的服务对应的“专用服务条款”,即本协议即对您将产生法律约束力。如您不同意部分或全部协议条款的,请您停止使用相关服务。
通用服务条款
1.1 缔结主体。 本协议由 您(或称“用户”)与华为云相关签约主体(或称“华为云”、“我们”) 共同缔结,具体华为云签约主体以您账号中心显示的签约主体为准,一经生效将会在您与我们之间具有法律效力。如您代表一家公司或其他法律主体进行注册或以其他华为云允许的方式实际使用本服务,则您声明和保证,您有权使该公司或该法律主体受本协议的约束。
1.2 单独协议。 如果您通过线下订阅本服务、或通过我们的合作伙伴采购本服务,或购买集成本服务的合作伙伴产品,您可能与我们或我们的合作伙伴之间签署单独协议。您承认并同意,如果您被授权或以其他方式访问和使用本服务的,则您将仍受本条所提及的单独协议的约束;
1.3 协议变更。 本协议会不定时进行更新,对于本协议的任何重大变更,我们会通过在我们的网站发布通知或其他方式通知您。或者您也可以随时点击访问服务官网,阅读最新版的服务协议。如您不同意最新版服务协议的内容,请您停止使用本服务,如您继续使用,即表示您已了解且同意最新版的服务声明。
1.4 您的内容
CodeArts编码智能助手服务条款
2.1 服务内容
- CodeArts编码智能助手是华为云提供的智能开发助手,为客户提供代码智能生成和问答能力,重塑智能化软件研发的新范式,让开发者更加聚焦业务创新,事半功倍。CodeArts编码智能助手在鸿蒙开发场景上提供DevEco CodeGenie AI辅助编程工具,为开发者提供高效的应用/服务开发。CodeArts编码智能助手提供IDE插件和OpenAPI服务,支持开发者的多种使用场景。
2.2 对您的个人信息收集与处理
2.3 对您的内容数据处理
2.4 您需要提供的配合
- (1)CodeArts编码智能助手智能开发助手在集成开发环境(IDE)以插件的形式提供服务,因此我们需要您提前安装好指定的集成开发环境。若因您的操作系统或集成开发环境非正版、植入木马而导致数据泄露或其他法律问题,您理解并同意自愿承担相应后果,并确保华为云不会因此遭受任何损失;(2)在您使用CodeArts编码智能助手代码智能生成和问答能力时,需收集您的代码上下文信息、工程项目信息,用于完成对应问题的智能回复。
2.5使用限制
- 使用CodeArts编码智能助手的禁止行为。您不得使用CodeArts编码智能助手服务进行违法应用开发。若发生上述行为,我们有权暂停或终止提供CodeArts编码智能助手,并要求您赔偿由此给我们造成的实际损失,且我们无需退还您已支付的云服务费及对应的支持服务费用。
2.6费用说明
- 本服务费用已在套餐开通页面说明,您应按照套餐说明,支持相应的服务费用。在您未按照约定支持全部费用之前,本服务保留不向您提供服务和/或技术支持,或者终止服务和/或技术支持的权利。
2.7免责声明
CodeArts Doer for Coding: Installation and User Guide
CodeArts Doer for Coding: Introduction
This CodeArts AI assistant transforms natural language prompts into clean code without open-source vulnerabilities. Ship rock-solid, enterprise-ready code for accelerated feature rollouts so you can stay ahead of market shifts.
Basic Features
- Code generation
- R&D Q&A
- Code commenting
- Code debugging
- Unit testing
- Code explanation
- Code optimization
Benefits
- Get multiple code suggestions right inside your editor as you type.
- Let the extension auto-suggest when you stop typing (opt-in via settings).
- Invoke suggestions anywhere you like.
Shortcuts
- @: Call in agents from the input box.
- /: Fire off slash commands in the input box.
- #: Scope your chat to specific context.
- Alt (Option)+U: Pop open the chat panel.
- Enter: Trigger auto-generation under functions or method signatures.
- Tab: Accept generated code.
- Esc: Cancel code generation.
- Alt (Option)+]: View the next suggestion.
- Alt (Option)+[: View the previous suggestion.
- Alt (Option)+C: Trigger multi-line code generation.
- Alt (Option)+X: Trigger single-line code generation.
- Alt (Option)+R: Regenerate code.
- Ctrl+Shift+Q: Add code to the chat window.
Slash Commands
- /explain: Provide breakdowns for the selected code.
- /comment: Generate method or line comments for the selected code.
- /debug: Diagnose issues in the selected code.
- /tests: Spawn unit tests for the selected code.
- /optimize: Level up the selected code.
- /clear: Flush context memory mid-session.
- /help: Find out how CodeArts Doer for Coding can give you a boost.
Intelligent Functions
Generation
Code Generation: Press Alt (Option)+C for multi-line code. For just one line, press Alt+X. Smart triggers in settings include Enter keystroke and pauses. (Streaming generation is not yet available in VS Code versions 1.78.0 and up.)
Chat
Code explanation: Right-click on a code snippet and choose CodeArts Doer for Coding > Explain Code.
Code commenting: Right-click on a code snippet and choose CodeArts Doer for Coding > Generate Comment.
Code debugging: Right-click on a buggy code snippet and choose Debug Code. Drop your error log into the popup to get back actionable fixes for any runtime error in your IDE.
Unit testing: Right-click on a code snippet and choose CodeArts Doer for Coding > Generate Unit Tests.
Code optimization: Right-click on a code snippet and choose CodeArts Doer for Coding > Optimize Code.
R&D Q&A: Got questions about research, development, or anything in between? Just ask in the chat box.
Quick Functions: Use the shortcut Alt(Option)+U or open the right toolbar, then click inside the input box and press "/" to see the available quick function options.
CodeArts Doer for Coding Service Statement
This Service Statement ("this Statement" or "this Agreement") describes your rights, obligations, and responsibilities when using Huawei Cloud services. Please read the terms carefully, especially the terms that have a significant impact on your rights and interests, such as exemption from liability and limitation of liability. Such terms are in bold in this Agreement.
You understand and agree that by using any service as stated under this Agreement, you are deemed to have read and agreed to the General Terms of Service in this Agreement and the Dedicated Terms of Service for the service you use. By using any service under this Agreement, this Agreement shall become legally binding on you. If you do not agree to some or all of the terms in this Agreement, you agree to stop using related services.
General Terms of Service
1.1 Contracting Entity. This Agreement is entered into by and between you (or "user") and the Huawei Cloud contracting entity ("Huawei Cloud", "we", or "us"). The contracting entity displayed in your account center shall prevail. Once this Agreement takes effect, it will be legally effective between you and Huawei Cloud. In the event that you register on behalf of a company or other legal entity or use this Service in a manner permitted by Huawei Cloud, you represent and warrant that you have the right to make the company or legal entity bound by the terms of this Agreement.
1.2 Separate Agreement. If you subscribe to this Service offline, purchase this Service through our partners, or purchase partner products that integrate this Service, you may have to sign a separate agreement with us or our partners. You acknowledge and agree that you will remain bound by the separate agreement mentioned in this article if you are authorized to access and use this Service.
1.3 Agreement Update. This Agreement is subject to change at any time. We will notify you of any changes to this Agreement by posting a notice on our website or by other means. You can also visit our website to read the latest service agreement. If you do not agree to part or all of the latest version of this Agreement, please stop using this Service. By continuing to use this Service, you acknowledge that you are aware of and agree to the latest version of this Agreement.
1.4 Your Content
- 1.4.1 The definition and related regulations of "Your Content" are subject to the Huawei Cloud Customer Agreement (https://www.huaweicloud.com/intl/en-us/declaration-sg/sa_cua.html)
- 1.4.2 In terms of Your Content, except as required by laws and regulations or for your use of this Service, Huawei Cloud is entrusted to process your data only in accordance with your authorization and instructions and the agreement between you and us.
- 1.4.3 You have the right to upload, delete, and modify Your Content. Exercise caution when deleting or modifying data. You shall solely bear the consequences of these operations.
- 1.4.4 You must back up the data you need. Huawei Cloud provides data backup services only in accordance with relevant laws and regulations or agreements.
CodeArts Doer for Coding Terms of Service
2.1 Service Content
- CodeArts Doer for Coding is an intelligent development assistant provided by Huawei Cloud. It offers intelligent code generation and Q&A capabilities, reshaping software R&D and enabling developers to focus on service innovation with higher velocity. CodeArts Doer for Coding provides DevEco CodeGenie, an AI-assisted programming tool for HarmonyOS development to support efficient application/service development. CodeArts Doer for Coding is made available through integrated development environment (IDE) extensions (or plug-ins) and open APIs for integration into multiple application scenarios.
2.2 Collection and Processing of Your Personal Data
2.3 Processing Your Content Data
2.4 Cooperation You Need to Provide
- (1) CodeArts Doer for Coding is provided as an extension (or plug-in) for supported IDEs. You are responsible for installing a compatible IDE prior to using this Service. If data leakage or other legal issues arise due to the use of non-genuine, compromised, or Trojan-infected operating systems (OSs) or IDEs, you acknowledge and agree that you bear full responsibility and ensure that Huawei Cloud will not suffer any resulting loss. (2) To provide intelligent code generation and Q&A capabilities, CodeArts Doer for Coding may collect and process your code context, project information, and related data to give responses.
2.5 Restrictions
- Prohibited Behaviors When Using CodeArts Doer for Coding. You shall not use CodeArts Doer for Coding to perform any illegal development activities. In the event of any of the above, we reserve the right to unilaterally suspend or terminate provisioning this Service to you and to ask you to compensate us for any and all losses arising therefrom. In addition, we reserve the right to withhold any cloud service fees or support service fees you have already paid.
2.6 Service Pricing
- Billing has been described on the package subscription page. You agree to pay for the service fees based on this package description. This Service reserves the right to not provide you with services and/or technical support, and the right to terminate the services and/or technical support, until you pay all fees as agreed.
2.7 Disclaimer
You are responsible for reviewing CodeArts Doer for Coding's service description published on Huawei Cloud's official website and for determining the suitability and adaptability of this Service for your intended use. You acknowledge and agree that you are solely responsible for understanding the operations of CodeArts Doer for Coding and for any consequences arising from your use of this Service. Huawei Cloud shall not be liable for any consequences caused by you.
You shall understand and agree that the code displayed by this Service is provided solely as a recommendation. Huawei Cloud and this Service do not generate or write code on your behalf. If you choose to accept any recommended code, it shall be deemed that you authored such code. Huawei Cloud and this Service make no express or implied warranties regarding the security, defect, quality, or compatibility of any recommended code. You are solely responsible for the quality of your code, whether authored independently or based on this Service's recommendations. When using code recommended by this Service, you are advised to take the same precautions as during self-coding, which include rigorous testing, IP scanning, and security vulnerability tracking.
CodeArts Doer for Coding provides knowledge base management functionality. We make no express or implied commitment or guarantee regarding the availability, reliability, correctness, security, update, or upgrade of knowledge bases you use. The running, operation, and use of your service are at your own discretion and risk.
CodeArts Doer for Coding provides the Model Context Protocol (MCP) framework. We make no express or implied commitment or guarantee regarding the availability, reliability, correctness, security, update, or upgrade of the MCP service you use. The running, operation, and use of your service are at your own discretion and risk.
Last updated: September 30th, 2025