Skip to content

Commit 8da7910

Browse files
authored
fix(amazonq): forward chat update notification (aws#7136)
## Problem ChatUpdate notifications are not getting forwarded to UI ## Solution Forward chat update notification --- - 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 905d80c commit 8da7910

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ import {
4949
buttonClickRequestType,
5050
ButtonClickResult,
5151
CancellationTokenSource,
52+
chatUpdateNotificationType,
53+
ChatUpdateParams,
5254
} from '@aws/language-server-runtimes/protocol'
5355
import { v4 as uuidv4 } from 'uuid'
5456
import * as vscode from 'vscode'
@@ -463,6 +465,13 @@ export function registerMessageListeners(
463465
true
464466
)
465467
})
468+
469+
languageClient.onNotification(chatUpdateNotificationType.method, (params: ChatUpdateParams) => {
470+
void provider.webview?.postMessage({
471+
command: chatUpdateNotificationType.method,
472+
params: params,
473+
})
474+
})
466475
}
467476

468477
function isServerEvent(command: string) {

0 commit comments

Comments
 (0)