mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-19 08:50:58 +00:00
chore(merge): sync master into dev/4.11.x
This commit is contained in:
@@ -26,7 +26,7 @@ import {
|
||||
import { httpClient } from '@/app/infra/http/HttpClient';
|
||||
import {
|
||||
systemInfo,
|
||||
initializeUserInfo,
|
||||
bootstrapWorkspaceSession,
|
||||
initializeSystemInfo,
|
||||
getCloudServiceClient,
|
||||
getCloudServiceClientSync,
|
||||
@@ -347,8 +347,16 @@ export default function WizardPage() {
|
||||
let cancelled = false;
|
||||
(async () => {
|
||||
try {
|
||||
// Initialize user/system info (wizard is outside /home layout)
|
||||
await Promise.all([initializeUserInfo(), initializeSystemInfo()]);
|
||||
// Resolve the Account's Workspace before loading scoped wizard data.
|
||||
const workspaceResult = await bootstrapWorkspaceSession();
|
||||
if (workspaceResult.status === 'selection-required') {
|
||||
navigate('/workspaces/select?returnTo=%2Fwizard', { replace: true });
|
||||
return;
|
||||
}
|
||||
if (workspaceResult.status === 'unavailable') {
|
||||
throw new Error('No Workspace is available for this Account');
|
||||
}
|
||||
await initializeSystemInfo({ throwOnError: true });
|
||||
|
||||
const [adaptersResp, metadataResp] = await Promise.all([
|
||||
httpClient.getAdapters(),
|
||||
@@ -414,7 +422,7 @@ export default function WizardPage() {
|
||||
return () => {
|
||||
cancelled = true;
|
||||
};
|
||||
}, [t]);
|
||||
}, [navigate, t]);
|
||||
|
||||
// ---- Derived data ----
|
||||
|
||||
|
||||
Reference in New Issue
Block a user