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

Function loadRawConfigStore

apps/cli/src/ai/llm-config.ts:235–250  ·  view source on GitHub ↗
(aiDataDir: string)

Source from the content-addressed store, hash-verified

233}
234
235function loadRawConfigStore(aiDataDir: string): AIConfigStore {
236 const configPath = path.join(aiDataDir, 'llm-config.json')
237 if (!fs.existsSync(configPath)) {
238 return { configs: [], defaultAssistant: null, fastModel: null }
239 }
240 try {
241 const data = JSON.parse(fs.readFileSync(configPath, 'utf-8'))
242 return {
243 configs: data.configs || [],
244 defaultAssistant: data.defaultAssistant ?? null,
245 fastModel: data.fastModel ?? null,
246 }
247 } catch {
248 return { configs: [], defaultAssistant: null, fastModel: null }
249 }
250}
251
252// ==================== PiModel Builder ====================
253

Callers 5

addLlmConfigFunction · 0.85
updateLlmConfigFunction · 0.85
deleteLlmConfigFunction · 0.85
setDefaultAssistantSlotFunction · 0.85
setFastModelSlotFunction · 0.85

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected