Skip to content

Commit 8a0c499

Browse files
authored
fix: buildUri should be extension specific (#4929)
Problem: - buildUri only grabs the extension id for the aws toolkit. This means if you only have the q extension installed you get prompted to install the aws toolkit when a uri is registered Solution: - build the uri depending on the extension you are in
1 parent 86e7640 commit 8a0c499

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/core/src/shared/vscode/uriHandler.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import * as nls from 'vscode-nls'
1010
import { showViewLogsMessage } from '../utilities/messages'
1111
import { URL, URLSearchParams } from 'whatwg-url'
1212
import { VSCODE_EXTENSION_ID } from '../extensions'
13+
import { isAmazonQ } from '../extensionUtilities'
1314

1415
const localize = nls.loadMessageBundle()
1516

@@ -100,7 +101,8 @@ export class UriHandler implements vscode.UriHandler {
100101
}
101102

102103
static buildUri(path: string) {
103-
return vscode.Uri.parse(`vscode://${VSCODE_EXTENSION_ID.awstoolkit}/${path}`)
104+
const extensionId = isAmazonQ() ? VSCODE_EXTENSION_ID.amazonq : VSCODE_EXTENSION_ID.awstoolkit
105+
return vscode.Uri.parse(`vscode://${extensionId}/${path}`)
104106
}
105107
}
106108

0 commit comments

Comments
 (0)