Skip to content

Commit 71e4f15

Browse files
authored
Provide range to completion item to allow for correct inline display (#15398)
1 parent ec8152e commit 71e4f15

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/ai-code-completion/src/browser/code-completion-agent.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,11 @@ export class CodeCompletionAgentImpl implements CodeCompletionAgent {
156156
const postProcessedCompletionText = this.postProcessor.postProcess(completionText);
157157

158158
return {
159-
items: [{ insertText: postProcessedCompletionText }],
160-
enableForwardStability: true,
159+
items: [{
160+
insertText: postProcessedCompletionText,
161+
range: new monaco.Range(position.lineNumber, position.column, position.lineNumber, position.column)
162+
}],
163+
enableForwardStability: true
161164
};
162165
} catch (e) {
163166
if (!token.isCancellationRequested) {

0 commit comments

Comments
 (0)