@overmap-ai/core 1.0.53-add-agent-conversations.12 → 1.0.53-add-agent-conversations.14

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.
@@ -5592,7 +5592,7 @@ class ComponentService extends BaseApiService {
5592
5592
  });
5593
5593
  return promise;
5594
5594
  }
5595
- async refreshStore(replace) {
5595
+ async refreshStore() {
5596
5596
  const { store } = this.client;
5597
5597
  const result = await this.enqueueRequest({
5598
5598
  description: "Get components",
@@ -5601,11 +5601,7 @@ class ComponentService extends BaseApiService {
5601
5601
  blockers: [],
5602
5602
  blocks: []
5603
5603
  });
5604
- if (replace) {
5605
- store.dispatch(setComponents(result));
5606
- } else {
5607
- store.dispatch(addComponentsInBatches(result));
5608
- }
5604
+ store.dispatch(setComponents(result));
5609
5605
  }
5610
5606
  }
5611
5607
  class ComponentStageCompletionService extends BaseApiService {
@@ -6605,7 +6601,7 @@ class MainService extends BaseApiService {
6605
6601
  if (replaceExisting) {
6606
6602
  this.client.store.dispatch(setIsFetchingInitialData(true));
6607
6603
  }
6608
- return this.enqueueRequest({
6604
+ const result = await this.enqueueRequest({
6609
6605
  uuid,
6610
6606
  description: "Get initial data",
6611
6607
  method: HttpMethod.GET,
@@ -6614,10 +6610,8 @@ class MainService extends BaseApiService {
6614
6610
  isAuthNeeded: true,
6615
6611
  blockers: [],
6616
6612
  blocks: []
6617
- }).then((result) => {
6618
- void this._processInitialData(result, replaceExisting);
6619
- return result;
6620
6613
  });
6614
+ void this._processInitialData(result, replaceExisting);
6621
6615
  }
6622
6616
  async fetchProjectUsers() {
6623
6617
  const projectId = this.client.store.getState().projectReducer.activeProjectId;
@@ -6673,7 +6667,6 @@ class MainService extends BaseApiService {
6673
6667
  isProjectIdValid = true;
6674
6668
  for (const workspaceData of projectData.workspaces) {
6675
6669
  const workspace = { ...workspaceData, project: projectData.id };
6676
- delete workspace.categories;
6677
6670
  workspaces[workspace.offline_id] = workspace;
6678
6671
  }
6679
6672
  }
@@ -6731,42 +6724,6 @@ class MainService extends BaseApiService {
6731
6724
  if (currentWorkspaceId) {
6732
6725
  store.dispatch(setActiveWorkspaceId(currentWorkspaceId));
6733
6726
  }
6734
- if (currentProjectId) {
6735
- void this.client.projectAccesses.refreshStore();
6736
- void this.client.projectFiles.refreshStore();
6737
- void this.client.projectAttachments.refreshStore();
6738
- let issuesPromise;
6739
- void Promise.allSettled([
6740
- this.client.categories.refreshStore(),
6741
- this.client.issueTypes.refreshStore()
6742
- ]).then(() => {
6743
- issuesPromise = this.client.issues.refreshStore();
6744
- });
6745
- void Promise.allSettled([
6746
- this.client.componentTypes.refreshStore(),
6747
- this.client.componentStages.refreshStore()
6748
- ]).then(() => {
6749
- void this.client.components.refreshStore(overwrite).then(() => {
6750
- void this.client.componentStageCompletions.refreshStore();
6751
- void this.client.componentTypeAttachments.refreshStore();
6752
- void this.client.componentAttachments.refreshStore();
6753
- });
6754
- });
6755
- void this.client.documents.refreshStore().then(() => {
6756
- void this.client.documentAttachments.refreshStore();
6757
- });
6758
- void this.client.userForms.refreshStore().then(() => {
6759
- void this.client.userFormSubmissions.refreshStore();
6760
- });
6761
- void this.client.agent.refreshStore();
6762
- void this.fetchProjectUsers();
6763
- await issuesPromise;
6764
- void this.client.issueAttachments.refreshStore();
6765
- void this.client.issueComments.refreshStore();
6766
- void this.client.issueUpdates.refreshStore();
6767
- }
6768
- void this.client.teams.refreshStore();
6769
- store.dispatch(setIsFetchingInitialData(false));
6770
6727
  if (overwrite) {
6771
6728
  console.log("Overwriting data");
6772
6729
  store.dispatch(setProjects(projects));
@@ -6777,6 +6734,31 @@ class MainService extends BaseApiService {
6777
6734
  store.dispatch(addOrReplaceProjects(projects));
6778
6735
  store.dispatch(addOrReplaceWorkspaces(workspaces));
6779
6736
  }
6737
+ await this.client.projectFiles.refreshStore();
6738
+ store.dispatch(setIsFetchingInitialData(false));
6739
+ if (currentProjectId) {
6740
+ void this.client.componentTypes.refreshStore();
6741
+ void this.client.componentStages.refreshStore();
6742
+ void this.client.components.refreshStore();
6743
+ void this.client.componentStageCompletions.refreshStore();
6744
+ void this.client.categories.refreshStore();
6745
+ void this.client.issueTypes.refreshStore();
6746
+ void this.client.issues.refreshStore();
6747
+ void this.fetchProjectUsers();
6748
+ void this.client.documents.refreshStore();
6749
+ void this.client.userForms.refreshStore();
6750
+ void this.client.documentAttachments.refreshStore();
6751
+ void this.client.userFormSubmissions.refreshStore();
6752
+ void this.client.agent.refreshStore();
6753
+ void this.client.issueAttachments.refreshStore();
6754
+ void this.client.issueComments.refreshStore();
6755
+ void this.client.issueUpdates.refreshStore();
6756
+ void this.client.projectAccesses.refreshStore();
6757
+ void this.client.projectAttachments.refreshStore();
6758
+ void this.client.componentTypeAttachments.refreshStore();
6759
+ void this.client.componentAttachments.refreshStore();
6760
+ }
6761
+ void this.client.teams.refreshStore();
6780
6762
  }
6781
6763
  }
6782
6764
  class ProjectAccessService extends BaseApiService {