(slot: ModelSlot | null | undefined, configs: AIServiceConfig[])
| 73 | } |
| 74 | |
| 75 | function 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 | |
| 82 | export function getDefaultAssistantConfig(aiDataDir: string): AIServiceConfig | null { |
| 83 | const store = loadLlmConfig(aiDataDir) |
no outgoing calls
no test coverage detected