MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / mergeDefaults

Function mergeDefaults

ai/ai.ts:401–411  ·  view source on GitHub ↗
(
  a?: T,
  b?: T,
)

Source from the content-addressed store, hash-verified

399 if (configuredType) return configuredType;
400 return `auto -> ${resolveProviderType(providerConfig)}`;
401};
402
403const mergeDefaults = <T extends { extraParams?: Record<string, any> }>(
404 a?: T,
405 b?: T,
406): T | undefined => {
407 if (!a && !b) return undefined;
408 return {
409 ...(a || {}),
410 ...(b || {}),
411 extraParams: { ...(a?.extraParams || {}), ...(b?.extraParams || {}) },
412 } as T;
413};
414

Callers 1

resolveModeConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected