File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010<p align =" center " >
1111 <img src =" https://img.shields.io/badge/.NET-10.0%2B-purple.svg " alt =" .NET 10 " />
1212 <img src =" https://img.shields.io/badge/license-MIT-green " alt =" MIT " />
13- <img src =" https://img.shields.io/badge/version-1.0.0.3-blue " alt =" Version " />
1413 <img src =" https://img.shields.io/badge/platform-Windows-success " />
1514 <img src =" https://img.shields.io/github/stars/shunnet/CopilotProxy?style=social " />
1615</p >
@@ -44,6 +43,8 @@ GitHub Copilot 默认仅支持 OpenAI / Anthropic 等海外模型。对于国内
4443<tr ><td >💬 <b >会话保活</b ></td ><td >自动维持 KV Cache,降低 API 费用</td ></tr >
4544<tr ><td >🔧 <b >工具调用</b ></td ><td >完整的 Function Calling 支持,智能 JSON 修复</td ></tr >
4645<tr ><td >🛡️ <b >安全可靠</b ></td ><td >精准进程管理(不误杀其他 node 进程)、API Key 安全存储</td ></tr >
46+ <tr ><td >🔍 <b >版本检测</b ></td ><td >一键检查 GitHub 最新版本,自动比对提示更新</td ></tr >
47+ <tr ><td >🔧 <b >工具 Schema 自动补全</b ></td ><td >VS Copilot 工具参数自动校验与补全,智能 JSON 修复</td ></tr >
4748</table >
4849
4950## 📋 系统要求
Original file line number Diff line number Diff line change 199199 <data name =" Error_CheckUpdateFailed" xml : space =" preserve" >
200200 <value >[ Error ] Update check failed: {0}</value >
201201 </data >
202+ <data name =" Error_RateLimited" xml : space =" preserve" >
203+ <value >[ Error ] GitHub API rate limit exceeded. Please try again later.</value >
204+ </data >
202205</root >
Original file line number Diff line number Diff line change 199199 <data name =" Error_CheckUpdateFailed" xml : space =" preserve" >
200200 <value >[ Error ] 检查更新失败: {0}</value >
201201 </data >
202+ <data name =" Error_RateLimited" xml : space =" preserve" >
203+ <value >[ Error ] GitHub API 请求过于频繁,请稍后再试</value >
204+ </data >
202205</root >
Original file line number Diff line number Diff line change @@ -583,8 +583,15 @@ public async Task CheckUpdatesAsync()
583583 {
584584 using var http = new HttpClient { Timeout = TimeSpan . FromSeconds ( 10 ) } ;
585585 http . DefaultRequestHeaders . UserAgent . TryParseAdd ( "CopilotProxy" ) ;
586- var resp = await http . GetStringAsync ( "https://api.github.com/repos/shunnet/CopilotProxy/releases/latest" ) ;
587- var json = System . Text . Json . JsonDocument . Parse ( resp ) ;
586+ var resp = await http . GetAsync ( "https://api.github.com/repos/shunnet/CopilotProxy/releases/latest" ) ;
587+ if ( resp . StatusCode == System . Net . HttpStatusCode . Forbidden || resp . StatusCode == System . Net . HttpStatusCode . TooManyRequests )
588+ {
589+ await ShowAsync ( App . LanguageOperate . GetLanguageValue ( "Error_RateLimited" ) ) ;
590+ return ;
591+ }
592+ resp . EnsureSuccessStatusCode ( ) ;
593+ var body = await resp . Content . ReadAsStringAsync ( ) ;
594+ var json = System . Text . Json . JsonDocument . Parse ( body ) ;
588595 var latest = json . RootElement . GetProperty ( "tag_name" ) . GetString ( ) ? . TrimStart ( 'v' ) ?? "" ;
589596
590597 var current = GetVersion ( ) ;
Original file line number Diff line number Diff line change 99 <ApplicationIcon >icon.ico</ApplicationIcon >
1010 <Company >Shunnet.top</Company >
1111 <Product >CopilotProxy</Product >
12- <Version >1.0.0.4 </Version >
12+ <Version >1.0.0.5 </Version >
1313 <PackageLicenseExpression >MIT</PackageLicenseExpression >
1414 <PackageReadmeFile >README.md</PackageReadmeFile >
1515 <SatelliteResourceLanguages >zh-Hans;en</SatelliteResourceLanguages >
You can’t perform that action at this time.
0 commit comments