MCPcopy
hub / github.com/HisMax/RedInk / testTextConnection

Function testTextConnection

frontend/src/composables/useProviderForm.ts:317–336  ·  view source on GitHub ↗

* 测试文本服务商连接(弹窗中)

()

Source from the content-addressed store, hash-verified

315 * 测试文本服务商连接(弹窗中)
316 */
317 async function testTextConnection() {
318 testingText.value = true
319 try {
320 const result = await testConnection({
321 type: textForm.value.type,
322 provider_name: editingTextProvider.value || undefined,
323 api_key: textForm.value.api_key || undefined,
324 base_url: textForm.value.base_url,
325 endpoint_type: textForm.value.endpoint_type,
326 model: textForm.value.model
327 })
328 if (result.success) {
329 setSuccess(result.message || '连接成功')
330 }
331 } catch (e: any) {
332 setError(e, '连接失败')
333 } finally {
334 testingText.value = false
335 }
336 }
337
338 /**
339 * 测试列表中的文本服务商

Callers

nothing calls this directly

Calls 3

testConnectionFunction · 0.90
setSuccessFunction · 0.85
setErrorFunction · 0.85

Tested by

no test coverage detected