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:
committed by
GitHub
co-authored by
Bohdan Triapitsyn
parent
c0405d3fa4
commit
c88dd16d2a
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user