feat(admin): add MindSpace SEO/GEO controls and template catalog page

Expose SEO/GEO switches on the MindSpace config form and add template catalog management UI wired to shared Memind modules.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-10 08:06:21 +08:00
parent 7120d4b5ea
commit ed8bc6d1b1
13 changed files with 768 additions and 16 deletions
+24
View File
@@ -62,6 +62,8 @@ import type {
WechatWebNotification,
MindSearchConfig,
MindSearchServiceTestResult,
AdminTemplateCatalogItem,
AdminTemplateCatalogPatch,
} from '../types';
import type {
OrchestratorCanaryReadiness,
@@ -1432,3 +1434,25 @@ export async function fetchImageQuotaLedger(params: {
totalPages: number;
}>(`/admin-api/image-quota/ledger${q.toString() ? `?${q}` : ''}`);
}
export async function fetchAdminTemplateCatalog(): Promise<AdminTemplateCatalogItem[]> {
const result = await portalFetch<{ items: AdminTemplateCatalogItem[] }>('/admin-api/template-catalog');
return result.items ?? [];
}
export async function updateAdminTemplateCatalogItem(
skillName: string,
patch: AdminTemplateCatalogPatch,
): Promise<{ ok: boolean; item?: AdminTemplateCatalogItem }> {
return portalFetch(`/admin-api/template-catalog/${encodeURIComponent(skillName)}`, {
method: 'PUT',
body: JSON.stringify(patch),
});
}
export async function grantUserPageTemplate(userId: string, skillName: string) {
return portalFetch<{ ok: boolean; skillName: string; grantedSkills?: string[] }>(
`/admin-api/users/${encodeURIComponent(userId)}/template-grants/${encodeURIComponent(skillName)}`,
{ method: 'POST' },
);
}