Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type" : "bugfix",
"description" : "Fix error occuring when Amazon Q attempts to show UI hints on manually triggerred inline suggestion (#4929)"
}
Original file line number Diff line number Diff line change
Expand Up @@ -409,10 +409,8 @@ class CodeWhispererService(private val cs: CoroutineScope) : Disposable {
if (requestContext.triggerTypeInfo.triggerType == CodewhispererTriggerType.OnDemand) {
// We should only show error hint when CodeWhisperer popup is not visible,
// and make it silent if CodeWhisperer popup is showing.
runInEdt {
if (!CodeWhispererInvocationStatus.getInstance().isPopupActive()) {
showCodeWhispererErrorHint(requestContext.editor, displayMessage)
}
if (!CodeWhispererInvocationStatus.getInstance().isPopupActive()) {
showCodeWhispererErrorHint(requestContext.editor, displayMessage)
}
}
}
Expand Down Expand Up @@ -754,12 +752,16 @@ class CodeWhispererService(private val cs: CoroutineScope) : Disposable {
return true
}

fun showCodeWhispererInfoHint(editor: Editor, message: String) {
HintManager.getInstance().showInformationHint(editor, message, HintManager.UNDER)
private fun showCodeWhispererInfoHint(editor: Editor, message: String) {
runInEdt {
HintManager.getInstance().showInformationHint(editor, message, HintManager.UNDER)
}
}

fun showCodeWhispererErrorHint(editor: Editor, message: String) {
HintManager.getInstance().showErrorHint(editor, message, HintManager.UNDER)
private fun showCodeWhispererErrorHint(editor: Editor, message: String) {
runInEdt {
HintManager.getInstance().showErrorHint(editor, message, HintManager.UNDER)
}
}

override fun dispose() {}
Expand Down
Loading