chore: stabilize Zhinian pilot delivery
This commit is contained in:
@@ -5,6 +5,7 @@ import { logger } from '../../utils/logger';
|
||||
import { getOpenClawConfigDir } from '../../utils/paths';
|
||||
import { buildGatewayHealthSummary } from '../../utils/gateway-health';
|
||||
import { buildYinianModelConfigDiagnostics, ensureYinianModelRuntimeConfigured } from '../../utils/model-diagnostics';
|
||||
import { buildOfficeSkillRuntimeDiagnostics, ensureOfficeSkillRuntimeReady } from '../../utils/office-skill-runtime';
|
||||
import type { HostApiContext } from '../context';
|
||||
import { sendJson } from '../route-utils';
|
||||
import { buildChannelAccountsView, getChannelStatusDiagnostics } from './channels';
|
||||
@@ -95,5 +96,17 @@ export async function handleDiagnosticsRoutes(
|
||||
return true;
|
||||
}
|
||||
|
||||
if (url.pathname === '/api/diagnostics/office-runtime' && req.method === 'GET') {
|
||||
try {
|
||||
const diagnostics = url.searchParams.get('repair') === '1'
|
||||
? await ensureOfficeSkillRuntimeReady()
|
||||
: await buildOfficeSkillRuntimeDiagnostics();
|
||||
sendJson(res, 200, diagnostics);
|
||||
} catch (error) {
|
||||
sendJson(res, 500, { success: false, error: String(error) });
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user