Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>chatgpt-code-explainer-extensionNew to Visual Studio Code? Get it now.
chatgpt-code-explainer-extension

chatgpt-code-explainer-extension

weichuanxin

|
100 installs
| (0) | Free
use chatgpt to explain abstract code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

chatgpt-code-explainer-extension README

介绍

选中代码段或者函数,拓展会根据 config 中设置的 prompt,生成对应的内容。默认是解释代码功能。要分析 html 内的代码请使用 selected explainer。

使用

  1. 文件 -> 首选项 -> 扩展 -> chatgpt-code-explainer-extension,根据键名修改其的值。

    • apiKey: CHATGPT 的 api key。

    • server: 默认为官方服务器,可以自己在设置中填写中转服务器。

    • engine: 选择要调用的 CHATGPT 模型。

    • system: 角色 system 所使用的 prompt。

    • maxToken: 单次对话最大 token 限制。

  2. 选择代码

    • chatgpt code explainer(默认热键 ctrl+shift+p): 会获取到光标所在位置的函数。
    • chatgpt selected explainer(默认热键 ctrl+shift+l): 使用光标选中代码段。
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft