Skip to content

Commit 6a3f6be

Browse files
author
Apurva
authored
Merge pull request #1513 from JLargent42/feature/starling
fix(appcomposer): improve feedback message handler
2 parents 5243dc4 + 45db64d commit 6a3f6be

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/applicationcomposer/messageHandlers/openFeedbackMessageHandler.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
import vscode from 'vscode'
6+
import { submitFeedback } from '../../feedback/vue/submitFeedback'
7+
import { placeholder } from '../../shared/vscode/commands2'
78

89
export function openFeedbackMessageHandler() {
9-
void vscode.commands.executeCommand('aws.submitFeedback')
10+
void submitFeedback.execute(placeholder, 'Application Composer')
1011
}

src/feedback/vue/submitFeedback.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,11 @@ export class FeedbackWebview extends VueWebview {
6363
}
6464
}
6565

66+
type FeedbackId = 'AWS Toolkit' | 'CodeWhisperer' | 'Amazon Q' | 'Application Composer'
67+
6668
export const submitFeedback = Commands.declare(
6769
{ id: 'aws.submitFeedback', autoconnect: false },
68-
(context: ExtContext) => async (_: VsCodeCommandArg, id: 'AWS Toolkit' | 'CodeWhisperer' | 'Amazon Q') => {
70+
(context: ExtContext) => async (_: VsCodeCommandArg, id: FeedbackId) => {
6971
if (_ !== placeholder) {
7072
// No args exist, we must supply them
7173
id = 'AWS Toolkit'

0 commit comments

Comments
 (0)