MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / init

Method init

packages/node-runtime/src/ai/assistant-manager.ts:101–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

99 // ==================== Init ====================
100
101 init(): AssistantInitResult {
102 const { fs, assistantsDir } = this.deps
103 fs.ensureDir(assistantsDir)
104
105 const generalCreated = this.ensureGeneralAssistants()
106 this.loadAll()
107
108 this.initialized = true
109 this.deps.logger?.info('AssistantManager', 'Initialized', {
110 total: this.cache.size,
111 generalCreated,
112 })
113
114 return { total: this.cache.size, generalCreated }
115 }
116
117 private ensureGeneralAssistants(): boolean {
118 const { fs, assistantsDir } = this.deps

Callers 1

ensureInitializedMethod · 0.95

Calls 4

loadAllMethod · 0.95
ensureDirMethod · 0.65
infoMethod · 0.65

Tested by

no test coverage detected