fix: 第三方/本地服务编辑弹窗丢失多个自定义模型

This commit is contained in:
digua
2026-04-09 20:31:52 +08:00
committed by digua
parent df1bccca2e
commit d7a02a10c2
5 changed files with 18 additions and 1 deletions
+1
View File
@@ -58,6 +58,7 @@ export interface LLMConnectionConfig {
export interface LLMConnectionConfigCompat extends LLMConnectionConfig {
disableThinking?: boolean
isReasoningModel?: boolean
customModels?: Array<{ id: string; name: string }>
}
// ==================== 用途选择(预留) ====================
+1
View File
@@ -42,6 +42,7 @@ export interface AIServiceConfig {
maxTokens?: number
disableThinking?: boolean
isReasoningModel?: boolean
customModels?: Array<{ id: string; name: string }>
createdAt: number
updatedAt: number
}
+2
View File
@@ -403,6 +403,7 @@ export function registerAIHandlers({ win }: IpcContext): void {
model?: string
baseUrl?: string
maxTokens?: number
customModels?: Array<{ id: string; name: string }>
}
) => {
try {
@@ -439,6 +440,7 @@ export function registerAIHandlers({ win }: IpcContext): void {
model?: string
baseUrl?: string
maxTokens?: number
customModels?: Array<{ id: string; name: string }>
}
) => {
try {
+3
View File
@@ -172,6 +172,7 @@ export interface AIServiceConfigDisplay {
maxTokens?: number
disableThinking?: boolean
isReasoningModel?: boolean
customModels?: Array<{ id: string; name: string }>
createdAt: number
updatedAt: number
}
@@ -608,6 +609,7 @@ export const llmApi = {
maxTokens?: number
disableThinking?: boolean
isReasoningModel?: boolean
customModels?: Array<{ id: string; name: string }>
}): Promise<{ success: boolean; config?: AIServiceConfigDisplay; error?: string }> => {
return ipcRenderer.invoke('llm:addConfig', config)
},
@@ -626,6 +628,7 @@ export const llmApi = {
maxTokens?: number
disableThinking?: boolean
isReasoningModel?: boolean
customModels?: Array<{ id: string; name: string }>
}
): Promise<{ success: boolean; error?: string }> => {
return ipcRenderer.invoke('llm:updateConfig', id, updates)