diff --git a/src/core/task/Task.ts b/src/core/task/Task.ts index 6f6f2d684a..422f8c24cb 100644 --- a/src/core/task/Task.ts +++ b/src/core/task/Task.ts @@ -450,7 +450,7 @@ export class Task extends EventEmitter { // 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 { 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 { 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 { 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()