Skip to content

Commit 8d2c440

Browse files
committed
feat(amazonq): Add description and github issue link to feedback form
1 parent 00be1cc commit 8d2c440

File tree

8 files changed

+28
-5
lines changed

8 files changed

+28
-5
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "feature",
3+
"description" : "feat(amazonq): Added github issue link and description to the chat answer feedback form"
4+
}

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/BrowserConnector.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ class BrowserConnector(
5757
"open-user-guide" -> {
5858
BrowserUtil.browse(node.get("userGuideLink").asText())
5959
}
60+
"open-form-link" -> {
61+
BrowserUtil.browse(node.get("link").asText())
62+
}
6063
"send-telemetry" -> {
6164
val source = node.get("source")
6265
val module = node.get("module")

plugins/amazonq/mynah-ui/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.

plugins/amazonq/mynah-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"lintfix": "eslint -c .eslintrc.js --fix --ext .ts ."
1313
},
1414
"dependencies": {
15-
"@aws/mynah-ui-chat": "npm:@aws/mynah-ui@4.21.6",
15+
"@aws/mynah-ui-chat": "npm:@aws/mynah-ui@4.22.0",
1616
"@types/node": "^14.18.5",
1717
"fs-extra": "^10.0.1",
1818
"sanitize-html": "^2.12.1",

plugins/amazonq/mynah-ui/src/mynah-ui/ui/commands.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ type MessageCommand =
6161
| 'generate-test'
6262
| 'start-test-gen'
6363
| 'open-user-guide'
64+
| 'open-form-link'
6465
| 'send-telemetry'
6566
| 'doc_stop_generate'
6667
| 'updatePromptProgress'

plugins/amazonq/mynah-ui/src/mynah-ui/ui/connector.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,13 @@ export class Connector {
133133
}
134134
}
135135

136+
onFormLinkClick = (link: string): void => {
137+
this.sendMessageToExtension({
138+
command: 'open-form-link',
139+
link,
140+
})
141+
}
142+
136143
onResponseBodyLinkClick = (tabID: string, messageId: string, link: string): void => {
137144
switch (this.tabsStorage.getTab(tabID)?.type) {
138145
case 'cwc':

plugins/amazonq/mynah-ui/src/mynah-ui/ui/main.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,12 @@ export const createMynahUI = (
677677
mouseEvent?.stopImmediatePropagation()
678678
connector.onResponseBodyLinkClick(tabId, messageId, link)
679679
},
680+
onFormLinkClick: (link, mouseEvent) => {
681+
mouseEvent?.preventDefault()
682+
mouseEvent?.stopPropagation()
683+
mouseEvent?.stopImmediatePropagation()
684+
connector.onFormLinkClick(link)
685+
},
680686
onInfoLinkClick: (tabId: string, link: string, mouseEvent?: MouseEvent) => {
681687
mouseEvent?.preventDefault()
682688
mouseEvent?.stopPropagation()

plugins/amazonq/mynah-ui/src/mynah-ui/ui/texts/constants.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ export const uiComponentsTexts = {
88
copy: 'Copy',
99
insertAtCursorLabel: 'Insert at cursor',
1010
feedbackFormTitle: 'Report an issue',
11+
feedbackFormDescription:
12+
'_Feedback is anonymous. For issue updates, please contact us on [GitHub](https://github.com/aws/aws-toolkit-jetbrains/issues/new/choose)._',
1113
feedbackFormOptionsLabel: 'What type of issue would you like to report?',
1214
feedbackFormCommentLabel: 'Description of issue (optional):',
1315
feedbackThanks: 'Thanks for your feedback!',

0 commit comments

Comments
 (0)