Skip to content

Commit 4ffea91

Browse files
committed
updated open-user-guide and open-form-link combined to open-link
1 parent 83aedec commit 4ffea91

File tree

5 files changed

+7
-13
lines changed

5 files changed

+7
-13
lines changed

packages/core/src/amazonq/webview/messages/messageDispatcher.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,7 @@ export function dispatchWebViewMessagesToApps(
4848
AmazonQChatMessageDuration.stopChatMessageTelemetry(msg)
4949
return
5050
}
51-
case 'open-user-guide': {
52-
const { userGuideLink } = msg
53-
void openUrl(Uri.parse(userGuideLink))
54-
return
55-
}
56-
case 'open-form-link': {
51+
case 'open-link': {
5752
const { link } = msg
5853
void openUrl(Uri.parse(link))
5954
return

packages/core/src/amazonq/webview/ui/apps/amazonqCommonsConnector.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ export class Connector {
130130
this.sendMessageToExtension(createClickTelemetry(`amazonq-explore-${actionId}`))
131131

132132
this.sendMessageToExtension({
133-
command: 'open-user-guide',
134-
userGuideLink,
133+
command: 'open-link',
134+
link: userGuideLink,
135135
})
136136
}
137137

packages/core/src/amazonq/webview/ui/commands.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ type MessageCommand =
3939
| 'store-code-result-message-id'
4040
| 'start-test-gen'
4141
| 'review'
42-
| 'open-user-guide'
43-
| 'open-form-link'
42+
| 'open-link'
4443
| 'send-telemetry'
4544
| 'update-welcome-count'
4645

packages/core/src/amazonq/webview/ui/connector.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ export class Connector {
131131
}
132132
}
133133

134-
onFormLinkClick = (link: string): void => {
134+
onLinkClick = (link: string): void => {
135135
this.sendMessageToExtension({
136-
command: 'open-form-link',
136+
command: 'open-link',
137137
link,
138138
})
139139
}

packages/core/src/amazonq/webview/ui/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ export const createMynahUI = (
838838
mouseEvent?.preventDefault()
839839
mouseEvent?.stopPropagation()
840840
mouseEvent?.stopImmediatePropagation()
841-
connector.onFormLinkClick(link)
841+
connector.onLinkClick(link)
842842
},
843843
onInfoLinkClick: (tabId: string, link: string, mouseEvent?: MouseEvent) => {
844844
mouseEvent?.preventDefault()

0 commit comments

Comments
 (0)