inline chat fixes (#203297)

* Pause state should be more relaxed and expect partial state

fixes https://github.com/microsoft/vscode/issues/203173

* clear stashed session before starting a new session

fixes https://github.com/microsoft/vscode-copilot/issues/3719
This commit is contained in:
Johannes Rieken 2024-01-24 10:40:58 +01:00 committed by GitHub
parent b27e28197e
commit afd4f631aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -247,6 +247,7 @@ export class InlineChatController implements IEditorContribution {
}
this._historyOffset = -1;
this._historyCandidate = '';
this._stashedSession.clear();
this._onWillStartSession.fire();
this._currentRun = this._nextState(State.CREATE_SESSION, options);
await this._currentRun;
@ -815,12 +816,10 @@ export class InlineChatController implements IEditorContribution {
}
private async[State.PAUSE]() {
assertType(this._session);
assertType(this._strategy);
this._resetWidget();
this._strategy.pause?.();
this._strategy?.pause?.();
this._session = undefined;
}