char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
8144f3192
char/aliceai-t5-moe
1// direct imports, not via the barrel, to avoid circular deps 2import { conversationsStore } from './conversations/index.svelte' ; 3import { permissionsStore } from './permissions.svelte' ; 4import { settingsStore } from './settings/index.svelte' ; 5import { tabsStore } from './tabs.svelte' ; 6import { toolsStore } from './tools.svelte' ; 7import { versionStore } from './version.svelte' ; 8import { browser } from '$app/environment' ; 9import { MigrationService } from '$lib/services/migration.service' ; 10 11let startup :Promise < void > | null = null ; 12 13export function initStores () :Promise < void > { 14if ( ! browser ) return Promise . resolve (); 15 16startup ??= ( async () => { 17await MigrationService . runAllMigrations (); 18 19settingsStore . initialize (); 20permissionsStore . initialize (); 21toolsStore . initialize (); 22void versionStore . initialize (); 23 24// the full conversation list loads in the background; once it is back, 25// prune persisted tabs against the conversations that still exist 26void conversationsStore . initialize (). then (() => { 27tabsStore . init ( conversationsStore . conversations . map (( c ) => c . id )); 28}); 29})(); 30 31return startup ; 32}