@@ -636,7 +636,7 @@ function getRemainingDebounceMs(accessor: ServicesAccessor, opts: GetGhostTextOp
636636 return Math . max ( 0 , debounce - elapsed ) ;
637637}
638638
639- function inlineCompletionRequestCancelled (
639+ function isCompletionRequestCancelled (
640640 currentGhostText : ICompletionsCurrentGhostText ,
641641 requestId : string ,
642642 cancellationToken ?: ICancellationToken
@@ -668,7 +668,7 @@ async function getGhostTextWithoutAbortHandling(
668668 const currentGhostText = accessor . get ( ICompletionsCurrentGhostText ) ;
669669 const statusReporter = accessor . get ( ICompletionsStatusReporter ) ;
670670
671- if ( inlineCompletionRequestCancelled ( currentGhostText , ourRequestId , cancellationToken ) ) {
671+ if ( isCompletionRequestCancelled ( currentGhostText , ourRequestId , cancellationToken ) ) {
672672 return {
673673 type : 'abortedBeforeIssued' ,
674674 reason : 'cancelled before extractPrompt' ,
@@ -758,7 +758,7 @@ async function getGhostTextWithoutAbortHandling(
758758 if ( debounce > 0 ) {
759759 ghostTextLogger . debug ( logTarget , `Debouncing ghost text request for ${ debounce } ms` ) ;
760760 await delay ( debounce ) ;
761- if ( inlineCompletionRequestCancelled ( currentGhostText , ourRequestId , cancellationToken ) ) {
761+ if ( isCompletionRequestCancelled ( currentGhostText , ourRequestId , cancellationToken ) ) {
762762 return {
763763 type : 'abortedBeforeIssued' ,
764764 reason : 'cancelled after debounce' ,
@@ -845,7 +845,7 @@ async function getGhostTextWithoutAbortHandling(
845845 const trimmedChoice = makeGhostAPIChoice ( choice [ 0 ] , { forceSingleLine } ) ;
846846 choices = [ [ trimmedChoice ] , ResultType . Async ] ;
847847 }
848- if ( inlineCompletionRequestCancelled ( currentGhostText , ourRequestId , cancellationToken ) ) {
848+ if ( isCompletionRequestCancelled ( currentGhostText , ourRequestId , cancellationToken ) ) {
849849 ghostTextLogger . debug ( logTarget , 'Cancelled before requesting a new completion' ) ;
850850 return {
851851 type : 'abortedBeforeIssued' ,
@@ -988,7 +988,7 @@ async function getGhostTextWithoutAbortHandling(
988988 if ( resultType !== ResultType . TypingAsSuggested && ! ghostTextOptions . isCycling && remainingDelay > 0 ) {
989989 ghostTextLogger . debug ( logTarget , `Waiting ${ remainingDelay } ms before returning completion` ) ;
990990 await delay ( remainingDelay ) ;
991- if ( inlineCompletionRequestCancelled ( currentGhostText , ourRequestId , cancellationToken ) ) {
991+ if ( isCompletionRequestCancelled ( currentGhostText , ourRequestId , cancellationToken ) ) {
992992 ghostTextLogger . debug ( logTarget , 'Cancelled after completions delay' ) ;
993993 return {
994994 type : 'canceled' ,
@@ -1038,7 +1038,7 @@ async function getGhostTextWithoutAbortHandling(
10381038 `Produced ${ results . length } results from ${ resultTypeToString ( resultType ) } at ${ telemetryData . measurements . foundOffset } offset`
10391039 ) ;
10401040
1041- if ( inlineCompletionRequestCancelled ( currentGhostText , ourRequestId , cancellationToken ) ) {
1041+ if ( isCompletionRequestCancelled ( currentGhostText , ourRequestId , cancellationToken ) ) {
10421042 return {
10431043 type : 'canceled' ,
10441044 reason : 'after post processing completions' ,
0 commit comments