fix: restore OpenCode health compatibility for startup (#1542)
This commit is contained in:
@@ -547,7 +547,7 @@ export async function activate(context: vscode.ExtensionContext) {
|
||||
};
|
||||
|
||||
const probeTargets: Array<{ label: string; path: string; includeDirectory?: boolean; timeoutMs?: number }> = [
|
||||
{ label: 'health', path: '/api/health', includeDirectory: false },
|
||||
{ label: 'health', path: '/global/health', includeDirectory: false },
|
||||
{ label: 'config', path: '/config', includeDirectory: true },
|
||||
{ label: 'providers', path: '/config/providers', includeDirectory: true },
|
||||
// Can be slower on large configs; keep the probe from producing false negatives.
|
||||
|
||||
@@ -567,8 +567,8 @@ async function waitForReady(
|
||||
const controller = new AbortController();
|
||||
const timeout = setTimeout(() => controller.abort(), 3000);
|
||||
|
||||
// OpenCode readiness check.
|
||||
const url = new URL(`${baseUrl}/api/health`);
|
||||
// OpenCode readiness check. Use /global/health for OpenCode 1.15.x compatibility.
|
||||
const url = new URL(`${baseUrl}/global/health`);
|
||||
const res = await fetch(url.toString(), {
|
||||
method: 'GET',
|
||||
headers: { Accept: 'application/json', ...authHeaders },
|
||||
|
||||
Reference in New Issue
Block a user