Skip to content

Commit 4057a58

Browse files
authored
don't count changes but make sure error'd edits don't make it into buffer (microsoft#202745)
fixes microsoft#202702
1 parent 37740ec commit 4057a58

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,8 @@ suite('InteractiveChatController', function () {
382382
assert.strictEqual(editor.getModel().getValue(), valueThen);
383383
});
384384

385+
386+
385387
test('UI is streaming edits minutes after the response is finished #3345', async function () {
386388

387389
configurationService.setUserConfiguration(InlineChatConfigKeys.Mode, EditMode.Live);
@@ -411,26 +413,27 @@ suite('InteractiveChatController', function () {
411413
});
412414

413415

414-
let modelChangeCounter = 0;
415-
store.add(editor.getModel().onDidChangeContent(() => { modelChangeCounter++; }));
416+
// let modelChangeCounter = 0;
417+
// store.add(editor.getModel().onDidChangeContent(() => { modelChangeCounter++; }));
416418

417419
store.add(d);
418420
ctrl = instaService.createInstance(TestController, editor);
419421
const p = ctrl.waitFor([...TestController.INIT_SEQUENCE, State.MAKE_REQUEST, State.APPLY_RESPONSE, State.SHOW_RESPONSE, State.WAIT_FOR_INPUT]);
420422
const r = ctrl.run({ message: 'Hello', autoSend: true });
421423
await p;
422424

423-
assert.ok(modelChangeCounter > 0); // some changes have been made
424-
425-
const modelChangeCounterNow = modelChangeCounter;
425+
// assert.ok(modelChangeCounter > 0, modelChangeCounter.toString()); // some changes have been made
426+
// const modelChangeCounterNow = modelChangeCounter;
426427

428+
assert.ok(!editor.getModel().getValue().includes('DONE'));
427429
await timeout(10);
428430

429-
assert.strictEqual(modelChangeCounterNow, modelChangeCounter);
431+
// assert.strictEqual(modelChangeCounterNow, modelChangeCounter);
430432
assert.ok(!editor.getModel().getValue().includes('DONE'));
431433

432434
await ctrl.cancelSession();
433435
await r;
434436
});
435437
});
438+
436439
});

0 commit comments

Comments
 (0)