@overmap-ai/core 1.0.53-add-agent-conversations.19 → 1.0.53-add-agent-conversations.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6737,9 +6737,14 @@ class MainService extends BaseApiService {
6737
6737
  store.dispatch(addOrReplaceProjects(projects));
6738
6738
  store.dispatch(addOrReplaceWorkspaces(workspaces));
6739
6739
  }
6740
- await this.client.projectFiles.refreshStore();
6741
- store.dispatch(setIsFetchingInitialData(false));
6742
- if (currentProjectId) {
6740
+ if (!currentProjectId) {
6741
+ store.dispatch(setIsFetchingInitialData(false));
6742
+ } else {
6743
+ try {
6744
+ await this.client.projectFiles.refreshStore();
6745
+ } finally {
6746
+ store.dispatch(setIsFetchingInitialData(false));
6747
+ }
6743
6748
  void this.client.componentTypes.refreshStore();
6744
6749
  void this.client.componentStages.refreshStore();
6745
6750
  void this.client.components.refreshStore();
@@ -6801,16 +6806,11 @@ class ProjectAccessService extends BaseApiService {
6801
6806
  const { store } = this.client;
6802
6807
  const state = store.getState();
6803
6808
  const projectId = state.projectReducer.activeProjectId;
6804
- const currentUser = state.userReducer.currentUser;
6805
6809
  if (!projectId) {
6806
6810
  throw new Error("No active project");
6807
6811
  }
6808
6812
  const promise = this.fetchAll(projectId);
6809
6813
  const result = await promise;
6810
- const activeProjectAccess = result.find((projectAccess) => projectAccess.user === currentUser.id);
6811
- if (!activeProjectAccess) {
6812
- throw new Error("Current user does not have a project access instance");
6813
- }
6814
6814
  store.dispatch(setProjectAccesses(result));
6815
6815
  }
6816
6816
  }