File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
packages/core/src/codewhisperer/service Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -390,6 +390,7 @@ export class RecommendationHandler {
390390
391391 // send Empty userDecision event if user receives no recommendations in this session at all.
392392 if ( invocationResult === 'Succeeded' && nextToken === '' ) {
393+ // case 1: empty list of suggestion []
393394 if ( session . recommendations . length === 0 ) {
394395 session . requestIdList . push ( requestId )
395396 // Received an empty list of recommendations
@@ -403,7 +404,9 @@ export class RecommendationHandler {
403404 ) . language ,
404405 session . requestContext . supplementalMetadata
405406 )
406- } else if ( ! this . hasAtLeastOneValidSuggestion ( typedPrefix ) ) {
407+ }
408+ // case 2: non empty list of suggestion but with (a) empty content or (b) non-matching typeahead
409+ else if ( ! this . hasAtLeastOneValidSuggestion ( typedPrefix ) ) {
407410 this . reportUserDecisions ( - 1 )
408411 }
409412 }
You can’t perform that action at this time.
0 commit comments