Skip to content

Commit ca98f9c

Browse files
committed
update
1 parent 00f53bb commit ca98f9c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

packages/amazonq/src/app/inline/sessionManager.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

packages/amazonq/src/lsp/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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')

0 commit comments

Comments
 (0)