@@ -180,6 +180,7 @@ export class InlineChatController implements IEditorContribution {
180
180
this . _log ( 'session starting inside of run' ) ;
181
181
console . log ( 'before finishExistingSession inside of run' ) ;
182
182
await this . finishExistingSession ( ) ;
183
+ console . log ( 'after finish existing session inside of run' ) ;
183
184
this . _stashedSession . clear ( ) ;
184
185
console . log ( 'before calling create session inside of run' ) ;
185
186
await this . _nextState ( State . CREATE_SESSION , options ) ;
@@ -220,14 +221,15 @@ export class InlineChatController implements IEditorContribution {
220
221
private async [ State . CREATE_SESSION ] ( options : InlineChatRunOptions ) : Promise < State . CANCEL | State . INIT_UI | State . PAUSE > {
221
222
console . log ( 'inside of CREATE_SESSION' ) ;
222
223
console . log ( 'inside of CREATE_SESSION, this._activeSession : ' , this . _activeSession ) ;
223
- if ( this . _activeSession ) {
224
- console . log ( 'inside of CREATE_SESSION, before clearing the session store' ) ;
225
- this . _sessionStore . clear ( ) ;
226
- console . log ( 'inside of CREATE_SESSION, before releasing the session' ) ;
227
- this . _inlineChatSessionService . releaseSession ( this . _activeSession ) ;
228
- console . log ( 'inside of CREATE_SESSION, before calling pause' ) ;
229
- await this [ State . PAUSE ] ( ) ;
230
- }
224
+ // if (this._activeSession) {
225
+ // console.log('inside of CREATE_SESSION, before clearing the session store');
226
+ // this._sessionStore.clear();
227
+ // console.log('inside of CREATE_SESSION, before releasing the session');
228
+ // this._inlineChatSessionService.releaseSession(this._activeSession);
229
+ // console.log('inside of CREATE_SESSION, before calling pause');
230
+ // // Doesn't appear to be properly awaited?
231
+ // await this[State.PAUSE]();
232
+ // }
231
233
console . log ( 'inside of CREATE_SESSION, this._activeSession after the cleaning : ' , this . _activeSession ) ;
232
234
assertType ( this . _activeSession === undefined ) ;
233
235
assertType ( this . _editor . hasModel ( ) ) ;
@@ -691,7 +693,7 @@ export class InlineChatController implements IEditorContribution {
691
693
console . log ( 'inside of State.ACCEPT, before strategy apply' ) ;
692
694
await this . _strategy . apply ( ) ;
693
695
console . log ( 'inside of State.ACCEPT, after strategy apply' ) ;
694
- // TODO: ASK WHY DESPITE AWAIT AFTER STRATEFY NOT PRINTED BEFORE CREATE SESSION
696
+ // TODO: ASK WHY DESPITE AWAIT, AFTER STRATEFY NOT PRINTED BEFORE CREATE SESSION
695
697
} catch ( err ) {
696
698
console . log ( 'inside of State.ACCEPT, when error obtained' ) ;
697
699
this . _dialogService . error ( localize ( 'err.apply' , "Failed to apply changes." , toErrorMessage ( err ) ) ) ;
@@ -812,6 +814,7 @@ export class InlineChatController implements IEditorContribution {
812
814
813
815
acceptSession ( ) : void {
814
816
console . log ( 'inside of acceptSession method' ) ;
817
+ // Will fire a message which will be picked up by the controller and some other code will be run
815
818
this . _messages . fire ( Message . ACCEPT_SESSION ) ;
816
819
}
817
820
0 commit comments