MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / getManager

Function getManager

apps/desktop/main/ai/chats.ts:16–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14let manager: AIChatManager | null = null
15
16export function getManager(): AIChatManager {
17 if (!manager) {
18 manager = new AIChatManager(getPathProvider().getAiDataDir(), {
19 logger: {
20 warn(category, message, extra) {
21 aiLogger.warn(category, message, extra)
22 },
23 },
24 })
25 }
26 return manager
27}
28
29export function closeAiDatabase(): void {
30 if (manager) {

Callers 15

getAiSchemaFunction · 0.70
executeAiSQLFunction · 0.70
createAIChatFunction · 0.70
getAIChatCountsBySessionFunction · 0.70
getAIChatsFunction · 0.70
getAIChatFunction · 0.70
updateAIChatTitleFunction · 0.70
deleteAIChatFunction · 0.70
addMessageFunction · 0.70
getMessagesFunction · 0.70
deleteMessageFunction · 0.70
deleteMessagesFromFunction · 0.70

Calls 2

getPathProviderFunction · 0.90
getAiDataDirMethod · 0.65

Tested by

no test coverage detected