update readme

This commit is contained in:
luyoyu 2023-09-21 01:34:59 +08:00
parent fd1dea3ab3
commit df73f496f9
3 changed files with 74 additions and 0 deletions

BIN
readme/ceshi.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 562 KiB

74
readme/codeTipsProxy.md Normal file
View 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
![](https://foruda.gitee.com/images/1695118855841319485/b2c3c89e_8829470.png)

BIN
readme/jiaggou.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB