@@ -14,7 +14,6 @@ import { tmpDir } from '../run-queries';
1414import {
1515 ToRemoteQueriesMessage ,
1616 FromRemoteQueriesMessage ,
17- RemoteQueryDownloadLinkClickedMessage ,
1817} from '../pure/interface-types' ;
1918import { Logger } from '../logging' ;
2019import { getHtmlForWebview } from '../interface-utils' ;
@@ -28,6 +27,7 @@ import { Credentials } from '../authentication';
2827import { showAndLogWarningMessage , showInformationMessageWithAction } from '../helpers' ;
2928import { URLSearchParams } from 'url' ;
3029import { SHOW_QUERY_TEXT_MSG } from '../query-history' ;
30+ import { DownloadLink } from './download-link' ;
3131
3232export class RemoteQueriesInterfaceManager {
3333 private panel : WebviewPanel | undefined ;
@@ -189,18 +189,21 @@ export class RemoteQueriesInterfaceManager {
189189 case 'openVirtualFile' :
190190 await this . openVirtualFile ( msg . queryText ) ;
191191 break ;
192- case 'remoteQueryDownloadLinkClicked' :
193- await this . handleDownloadLinkClicked ( msg ) ;
192+ case 'remoteQueryDownloadAnalysisResults' :
193+ await this . handleDownloadLinkClicked ( msg . downloadLink ) ;
194+ break ;
195+ case 'remoteQueryDownloadAllAnalysesResults' :
196+ await this . handleDownloadLinkClicked ( msg . downloadLink ) ;
194197 break ;
195198 default :
196199 assertNever ( msg ) ;
197200 }
198201 }
199202
200- private async handleDownloadLinkClicked ( msg : RemoteQueryDownloadLinkClickedMessage ) : Promise < void > {
203+ private async handleDownloadLinkClicked ( downloadLink : DownloadLink ) : Promise < void > {
201204 const credentials = await Credentials . initialize ( this . ctx ) ;
202205
203- const filePath = await downloadArtifactFromLink ( credentials , msg . downloadLink ) ;
206+ const filePath = await downloadArtifactFromLink ( credentials , downloadLink ) ;
204207 const isDir = ( await fs . stat ( filePath ) ) . isDirectory ( ) ;
205208 const message = `Result file saved at ${ filePath } ` ;
206209 if ( isDir ) {
0 commit comments