Skip to content

Commit 8967c86

Browse files
committed
chore: reload live preview on ai edits
1 parent 7cd2c6e commit 8967c86

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/core-ai/AIChatPanel.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,9 @@ define(function (require, exports, module) {
905905
// Record pre-edit content into pending snapshot and back-fill
906906
SnapshotStore.recordFileBeforeEdit(edit.file, previousContent, isNewFile);
907907

908+
// Reload live preview so the user sees the edit reflected immediately
909+
CommandManager.execute(Commands.CMD_RELOAD_LIVE_PREVIEW);
910+
908911
// Find the oldest Edit/Write tool indicator for this file that doesn't
909912
// already have edit actions. This is more robust than matching by toolId
910913
// because the SDK with includePartialMessages may re-emit tool_use blocks

0 commit comments

Comments
 (0)