mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-10 03:28:03 +00:00
Fix error message not showing after canceling API request (#2845)
This commit is contained in:
parent
1a376c262e
commit
c6f91a3b2f
2 changed files with 9 additions and 2 deletions
|
|
@ -943,6 +943,8 @@ export class Cline extends EventEmitter<ClineEvents> {
|
|||
if (this.isStreaming && this.diffViewProvider.isEditing) {
|
||||
await this.diffViewProvider.revertChanges()
|
||||
}
|
||||
// Save the countdown message in the automatic retry or other content
|
||||
await this.saveClineMessages()
|
||||
}
|
||||
|
||||
// Tools
|
||||
|
|
|
|||
|
|
@ -591,8 +591,13 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
|
|||
case "api_req_deleted": // aggregated api_req metrics from deleted messages
|
||||
return false
|
||||
case "api_req_retry_delayed":
|
||||
// Only show the retry message if it's the last message
|
||||
return message === modifiedMessages.at(-1)
|
||||
// Only show the retry message if it's the last message or the last messages is api_req_retry_delayed+resume_task
|
||||
const last1 = modifiedMessages.at(-1)
|
||||
const last2 = modifiedMessages.at(-2)
|
||||
if (last1?.ask === "resume_task" && last2 === message) {
|
||||
return true
|
||||
}
|
||||
return message === last1
|
||||
case "text":
|
||||
// Sometimes cline returns an empty text message, we don't want to render these. (We also use a say text for user messages, so in case they just sent images we still render that)
|
||||
if ((message.text ?? "") === "" && (message.images?.length ?? 0) === 0) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue