MCPcopy Create free account
hub / github.com/ModelEngine-Group/app-platform / updateConfig

Function updateConfig

agent-flow/src/data/GraphOperator.js:129–139  ·  view source on GitHub ↗
(config, updates)

Source from the content-addressed store, hash-verified

127 }
128
129 const updateConfig = (config, updates) => {
130 if (Array.isArray(updates)) {
131 config.value = updates.map(update => {
132 return toConfig(null, update);
133 })?.filter(item => item !== null);
134 } else if (typeof updates === 'object') {
135 updateObject(updates, config);
136 } else {
137 config.value = updates;
138 }
139 };
140
141 const updateObject = (updates, config) => {
142 Object.keys(updates).forEach(k => {

Callers 2

graphOperatorFunction · 0.70
updateObjectFunction · 0.70

Calls 5

toConfigFunction · 0.90
updateObjectFunction · 0.85
isArrayMethod · 0.80
mapMethod · 0.65
filterMethod · 0.45

Tested by

no test coverage detected