Skip to content

Commit c9b5cf0

Browse files
committed
only show next session if both sessino ids are the same
1 parent 29c4048 commit c9b5cf0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/core/src/codewhisperer/commands/onInlineAcceptance.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ async function promoteNextSessionIfAvailable(acceptanceEntry: OnRecommendationAc
152152
const nextSession = CodeWhispererSessionState.instance.getNextSession()
153153
nextSession.startPos = acceptanceEntry.editor.selection.active
154154
CodeWhispererSessionState.instance.setSession(nextSession)
155-
if (nextSession.recommendations.length) {
155+
156+
if (nextSession.recommendations.length && acceptanceEntry.sessionId === nextSession.sessionId) {
156157
await RecommendationHandler.instance.tryShowRecommendation()
157158
}
158159
}

0 commit comments

Comments
 (0)