File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
server/aws-lsp-codewhisperer/src/language-server/inline-completion/handler Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -64,9 +64,15 @@ export class SessionResultsHandler {
6464 removedDiagnostics,
6565 } = params
6666
67- const sessionManager = params . isInlineEdit ? this . editSessionManager : this . completionSessionManager
67+ // Comment this out because Edit request might return Completion as well so we can't rely on this flag
68+ // const sessionManager = params.isInlineEdit ? this.editSessionManager : this.completionSessionManager
6869
69- const session = sessionManager . getSessionById ( sessionId )
70+ // TODO: Not elegant, worth refactoring
71+ const editSession = this . editSessionManager . getSessionById ( sessionId )
72+ const completionSession = this . completionSessionManager . getSessionById ( sessionId )
73+
74+ const session = editSession ?? completionSession
75+ const sessionManager = editSession ? this . editSessionManager : this . completionSessionManager
7076 if ( ! session ) {
7177 this . logging . log ( `ERROR: Session ID ${ sessionId } was not found` )
7278 return
You can’t perform that action at this time.
0 commit comments