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

Function writeStore

apps/desktop/main/ai/llm/custom-model-store.ts:29–36  ·  view source on GitHub ↗
(models: ModelDefinition[])

Source from the content-addressed store, hash-verified

27}
28
29function writeStore(models: ModelDefinition[]): void {
30 const storePath = getStorePath()
31 const dir = path.dirname(storePath)
32 if (!fs.existsSync(dir)) {
33 fs.mkdirSync(dir, { recursive: true })
34 }
35 fs.writeFileSync(storePath, JSON.stringify(models, null, 2), 'utf-8')
36}
37
38export function loadCustomModels(): ModelDefinition[] {
39 return readStore()

Callers 3

addCustomModelFunction · 0.70
updateCustomModelFunction · 0.70
deleteCustomModelFunction · 0.70

Calls 1

getStorePathFunction · 0.70

Tested by

no test coverage detected