Skip to content

Commit afd4f63

Browse files
authored
inline chat fixes (microsoft#203297)
* Pause state should be more relaxed and expect partial state fixes microsoft#203173 * clear stashed session before starting a new session fixes microsoft/vscode-copilot#3719
1 parent b27e281 commit afd4f63

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/vs/workbench/contrib/inlineChat/browser/inlineChatController.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ export class InlineChatController implements IEditorContribution {
247247
}
248248
this._historyOffset = -1;
249249
this._historyCandidate = '';
250+
this._stashedSession.clear();
250251
this._onWillStartSession.fire();
251252
this._currentRun = this._nextState(State.CREATE_SESSION, options);
252253
await this._currentRun;
@@ -815,12 +816,10 @@ export class InlineChatController implements IEditorContribution {
815816
}
816817

817818
private async[State.PAUSE]() {
818-
assertType(this._session);
819-
assertType(this._strategy);
820819

821820
this._resetWidget();
822821

823-
this._strategy.pause?.();
822+
this._strategy?.pause?.();
824823
this._session = undefined;
825824
}
826825

0 commit comments

Comments
 (0)