Skip to content

Commit d80f788

Browse files
committed
adding some more comments
1 parent a07bb86 commit d80f788

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ export class InlineChatController implements IEditorContribution {
144144
dispose(): void {
145145
console.log('inside of dispose');
146146
this._stashedSession.clear();
147+
console.log('inside of dispose before calling finishExistingSession');
147148
this.finishExistingSession();
148149
this._store.dispose();
149150
this._log('controller disposed');
@@ -177,6 +178,7 @@ export class InlineChatController implements IEditorContribution {
177178

178179
async run(options: InlineChatRunOptions | undefined = {}): Promise<void> {
179180
this._log('session starting inside of run');
181+
console.log('before finishExistingSession inside of run');
180182
await this.finishExistingSession();
181183
this._stashedSession.clear();
182184
console.log('before calling create session inside of run');
@@ -353,7 +355,7 @@ export class InlineChatController implements IEditorContribution {
353355

354356
if (editIsOutsideOfWholeRange) {
355357
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');
357359
this.finishExistingSession();
358360
}
359361
}));
@@ -729,6 +731,7 @@ export class InlineChatController implements IEditorContribution {
729731
// only stash sessions that had edits
730732
this._stashedSession.value = this._instaService.createInstance(StashedSession, this._editor, mySession);
731733
} else {
734+
console.log('before releasing the session of cancel');
732735
this._inlineChatSessionService.releaseSession(mySession);
733736
}
734737
}
@@ -870,6 +873,7 @@ class StashedSession {
870873
this._ctxHasStashedSession.set(true);
871874
this._listener = Event.once(Event.any(editor.onDidChangeCursorSelection, editor.onDidChangeModelContent, editor.onDidChangeModel))(() => {
872875
this._session = undefined;
876+
console.log('before release session of constructor');
873877
this._sessionService.releaseSession(session);
874878
this._ctxHasStashedSession.reset();
875879
});
@@ -879,6 +883,7 @@ class StashedSession {
879883
this._listener.dispose();
880884
this._ctxHasStashedSession.reset();
881885
if (this._session) {
886+
console.log('before release session of dispose');
882887
this._sessionService.releaseSession(this._session);
883888
}
884889
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,7 @@ export class InlineChatSessionService implements IInlineChatSessionService {
477477
}
478478

479479
releaseSession(session: Session): void {
480+
console.log('at the beginning of the release session');
480481

481482
const { editor } = session;
482483

@@ -498,6 +499,7 @@ export class InlineChatSessionService implements IInlineChatSessionService {
498499

499500
// send telemetry
500501
this._telemetryService.publicLog2<TelemetryData, TelemetryDataClassification>('interactiveEditor/session', session.asTelemetryData());
502+
console.log('at the end of the release session');
501503
}
502504

503505
getSession(editor: ICodeEditor, uri: URI): Session | undefined {

0 commit comments

Comments
 (0)