add error tip in llm test dialog

This commit is contained in:
geekgeekrun
2025-04-23 02:14:07 +08:00
parent d23b0475dc
commit 582eae0900

View File

@@ -140,6 +140,7 @@
<script lang="ts" setup>
import { computed, ref } from 'vue'
import { sleep } from '@geekgeekrun/utils/sleep.mjs'
import { ElMessage } from 'element-plus'
type MessageItem = {
text: string
usedLlmConfig: string
@@ -184,6 +185,12 @@ async function sendLlmGeneratedContent() {
top: scrollElRef.value?.scrollHeight,
behavior: 'smooth'
})
} catch (err) {
ElMessage.error({
dangerouslyUseHTMLString: true,
grouping: true,
message: `<div>本次测试所使用的模型不可用</div><div style="margin-top: 10px; white-space: nowrap;">建议在大语言模型配置中关闭相关模型</div>`
})
} finally {
isLoading.value = false
}