Add wechat reminder LLM admin toggle

This commit is contained in:
john
2026-07-07 12:10:21 +08:00
parent ebcc33b367
commit b9cadd91fc
6 changed files with 79 additions and 1 deletions
+11
View File
@@ -38,6 +38,7 @@ import type {
WechatBinding,
WechatDeliveryLog,
WechatDigestSubscription,
WechatScheduleLlmConfig,
WechatMessage,
WechatWebNotification,
} from '../types';
@@ -254,6 +255,7 @@ export async function getWechatAdminSummary(): Promise<WechatAdminSummary> {
bindPath: summary.config?.bindPath ?? null,
tokenEndpointConfigured: summary.config?.tokenEndpointConfigured ?? false,
customerServiceEndpointConfigured: summary.config?.customerServiceEndpointConfigured ?? false,
scheduleLlmEnabled: summary.config?.scheduleLlmEnabled ?? false,
},
counts: {
boundUsers: summary.counts?.boundUsers ?? 0,
@@ -268,6 +270,15 @@ export async function getWechatAdminSummary(): Promise<WechatAdminSummary> {
};
}
export async function updateWechatScheduleLlmConfig(
payload: Pick<WechatScheduleLlmConfig, 'scheduleLlmEnabled'>,
): Promise<WechatScheduleLlmConfig> {
return portalFetch<WechatScheduleLlmConfig>('/admin-api/wechat/schedule-llm-config', {
method: 'PATCH',
body: JSON.stringify(payload),
});
}
export async function getMindSpaceAdminConfig(): Promise<MindSpaceAdminConfig> {
const result = await portalFetch<{ config: MindSpaceAdminConfig }>('/admin-api/mindspace/config');
return result.config;