fix: 精简AI失败重试文案
This commit is contained in:
@@ -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 回答生成失败,本次不会扣除成功回答额度。";
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user