Skip to content

Commit c99a6ff

Browse files
committed
update
1 parent 74b44d2 commit c99a6ff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ export class AmazonQInlineCompletionItemProvider implements InlineCompletionItem
222222
// this line is to force VS Code to re-render the inline completion
223223
// if it decides the inline completion can be shown
224224
await vscode.commands.executeCommand('editor.action.inlineSuggest.trigger')
225-
// yield event loop to let backend state transition finish
226-
await sleep(1)
225+
// yield event loop to let backend state transition finish plus wait for vsc to render
226+
await sleep(10)
227227
// run the command to detect if inline suggestion is really shown or not
228228
await vscode.commands.executeCommand(`aws.amazonq.checkInlineSuggestionVisibility`)
229229
}
@@ -316,7 +316,7 @@ export class AmazonQInlineCompletionItemProvider implements InlineCompletionItem
316316
if (prevItemMatchingPrefix.length > 0) {
317317
logstr += `- not call LSP and reuse previous suggestions that match user typed characters
318318
- duration between trigger to completion suggestion is displayed ${performance.now() - t0}`
319-
this.checkWhetherInlineCompletionWasShown()
319+
void this.checkWhetherInlineCompletionWasShown()
320320
return prevItemMatchingPrefix
321321
}
322322

@@ -471,7 +471,7 @@ ${itemLog}
471471
this.sessionManager.updateCodeReferenceAndImports()
472472
// suggestions returned here will be displayed on screen
473473
logstr += `- duration between trigger to completion suggestion is displayed: ${performance.now() - t0}ms`
474-
this.checkWhetherInlineCompletionWasShown()
474+
void this.checkWhetherInlineCompletionWasShown()
475475
return itemsMatchingTypeahead as InlineCompletionItem[]
476476
} catch (e) {
477477
getLogger('amazonqLsp').error('Failed to provide completion items: %O', e)

0 commit comments

Comments
 (0)