MCPcopy
hub / github.com/7836246/cursor2api / getConfig

Function getConfig

src/config.ts:285–294  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

283 * 获取当前配置(所有模块统一通过此函数获取最新配置)
284 */
285export function getConfig(): AppConfig {
286 if (config) return config;
287
288 // 首次加载
289 const defaults = defaultConfig();
290 const { config: parsed } = parseYamlConfig(defaults);
291 applyEnvOverrides(parsed);
292 config = parsed;
293 return config;
294}
295
296/**
297 * 初始化 config.yaml 文件监听,实现热重载

Callers

nothing calls this directly

Calls 3

defaultConfigFunction · 0.85
parseYamlConfigFunction · 0.85
applyEnvOverridesFunction · 0.85

Tested by

no test coverage detected