Add support for MCP in export mode

This commit is contained in:
YISH
2025-05-08 13:27:04 +08:00
parent 3809375694
commit d1baabae14
8 changed files with 198 additions and 51 deletions

View File

@@ -243,7 +243,12 @@ export const useAccessStore = createPersistStore(
);
},
fetch() {
if (fetchState > 0 || getClientConfig()?.buildMode === "export") return;
const clientConfig = getClientConfig();
if (!(fetchState > 0) && clientConfig?.buildMode === "export") {
set(clientConfig);
fetchState = 2;
}
if (fetchState > 0 || clientConfig?.buildMode === "export") return;
fetchState = 1;
fetch("/api/config", {
method: "post",