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

Function transformServiceData

packages/agent-core/src/config/toml.ts:423–436  ·  view source on GitHub ↗
(data: Record<string, unknown>)

Source from the content-addressed store, hash-verified

421}
422
423function transformServiceData(data: Record<string, unknown>): Record<string, unknown> {
424 const out: Record<string, unknown> = {};
425 for (const [key, value] of Object.entries(data)) {
426 const targetKey = snakeToCamel(key);
427 if (targetKey === 'oauth') {
428 out[targetKey] = isPlainObject(value) ? transformPlainObject(value) : value;
429 } else if (targetKey === 'customHeaders') {
430 out[targetKey] = cloneObjectValue(value);
431 } else {
432 out[targetKey] = value;
433 }
434 }
435 return out;
436}
437
438function transformLoopControlData(data: Record<string, unknown>): Record<string, unknown> {
439 const out = transformPlainObject(data);

Callers

nothing calls this directly

Calls 4

transformPlainObjectFunction · 0.85
cloneObjectValueFunction · 0.85
snakeToCamelFunction · 0.70
isPlainObjectFunction · 0.70

Tested by

no test coverage detected