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

Method save

packages/sync/src/config-manager.ts:58–65  ·  view source on GitHub ↗
(config: ApiServerConfig)

Source from the content-addressed store, hash-verified

56 }
57
58 save(config: ApiServerConfig): void {
59 try {
60 this.ensureDir()
61 fs.writeFileSync(this.getConfigPath(), JSON.stringify(config, null, 2), 'utf-8')
62 } catch (err) {
63 this.logger.error('[Config] Failed to save config', err)
64 }
65 }
66
67 update(partial: Partial<ApiServerConfig>): ApiServerConfig {
68 const current = this.load()

Callers 6

updateMethod · 0.95
ensureTokenMethod · 0.95
regenerateTokenMethod · 0.95
setEnabledFunction · 0.45
setPortFunction · 0.45

Calls 3

ensureDirMethod · 0.95
getConfigPathMethod · 0.95
errorMethod · 0.65

Tested by

no test coverage detected