Skip to content

Commit ac2fa31

Browse files
author
CodeKing
committed
fix: push restored chat history to webview on task resume after reload
1 parent e9ca466 commit ac2fa31

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/core/task/Task.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2150,6 +2150,14 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
21502150
await this.overwriteClineMessages(modifiedClineMessages)
21512151
this.clineMessages = await this.getSavedClineMessages()
21522152

2153+
// Push the full restored message history to the webview so the UI
2154+
// renders the previous conversation immediately on resume, rather
2155+
// than waiting for the user to respond to the resume prompt.
2156+
const resumeProvider = this.providerRef.deref()
2157+
if (resumeProvider) {
2158+
await resumeProvider.postStateToWebview()
2159+
}
2160+
21532161
// Now present the cline messages to the user and ask if they want to
21542162
// resume (NOTE: we ran into a bug before where the
21552163
// apiConversationHistory wouldn't be initialized when opening a old

0 commit comments

Comments
 (0)