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

Function testImageConnection

frontend/src/composables/useProviderForm.ts:476–495  ·  view source on GitHub ↗

* 测试图片服务商连接(弹窗中)

()

Source from the content-addressed store, hash-verified

474 * 测试图片服务商连接(弹窗中)
475 */
476 async function testImageConnection() {
477 testingImage.value = true
478 try {
479 const result = await testConnection({
480 type: imageForm.value.type,
481 provider_name: editingImageProvider.value || undefined,
482 api_key: imageForm.value.api_key || undefined,
483 base_url: imageForm.value.base_url,
484 endpoint_type: imageForm.value.endpoint_type,
485 model: imageForm.value.model
486 })
487 if (result.success) {
488 setSuccess(result.message || '连接成功')
489 }
490 } catch (e: any) {
491 setError(e, '连接失败')
492 } finally {
493 testingImage.value = false
494 }
495 }
496
497 /**
498 * 测试列表中的图片服务商

Callers

nothing calls this directly

Calls 3

testConnectionFunction · 0.90
setSuccessFunction · 0.85
setErrorFunction · 0.85

Tested by

no test coverage detected