Skip to content

Commit 7a06a07

Browse files
committed
Merge branch 'master' of github.com:leigaol/aws-toolkit-vscode into build_script
2 parents 4931885 + 3a9aca9 commit 7a06a07

File tree

6 files changed

+26
-8
lines changed

6 files changed

+26
-8
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.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"skippedTestReport": "ts-node ./scripts/skippedTestReport.ts ./packages/amazonq/test/e2e/"
4242
},
4343
"devDependencies": {
44-
"@aws-toolkits/telemetry": "^1.0.322",
44+
"@aws-toolkits/telemetry": "^1.0.323",
4545
"@playwright/browser-chromium": "^1.43.1",
4646
"@stylistic/eslint-plugin": "^2.11.0",
4747
"@types/he": "^1.2.3",

packages/amazonq/src/lsp/chat/messages.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,21 @@ export function registerMessageListeners(
435435
async (params: ShowDocumentParams): Promise<ShowDocumentParams | ResponseError<ShowDocumentResult>> => {
436436
try {
437437
const uri = vscode.Uri.parse(params.uri)
438+
439+
if (params.external) {
440+
// Note: Not using openUrl() because we probably don't want telemetry for these URLs.
441+
// Also it doesn't yet support the required HACK below.
442+
443+
// HACK: workaround vscode bug: https://github.com/microsoft/vscode/issues/85930
444+
vscode.env.openExternal(params.uri as any).then(undefined, (e) => {
445+
// TODO: getLogger('?').error('failed vscode.env.openExternal: %O', e)
446+
vscode.env.openExternal(uri).then(undefined, (e) => {
447+
// TODO: getLogger('?').error('failed vscode.env.openExternal: %O', e)
448+
})
449+
})
450+
return params
451+
}
452+
438453
const doc = await vscode.workspace.openTextDocument(uri)
439454
await vscode.window.showTextDocument(doc, { preview: false })
440455
return params

packages/amazonq/src/lsp/client.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ export async function startLanguageServer(
123123
awsClientCapabilities: {
124124
q: {
125125
developerProfiles: true,
126-
mcp: true,
127126
},
128127
window: {
129128
notifications: true,

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ To learn more, visit the [User Guide](${userGuideURL}).`,
6363
gumby: {
6464
title: 'Q - Code Transformation',
6565
placeholder: 'Open a new tab to chat with Q',
66-
welcome: 'Welcome to Code Transformation!',
66+
welcome:
67+
'Welcome to Code Transformation! You can also run transformations from the command line. To install the tool, see the [documentation](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/run-CLI-transformations.html).',
6768
},
6869
review: {
6970
title: 'Q - Review',

packages/core/src/shared/utilities/vsCodeUtils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,11 @@ export function reloadWindowPrompt(message: string): void {
215215
* if user dismisses the vscode confirmation prompt.
216216
*/
217217
export async function openUrl(url: vscode.Uri, source?: string): Promise<boolean> {
218+
// Avoid PII in URL.
219+
const truncatedUrl = `${url.scheme}${url.authority}${url.path}${url.fragment.substring(20)}`
220+
218221
return telemetry.aws_openUrl.run(async (span) => {
219-
span.record({ url: url.toString(), source })
222+
span.record({ url: truncatedUrl, source })
220223
const didOpen = await vscode.env.openExternal(url)
221224
if (!didOpen) {
222225
throw new CancellationError('user')

0 commit comments

Comments
 (0)