File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
packages/amazonq/src/lsp/chat Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments