MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / resolveSlot

Function resolveSlot

apps/cli/src/ai/llm-config.ts:75–80  ·  view source on GitHub ↗
(slot: ModelSlot | null | undefined, configs: AIServiceConfig[])

Source from the content-addressed store, hash-verified

73}
74
75function resolveSlot(slot: ModelSlot | null | undefined, configs: AIServiceConfig[]): ModelSlot | null {
76 if (slot && configs.some((c) => c.id === slot.configId)) return slot
77 const fallback = configs[0]
78 if (!fallback) return null
79 return { configId: fallback.id, modelId: fallback.model }
80}
81
82export function getDefaultAssistantConfig(aiDataDir: string): AIServiceConfig | null {
83 const store = loadLlmConfig(aiDataDir)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected