Henning Dieterichs
2025-07-04 14:37:48 +00:00
committed by GitHub
parent 2380d75ac8
commit 005f93e50a
2 changed files with 3 additions and 1 deletions
@@ -172,6 +172,7 @@ export class InlineCompletionsModel extends Disposable {
changeSummary.changeReason = detailedReasons.length > 0 ? detailedReasons[0].getType() : '';
changeSummary.textChange = true;
} else if (ctx.didChange(this._forceUpdateExplicitlySignal)) {
changeSummary.preserveCurrentCompletion = true;
changeSummary.inlineCompletionTriggerKind = InlineCompletionTriggerKind.Explicit;
} else if (ctx.didChange(this.dontRefetchSignal)) {
changeSummary.dontRefetch = true;
@@ -340,6 +340,7 @@ suite('Inline Completions', () => {
test('when accepting word by word', async function () {
// The user types the text as suggested and the provider reports a different suggestion.
// Even when triggering explicitly, we want to keep the suggestion.
const provider = new MockInlineCompletionsProvider();
await withAsyncTestCodeEditorAndInlineCompletionsModel('',
@@ -356,7 +357,7 @@ suite('Inline Completions', () => {
await ctx.model.triggerExplicitly(); // reset to provider truth
await timeout(10000);
assert.deepStrictEqual(ctx.context.getAndClearViewStates(), (["foo[ baz]"]));
assert.deepStrictEqual(ctx.context.getAndClearViewStates(), ([]));
}
);
});