@@ -21,7 +21,6 @@ const downloadUriPrefix = 'https://pvsc.blob.core.windows.net/python-analysis';
21
21
const downloadBaseFileName = 'Python-Analysis-VSCode' ;
22
22
const downloadVersion = '0.1.0' ;
23
23
const downloadFileExtension = '.nupkg' ;
24
- const modelName = 'model-sequence.json.gz' ;
25
24
26
25
export class AnalysisEngineDownloader {
27
26
private readonly output : OutputChannel ;
@@ -56,29 +55,6 @@ export class AnalysisEngineDownloader {
56
55
}
57
56
}
58
57
59
- public async downloadIntelliCodeModel ( context : ExtensionContext ) : Promise < void > {
60
- const modelFolder = path . join ( context . extensionPath , 'analysis' , 'Pythia' , 'model' ) ;
61
- const localPath = path . join ( modelFolder , modelName ) ;
62
- if ( await this . fs . fileExists ( localPath ) ) {
63
- return ;
64
- }
65
-
66
- let localTempFilePath = '' ;
67
- try {
68
- localTempFilePath = await this . downloadFile ( downloadUriPrefix , modelName , 'Downloading IntelliCode Model File... ' ) ;
69
- await this . fs . createDirectory ( modelFolder ) ;
70
- await this . fs . copyFile ( localTempFilePath , localPath ) ;
71
- } catch ( err ) {
72
- this . output . appendLine ( 'failed.' ) ;
73
- this . output . appendLine ( err ) ;
74
- throw new Error ( err ) ;
75
- } finally {
76
- if ( localTempFilePath . length > 0 ) {
77
- await this . fs . deleteFile ( localTempFilePath ) ;
78
- }
79
- }
80
- }
81
-
82
58
private async downloadFile ( location : string , fileName : string , title : string ) : Promise < string > {
83
59
const uri = `${ location } /${ fileName } ` ;
84
60
this . output . append ( `Downloading ${ uri } ... ` ) ;
0 commit comments