feat: 能力插件元数据与运行时消费闭环

This commit is contained in:
que01 committed 2026-10-12 11:20:43 +08:00
1 parent 076c6124c8
commit bb0709b8cc
26 files changed
+2188 -267

No files matched your search

+1 -2
View File
@@ -47,8 +47,6 @@ export async function loadWorkspace() {
const data = await request<RuntimeWorkspace>("/public/workspace");
const editorPreview = isEditorPreview();
if (!editorPreview && data.publication?.status !== "published") throw new Error("品牌尚未发布");
if (!editorPreview && data.brand.visualTemplateKey !== TEMPLATE_KEY)
throw new Error("该品牌使用其他模板,请选择匹配的模板预览地址");
return {
...data,
brand: data.brand ?? {},
@@ -59,6 +57,7 @@ export async function loadWorkspace() {
trustPresentation: data.trustPresentation ?? {},
capabilities: data.capabilities ?? [],
theme: data.theme ?? { colors: {} },
plugins: data.plugins ?? [],
};
}
export async function ensureSession() {