/** * Demo mode helpers. * * Starting the demo registers a local instance whose API calls are served by * {@link demoFetch} — no network and no credentials required. */ import { useAccountsStore } from '@/core/accounts/accounts-store'; import { DEMO_BASE_URL, DEMO_LOGIN, DEMO_TOKEN } from './demo-fetch'; export { demoFetch, isDemoBaseUrl, DEMO_BASE_URL, DEMO_HOST, DEMO_TOKEN, DEMO_LOGIN } from './demo-fetch'; /** Registers the built-in demo instance and makes it the active account. */ export async function startDemoAccount(): Promise { await useAccountsStore.getState().registerAccount({ baseUrl: DEMO_BASE_URL, label: 'Demo', token: DEMO_TOKEN, version: '1.22.0', profile: { login: DEMO_LOGIN, id: 1, fullName: 'Octo Cat' }, }); }