Skip to content

Commit c0d0721

Browse files
authored
fix(chat): fix for pair programmer mode message in chat (aws#7029)
## Problem Pair Programmer mode button change in Mynah UI beta update caused the notification message in chat error. ## Solution - Corrected the prompt values for new button in controller to send the right message. --- - 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 0efab0a commit c0d0721

File tree

4 files changed

+12
-21
lines changed

4 files changed

+12
-21
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@
525525
"@aws-sdk/s3-request-presigner": "<3.731.0",
526526
"@aws-sdk/smithy-client": "<3.731.0",
527527
"@aws-sdk/util-arn-parser": "<3.731.0",
528-
"@aws/mynah-ui": "^4.30.1",
528+
"@aws/mynah-ui": "^4.31.0-beta.1",
529529
"@gerhobbelt/gitignore-parser": "^0.2.0-9",
530530
"@iarna/toml": "^2.2.5",
531531
"@smithy/fetch-http-handler": "^5.0.1",

packages/core/src/amazonq/webview/ui/tabs/generator.ts

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,20 +91,11 @@ export class TabDataGenerator {
9191
tabType === 'cwc'
9292
? [
9393
{
94-
type: 'toggle',
95-
id: 'prompt-type',
96-
value: 'pair-programming-on',
97-
tooltip: 'Pair programmer on',
98-
options: [
99-
{
100-
value: 'pair-programming-on',
101-
icon: 'code-block', // TODO: correct icons
102-
},
103-
{
104-
value: 'pair-programming-off',
105-
icon: 'chat', // TODO: correct icons
106-
},
107-
],
94+
type: 'switch',
95+
id: 'pair-programmer-mode',
96+
tooltip: 'Enable or disable pair programmer mode',
97+
value: 'true',
98+
icon: 'code-block',
10899
},
109100
]
110101
: [],

packages/core/src/codewhispererChat/controllers/chat/controller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -955,8 +955,8 @@ export class ChatController {
955955

956956
private async processPromptInputOptionChange(message: PromptInputOptionChange) {
957957
const session = this.sessionStorage.getSession(message.tabID)
958-
const promptTypeValue = message.optionsValues['prompt-type']
959-
if (promptTypeValue === 'pair-programming-on') {
958+
const promptTypeValue = message.optionsValues['pair-programmer-mode']
959+
if (promptTypeValue === 'true') {
960960
session.setPairProgrammingModeOn(true)
961961
this.messenger.sendDirectiveMessage(
962962
message.tabID,

0 commit comments

Comments
 (0)