feat(wechat): add admin UI for WeChat LLM intent router toggles.

Expose memindadm controls for the service-account-only intent refinement layer so operators can enable, shadow, and canary the router without touching H5 chatIntentRouter settings.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-01 21:16:35 +08:00
parent 9933bfb89c
commit 1af5b1dd82
3 changed files with 291 additions and 1 deletions
+22
View File
@@ -51,6 +51,9 @@ import type {
WechatDeliveryLog,
WechatDigestSubscription,
WechatScheduleLlmConfig,
WechatIntentRouterAdminConfig,
WechatIntentRouterConfigState,
WechatIntentRouterRuntimeState,
WechatMessage,
WechatWebNotification,
MindSearchConfig,
@@ -446,6 +449,25 @@ export async function updateWechatScheduleLlmConfig(
});
}
export async function getWechatIntentRouterConfig(): Promise<WechatIntentRouterAdminConfig> {
const result = await portalFetch<WechatIntentRouterConfigState>('/admin-api/wechat/intent-router/config');
return result.config;
}
export async function patchWechatIntentRouterConfig(
patch: Partial<Omit<WechatIntentRouterAdminConfig, 'updatedAt' | 'updatedBy'>>,
): Promise<WechatIntentRouterAdminConfig> {
const result = await portalFetch<WechatIntentRouterConfigState>('/admin-api/wechat/intent-router/config', {
method: 'PATCH',
body: JSON.stringify(patch),
});
return result.config;
}
export async function getWechatIntentRouterRuntime(): Promise<WechatIntentRouterRuntimeState> {
return portalFetch<WechatIntentRouterRuntimeState>('/admin-api/wechat/intent-router/runtime');
}
export async function getAssetGatewayConfig(): Promise<AssetGatewayConfig> {
return portalFetch('/admin-api/asset-gateway/config');
}