(slot: import('./model-types').ModelSlot | null)
| 380 | |
| 381 | /** 设置快速模型(configId + modelId),传 null 表示跟随默认助手 */ |
| 382 | export function setFastModel(slot: import('./model-types').ModelSlot | null): { success: boolean; error?: string } { |
| 383 | const store = loadConfigStore() |
| 384 | |
| 385 | if (slot !== null) { |
| 386 | const config = store.configs.find((c) => c.id === slot.configId) |
| 387 | if (!config) { |
| 388 | return { success: false, error: t('llm.configNotFound') } |
| 389 | } |
| 390 | } |
| 391 | |
| 392 | store.fastModel = slot |
| 393 | saveConfigStore(store) |
| 394 | return { success: true } |
| 395 | } |
| 396 | |
| 397 | export function hasActiveConfig(): boolean { |
| 398 | return getDefaultAssistantConfig() !== null |
nothing calls this directly
no test coverage detected