feat: prepare Zhinian desktop pilot
Some checks failed
Electron E2E / Electron E2E (macos-latest) (push) Has been cancelled
Electron E2E / Electron E2E (ubuntu-latest) (push) Has been cancelled
Electron E2E / Electron E2E (windows-latest) (push) Has been cancelled

This commit is contained in:
inman
2026-05-07 21:49:20 +08:00
parent cddaf37016
commit 0abc48189c
103 changed files with 10975 additions and 2049 deletions

View File

@@ -4,6 +4,7 @@ import type { IncomingMessage, ServerResponse } from 'http';
import { logger } from '../../utils/logger';
import { getOpenClawConfigDir } from '../../utils/paths';
import { buildGatewayHealthSummary } from '../../utils/gateway-health';
import { buildYinianModelConfigDiagnostics, ensureYinianModelRuntimeConfigured } from '../../utils/model-diagnostics';
import type { HostApiContext } from '../context';
import { sendJson } from '../route-utils';
import { buildChannelAccountsView, getChannelStatusDiagnostics } from './channels';
@@ -82,5 +83,17 @@ export async function handleDiagnosticsRoutes(
return true;
}
if (url.pathname === '/api/diagnostics/model-config' && req.method === 'GET') {
try {
if (url.searchParams.get('repair') === '1') {
await ensureYinianModelRuntimeConfigured();
}
sendJson(res, 200, await buildYinianModelConfigDiagnostics());
} catch (error) {
sendJson(res, 500, { success: false, error: String(error) });
}
return true;
}
return false;
}