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

Function getManager

apps/desktop/main/ai/assistant/manager.ts:53–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51let _manager: SharedAssistantManager | null = null
52
53export function getManager(): SharedAssistantManager {
54 if (!_manager) {
55 _manager = new SharedAssistantManager({
56 fs: nodeFs,
57 assistantsDir: path.join(getPathProvider().getAiDataDir(), 'assistants'),
58 builtinRawConfigs: [
59 { id: 'general_cn', content: builtinGeneralZhRaw },
60 { id: 'general_en', content: builtinGeneralEnRaw },
61 { id: 'general_ja', content: builtinGeneralJaRaw },
62 ],
63 logger: aiLogger,
64 generateId: () => `custom_${randomUUID().replace(/-/g, '').slice(0, 12)}`,
65 })
66 }
67 return _manager
68}
69
70// ==================== Public API (preserves existing function signatures) ====================
71

Callers 13

initAssistantManagerFunction · 0.70
getAllAssistantsFunction · 0.70
getAssistantConfigFunction · 0.70
hasAssistantFunction · 0.70
getBuiltinCatalogFunction · 0.70
importAssistantFunction · 0.70
reimportAssistantFunction · 0.70
updateAssistantFunction · 0.70
createAssistantFunction · 0.70
deleteAssistantFunction · 0.70
resetAssistantFunction · 0.70
importAssistantFromMdFunction · 0.70

Calls 2

getPathProviderFunction · 0.90
getAiDataDirMethod · 0.65

Tested by

no test coverage detected