File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -140,9 +140,13 @@ export class SessionManager {
140140 if ( this . activeSession ?. suggestions && this . activeSession . suggestions . length > 0 ) {
141141 const reference = this . activeSession . suggestions [ this . _currentSuggestionIndex ] . references
142142 if ( reference && reference . length > 0 ) {
143+ const insertText = this . activeSession . suggestions [ this . _currentSuggestionIndex ] . insertText
144+ const insertTextStr =
145+ typeof insertText === 'string' ? insertText : ( insertText . value ?? String ( insertText ) )
146+
143147 ReferenceInlineProvider . instance . setInlineReference (
144148 this . activeSession . startPosition . line ,
145- this . activeSession . suggestions [ this . _currentSuggestionIndex ] . insertText . toString ( ) ,
149+ insertTextStr ,
146150 reference
147151 )
148152 }
Original file line number Diff line number Diff line change @@ -309,12 +309,12 @@ async function onLanguageServerReady(
309309 Commands . register ( 'aws.amazonq.showPrev' , async ( ) => {
310310 await sessionManager . maybeRefreshSessionUx ( )
311311 await vscode . commands . executeCommand ( 'editor.action.inlineSuggest.showPrevious' )
312- await sessionManager . onPrevSuggestion ( )
312+ sessionManager . onPrevSuggestion ( )
313313 } ) ,
314314 Commands . register ( 'aws.amazonq.showNext' , async ( ) => {
315315 await sessionManager . maybeRefreshSessionUx ( )
316316 await vscode . commands . executeCommand ( 'editor.action.inlineSuggest.showNext' )
317- await sessionManager . onNextSuggestion ( )
317+ sessionManager . onNextSuggestion ( )
318318 } ) ,
319319 Commands . register ( { id : 'aws.amazonq.invokeInlineCompletion' , autoconnect : true } , async ( ) => {
320320 await vscode . commands . executeCommand ( 'editor.action.inlineSuggest.trigger' )
You can’t perform that action at this time.
0 commit comments