Skip to content

Commit 12eece1

Browse files
authored
feat(lsp): forward chatOptionsUpdate to ui (#7397)
## Problem `chatOptionsUpdate` notifications are not forwarded to UI. This is needed to persist previously selected model in new tabs. ## Solution Forward `chatOptionsUpdate` notifications to UI Related PR: aws/language-server-runtimes#530 --- - 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 d41e749 commit 12eece1

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
@@ -53,6 +53,8 @@ import {
5353
CancellationTokenSource,
5454
chatUpdateNotificationType,
5555
ChatUpdateParams,
56+
chatOptionsUpdateType,
57+
ChatOptionsUpdateParams,
5658
} from '@aws/language-server-runtimes/protocol'
5759
import { v4 as uuidv4 } from 'uuid'
5860
import * as vscode from 'vscode'
@@ -486,6 +488,13 @@ export function registerMessageListeners(
486488
params: params,
487489
})
488490
})
491+
492+
languageClient.onNotification(chatOptionsUpdateType.method, (params: ChatOptionsUpdateParams) => {
493+
void provider.webview?.postMessage({
494+
command: chatOptionsUpdateType.method,
495+
params: params,
496+
})
497+
})
489498
}
490499

491500
function isServerEvent(command: string) {

0 commit comments

Comments
 (0)