mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: refresh UI after checkpoint restore operation
- Added postStateToWebview() call after checkpoint deletion/restoration - This ensures the webview displays the restored messages correctly - Fixes issue where chat history disappeared visually after restore - Updated tests to include the mock for postStateToWebview Fixes #9307
This commit is contained in:
parent
3e0bd0ea55
commit
ec17fbf1ce
2 changed files with 4 additions and 0 deletions
|
|
@ -48,6 +48,7 @@ describe("checkpointRestoreHandler", () => {
|
|||
mockProvider = {
|
||||
getCurrentTask: vi.fn(() => mockCline),
|
||||
postMessageToWebview: vi.fn(),
|
||||
postStateToWebview: vi.fn(), // Add this method to the mock
|
||||
getTaskWithId: vi.fn(() => ({
|
||||
historyItem: { id: "test-task-123", messages: mockCline.clineMessages },
|
||||
})),
|
||||
|
|
|
|||
|
|
@ -75,6 +75,9 @@ export async function handleCheckpointRestoreOperation(config: CheckpointRestore
|
|||
// Get the updated history item and reinitialize
|
||||
const { historyItem } = await provider.getTaskWithId(currentCline.taskId)
|
||||
await provider.createTaskWithHistoryItem(historyItem)
|
||||
|
||||
// Update the webview to show the restored messages
|
||||
await provider.postStateToWebview()
|
||||
}
|
||||
// For edit operations, the task cancellation in checkpointRestore
|
||||
// will trigger reinitialization, which will process pendingEditAfterRestore
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue