Skip to content

Instantly share code, notes, and snippets.

@daodao97
Last active September 6, 2023 17:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daodao97/4f523c2788c3acefd6f135744792b597 to your computer and use it in GitHub Desktop.
Save daodao97/4f523c2788c3acefd6f135744792b597 to your computer and use it in GitHub Desktop.
GPT CodeHelper - One IDE Plugin Powered By OPENAI

一个基于OPENAI API, 可以帮你 读代码/写代码/找BUGAI 插件.

GPT CodeHelper Preview 功能预览

  • Chat Window

chat-window-example

  • Stream copilot

stream-example

Install

IDE Plugin Marketplace

Usage

Selected Some Code -> Right Click -> GPT CodeHelper -> Click One Prompt

选中部分代码 -> 点击右键 -> GPT CodeHelper -> 点击指定的Promot

Config

config

  • OpenAI

    • BaseApi 默认 https://api.openai.com , 可根据自己的情况修改
    • ApiKey 填写 OPNE_AI_KEY, 获取我自己的KEY
    • Model 当前使用的 AI 模型
    • Working Mode 工作模式
      • Insert After Selected In Editor 在选中的文本后方插入
      • Replace Selected In Editor 替换选中的文本
      • Stream Insert After Selected In Editor 以流式的方式在选中的文本后方插入
      • Stream Selected In Editor 以流式的方式替换选中的文本
      • Chat In CodeHelper Window 在右侧聊天窗口中进行回复
  • Proxy 根据自己的情况设置代理

  • Test Connecttion 点击 Apply 应用配置后, 再点击 Test 按钮, 测试以上配置是有正常.

  • Prompts

    • Reply Language 可以选择您的主语言
    • Cloud Prompt 通过远程文件共享 Prompt, 文件格式参见 cloud-prompt-example
    • Prompt List 可以管理您的 Prompt

常见问题

  • Chat Window 的输入框中无法输入中文 这是一个 IDE JCEF 底层组件的BUG, 详见这里 临时解决方案如下, 根治需等待 IDE 后续更新

    操作路径: IDE / Help / Editor Custom VM Options

    -Dide.browser.jcef.osr.enabled=false
    

    将以上配置贴入 vmoptions 文件, 保存后重启 IDE 即可

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment