import { commands , window } from 'vscode' ; import { ext } from '../extensionVariables' ; export async function reloadSchemas ( ) { if ( ext . languageServerClient ) { ext . outputChannel . appendLine ( "Reloading schemas" ) ; await ext . languageServerClient . sendRequest ( 'schema/reloadSchemas' , { } ) ; const reload = "Reload Now" ; if ( reload === await window . showInformationMessage ( "Azure schema cache has been cleared. Please reload Visual Studio Code to reload schemas." , reload ) ) { commands . executeCommand ( 'workbench.action.reloadWindow' ) ; } } else { throw new Error ( "Language server is not yet ready. Please try again in a little while." ) ; } }