@@ -40,9 +40,6 @@ import {
4040 tabBarActionRequestType ,
4141 contextCommandsNotificationType ,
4242 ContextCommandParams ,
43- ShowDocumentParams ,
44- ShowDocumentResult ,
45- ShowDocumentRequest ,
4643 openFileDiffNotificationType ,
4744 OpenFileDiffParams ,
4845 LINK_CLICK_NOTIFICATION_METHOD ,
@@ -73,7 +70,6 @@ import { telemetry, TelemetryBase } from 'aws-core-vscode/telemetry'
7370import { isValidResponseError } from './error'
7471import { decryptResponse , encryptRequest } from '../encryption'
7572import { getCursorState } from '../utils'
76- import { focusAmazonQPanel } from './commands'
7773
7874export function registerLanguageServerEventListener ( languageClient : LanguageClient , provider : AmazonQChatViewProvider ) {
7975 languageClient . info (
@@ -416,40 +412,6 @@ export function registerMessageListeners(
416412 }
417413 } )
418414
419- languageClient . onRequest < ShowDocumentParams , ShowDocumentResult > (
420- ShowDocumentRequest . method ,
421- async ( params : ShowDocumentParams ) : Promise < ShowDocumentParams | ResponseError < ShowDocumentResult > > => {
422- focusAmazonQPanel ( ) . catch ( ( e ) => languageClient . error ( `[VSCode Client] focusAmazonQPanel() failed` ) )
423-
424- try {
425- const uri = vscode . Uri . parse ( params . uri )
426-
427- if ( params . external ) {
428- // Note: Not using openUrl() because we probably don't want telemetry for these URLs.
429- // Also it doesn't yet support the required HACK below.
430-
431- // HACK: workaround vscode bug: https://github.com/microsoft/vscode/issues/85930
432- vscode . env . openExternal ( params . uri as any ) . then ( undefined , ( e ) => {
433- // TODO: getLogger('?').error('failed vscode.env.openExternal: %O', e)
434- vscode . env . openExternal ( uri ) . then ( undefined , ( e ) => {
435- // TODO: getLogger('?').error('failed vscode.env.openExternal: %O', e)
436- } )
437- } )
438- return params
439- }
440-
441- const doc = await vscode . workspace . openTextDocument ( uri )
442- await vscode . window . showTextDocument ( doc , { preview : false } )
443- return params
444- } catch ( e ) {
445- return new ResponseError (
446- LSPErrorCodes . RequestFailed ,
447- `Failed to open document: ${ ( e as Error ) . message } `
448- )
449- }
450- }
451- )
452-
453415 languageClient . onNotification ( contextCommandsNotificationType . method , ( params : ContextCommandParams ) => {
454416 void provider . webview ?. postMessage ( {
455417 command : contextCommandsNotificationType . method ,
0 commit comments