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

Function testConnection

src/renderer/src/components/settings/LLMSettings.tsx:118–139  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

116 }
117
118 const testConnection = async () => {
119 try {
120 const values = await form.validateFields()
121 setLoading(true)
122
123 const result = await window.api.ai.testConnection({
124 apiHost: values.apiHost,
125 apiKey: values.apiKey,
126 modelName: values.modelName
127 })
128
129 if (result.success) {
130 message.success('连接测试成功')
131 } else {
132 message.error(result.error || '连接测试失败,请检查配置')
133 }
134 } catch (error) {
135 message.error('连接测试失败,请检查配置')
136 } finally {
137 setLoading(false)
138 }
139 }
140
141 return (
142 <Modal

Callers

nothing calls this directly

Calls 1

testConnectionMethod · 0.45

Tested by

no test coverage detected