()
| 257 | |
| 258 | /** 获取快速模型配置(会话摘要),未配置时回退到默认助手 */ |
| 259 | export function getFastModelConfig(): AIServiceConfig | null { |
| 260 | const store = loadConfigStore() |
| 261 | if (store.fastModel === null) return getDefaultAssistantConfig() |
| 262 | |
| 263 | const slot = resolveSlot(store.fastModel, store.configs) |
| 264 | if (slot) { |
| 265 | const config = store.configs.find((c) => c.id === slot.configId) |
| 266 | if (config) return { ...config, model: slot.modelId || config.model } |
| 267 | } |
| 268 | return getDefaultAssistantConfig() |
| 269 | } |
| 270 | |
| 271 | export function getConfigById(id: string): AIServiceConfig | null { |
| 272 | const store = loadConfigStore() |
no test coverage detected