Skip to content

Commit c4d8674

Browse files
committed
fix nextToken check condition
1 parent ceb53a0 commit c4d8674

File tree

1 file changed

+2
-2
lines changed
  • plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/service

1 file changed

+2
-2
lines changed

plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/service/CodeWhispererService.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ class CodeWhispererService(private val cs: CoroutineScope) : Disposable {
292292
return null
293293
}
294294

295-
if (completions.partialResultToken?.left?.isEmpty() == true) {
295+
if (completions.partialResultToken?.left.isNullOrEmpty()) {
296296
CodeWhispererInvocationStatus.getInstance().finishInvocation()
297297
}
298298

@@ -326,7 +326,7 @@ class CodeWhispererService(private val cs: CoroutineScope) : Disposable {
326326
// If there are no recommendations at all in this session, we need to manually send the user decision event here
327327
// since it won't be sent automatically later
328328
if (!hasAtLeastOneValid) {
329-
if (completions.partialResultToken?.left?.isEmpty() == true) {
329+
if (completions.partialResultToken?.left.isNullOrEmpty()) {
330330
LOG.debug { "None of the recommendations are valid, exiting CodeWhisperer session" }
331331
CodeWhispererPopupManager.getInstance().cancelPopup(popup)
332332
return null

0 commit comments

Comments
 (0)