@@ -11,7 +11,7 @@ import { VueWebview } from '../../webviews/main'
11
11
import { isCloud9 } from '../../shared/extensionUtilities'
12
12
import globals from '../../shared/extensionGlobals'
13
13
import { telemetry , CodewhispererLanguage , CodewhispererGettingStartedTask } from '../../shared/telemetry/telemetry'
14
- import { FileSystemCommon } from '../../srcShared/fs'
14
+ import { fsCommon } from '../../srcShared/fs'
15
15
import { getLogger } from '../../shared/logger'
16
16
import { PromptSettings } from '../../shared/settings'
17
17
import { CodeWhispererSource } from '../commands/types'
@@ -39,7 +39,7 @@ export class CodeWhispererWebview extends VueWebview {
39
39
const fileContent = name [ 1 ]
40
40
41
41
const localFilePath = this . getLocalFilePath ( fileName )
42
- if ( ( await FileSystemCommon . instance . fileExists ( localFilePath ) ) && this . isFileSaved ) {
42
+ if ( ( await fsCommon . existsFile ( localFilePath ) ) && this . isFileSaved ) {
43
43
const fileUri = vscode . Uri . file ( localFilePath )
44
44
await vscode . workspace . openTextDocument ( fileUri ) . then ( async doc => {
45
45
await vscode . window . showTextDocument ( doc , vscode . ViewColumn . Active ) . then ( editor => {
@@ -58,7 +58,7 @@ export class CodeWhispererWebview extends VueWebview {
58
58
// This function saves and open the file in the editor.
59
59
private async saveFileLocally ( localFilePath : string , fileContent : string ) : Promise < void > {
60
60
try {
61
- await FileSystemCommon . instance . writeFile ( localFilePath , fileContent )
61
+ await fsCommon . writeFile ( localFilePath , fileContent )
62
62
this . isFileSaved = true
63
63
// Opening the text document
64
64
await vscode . workspace . openTextDocument ( localFilePath ) . then ( async doc => {
0 commit comments