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

Function setDefaultAssistantModel

apps/desktop/main/ai/llm/index.ts:368–379  ·  view source on GitHub ↗
(configId: string, modelId: string)

Source from the content-addressed store, hash-verified

366
367/** 设置默认助手模型(configId + modelId) */
368export function setDefaultAssistantModel(configId: string, modelId: string): { success: boolean; error?: string } {
369 const store = loadConfigStore()
370 const config = store.configs.find((c) => c.id === configId)
371
372 if (!config) {
373 return { success: false, error: t('llm.configNotFound') }
374 }
375
376 store.defaultAssistant = { configId, modelId }
377 saveConfigStore(store)
378 return { success: true }
379}
380
381/** 设置快速模型(configId + modelId),传 null 表示跟随默认助手 */
382export function setFastModel(slot: import('./model-types').ModelSlot | null): { success: boolean; error?: string } {

Callers

nothing calls this directly

Calls 3

tFunction · 0.90
loadConfigStoreFunction · 0.85
saveConfigStoreFunction · 0.85

Tested by

no test coverage detected