Skip to content

Commit 6732c27

Browse files
authored
Fix losing input history when clearing the chat session (microsoft#199092)
1 parent d99c66c commit 6732c27

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/vs/workbench/contrib/chat/browser/chatWidget.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,9 @@ export class ChatWidget extends Disposable implements IChatWidget {
439439
}
440440
}));
441441
this.viewModelDisposables.add(this.viewModel.onDidDisposeModel(() => {
442+
// Ensure that view state is saved here, because we will load it again when a new model is assigned
443+
this.inputPart.saveState();
444+
442445
// Disposes the viewmodel and listeners
443446
this.viewModel = undefined;
444447
this.onDidChangeItems();

0 commit comments

Comments
 (0)