Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>CodeArts AgentNew to Visual Studio Code? Get it now.
CodeArts Agent

CodeArts Agent

Huawei Cloud

|
26,315 installs
| (4) | Free
With CodeArts Agent, writing code feels like a finger snap.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

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代码智能体
  • 注: 智能问答支持全部指令,智能体仅支持/clear

功能介绍

代码生成:在任意位置使用热键 Alt(Option)+C 可以触发多行代码生成;在设置里可打开 回车触发 以及 停顿触发 使用其他功能触发方式。同时也支持代码单行生成,快捷键为Alt + X。(VSCode 1.78.0以及以上版本暂不支持流式生成)

代码解释:选中合适的代码片段,点击右键在“CodeArts代码智能体”下选中“代码解释”功能,快速分析代码并自动生成文档,提高阅读代码的速度和效率。

代码注释:选中合适的代码片段,点击右键在“CodeArts代码智能体”下选中“代码注释”功能,快速分析代码,自动生成有意义的完整注释,增加代码可读性,同一个代码库注释风格的一致性,提高研发问题的解决效率。

代码调试:选中合适的代码片段,点击右键在“CodeArts代码智能体”下选中“代码调试”功能,调试代码在用户调试运行时,根据提示的错误日志和需要修复的代码,使用大模型生成解决方案,帮助用户解决该问题。

单元测试:选中合适的代码片段,点击右键在“CodeArts代码智能体”下选中“单元测试”功能,能够自动创建单元测试用例,提高测试覆盖率,确保每个功能和场景都被测试到。

代码优化:选择需要优化的代码,点击右键在“CodeArts代码智能体”下选中代码优化功能,对代码进行检查,并提供优化建议,提升代码质量。

研发知识问答:在交互框中进行研发相关提问,提高研发问题的解决效率。

快捷功能:使用热键 Alt(Option)+U 或打开右边工具栏,点击输入框内敲下“/”可看到快捷功能使用选择。

CodeArts代码智能体服务声明

服务声明详情请点击链接查阅:https://www.huaweicloud.com/declaration/tsa-codearts-doer.html

CodeArts Agent: Installation and User Guide

CodeArts Agent: 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 Agent can give you a boost.
  • Note: The ask supports all commands, the agent only supports /clear.

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 Agent > Explain Code.

Code commenting: Right-click on a code snippet and choose CodeArts Agent > 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 Agent > Generate Unit Tests.

Code optimization: Right-click on a code snippet and choose CodeArts Agent > 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 Agent Service Statement

For details of the service statement, please click the link below: https://www.huaweicloud.com/declaration/tsa-codearts-doer.html

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