reloadProjects() {
    this.logger.info("reload projects.");
    this.filenameToScriptInfo.forEach((info) => {
      if (this.openFiles.has(info.path))
        return;
      if (!info.fileWatcher)
        return;
      this.onSourceFileChanged(info, this.host.fileExists(info.fileName) ? 1 /* Changed */ : 2 /* Deleted */);
    });
    this.pendingProjectUpdates.forEach((_project, projectName) => {
      this.throttledOperations.cancel(projectName);
      this.pendingProjectUpdates.delete(projectName);
    });
    this.throttledOperations.cancel(ensureProjectForOpenFileSchedule);
    this.pendingEnsureProjectForOpenFiles = false;
    this.configFileExistenceInfoCache.forEach((info) => {
      if (info.config)
        info.config.reloadLevel = 2 /* Full */;
    });
    this.reloadConfiguredProjectForFiles(
      this.openFiles,
      /*clearSemanticCache*/
      true,
      /*delayReload*/
      false,
      returnTrue,
      "User requested reload projects"
    );
    this.externalProjects.forEach((project) => {
      this.clearSemanticCache(project);
      project.updateGraph();
    });
    this.inferredProjects.forEach((project) => this.clearSemanticCache(project));
    this.ensureProjectForOpenFiles();
  }
This function rebuilds the project for every file opened by the client
This does not reload contents of open files from disk. But we could do that if needed