Adding a retry button for cases when the streaming response breaks with no text or error (#5505)

This commit is contained in:
Ara authored and GitHub committed 2025-08-13 16:53:27 -07:00
1 parent 88000d4f39
commit 2ec21eda34
1 file changed
+13 -1
+13 -1
View File
@@ -2511,7 +2511,19 @@ export class Task {
},
],
})
// Returns early to avoid retry since no assistant message was received
// Offer the user a chance to retry this API request
const { response } = await this.ask(
"api_req_failed",
"No assistant message was received. Would you like to retry the request?",
)
if (response === "yesButtonClicked") {
// Signal the loop to continue (i.e., do not end), so it will attempt again
return false
}
// Returns early to avoid retry since user dismissed
return true
}