feat: 终止请求后的调整

This commit is contained in:
zoujing
2025-08-06 13:52:32 +08:00
parent 65653525a0
commit 6f9f129883
2 changed files with 7 additions and 1 deletions

View File

@@ -59,7 +59,8 @@ function agentChatStream(params, onChunk) {
});
requestTask.onChunkReceived(res => {
if (hasError) return;
// 检查请求是否已被中止
if (hasError || requestTask.isAborted) return;
const base64 = uni.arrayBufferToBase64(res.data);
let data = '';
try {