perf(client): defer chat persistence dependencies
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import type { IChatRepository } from "./interfaces/ichat_repository";
|
||||
|
||||
/**
|
||||
* Loads the browser-only chat repository behind an explicit async boundary.
|
||||
*
|
||||
* The repository owns the Dexie-backed history and media stores. Keeping this
|
||||
* loader separate prevents those stores from entering every route's eager
|
||||
* client graph through shared providers.
|
||||
*/
|
||||
export async function loadChatRepository(): Promise<IChatRepository> {
|
||||
const { getChatRepository } = await import("./chat_repository");
|
||||
return getChatRepository();
|
||||
}
|
||||
Reference in New Issue
Block a user