fix: 精简AI失败重试文案

This commit is contained in:
2026-08-03 18:04:27 +08:00
parent 1954f461af
commit 59c306f88f
2 changed files with 3 additions and 3 deletions

View File

@@ -219,7 +219,7 @@ async function runGeneration(sessionId: number, message: string, assistantIndex:
} else {
currentAssistant().errorMessage = chatErrorMessage(error);
currentAssistant().retryQuestion = message;
showToast("本次回答未完成,可以点击重新生成");
showToast("本次回答未完成,可以点击重");
}
} finally {
sending.value = false;
@@ -230,7 +230,7 @@ async function runGeneration(sessionId: number, message: string, assistantIndex:
function chatErrorMessage(error: unknown) {
const message = error instanceof Error ? error.message : "";
if (/429|too many|请求过多|排队/i.test(message)) return "当前请求较多AI 服务暂时繁忙。";
if (/timeout|超时/i.test(message)) return "等待 AI 回复超时,请稍后重新生成。";
if (/timeout|超时/i.test(message)) return "等待 AI 回复超时,请稍后重。";
if (/network|网络|连接/i.test(message)) return "网络连接不稳定,本次回答没有完成。";
return "AI 回答生成失败,本次不会扣除成功回答额度。";
}

View File

@@ -105,7 +105,7 @@ const displayTime = computed(() => {
<span>{{ errorMessage }}</span>
<button v-if="canRetry" type="button" :disabled="streaming" @click="emit('retry')">
<RotateCcw :size="15" aria-hidden="true" />
新生成
</button>
</div>
</template>