1 Star 0 Fork 60

诶黑黑/cocopilot

forked from 屁屁啊哈/cocopilot 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vscode.bat 1.05 KB
一键复制 编辑 原始数据 按行查看 历史
屁屁啊哈 提交于 2023-09-11 10:41 . 'init'
@echo off
setlocal
set extensions_dir=%userprofile%\.vscode\extensions
if not exist "%extensions_dir%" (
echo ERROR: VSCode extensions directory not found!
pause
exit /b 1
)
for /f "tokens=*" %%a in ('dir /b /ad "%extensions_dir%" ^| findstr /r /c:"^github\.copilot-[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$"') do (
set copilot_dir=%%a
goto :found
)
echo ERROR: Copilot extension not found!
pause
exit /b 1
:found
set copilot_dir=%extensions_dir%\%copilot_dir%
set extension_file=%copilot_dir%\dist\extension.js
if not exist "%extension_file%" (
echo ERROR: Copilot extension entry file not found!
pause
exit /b 1
)
echo please be patient...
set tmp_file=%copilot_dir%\dist\extension.js.tmp
(
echo process.env.CODESPACES="true";process.env.GITHUB_TOKEN="ghu_ThisIsARealFreeCopilotKeyByCoCopilot";process.env.GITHUB_SERVER_URL="https://github.com";process.env.GITHUB_API_URL="https://api.cocopilot.org";
) > "%tmp_file%"
type "%extension_file%" >> "%tmp_file%"
move "%tmp_file%" "%extension_file%" > nul
echo done. please restart your vscode.
pause
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ehwhw/cocopilot.git
git@gitee.com:ehwhw/cocopilot.git
ehwhw
cocopilot
cocopilot
master

搜索帮助