(config: LLMConfig)
| 247 | const { message, modal } = App.useApp() |
| 248 | |
| 249 | const handleSaveConfig = (config: LLMConfig) => { |
| 250 | const existingConfig = settings.llmConfigs?.find((c) => c.id === config.id) |
| 251 | |
| 252 | if (existingConfig) { |
| 253 | updateLLMConfig(config.id, config) |
| 254 | message.success('配置已更新') |
| 255 | } else { |
| 256 | addLLMConfig(config) |
| 257 | message.success('配置已添加') |
| 258 | } |
| 259 | |
| 260 | setModalOpen(false) |
| 261 | setEditingConfig(undefined) |
| 262 | } |
| 263 | |
| 264 | const handleDeleteConfig = (config: LLMConfig) => { |
| 265 | const currentConfigs = settings.llmConfigs || [] |
nothing calls this directly
no outgoing calls
no test coverage detected