Skip to content

Commit eb6c9c9

Browse files
authored
fix(amazonq): accept empty body partial result. (#7158)
## Problem If the server sends a partial result without a body, we currently ignore it. ## Solution - explicitly check for undefined. --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent d856334 commit eb6c9c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ async function handlePartialResult<T extends ChatResult>(
516516
? await decodeRequest<T>(partialResult, encryptionKey)
517517
: (partialResult as T)
518518

519-
if (decryptedMessage.body) {
519+
if (decryptedMessage.body !== undefined) {
520520
void provider.webview?.postMessage({
521521
command: chatRequestType.method,
522522
params: decryptedMessage,

0 commit comments

Comments
 (0)