fix: model should now recompute outcome at each next edit location
This commit is contained in:
parent
09cbcdba55
commit
2cbfe9748f
1 changed files with 20 additions and 1 deletions
|
|
@ -432,10 +432,29 @@ export class ContinueCompletionProvider
|
|||
0 &&
|
||||
!jumpSuccessful
|
||||
) {
|
||||
// NOTE: Outcome has to be re-computed for each next editable location.
|
||||
const nextRegion =
|
||||
this.nextEditProvider.shiftNextEditableRegionsInTheCurrentChain();
|
||||
this.nextEditProvider.getNextEditableRegionsInTheCurrentChain()[0];
|
||||
if (!nextRegion) continue;
|
||||
|
||||
// Getting the outcome shifts the next editable region queue,
|
||||
// deleting the item denoted by nextRegion above.
|
||||
outcome =
|
||||
await this.nextEditProvider.provideInlineCompletionItemsWithChain(
|
||||
{
|
||||
completionId,
|
||||
manuallyPassFileContents,
|
||||
manuallyPassPrefix,
|
||||
selectedCompletionInfo,
|
||||
isUntitledFile: document.isUntitled,
|
||||
recentlyVisitedRanges,
|
||||
recentlyEditedRanges,
|
||||
},
|
||||
signal,
|
||||
);
|
||||
|
||||
if (!outcome) continue;
|
||||
|
||||
const jumpPosition = new vscode.Position(
|
||||
nextRegion.range.start.line,
|
||||
nextRegion.range.start.character,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue