@parhelia/core 0.1.12756 → 0.1.12758

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.
Files changed (33) hide show
  1. package/dist/config/config.js +18 -5
  2. package/dist/config/config.js.map +1 -1
  3. package/dist/editor/Editor.js +32 -1
  4. package/dist/editor/Editor.js.map +1 -1
  5. package/dist/editor/ai/AgentTerminal.js +12 -0
  6. package/dist/editor/ai/AgentTerminal.js.map +1 -1
  7. package/dist/editor/client/EditorShell.js +18 -3
  8. package/dist/editor/client/EditorShell.js.map +1 -1
  9. package/dist/editor/client/hooks/useQuota.d.ts +1 -1
  10. package/dist/editor/client/hooks/useQuota.js +52 -1
  11. package/dist/editor/client/hooks/useQuota.js.map +1 -1
  12. package/dist/editor/field-types/TreeListEditor.js +20 -12
  13. package/dist/editor/field-types/TreeListEditor.js.map +1 -1
  14. package/dist/editor/services/agentService.js +4 -1
  15. package/dist/editor/services/agentService.js.map +1 -1
  16. package/dist/editor/services/serviceHelper.js +6 -2
  17. package/dist/editor/services/serviceHelper.js.map +1 -1
  18. package/dist/editor/services/systemService.d.ts +31 -0
  19. package/dist/editor/services/systemService.js +3 -0
  20. package/dist/editor/services/systemService.js.map +1 -1
  21. package/dist/editor/settings/panels/ClusterInstancesPanel.d.ts +1 -0
  22. package/dist/editor/settings/panels/ClusterInstancesPanel.js +73 -0
  23. package/dist/editor/settings/panels/ClusterInstancesPanel.js.map +1 -0
  24. package/dist/editor/settings/panels/index.d.ts +1 -0
  25. package/dist/editor/settings/panels/index.js +1 -0
  26. package/dist/editor/settings/panels/index.js.map +1 -1
  27. package/dist/editor/setup-wizard/steps/ModelSelectionStep.js +13 -3
  28. package/dist/editor/setup-wizard/steps/ModelSelectionStep.js.map +1 -1
  29. package/dist/revision.d.ts +2 -2
  30. package/dist/revision.js +2 -2
  31. package/dist/task-board/views/DependencyGraphView.js +48 -4
  32. package/dist/task-board/views/DependencyGraphView.js.map +1 -1
  33. package/package.json +1 -1
@@ -385,8 +385,13 @@ export function EditorShell({ configuration, className, item: loadItemDescriptor
385
385
  window.location.reload();
386
386
  return;
387
387
  }
388
+ // Surface the server-provided reason when available — typically explains that
389
+ // another browser still owns this account so the user knows to close it first.
390
+ const serverDetail = (typeof result.details === "string" && result.details.trim()) ||
391
+ (typeof result.summary === "string" && result.summary.trim()) ||
392
+ "";
388
393
  toast.error("Reconnect failed", {
389
- description: "Could not claim this browser session. Try again.",
394
+ description: serverDetail || "Could not claim this browser session. Try again.",
390
395
  });
391
396
  },
392
397
  },
@@ -556,6 +561,12 @@ export function EditorShell({ configuration, className, item: loadItemDescriptor
556
561
  const { quotaInfo, setQuotaInfo, isQuotaExceeded, getQuotaWarningMessage } = useQuota({
557
562
  showError: ({ summary, details }) => showErrorToast({ summary, details }),
558
563
  });
564
+ const requestQuotaAndUpdate = useCallback(async () => {
565
+ const result = await requestQuota();
566
+ if (result.type === "success" && result.data) {
567
+ setQuotaInfo(result.data);
568
+ }
569
+ }, [setQuotaInfo]);
559
570
  const [webSocketMessages, setWebSocketMessages] = useState([]);
560
571
  const [socketDiagnostics, setSocketDiagnostics] = useState(() => createEditorSocketDiagnostics(sessionId));
561
572
  const [favorites, setFavorites] = useState([]);
@@ -2816,7 +2827,7 @@ export function EditorShell({ configuration, className, item: loadItemDescriptor
2816
2827
  },
2817
2828
  onSessionRevoked: () => promptSessionReconnect("session-revoked"),
2818
2829
  connectSocket,
2819
- requestQuota,
2830
+ requestQuota: requestQuotaAndUpdate,
2820
2831
  sendClientInfo,
2821
2832
  setSocketDiagnostics,
2822
2833
  });
@@ -3851,11 +3862,15 @@ export function EditorShell({ configuration, className, item: loadItemDescriptor
3851
3862
  useEffect(() => {
3852
3863
  if (mode === "suggestions") {
3853
3864
  setShowSuggestedEdits(true);
3865
+ // Refresh from the server to recover from any missed
3866
+ // `suggested-edit-updated` WebSocket events (e.g. created by an
3867
+ // agent tool while another tab was focused).
3868
+ loadSuggestedEdits();
3854
3869
  }
3855
3870
  else {
3856
3871
  setShowSuggestedEdits(false);
3857
3872
  }
3858
- }, [mode]);
3873
+ }, [mode, loadSuggestedEdits]);
3859
3874
  const isReadOnly = !item ||
3860
3875
  !item.canWriteItem ||
3861
3876
  !item.canWriteLanguage ||