mirror of
https://gitee.com/chuangxxt/share-copilot
synced 2025-04-16 09:33:24 +00:00
update readme
This commit is contained in:
parent
fd1dea3ab3
commit
df73f496f9
BIN
readme/ceshi.gif
Normal file
BIN
readme/ceshi.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 562 KiB |
74
readme/codeTipsProxy.md
Normal file
74
readme/codeTipsProxy.md
Normal file
@ -0,0 +1,74 @@
|
||||
# 代码提示代理说明
|
||||
|
||||
*以windows为例,其他的系统等个友友补充*
|
||||
|
||||
## **vscode:**
|
||||
|
||||
##### **1.修改文件:**
|
||||
|
||||
`%userprofile%\.vscode\extensions\github.copilot-xxxx\dist\extension.js`
|
||||
|
||||
```js
|
||||
//extension.js头部添加环境变量
|
||||
process.env.completionsUrl="http://127.0.0.1";
|
||||
process.env.telemetryUrl="http://127.0.0.1/telemetry";
|
||||
```
|
||||
|
||||
**1.1.搜索extension.js全文替换内容,注意引号一起搜索替换**
|
||||
|
||||
```js
|
||||
"https://copilot-proxy.githubusercontent.com"
|
||||
替换为 process.env.completionsUrl
|
||||
这个是代码提示接口
|
||||
|
||||
"https://copilot-telemetry.githubusercontent.com/telemetry"
|
||||
替换为 process.env.completionsUrl
|
||||
这个应该是copilot把你代码上传拿去深度学习的,直接改成null也不影响使用
|
||||
```
|
||||
|
||||
**1.2.也可以使用[脚本](https://gitee.com/chuangxxt/share-copilot/releases/download/v1.0.4/vscode%E4%B8%80%E9%94%AE%E9%85%8D%E7%BD%AE%E8%84%9A%E6%9C%AC.bat)一键修改,需要将extension.js原来增加的内容删掉,再配置脚本一键修改**
|
||||
|
||||
将127.0.0.1改为自己的Api url
|
||||
|
||||
GITHUB_TOKEN改为代理服务器中间件验证内容
|
||||
|
||||
```bash
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
:: ghu代理
|
||||
set "GITHUB_TOKEN=123456"
|
||||
set "GITHUB_API_URL=http://127.0.0.1"
|
||||
:: 代码提示代理
|
||||
set "completionsUrl=http://127.0.0.1"
|
||||
set "telemetryUrl=http://127.0.0.1/telemetry"
|
||||
|
||||
set "CODESPACES=true"
|
||||
set "GITHUB_SERVER_URL=https://github.com"
|
||||
|
||||
...略...
|
||||
```
|
||||
|
||||
##### 2.测试
|
||||
|
||||
如图,代码提示已经走代理服务器了,这样就全是走一个ip了,虽然不知道有没有意义
|
||||
|
||||
如果你是贩子,甚至可以搞点有意思的东西
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## **jetbrains:**
|
||||
|
||||
代理服务器是支持的,插件我不会改,等个有缘人
|
||||
|
||||
我修改了插件里面js文件里面的接口,改为自己的,然后重新构建成exe,
|
||||
打包后有问题,可以运行,代理联网等都正常
|
||||
|
||||
但是代码提示无法在ide里面显示
|
||||
目前找不到原因(不懂node.js)
|
||||
|
||||

|
BIN
readme/jiaggou.png
Normal file
BIN
readme/jiaggou.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
Loading…
Reference in New Issue
Block a user