學習自該文章,感謝作者!
2025 年 VSCode 插件離線下載攻略:官方渠道一鍵獲取 - 知乎
獲取擴展關鍵信息
方法一:官網獲取
打開 VSCode 擴展官方網站
搜索要下載的擴展,以 CodeGeeX 為例,網址為:
CodeGeeX: AI Coding Assistant - Visual Studio Marketplace
在頁面右側,找到以下信息:
More Info
Version | 2.22.3 |
---|---|
Released on | 2022/9/18 21:38:06 |
Last updated | 2025/4/18 13:11:34 |
Publisher | Zhipu AI |
Unique Identifier | aminer.codegeex |
Report | Report a concern |
需要注意的是,發布者(Publisher)不能用 Publisher 的 Zhipu AI,而是用
Identifier 的前面部分:aminer
擴展名是用 Identifier 的后面部分 :codegeex
版本信息是用 Version:2.22.3,
方法二:VSCode 獲取
運行 VSCode,在擴展商店搜索要下載的擴展,以 CodeGeeX 為例。
在擴展介紹頁面,標題如下:
CodeGeeX: AI Coding Assistant v2.22.3
這里能獲取版本信息:2.22.3,注意不能帶 v
在具體介紹的右側頁面,能找到標識信息:
標識符 aminer.codegeex
這里能獲取 發布者(Publisher):aminer 和擴展名:codegeex
代入網址模版
將上述信息代入 https://marketplace.visualstudio.com/_apis/public/gallery/publishers/{發布者}/vsextensions/{插件名}/{版本號}/vspackage
codegeex 下載網址即為:https://marketplace.visualstudio.com/_apis/public/gallery/publishers/aminer/vsextensions/codegeex/2.22.3/vspackage
?如果是不同目標平臺,結尾還要搭配上 ?targetPlatform={platform}
platform選項:
platform | 平臺 |
---|---|
win32-x64 | Windows 64-bit |
win32-ia32 | Windows 32-bit |
win32-arm64 | Windows ARM64 |
darwin-x64 | macOS Intel |
darwin-arm64 | macOS Apple Silicon |
linux-x64 | Linux 64-bit |
linux-arm64 | Linux ARM64 |
alpine-x64 | Alpine Linux |
注意: 不是所有擴展都有上述平臺的特定版本,codegeex 就不能下載特定平臺版本。如果不能下載會獲取類似錯誤信息:
{“$id”:“1”,“innerException”:null,“message”:“Version 2.22.3 for extension aminer.codegeex has no support for targetPlatform darwin-arm64”,“typeName”:“Microsoft.VisualStudio.Services.Gallery.WebApi.ExtensionVersionHasNoSupportForRequestedTargetPlatformsException, Microsoft.VisualStudio.Services.Gallery.WebApi”,“typeKey”:“ExtensionVersionHasNoSupportForRequestedTargetPlatformsException”,“errorCode”:0,“eventId”:3000}
其中 aminer.codegeex has no support for targetPlatform darwin-arm64 說明沒有 darwin-arm64 的特定版本。
沒有特定版本不一定表示不支持,也可能是通用版本。