Skip to content

Commit b97e7b8

Browse files
committed
removing the console logs
1 parent bd27bb0 commit b97e7b8

File tree

5 files changed

+0
-48
lines changed

5 files changed

+0
-48
lines changed

src/vs/editor/browser/widget/diffEditorWidget.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -709,8 +709,6 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE
709709
}
710710

711711
public override dispose(): void {
712-
console.log('inside of the dispose method');
713-
714712
this._codeEditorService.removeDiffEditor(this);
715713

716714
if (this._beginUpdateDecorationsTimeout !== -1) {
@@ -886,7 +884,6 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE
886884
this._onDidChangeModel.fire();
887885

888886
// Diff navigator
889-
console.log('right before the final _register');
890887
this._diffNavigator = this._register(this._instantiationService.createInstance(DiffNavigator, this, {
891888
alwaysRevealFirst: false,
892889
findResultLoop: this.getModifiedEditor().getOption(EditorOption.find).loop

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ export class InlineChatController implements IEditorContribution {
176176
private _currentRun?: Promise<void>;
177177

178178
async run(options: InlineChatRunOptions | undefined = {}): Promise<void> {
179-
console.log('inside of run');
180179
this.finishExistingSession();
181180
if (this._currentRun) {
182181
await this._currentRun;
@@ -668,7 +667,6 @@ export class InlineChatController implements IEditorContribution {
668667
}
669668

670669
private async [State.CANCEL]() {
671-
console.log('inside of cancel function');
672670
assertType(this._activeSession);
673671
assertType(this._strategy);
674672
this._sessionStore.clear();
@@ -773,7 +771,6 @@ export class InlineChatController implements IEditorContribution {
773771
}
774772

775773
cancelSession() {
776-
console.log('inside of the cancel session method');
777774
let result: string | undefined;
778775
if (this._strategy && this._activeSession) {
779776
const changedText = this._activeSession.asChangedText();
@@ -788,7 +785,6 @@ export class InlineChatController implements IEditorContribution {
788785
}
789786

790787
finishExistingSession(): void {
791-
console.log('inside of finish existing session');
792788
if (this._activeSession) {
793789
if (this._activeSession.editMode === EditMode.Preview) {
794790
this._log('finishing existing session, using CANCEL', this._activeSession.editMode);

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ export class PreviewStrategy extends EditModeStrategy {
126126
const edits = response.localEdits.map(edit => EditOperation.replace(Range.lift(edit.range), edit.text));
127127
this._widget.showEditsPreview(this._session.textModel0, edits, this._session.lastTextModelChanges);
128128
} else {
129-
console.log('inside of render changes');
130129
this._widget.hideEditsPreview();
131130
}
132131

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,6 @@ export class InlineChatWidget {
521521
this._elements.statusToolbar.classList.add('hidden');
522522
this._elements.feedbackToolbar.classList.add('hidden');
523523
this.hideCreatePreview();
524-
console.log('inside of reset');
525524
this.hideEditsPreview();
526525
this._onDidChangeHeight.fire();
527526
}
@@ -538,7 +537,6 @@ export class InlineChatWidget {
538537

539538
showEditsPreview(textModelv0: ITextModel, edits: ISingleEditOperation[], changes: readonly LineRangeMapping[]) {
540539
if (changes.length === 0) {
541-
console.log('inside of show edits preview');
542540
this.hideEditsPreview();
543541
return;
544542
}
@@ -548,7 +546,6 @@ export class InlineChatWidget {
548546
const languageSelection: ILanguageSelection = { languageId: textModelv0.getLanguageId(), onDidChange: Event.None };
549547
const modified = this._modelService.createModel(createTextBufferFactoryFromSnapshot(textModelv0.createSnapshot()), languageSelection, undefined, true);
550548
modified.applyEdits(edits, false);
551-
console.log('inside of show edits preview');
552549
this._previewDiffEditor.value.setModel({ original: textModelv0, modified });
553550

554551
// joined ranges
@@ -580,10 +577,7 @@ export class InlineChatWidget {
580577
}
581578

582579
hideEditsPreview() {
583-
// Error happens because this is called after the diff editor widget is already disposed.
584-
console.log('inside of hide edits preview');
585580
this._elements.previewDiff.classList.add('hidden');
586-
// TODO: error is happening here
587581
this._previewDiffEditor.value.setModel(null);
588582
this._previewDiffModel.clear();
589583
this._onDidChangeHeight.fire();
@@ -840,7 +834,6 @@ export class InlineChatZoneWidget extends ZoneWidget {
840834
}
841835

842836
override hide(): void {
843-
console.log('inside of hide');
844837
this.container!.classList.remove('inside-selection');
845838
this._ctxVisible.reset();
846839
this._ctxCursorPosition.reset();

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

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -141,39 +141,26 @@ suite('InteractiveChatController', function () {
141141
});
142142

143143
test('creation, not showing anything', function () {
144-
console.log('*** at the begining of creation');
145144
ctrl = instaService.createInstance(TestController, editor);
146145
assert.ok(ctrl);
147146
assert.strictEqual(ctrl.getWidgetPosition(), undefined);
148-
console.log('*** at the end of creation');
149147
});
150148

151149
test('run (show/hide)', async function () {
152-
console.log('*** at the beginning of run (show/hide)');
153-
154150
ctrl = instaService.createInstance(TestController, editor);
155-
console.log('right before run');
156151
const run = ctrl.run({ message: 'Hello', autoSend: true });
157152

158-
console.log('right before waitFor INIT_SEQUENCE_AUTO_SEND');
159153
await ctrl.waitFor(TestController.INIT_SEQUENCE_AUTO_SEND);
160154
assert.ok(ctrl.getWidgetPosition() !== undefined);
161-
162-
console.log('right before cancel session');
163155
ctrl.cancelSession();
164156

165-
console.log('right before run');
166157
await run;
167158

168-
console.log('ctrl.getWidgetPosition() : ', ctrl.getWidgetPosition());
169159
assert.ok(ctrl.getWidgetPosition() === undefined);
170-
console.log('*** at the end of run (show/hide)');
171160
});
172161

173162
test('wholeRange expands to whole lines, editor selection default', async function () {
174163

175-
console.log('*** at the beginning of wholeRange, editor selection default');
176-
177164
editor.setSelection(new Range(1, 1, 1, 3));
178165
ctrl = instaService.createInstance(TestController, editor);
179166

@@ -198,14 +185,10 @@ suite('InteractiveChatController', function () {
198185

199186
ctrl.cancelSession();
200187
d.dispose();
201-
202-
console.log('*** at the end of wholeRange, editor selection default');
203188
});
204189

205190
test('wholeRange expands to whole lines, session provided', async function () {
206191

207-
console.log('*** at the beginning of wholeRange, editor selection provided');
208-
209192
editor.setSelection(new Range(1, 1, 1, 1));
210193
ctrl = instaService.createInstance(TestController, editor);
211194

@@ -231,14 +214,9 @@ suite('InteractiveChatController', function () {
231214

232215
ctrl.cancelSession();
233216
d.dispose();
234-
235-
console.log('*** at the end of wholeRange, editor selection provided');
236217
});
237218

238219
test('typing outside of wholeRange finishes session', async function () {
239-
240-
console.log('*** at the beginning of typing outside');
241-
242220
ctrl = instaService.createInstance(TestController, editor);
243221
ctrl.run({ message: 'Hello', autoSend: true });
244222

@@ -252,14 +230,10 @@ suite('InteractiveChatController', function () {
252230
editor.trigger('test', 'type', { text: 'a' });
253231

254232
await ctrl.waitFor([State.ACCEPT]);
255-
256-
console.log('*** at the end of typing outside');
257233
});
258234

259235
test('\'whole range\' isn\'t updated for edits outside whole range #4346', async function () {
260236

261-
console.log('*** at the beginning of whole range isnt updated');
262-
263237
editor.setSelection(new Range(3, 1, 3, 1));
264238

265239
const d = inlineChatService.addProvider({
@@ -296,14 +270,9 @@ suite('InteractiveChatController', function () {
296270
await ctrl.waitFor([State.MAKE_REQUEST, State.APPLY_RESPONSE, State.SHOW_RESPONSE, State.WAIT_FOR_INPUT]);
297271

298272
assert.deepStrictEqual(session.wholeRange.value, new Range(1, 1, 4, 12));
299-
300-
console.log('*** at the end of whole range isnt updated');
301273
});
302274

303275
test('Stuck inline chat widget #211', async function () {
304-
305-
console.log('*** at the beginning of stuck inline chat');
306-
307276
const d = inlineChatService.addProvider({
308277
debugName: 'Unit Test',
309278
prepareInlineChatSession() {
@@ -336,7 +305,5 @@ suite('InteractiveChatController', function () {
336305

337306
await p;
338307
assert.strictEqual(ctrl.getWidgetPosition(), undefined);
339-
340-
console.log('*** at the end of stuck inline chat');
341308
});
342309
});

0 commit comments

Comments
 (0)