@@ -65,7 +65,7 @@ export class InlineCompletionsModel extends Disposable {
65
65
let lastItem : InlineCompletionWithUpdatedRange | undefined = undefined ;
66
66
this . _register ( autorun ( 'call handleItemDidShow' , reader => {
67
67
const item = this . state . read ( reader ) ;
68
- const completion = item ?. completion ;
68
+ const completion = item ?. inlineCompletion ;
69
69
if ( completion ?. semanticId !== lastItem ?. semanticId ) {
70
70
lastItem = completion ;
71
71
if ( completion ) {
@@ -191,7 +191,7 @@ export class InlineCompletionsModel extends Disposable {
191
191
192
192
public readonly state = derived < {
193
193
suggestItem : SuggestItemInfo | undefined ;
194
- completion : InlineCompletionWithUpdatedRange | undefined ;
194
+ inlineCompletion : InlineCompletionWithUpdatedRange | undefined ;
195
195
ghostText : GhostTextOrReplacement ;
196
196
} | undefined > ( 'ghostTextAndCompletion' , ( reader ) => {
197
197
const model = this . textModel ;
@@ -225,7 +225,7 @@ export class InlineCompletionsModel extends Disposable {
225
225
226
226
// Show an invisible ghost text to reserve space
227
227
const ghostText = newGhostText ?? new GhostText ( edit . range . endLineNumber , [ ] ) ;
228
- return { ghostText, completion : augmentedCompletion ?. completion , suggestItem } ;
228
+ return { ghostText, inlineCompletion : augmentedCompletion ?. completion , suggestItem } ;
229
229
} else {
230
230
if ( ! this . _isActive . read ( reader ) ) { return undefined ; }
231
231
const item = this . selectedInlineCompletion . read ( reader ) ;
@@ -235,7 +235,7 @@ export class InlineCompletionsModel extends Disposable {
235
235
const mode = this . _inlineSuggestMode . read ( reader ) ;
236
236
const cursor = this . cursorPosition . read ( reader ) ;
237
237
const ghostText = replacement . computeGhostText ( model , mode , cursor ) ;
238
- return ghostText ? { ghostText, completion : item , suggestItem : undefined } : undefined ;
238
+ return ghostText ? { ghostText, inlineCompletion : item , suggestItem : undefined } : undefined ;
239
239
}
240
240
} ) ;
241
241
@@ -271,10 +271,10 @@ export class InlineCompletionsModel extends Disposable {
271
271
}
272
272
273
273
const state = this . state . get ( ) ;
274
- if ( ! state || state . ghostText . isEmpty ( ) || ! state . completion ) {
274
+ if ( ! state || state . ghostText . isEmpty ( ) || ! state . inlineCompletion ) {
275
275
return ;
276
276
}
277
- const completion = state . completion . toInlineCompletion ( undefined ) ;
277
+ const completion = state . inlineCompletion . toInlineCompletion ( undefined ) ;
278
278
279
279
editor . pushUndoStop ( ) ;
280
280
if ( completion . snippetInfo ) {
@@ -363,11 +363,11 @@ export class InlineCompletionsModel extends Disposable {
363
363
}
364
364
365
365
const state = this . state . get ( ) ;
366
- if ( ! state || state . ghostText . isEmpty ( ) || ! state . completion ) {
366
+ if ( ! state || state . ghostText . isEmpty ( ) || ! state . inlineCompletion ) {
367
367
return ;
368
368
}
369
369
const ghostText = state . ghostText ;
370
- const completion = state . completion . toInlineCompletion ( undefined ) ;
370
+ const completion = state . inlineCompletion . toInlineCompletion ( undefined ) ;
371
371
372
372
if ( completion . snippetInfo || completion . filterText !== completion . insertText ) {
373
373
// not in WYSIWYG mode, partial commit might change completion, thus it is not supported
0 commit comments