mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-10 03:28:03 +00:00
fix: await updateClineMessage calls to prevent duplicate reasoning blocks
- Add await to all updateClineMessage calls in Task.ts - Fixes race condition where reasoning blocks were rendered multiple times - Ensures message updates complete before proceeding with next update
This commit is contained in:
parent
a879f247f3
commit
639cb78e1d
1 changed files with 4 additions and 4 deletions
|
|
@ -450,7 +450,7 @@ export class Task extends EventEmitter<ClineEvents> {
|
|||
// data or one whole message at a time so ignore partial for
|
||||
// saves, and only post parts of partial message instead of
|
||||
// whole array in new listener.
|
||||
this.updateClineMessage(lastMessage)
|
||||
await this.updateClineMessage(lastMessage)
|
||||
throw new Error("Current ask promise was ignored (#1)")
|
||||
} else {
|
||||
// This is a new partial message, so add it with partial
|
||||
|
|
@ -486,7 +486,7 @@ export class Task extends EventEmitter<ClineEvents> {
|
|||
lastMessage.progressStatus = progressStatus
|
||||
lastMessage.isProtected = isProtected
|
||||
await this.saveClineMessages()
|
||||
this.updateClineMessage(lastMessage)
|
||||
await this.updateClineMessage(lastMessage)
|
||||
} else {
|
||||
// This is a new and complete message, so add it like normal.
|
||||
this.askResponse = undefined
|
||||
|
|
@ -636,7 +636,7 @@ export class Task extends EventEmitter<ClineEvents> {
|
|||
lastMessage.images = images
|
||||
lastMessage.partial = partial
|
||||
lastMessage.progressStatus = progressStatus
|
||||
this.updateClineMessage(lastMessage)
|
||||
await this.updateClineMessage(lastMessage)
|
||||
} else {
|
||||
// This is a new partial message, so add it with partial state.
|
||||
const sayTs = Date.now()
|
||||
|
|
@ -674,7 +674,7 @@ export class Task extends EventEmitter<ClineEvents> {
|
|||
await this.saveClineMessages()
|
||||
|
||||
// More performant than an entire `postStateToWebview`.
|
||||
this.updateClineMessage(lastMessage)
|
||||
await this.updateClineMessage(lastMessage)
|
||||
} else {
|
||||
// This is a new and complete message, so add it like normal.
|
||||
const sayTs = Date.now()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue