Fix microsoft/vscode-copilot#4823. (#208828)

Fix microsoft/vscode-copilot#4762.
This commit is contained in:
Peng Lyu 2024-03-26 13:01:35 -07:00 committed by GitHub
parent 25da801de4
commit 24346707ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -316,8 +316,8 @@ export class NotebookChatController extends Disposable implements INotebookEdito
run(index: number, input: string | undefined, autoSend: boolean | undefined): void {
if (this._widget) {
if (this._widget.afterModelPosition !== index) {
this._disposeWidget();
const window = getWindow(this._widget.domNode);
this._disposeWidget();
scheduleAtNextAnimationFrame(window, () => {
this._createWidget(index, input, autoSend, undefined);