MCPcopy Create free account
hub / github.com/experdot/pointer / handleSaveConfig

Function handleSaveConfig

src/renderer/src/components/settings/LLMSettings.tsx:249–262  ·  view source on GitHub ↗
(config: LLMConfig)

Source from the content-addressed store, hash-verified

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 || []

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected