Skip to content

Commit 55d6c91

Browse files
committed
fix(amazonq): delete token when you're done
1 parent 43658ff commit 55d6c91

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/amazonq/src/lsp/chat/messages.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ export function registerMessageListeners(
198198
const partialResultToken = uuidv4()
199199
let lastPartialResult: ChatResult | undefined
200200
const cancellationToken = new CancellationTokenSource()
201-
chatStreamTokens.set(message.params.tabId, cancellationToken)
201+
chatStreamTokens.set(chatParams.tabId, cancellationToken)
202202

203203
const chatDisposable = languageClient.onProgress(
204204
chatRequestType,
@@ -259,6 +259,8 @@ export function registerMessageListeners(
259259
chatParams.tabId,
260260
chatDisposable
261261
)
262+
} finally {
263+
chatStreamTokens.delete(chatParams.tabId)
262264
}
263265
break
264266
}

0 commit comments

Comments
 (0)