@@ -144,6 +144,7 @@ export class InlineChatController implements IEditorContribution {
144
144
dispose ( ) : void {
145
145
console . log ( 'inside of dispose' ) ;
146
146
this . _stashedSession . clear ( ) ;
147
+ console . log ( 'inside of dispose before calling finishExistingSession' ) ;
147
148
this . finishExistingSession ( ) ;
148
149
this . _store . dispose ( ) ;
149
150
this . _log ( 'controller disposed' ) ;
@@ -177,6 +178,7 @@ export class InlineChatController implements IEditorContribution {
177
178
178
179
async run ( options : InlineChatRunOptions | undefined = { } ) : Promise < void > {
179
180
this . _log ( 'session starting inside of run' ) ;
181
+ console . log ( 'before finishExistingSession inside of run' ) ;
180
182
await this . finishExistingSession ( ) ;
181
183
this . _stashedSession . clear ( ) ;
182
184
console . log ( 'before calling create session inside of run' ) ;
@@ -353,7 +355,7 @@ export class InlineChatController implements IEditorContribution {
353
355
354
356
if ( editIsOutsideOfWholeRange ) {
355
357
this . _log ( 'text changed outside of whole range, FINISH session' ) ;
356
- console . log ( 'inside of INIT_UI, before the third finish existing session' ) ;
358
+ console . log ( 'inside of INIT_UI, before calling finish existing session' ) ;
357
359
this . finishExistingSession ( ) ;
358
360
}
359
361
} ) ) ;
@@ -729,6 +731,7 @@ export class InlineChatController implements IEditorContribution {
729
731
// only stash sessions that had edits
730
732
this . _stashedSession . value = this . _instaService . createInstance ( StashedSession , this . _editor , mySession ) ;
731
733
} else {
734
+ console . log ( 'before releasing the session of cancel' ) ;
732
735
this . _inlineChatSessionService . releaseSession ( mySession ) ;
733
736
}
734
737
}
@@ -870,6 +873,7 @@ class StashedSession {
870
873
this . _ctxHasStashedSession . set ( true ) ;
871
874
this . _listener = Event . once ( Event . any ( editor . onDidChangeCursorSelection , editor . onDidChangeModelContent , editor . onDidChangeModel ) ) ( ( ) => {
872
875
this . _session = undefined ;
876
+ console . log ( 'before release session of constructor' ) ;
873
877
this . _sessionService . releaseSession ( session ) ;
874
878
this . _ctxHasStashedSession . reset ( ) ;
875
879
} ) ;
@@ -879,6 +883,7 @@ class StashedSession {
879
883
this . _listener . dispose ( ) ;
880
884
this . _ctxHasStashedSession . reset ( ) ;
881
885
if ( this . _session ) {
886
+ console . log ( 'before release session of dispose' ) ;
882
887
this . _sessionService . releaseSession ( this . _session ) ;
883
888
}
884
889
}
0 commit comments