MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / reloadRuntimeConfig

Method reloadRuntimeConfig

packages/agent-core/src/rpc/core-impl.ts:1020–1037  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1018 }
1019
1020 private reloadRuntimeConfig(): KimiConfig {
1021 const loaded = loadRuntimeConfigSafe(this.configPath);
1022 if (loaded.fileWarnings.length > 0) {
1023 // Keep the last good config: adopting a salvaged config mid-run could
1024 // silently drop providers or models a live session depends on.
1025 this.configWarnings = [
1026 ...loaded.fileWarnings,
1027 ...loaded.envWarnings,
1028 'config.toml has errors; keeping the previously loaded configuration.',
1029 ];
1030 log.warn('config reload degraded; keeping previous config', {
1031 warnings: loaded.fileWarnings,
1032 });
1033 return this.config;
1034 }
1035 this.configWarnings = loaded.envWarnings;
1036 return this.setRuntimeConfig(loaded.config);
1037 }
1038
1039 private setRuntimeConfig(config: KimiConfig): KimiConfig {
1040 this.config = config;

Callers 4

getKimiConfigMethod · 0.95
setKimiConfigMethod · 0.95
removeKimiProviderMethod · 0.95
reloadProviderManagerMethod · 0.95

Calls 3

setRuntimeConfigMethod · 0.95
loadRuntimeConfigSafeFunction · 0.90
warnMethod · 0.65

Tested by

no test coverage detected