fix: prevent bundled OpenCode self-upgrades (#2525)

* fix: prevent bundled OpenCode self-upgrades

* feat(vscode): support OpenCode upgrades

* fix: refresh OpenCode update status on runtime switch

---------

Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
This commit is contained in:
𝖎𝖚𝖑𝖎𝖎𝖆
2026-07-29 19:59:41 +03:00
committed by GitHub
co-authored by Bohdan Triapitsyn
parent c0405d3fa4
commit c88dd16d2a
21 changed files with 620 additions and 84 deletions
+11
View File
@@ -993,6 +993,17 @@ const handleLocalApiRequest = async (input: RequestInfo | URL, url: URL, init: R
});
}
if (pathname === '/api/opencode/upgrade-status' && method === 'GET') {
const data = await sendBridgeMessage('api:opencode/upgrade-status');
return jsonResponse(data);
}
if (pathname === '/api/opencode/upgrade' && method === 'POST') {
const body = await extractJsonBody(input, init, method);
const result = await sendBridgeMessage<{ status: number; body: unknown }>('api:opencode/upgrade', body);
return jsonResponse(result.body, result.status);
}
if (pathname === '/api/zen/models' && method === 'GET') {
try {
const data = await sendBridgeMessage('api:zen:models');