@parhelia/core 0.1.12554 → 0.1.12556
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.
- package/dist/agents-view/AgentCard.d.ts +4 -6
- package/dist/agents-view/AgentCard.js +24 -143
- package/dist/agents-view/AgentCard.js.map +1 -1
- package/dist/agents-view/AgentsInbox.d.ts +1 -1
- package/dist/agents-view/AgentsInbox.js +92 -7
- package/dist/agents-view/AgentsInbox.js.map +1 -1
- package/dist/agents-view/AgentsTitlebar.js +2 -3
- package/dist/agents-view/AgentsTitlebar.js.map +1 -1
- package/dist/agents-view/AgentsView.d.ts +7 -6
- package/dist/agents-view/AgentsView.js +98 -187
- package/dist/agents-view/AgentsView.js.map +1 -1
- package/dist/agents-view/AgentsWorkspaceView.d.ts +6 -2
- package/dist/agents-view/AgentsWorkspaceView.js +113 -266
- package/dist/agents-view/AgentsWorkspaceView.js.map +1 -1
- package/dist/agents-view/ProfileAgentsGroup.d.ts +1 -2
- package/dist/agents-view/ProfileAgentsGroup.js +3 -4
- package/dist/agents-view/ProfileAgentsGroup.js.map +1 -1
- package/dist/components/ActionButton.d.ts +1 -1
- package/dist/components/ActionButton.js.map +1 -1
- package/dist/components/FilterInput.d.ts +1 -1
- package/dist/components/FilterInput.js +1 -1
- package/dist/components/FilterInput.js.map +1 -1
- package/dist/components/ui/LanguageSelector.js +4 -2
- package/dist/components/ui/LanguageSelector.js.map +1 -1
- package/dist/components/ui/PlaceholderInput.js +3 -3
- package/dist/components/ui/PlaceholderInput.js.map +1 -1
- package/dist/components/ui/PlaceholderInputTypes.js +1 -1
- package/dist/components/ui/PlaceholderInputTypes.js.map +1 -1
- package/dist/components/ui/alert-dialog.d.ts +1 -1
- package/dist/components/ui/alert-dialog.js +10 -6
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/button.d.ts +4 -4
- package/dist/components/ui/button.js +1 -4
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts +1 -1
- package/dist/components/ui/context-menu.js +4 -12
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/copy-button.d.ts +1 -2
- package/dist/components/ui/copy-button.js +2 -2
- package/dist/components/ui/copy-button.js.map +1 -1
- package/dist/components/ui/dialog.d.ts +1 -1
- package/dist/components/ui/dialog.js +126 -21
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/input.d.ts +1 -1
- package/dist/components/ui/input.js +3 -5
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/paste-button.d.ts +1 -2
- package/dist/components/ui/paste-button.js +2 -2
- package/dist/components/ui/paste-button.js.map +1 -1
- package/dist/components/ui/popover.js +9 -1
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/select.js +1 -1
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/styled-dialog-title.js +1 -1
- package/dist/components/ui/styled-dialog-title.js.map +1 -1
- package/dist/components/ui/tabs.d.ts +1 -1
- package/dist/components/ui/tabs.js +11 -4
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/config/config.d.ts +2 -4
- package/dist/config/config.js +70 -250
- package/dist/config/config.js.map +1 -1
- package/dist/config/types/workspace.d.ts +0 -6
- package/dist/config/types.d.ts +12 -63
- package/dist/config/types.js.map +1 -1
- package/dist/editor/ComponentInfo.d.ts +4 -0
- package/dist/editor/ComponentInfo.js +41 -0
- package/dist/editor/ComponentInfo.js.map +1 -0
- package/dist/editor/ConfirmationDialog.js +4 -20
- package/dist/editor/ConfirmationDialog.js.map +1 -1
- package/dist/editor/ContentTree.d.ts +1 -2
- package/dist/editor/ContentTree.js +32 -93
- package/dist/editor/ContentTree.js.map +1 -1
- package/dist/editor/Editor.js +22 -87
- package/dist/editor/Editor.js.map +1 -1
- package/dist/editor/FieldHistory.js +36 -84
- package/dist/editor/FieldHistory.js.map +1 -1
- package/dist/editor/FieldListField.js +9 -21
- package/dist/editor/FieldListField.js.map +1 -1
- package/dist/editor/FieldListFieldWithFallbacks.js +2 -23
- package/dist/editor/FieldListFieldWithFallbacks.js.map +1 -1
- package/dist/editor/GlobalMenuBar.js +2 -29
- package/dist/editor/GlobalMenuBar.js.map +1 -1
- package/dist/editor/ImageEditor.js +2 -5
- package/dist/editor/ImageEditor.js.map +1 -1
- package/dist/editor/ItemInfo.js +1 -36
- package/dist/editor/ItemInfo.js.map +1 -1
- package/dist/editor/LinkEditorDialog.js +0 -3
- package/dist/editor/LinkEditorDialog.js.map +1 -1
- package/dist/editor/MainLayout.d.ts +2 -0
- package/dist/editor/MainLayout.js +8 -65
- package/dist/editor/MainLayout.js.map +1 -1
- package/dist/editor/MigrationsView.js +5 -29
- package/dist/editor/MigrationsView.js.map +1 -1
- package/dist/editor/MobileLayout.js +12 -37
- package/dist/editor/MobileLayout.js.map +1 -1
- package/dist/editor/PictureCropper.js +45 -54
- package/dist/editor/PictureCropper.js.map +1 -1
- package/dist/editor/PictureEditor.js +15 -17
- package/dist/editor/PictureEditor.js.map +1 -1
- package/dist/editor/QuickItemSwitcher.js +21 -21
- package/dist/editor/QuickItemSwitcher.js.map +1 -1
- package/dist/editor/SetupWizard.js +12 -52
- package/dist/editor/SetupWizard.js.map +1 -1
- package/dist/editor/Titlebar.js +2 -7
- package/dist/editor/Titlebar.js.map +1 -1
- package/dist/editor/ai/AgentCostDisplay.d.ts +0 -1
- package/dist/editor/ai/AgentCostDisplay.js +1 -1
- package/dist/editor/ai/AgentCostDisplay.js.map +1 -1
- package/dist/editor/ai/AgentDocumentList.js +14 -32
- package/dist/editor/ai/AgentDocumentList.js.map +1 -1
- package/dist/editor/ai/AgentGreeting.js +2 -3
- package/dist/editor/ai/AgentGreeting.js.map +1 -1
- package/dist/editor/ai/AgentProfileSelector.js +1 -2
- package/dist/editor/ai/AgentProfileSelector.js.map +1 -1
- package/dist/editor/ai/AgentStatusBadge.d.ts +5 -0
- package/dist/editor/ai/AgentStatusBadge.js +65 -67
- package/dist/editor/ai/AgentStatusBadge.js.map +1 -1
- package/dist/editor/ai/AgentTerminal.d.ts +2 -14
- package/dist/editor/ai/AgentTerminal.js +483 -2377
- package/dist/editor/ai/AgentTerminal.js.map +1 -1
- package/dist/editor/ai/AgentTerminalStatusBar.d.ts +3 -8
- package/dist/editor/ai/AgentTerminalStatusBar.js +56 -460
- package/dist/editor/ai/AgentTerminalStatusBar.js.map +1 -1
- package/dist/editor/ai/Agents.js +113 -150
- package/dist/editor/ai/Agents.js.map +1 -1
- package/dist/editor/ai/AiResponseMessage.d.ts +1 -10
- package/dist/editor/ai/AiResponseMessage.js +23 -238
- package/dist/editor/ai/AiResponseMessage.js.map +1 -1
- package/dist/editor/ai/ContextInfoBar.d.ts +3 -2
- package/dist/editor/ai/ContextInfoBar.js +7 -64
- package/dist/editor/ai/ContextInfoBar.js.map +1 -1
- package/dist/editor/ai/GuidanceOverlay.js +11 -17
- package/dist/editor/ai/GuidanceOverlay.js.map +1 -1
- package/dist/editor/ai/HelpTerminal.d.ts +5 -0
- package/dist/editor/ai/HelpTerminal.js +166 -0
- package/dist/editor/ai/HelpTerminal.js.map +1 -0
- package/dist/editor/ai/InlineAiDialog.d.ts +1 -1
- package/dist/editor/ai/InlineAiDialog.js +192 -514
- package/dist/editor/ai/InlineAiDialog.js.map +1 -1
- package/dist/editor/ai/InlineAiTrigger.js +12 -115
- package/dist/editor/ai/InlineAiTrigger.js.map +1 -1
- package/dist/editor/ai/MediaImage.js +8 -40
- package/dist/editor/ai/MediaImage.js.map +1 -1
- package/dist/editor/ai/SpawnedAgentsPanel.js +12 -10
- package/dist/editor/ai/SpawnedAgentsPanel.js.map +1 -1
- package/dist/editor/ai/ToolCallDisplay.d.ts +2 -22
- package/dist/editor/ai/ToolCallDisplay.js +147 -518
- package/dist/editor/ai/ToolCallDisplay.js.map +1 -1
- package/dist/editor/ai/dialogs/AgentDialogHandler.d.ts +8 -1
- package/dist/editor/ai/dialogs/AgentDialogHandler.js +42 -379
- package/dist/editor/ai/dialogs/AgentDialogHandler.js.map +1 -1
- package/dist/editor/ai/dialogs/QuestionnaireInline.d.ts +1 -5
- package/dist/editor/ai/dialogs/QuestionnaireInline.js +60 -628
- package/dist/editor/ai/dialogs/QuestionnaireInline.js.map +1 -1
- package/dist/editor/ai/dialogs/agentDialogTypes.d.ts +0 -115
- package/dist/editor/ai/dialogs/agentDialogTypes.js +0 -2
- package/dist/editor/ai/dialogs/agentDialogTypes.js.map +1 -1
- package/dist/editor/ai/types.d.ts +1 -3
- package/dist/editor/ai/useAgentStatus.d.ts +1 -2
- package/dist/editor/ai/useAgentStatus.js +99 -86
- package/dist/editor/ai/useAgentStatus.js.map +1 -1
- package/dist/editor/ai/useInlineAiPosition.js +5 -45
- package/dist/editor/ai/useInlineAiPosition.js.map +1 -1
- package/dist/editor/client/AboutDialog.js +2 -4
- package/dist/editor/client/AboutDialog.js.map +1 -1
- package/dist/editor/client/EditorShell.d.ts +1 -4
- package/dist/editor/client/EditorShell.js +230 -730
- package/dist/editor/client/EditorShell.js.map +1 -1
- package/dist/editor/client/editContext.d.ts +19 -33
- package/dist/editor/client/editContext.js.map +1 -1
- package/dist/editor/client/helpers.js +0 -6
- package/dist/editor/client/helpers.js.map +1 -1
- package/dist/editor/client/hooks/useEditorUrlSync.js +2 -1
- package/dist/editor/client/hooks/useEditorUrlSync.js.map +1 -1
- package/dist/editor/client/hooks/useEditorWebSocket.d.ts +0 -10
- package/dist/editor/client/hooks/useEditorWebSocket.js +14 -209
- package/dist/editor/client/hooks/useEditorWebSocket.js.map +1 -1
- package/dist/editor/client/hooks/useQuota.d.ts +0 -8
- package/dist/editor/client/hooks/useQuota.js.map +1 -1
- package/dist/editor/client/hooks/useSocketMessageHandler.js +7 -68
- package/dist/editor/client/hooks/useSocketMessageHandler.js.map +1 -1
- package/dist/editor/client/itemsRepository.js +6 -10
- package/dist/editor/client/itemsRepository.js.map +1 -1
- package/dist/editor/client/operations.d.ts +3 -6
- package/dist/editor/client/operations.js +30 -208
- package/dist/editor/client/operations.js.map +1 -1
- package/dist/editor/client/pageModelBuilder.js +31 -4
- package/dist/editor/client/pageModelBuilder.js.map +1 -1
- package/dist/editor/client/ui/DevModeIndicator.js +2 -2
- package/dist/editor/client/ui/DevModeIndicator.js.map +1 -1
- package/dist/editor/client/ui/EditorChrome.d.ts +6 -0
- package/dist/editor/client/ui/EditorChrome.js +72 -55
- package/dist/editor/client/ui/EditorChrome.js.map +1 -1
- package/dist/editor/client/ui/FullscreenControls.js +3 -5
- package/dist/editor/client/ui/FullscreenControls.js.map +1 -1
- package/dist/editor/commands/commands.d.ts +1 -11
- package/dist/editor/commands/commands.js +1 -12
- package/dist/editor/commands/commands.js.map +1 -1
- package/dist/editor/commands/componentCommands.js +55 -109
- package/dist/editor/commands/componentCommands.js.map +1 -1
- package/dist/editor/commands/customCommandConverter.d.ts +1 -8
- package/dist/editor/commands/customCommandConverter.js +5 -35
- package/dist/editor/commands/customCommandConverter.js.map +1 -1
- package/dist/editor/commands/handlers/agentHandler.js +1 -2
- package/dist/editor/commands/handlers/agentHandler.js.map +1 -1
- package/dist/editor/commands/itemCommands.d.ts +0 -3
- package/dist/editor/commands/itemCommands.js +10 -93
- package/dist/editor/commands/itemCommands.js.map +1 -1
- package/dist/editor/commands/undo.d.ts +15 -9
- package/dist/editor/commands/undo.js +0 -24
- package/dist/editor/commands/undo.js.map +1 -1
- package/dist/editor/context-menu/InsertMenu.js +39 -83
- package/dist/editor/context-menu/InsertMenu.js.map +1 -1
- package/dist/editor/field-types/MultiLineText.js +1 -1
- package/dist/editor/field-types/MultiLineText.js.map +1 -1
- package/dist/editor/field-types/RawEditor.js +1 -1
- package/dist/editor/field-types/ReactQuill.d.ts +125 -0
- package/dist/editor/field-types/ReactQuill.js +385 -0
- package/dist/editor/field-types/ReactQuill.js.map +1 -0
- package/dist/editor/field-types/RichTextEditor.js +5 -13
- package/dist/editor/field-types/RichTextEditor.js.map +1 -1
- package/dist/editor/field-types/RichTextEditorComponent.js +3 -37
- package/dist/editor/field-types/RichTextEditorComponent.js.map +1 -1
- package/dist/editor/field-types/SingleLineText.js +1 -1
- package/dist/editor/field-types/TreeListEditor.js +2 -3
- package/dist/editor/field-types/TreeListEditor.js.map +1 -1
- package/dist/editor/field-types/richtext/components/ReactSlate.css +5 -23
- package/dist/editor/field-types/richtext/components/ReactSlate.d.ts +0 -2
- package/dist/editor/field-types/richtext/components/ReactSlate.js +4 -28
- package/dist/editor/field-types/richtext/components/ReactSlate.js.map +1 -1
- package/dist/editor/field-types/richtext/components/ToolbarButton.js +2 -4
- package/dist/editor/field-types/richtext/components/ToolbarButton.js.map +1 -1
- package/dist/editor/field-types/richtext/contextMenuFactory.d.ts +0 -13
- package/dist/editor/field-types/richtext/contextMenuFactory.js +24 -181
- package/dist/editor/field-types/richtext/contextMenuFactory.js.map +1 -1
- package/dist/editor/field-types/richtext/types.d.ts +0 -2
- package/dist/editor/field-types/richtext/types.js.map +1 -1
- package/dist/editor/field-types/richtext/utils/plugins.js +0 -4
- package/dist/editor/field-types/richtext/utils/plugins.js.map +1 -1
- package/dist/editor/field-types/textContextMenuFactory.js +2 -3
- package/dist/editor/field-types/textContextMenuFactory.js.map +1 -1
- package/dist/editor/media-selector/AiImageSearchPrompt.js +2 -4
- package/dist/editor/media-selector/AiImageSearchPrompt.js.map +1 -1
- package/dist/editor/media-selector/MediaFolderBrowser.js +1 -1
- package/dist/editor/media-selector/MediaFolderBrowser.js.map +1 -1
- package/dist/editor/media-selector/MediaSelector.js +1 -7
- package/dist/editor/media-selector/MediaSelector.js.map +1 -1
- package/dist/editor/media-selector/TreeSelector.js +35 -40
- package/dist/editor/media-selector/TreeSelector.js.map +1 -1
- package/dist/editor/menubar/ActiveUsers.js +1 -1
- package/dist/editor/menubar/ActiveUsers.js.map +1 -1
- package/dist/editor/menubar/GenericToolbar.js +2 -4
- package/dist/editor/menubar/GenericToolbar.js.map +1 -1
- package/dist/editor/menubar/ItemLanguageVersion.js +2 -2
- package/dist/editor/menubar/ItemLanguageVersion.js.map +1 -1
- package/dist/editor/menubar/PageSelector.js +147 -26
- package/dist/editor/menubar/PageSelector.js.map +1 -1
- package/dist/editor/menubar/Separator.js +1 -1
- package/dist/editor/menubar/VersionSelector.js +4 -2
- package/dist/editor/menubar/VersionSelector.js.map +1 -1
- package/dist/editor/menubar/WorkflowButton.js +12 -39
- package/dist/editor/menubar/WorkflowButton.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/CustomCommandsToolbar.js +38 -16
- package/dist/editor/menubar/toolbar-sections/CustomCommandsToolbar.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/EditControls.js +3 -3
- package/dist/editor/menubar/toolbar-sections/EditControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/HelpButton.js +0 -1
- package/dist/editor/menubar/toolbar-sections/HelpButton.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/ManualBrowser.d.ts +10 -6
- package/dist/editor/menubar/toolbar-sections/ManualBrowser.js +220 -597
- package/dist/editor/menubar/toolbar-sections/ManualBrowser.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js +2 -13
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js.map +1 -1
- package/dist/editor/page-editor-chrome/CommentHighlighting.js +1 -42
- package/dist/editor/page-editor-chrome/CommentHighlighting.js.map +1 -1
- package/dist/editor/page-editor-chrome/FrameMenu.js +1 -1
- package/dist/editor/page-editor-chrome/FrameMenu.js.map +1 -1
- package/dist/editor/page-editor-chrome/InlineEditor.js +48 -97
- package/dist/editor/page-editor-chrome/InlineEditor.js.map +1 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js +17 -38
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js.map +1 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.js +11 -17
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.js.map +1 -1
- package/dist/editor/page-editor-chrome/useInlineAICompletion.js +301 -301
- package/dist/editor/page-editor-chrome/useInlineAICompletion.js.map +1 -1
- package/dist/editor/page-viewer/DeviceToolbar.js +1 -1
- package/dist/editor/page-viewer/DeviceToolbar.js.map +1 -1
- package/dist/editor/page-viewer/EditorForm.js +11 -69
- package/dist/editor/page-viewer/EditorForm.js.map +1 -1
- package/dist/editor/page-viewer/MiniMap.d.ts +4 -2
- package/dist/editor/page-viewer/MiniMap.js +28 -91
- package/dist/editor/page-viewer/MiniMap.js.map +1 -1
- package/dist/editor/page-viewer/PageViewer.d.ts +1 -3
- package/dist/editor/page-viewer/PageViewer.js +19 -92
- package/dist/editor/page-viewer/PageViewer.js.map +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.d.ts +1 -2
- package/dist/editor/page-viewer/PageViewerFrame.js +115 -348
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
- package/dist/editor/page-viewer/pageModelSkeletonBuilder.js +49 -114
- package/dist/editor/page-viewer/pageModelSkeletonBuilder.js.map +1 -1
- package/dist/editor/page-viewer/pageViewContext.d.ts +0 -1
- package/dist/editor/page-viewer/pageViewContext.js +14 -51
- package/dist/editor/page-viewer/pageViewContext.js.map +1 -1
- package/dist/editor/pageModel.d.ts +1 -14
- package/dist/editor/reviews/Comment.js +12 -26
- package/dist/editor/reviews/Comment.js.map +1 -1
- package/dist/editor/reviews/CommentDisplayPopover.js +5 -7
- package/dist/editor/reviews/CommentDisplayPopover.js.map +1 -1
- package/dist/editor/reviews/CommentView.js +4 -19
- package/dist/editor/reviews/CommentView.js.map +1 -1
- package/dist/editor/reviews/Comments.js +72 -89
- package/dist/editor/reviews/Comments.js.map +1 -1
- package/dist/editor/reviews/CreateReviewDialog.js +177 -281
- package/dist/editor/reviews/CreateReviewDialog.js.map +1 -1
- package/dist/editor/reviews/DecisionsMatrix.js +25 -96
- package/dist/editor/reviews/DecisionsMatrix.js.map +1 -1
- package/dist/editor/reviews/DiffView.js +14 -7
- package/dist/editor/reviews/DiffView.js.map +1 -1
- package/dist/editor/reviews/EditReviewSettingsDialog.js +4 -6
- package/dist/editor/reviews/EditReviewSettingsDialog.js.map +1 -1
- package/dist/editor/reviews/MultiReviewManager.js +3 -25
- package/dist/editor/reviews/MultiReviewManager.js.map +1 -1
- package/dist/editor/reviews/PagesPanel.js +15 -31
- package/dist/editor/reviews/PagesPanel.js.map +1 -1
- package/dist/editor/reviews/PreviewInfo.js +4 -1
- package/dist/editor/reviews/PreviewInfo.js.map +1 -1
- package/dist/editor/reviews/ReviewCard.js +7 -13
- package/dist/editor/reviews/ReviewCard.js.map +1 -1
- package/dist/editor/reviews/ReviewDetail.js +2 -3
- package/dist/editor/reviews/ReviewDetail.js.map +1 -1
- package/dist/editor/reviews/ReviewsList.js +3 -7
- package/dist/editor/reviews/ReviewsList.js.map +1 -1
- package/dist/editor/reviews/SuggestedEdit.js +3 -34
- package/dist/editor/reviews/SuggestedEdit.js.map +1 -1
- package/dist/editor/reviews/SuggestionDisplayPopover.js +5 -31
- package/dist/editor/reviews/SuggestionDisplayPopover.js.map +1 -1
- package/dist/editor/reviews/commentAi.js +6 -25
- package/dist/editor/reviews/commentAi.js.map +1 -1
- package/dist/editor/reviews/reviewCommands.js +1 -4
- package/dist/editor/reviews/reviewCommands.js.map +1 -1
- package/dist/editor/reviews/useMultiReview.js +2 -2
- package/dist/editor/reviews/useMultiReview.js.map +1 -1
- package/dist/editor/reviews/useReviews.d.ts +2 -2
- package/dist/editor/reviews/useReviews.js +30 -12
- package/dist/editor/reviews/useReviews.js.map +1 -1
- package/dist/editor/services/agentService.d.ts +5 -229
- package/dist/editor/services/agentService.js +39 -292
- package/dist/editor/services/agentService.js.map +1 -1
- package/dist/editor/services/aiService.d.ts +1 -57
- package/dist/editor/services/aiService.js +6 -79
- package/dist/editor/services/aiService.js.map +1 -1
- package/dist/editor/services/contentService.d.ts +3 -6
- package/dist/editor/services/contentService.js +12 -13
- package/dist/editor/services/contentService.js.map +1 -1
- package/dist/editor/services/editService.d.ts +1 -52
- package/dist/editor/services/editService.js +2 -94
- package/dist/editor/services/editService.js.map +1 -1
- package/dist/editor/services/indexService.js +1 -1
- package/dist/editor/services/indexService.js.map +1 -1
- package/dist/editor/services/reviewsService.d.ts +6 -3
- package/dist/editor/services/reviewsService.js +11 -2
- package/dist/editor/services/reviewsService.js.map +1 -1
- package/dist/editor/services/serviceHelper.d.ts +1 -2
- package/dist/editor/services/serviceHelper.js +20 -112
- package/dist/editor/services/serviceHelper.js.map +1 -1
- package/dist/editor/services/systemService.d.ts +1 -2
- package/dist/editor/services/systemService.js +0 -3
- package/dist/editor/services/systemService.js.map +1 -1
- package/dist/editor/services-server/api.d.ts +2 -1
- package/dist/editor/services-server/api.js +6 -11
- package/dist/editor/services-server/api.js.map +1 -1
- package/dist/editor/services-server/graphQL.d.ts +29 -0
- package/dist/editor/services-server/graphQL.js +53 -0
- package/dist/editor/services-server/graphQL.js.map +1 -0
- package/dist/editor/settings/About.js +3 -317
- package/dist/editor/settings/About.js.map +1 -1
- package/dist/editor/settings/AllAgentsPanel.d.ts +5 -0
- package/dist/editor/settings/AllAgentsPanel.js +139 -0
- package/dist/editor/settings/AllAgentsPanel.js.map +1 -0
- package/dist/editor/settings/LatestFeedback.d.ts +1 -0
- package/dist/editor/settings/LatestFeedback.js +136 -0
- package/dist/editor/settings/LatestFeedback.js.map +1 -0
- package/dist/editor/settings/QuotaInfo.js +4 -210
- package/dist/editor/settings/QuotaInfo.js.map +1 -1
- package/dist/editor/settings/SettingsView.js +23 -25
- package/dist/editor/settings/SettingsView.js.map +1 -1
- package/dist/editor/settings/Setup.d.ts +1 -0
- package/dist/editor/settings/Setup.js +211 -0
- package/dist/editor/settings/Setup.js.map +1 -0
- package/dist/editor/settings/Status.js +6 -7
- package/dist/editor/settings/Status.js.map +1 -1
- package/dist/editor/settings/index/useIndexStatus.js +22 -20
- package/dist/editor/settings/index/useIndexStatus.js.map +1 -1
- package/dist/editor/settings/panels/AgentsPanel.d.ts +4 -0
- package/dist/editor/settings/panels/AgentsPanel.js +121 -95
- package/dist/editor/settings/panels/AgentsPanel.js.map +1 -1
- package/dist/editor/settings/panels/DatabasePanel.d.ts +6 -0
- package/dist/editor/settings/panels/DatabasePanel.js +50 -0
- package/dist/editor/settings/panels/DatabasePanel.js.map +1 -0
- package/dist/editor/settings/panels/ModelsPanel.js +108 -329
- package/dist/editor/settings/panels/ModelsPanel.js.map +1 -1
- package/dist/editor/settings/panels/ProvidersPanel.d.ts +1 -1
- package/dist/editor/settings/panels/ProvidersPanel.js +59 -86
- package/dist/editor/settings/panels/ProvidersPanel.js.map +1 -1
- package/dist/editor/settings/panels/SearchConfigPanel.js +4 -4
- package/dist/editor/settings/panels/SearchConfigPanel.js.map +1 -1
- package/dist/editor/settings/panels/index.d.ts +2 -3
- package/dist/editor/settings/panels/index.js +2 -3
- package/dist/editor/settings/panels/index.js.map +1 -1
- package/dist/editor/settings/setup-steps/AiSetupStep/EmbeddingsModelSection.d.ts +2 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/EmbeddingsModelSection.js +195 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/EmbeddingsModelSection.js.map +1 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/index.d.ts +2 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/index.js +21 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/index.js.map +1 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/provider/ProviderSection.d.ts +1 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/provider/ProviderSection.js +233 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/provider/ProviderSection.js.map +1 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/required-containers/RequiredContainersList.d.ts +15 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/required-containers/RequiredContainersList.js +14 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/required-containers/RequiredContainersList.js.map +1 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/required-containers/RequiredContainersSection.d.ts +1 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/required-containers/RequiredContainersSection.js +94 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/required-containers/RequiredContainersSection.js.map +1 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/types.d.ts +1 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/types.js +2 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/types.js.map +1 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/utils.d.ts +5 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/utils.js +44 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/utils.js.map +1 -0
- package/dist/editor/settings/setup-steps/IndexSetupStep.d.ts +2 -0
- package/dist/editor/settings/setup-steps/IndexSetupStep.js +36 -0
- package/dist/editor/settings/setup-steps/IndexSetupStep.js.map +1 -0
- package/dist/editor/settings/setup-steps/SettingsSetupStep.d.ts +2 -0
- package/dist/editor/settings/setup-steps/SettingsSetupStep.js +111 -0
- package/dist/editor/settings/setup-steps/SettingsSetupStep.js.map +1 -0
- package/dist/editor/settings/setup-steps/SetupOverview.d.ts +14 -0
- package/dist/editor/settings/setup-steps/SetupOverview.js +38 -0
- package/dist/editor/settings/setup-steps/SetupOverview.js.map +1 -0
- package/dist/editor/settings/status/coreStatusChecks.js +19 -124
- package/dist/editor/settings/status/coreStatusChecks.js.map +1 -1
- package/dist/editor/settings/status/useStartupChecks.d.ts +1 -3
- package/dist/editor/settings/status/useStartupChecks.js +5 -9
- package/dist/editor/settings/status/useStartupChecks.js.map +1 -1
- package/dist/editor/setup-wizard/steps/CompleteStep.d.ts +1 -2
- package/dist/editor/setup-wizard/steps/CompleteStep.js +1 -2
- package/dist/editor/setup-wizard/steps/CompleteStep.js.map +1 -1
- package/dist/editor/sidebar/ComponentPalette.js +1 -2
- package/dist/editor/sidebar/ComponentPalette.js.map +1 -1
- package/dist/editor/sidebar/ComponentTree.d.ts +1 -8
- package/dist/editor/sidebar/ComponentTree.js +69 -216
- package/dist/editor/sidebar/ComponentTree.js.map +1 -1
- package/dist/editor/sidebar/Debug.d.ts +1 -0
- package/dist/editor/sidebar/Debug.js +70 -0
- package/dist/editor/sidebar/Debug.js.map +1 -0
- package/dist/editor/sidebar/EditHistory.js +46 -22
- package/dist/editor/sidebar/EditHistory.js.map +1 -1
- package/dist/editor/sidebar/Favorites.js +8 -4
- package/dist/editor/sidebar/Favorites.js.map +1 -1
- package/dist/editor/sidebar/GraphQL.d.ts +2 -0
- package/dist/editor/sidebar/GraphQL.js +234 -0
- package/dist/editor/sidebar/GraphQL.js.map +1 -0
- package/dist/editor/sidebar/LeftToolbar.d.ts +1 -0
- package/dist/editor/sidebar/LeftToolbar.js +12 -0
- package/dist/editor/sidebar/LeftToolbar.js.map +1 -0
- package/dist/editor/sidebar/MainContentTree.js +3 -4
- package/dist/editor/sidebar/MainContentTree.js.map +1 -1
- package/dist/editor/sidebar/NavigationSidebar.d.ts +4 -0
- package/dist/editor/sidebar/NavigationSidebar.js +254 -0
- package/dist/editor/sidebar/NavigationSidebar.js.map +1 -0
- package/dist/editor/sidebar/OperationItem.js +7 -21
- package/dist/editor/sidebar/OperationItem.js.map +1 -1
- package/dist/editor/sidebar/SidebarPanel.d.ts +1 -3
- package/dist/editor/sidebar/SidebarPanel.js +12 -44
- package/dist/editor/sidebar/SidebarPanel.js.map +1 -1
- package/dist/editor/sidebar/SidebarStack.d.ts +1 -2
- package/dist/editor/sidebar/SidebarStack.js +3 -4
- package/dist/editor/sidebar/SidebarStack.js.map +1 -1
- package/dist/editor/sidebar/Validation.js +12 -22
- package/dist/editor/sidebar/Validation.js.map +1 -1
- package/dist/editor/sidebar/Workbox.js +3 -53
- package/dist/editor/sidebar/Workbox.js.map +1 -1
- package/dist/editor/sidebar/WorkspaceRail.d.ts +1 -0
- package/dist/editor/sidebar/WorkspaceRail.js +167 -56
- package/dist/editor/sidebar/WorkspaceRail.js.map +1 -1
- package/dist/editor/tree-indicators/GutterColumns.d.ts +1 -3
- package/dist/editor/tree-indicators/GutterColumns.js +5 -26
- package/dist/editor/tree-indicators/GutterColumns.js.map +1 -1
- package/dist/editor/tree-indicators/GutterContext.d.ts +0 -4
- package/dist/editor/tree-indicators/GutterContext.js +0 -23
- package/dist/editor/tree-indicators/GutterContext.js.map +1 -1
- package/dist/editor/tree-indicators/GutterSelector.d.ts +5 -0
- package/dist/editor/tree-indicators/GutterSelector.js +91 -0
- package/dist/editor/tree-indicators/GutterSelector.js.map +1 -0
- package/dist/editor/tree-indicators/index.d.ts +1 -0
- package/dist/editor/tree-indicators/index.js +1 -0
- package/dist/editor/tree-indicators/index.js.map +1 -1
- package/dist/editor/tree-indicators/types.d.ts +1 -12
- package/dist/editor/ui/CopyMoveTargetSelectorDialog.js +1 -1
- package/dist/editor/ui/CopyMoveTargetSelectorDialog.js.map +1 -1
- package/dist/editor/ui/Icons.js +1 -1
- package/dist/editor/ui/Icons.js.map +1 -1
- package/dist/editor/ui/ItemNameDialogNew.d.ts +0 -2
- package/dist/editor/ui/ItemNameDialogNew.js +17 -33
- package/dist/editor/ui/ItemNameDialogNew.js.map +1 -1
- package/dist/editor/ui/ItemSearch.js +11 -7
- package/dist/editor/ui/ItemSearch.js.map +1 -1
- package/dist/editor/ui/SimpleIconButton.js +1 -1
- package/dist/editor/ui/SimpleIconButton.js.map +1 -1
- package/dist/editor/ui/SimpleTabs.d.ts +0 -1
- package/dist/editor/ui/SimpleTabs.js +25 -45
- package/dist/editor/ui/SimpleTabs.js.map +1 -1
- package/dist/editor/ui/Splitter.d.ts +0 -1
- package/dist/editor/ui/Splitter.js +86 -102
- package/dist/editor/ui/Splitter.js.map +1 -1
- package/dist/editor/ui/TemplateSelectorDialog.js +4 -4
- package/dist/editor/ui/TemplateSelectorDialog.js.map +1 -1
- package/dist/editor/ui/TreeListSelector.d.ts +1 -6
- package/dist/editor/ui/TreeListSelector.js +2 -2
- package/dist/editor/ui/TreeListSelector.js.map +1 -1
- package/dist/editor/utils/keyboardNavigation.d.ts +20 -6
- package/dist/editor/utils/keyboardNavigation.js +140 -48
- package/dist/editor/utils/keyboardNavigation.js.map +1 -1
- package/dist/editor/utils.js +9 -19
- package/dist/editor/utils.js.map +1 -1
- package/dist/editor/views/CompareView.d.ts +1 -3
- package/dist/editor/views/CompareView.js +5 -7
- package/dist/editor/views/CompareView.js.map +1 -1
- package/dist/editor/views/EditView.js +1 -1
- package/dist/editor/views/EditView.js.map +1 -1
- package/dist/editor/views/EditorSlot.js +34 -27
- package/dist/editor/views/EditorSlot.js.map +1 -1
- package/dist/editor/views/ItemEditor.js +3 -7
- package/dist/editor/views/ItemEditor.js.map +1 -1
- package/dist/editor/views/MediaFolderEditView.js +1 -1
- package/dist/editor/views/MediaFolderEditView.js.map +1 -1
- package/dist/editor/views/ParheliaView.js +6 -5
- package/dist/editor/views/ParheliaView.js.map +1 -1
- package/dist/editor/views/SingleEditView.d.ts +1 -2
- package/dist/editor/views/SingleEditView.js +8 -10
- package/dist/editor/views/SingleEditView.js.map +1 -1
- package/dist/editor/views/editorSlotContext.js +6 -35
- package/dist/editor/views/editorSlotContext.js.map +1 -1
- package/dist/index.d.ts +2 -16
- package/dist/index.js +0 -11
- package/dist/index.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/setup/services/setupWizardService.d.ts +13 -40
- package/dist/setup/services/setupWizardService.js +17 -32
- package/dist/setup/services/setupWizardService.js.map +1 -1
- package/dist/setup/wizard/steps/AddModelDialog.js +3 -12
- package/dist/setup/wizard/steps/AddModelDialog.js.map +1 -1
- package/dist/setup/wizard/steps/ImportModelDialog.js +22 -39
- package/dist/setup/wizard/steps/ImportModelDialog.js.map +1 -1
- package/dist/splash-screen/ModernSplashScreen.js +32 -112
- package/dist/splash-screen/ModernSplashScreen.js.map +1 -1
- package/dist/splash-screen/NewPage.js +50 -33
- package/dist/splash-screen/NewPage.js.map +1 -1
- package/dist/splash-screen/OpenPage.js +6 -2
- package/dist/splash-screen/OpenPage.js.map +1 -1
- package/dist/splash-screen/ParheliaAssistantChat.js +29 -12
- package/dist/splash-screen/ParheliaAssistantChat.js.map +1 -1
- package/dist/splash-screen/ParheliaLogo.js +37 -87
- package/dist/splash-screen/ParheliaLogo.js.map +1 -1
- package/dist/splash-screen/RecentPages.js +3 -3
- package/dist/splash-screen/RecentPages.js.map +1 -1
- package/dist/tour/Tour.d.ts +1 -2
- package/dist/tour/Tour.js +75 -256
- package/dist/tour/Tour.js.map +1 -1
- package/dist/tour/default-tour.js +96 -222
- package/dist/tour/default-tour.js.map +1 -1
- package/dist/types.d.ts +29 -63
- package/package.json +15 -19
- package/styles.css +10 -14
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React, { MouseEvent, ReactNode } from "react";
|
|
2
|
-
import { EditorConfiguration, WorkspaceDefinition, SidebarDefinition, ResolvedSidebar } from "../../config/types";
|
|
2
|
+
import { EditorConfiguration, EditorView, WorkspaceDefinition, SidebarDefinition, ResolvedSidebar } from "../../config/types";
|
|
3
3
|
import type { FieldAction, InsertingState, WebSocketMessage } from "./EditorShell";
|
|
4
|
-
import type { EditorSocketDiagnostics } from "./socketDiagnostics";
|
|
5
4
|
import type { QuotaInfo } from "./hooks/useQuota";
|
|
6
5
|
import { MenuItem } from "../../config/types";
|
|
7
6
|
import { Command, CommandData } from "../commands/commands";
|
|
8
7
|
import { ComponentDetails } from "../services/componentDesignerService";
|
|
9
8
|
import type { EditorSlotContext } from "../views/editorSlotContext";
|
|
10
|
-
import { EditOperation, EditSession, FieldDescriptor, HistoryEntry, InsertOption, LanguageVersions, User, ValidationResult, Comment, WorkboxItem,
|
|
9
|
+
import { EditOperation, EditSession, FieldDescriptor, HistoryEntry, InsertOption, LanguageVersions, User, ValidationResult, Comment, WorkboxItem, Review, AddComponentOperation, SuggestedEdit, UserInfo, UserPreferences, ParheliaSettings } from "../../types";
|
|
11
10
|
import { ConfirmationProps } from "../ConfirmationDialog";
|
|
12
11
|
import { Component, FieldButton, ItemDescriptor, Page, Timings, FullItem, Version, Field } from "../pageModel";
|
|
13
12
|
import { ItemsRepository } from "./itemsRepository";
|
|
@@ -71,7 +70,6 @@ export type EditContextType = {
|
|
|
71
70
|
rawValue?: string | null;
|
|
72
71
|
refresh?: "none" | "immediate" | "delayed" | "waitForQuietPeriod";
|
|
73
72
|
}) => Promise<void>;
|
|
74
|
-
updateRenderingParameters: (componentId: string, parameters: Record<string, string | null>) => Promise<void>;
|
|
75
73
|
undo: (operationId?: string) => Promise<boolean>;
|
|
76
74
|
undoOperations: (operationIds: string[]) => Promise<boolean>;
|
|
77
75
|
redo: (operationId?: string) => Promise<boolean>;
|
|
@@ -80,12 +78,10 @@ export type EditContextType = {
|
|
|
80
78
|
renameItem: (item: ItemDescriptor, newName: string) => Promise<void>;
|
|
81
79
|
deleteItems: (items: ItemDescriptor[], options?: {
|
|
82
80
|
canUndo?: boolean;
|
|
83
|
-
|
|
84
|
-
}) => Promise<boolean | undefined>;
|
|
81
|
+
}) => Promise<void>;
|
|
85
82
|
createItem: (parent: ItemDescriptor, templateId: string, name: string) => Promise<ItemDescriptor | undefined>;
|
|
86
83
|
createVersion: (item: ItemDescriptor) => Promise<void>;
|
|
87
84
|
removeVersion: (item: ItemDescriptor) => Promise<void>;
|
|
88
|
-
publishItem: (operation: PublishItemOperation) => Promise<PublishItemOperation>;
|
|
89
85
|
onFieldBlur: () => void;
|
|
90
86
|
undoing: boolean;
|
|
91
87
|
};
|
|
@@ -121,7 +117,6 @@ export type EditContextType = {
|
|
|
121
117
|
switchWorkspace: (workspaceId: string, options?: {
|
|
122
118
|
skipConfirmation?: boolean;
|
|
123
119
|
skipNavigationHistory?: boolean;
|
|
124
|
-
urlParams?: Record<string, string | undefined>;
|
|
125
120
|
}) => void;
|
|
126
121
|
/** All available sidebar definitions */
|
|
127
122
|
availableSidebars: SidebarDefinition[];
|
|
@@ -143,17 +138,13 @@ export type EditContextType = {
|
|
|
143
138
|
forceClose?: boolean;
|
|
144
139
|
}) => void;
|
|
145
140
|
/** Open a sidebar (without toggling it closed if already open) */
|
|
146
|
-
openSidebar: (sidebarId: string
|
|
147
|
-
preserveOpenSidebars?: boolean;
|
|
148
|
-
}) => void;
|
|
141
|
+
openSidebar: (sidebarId: string) => void;
|
|
149
142
|
/** Pin/unpin a sidebar icon to the toolbar */
|
|
150
143
|
toggleSidebarPin: (sidebarId: string) => void;
|
|
151
144
|
/** Lock/unlock an open sidebar to stay visible when selecting another */
|
|
152
145
|
toggleSidebarLock: (sidebarId: string) => void;
|
|
153
146
|
/** Stack one open sidebar with another (vertical top/bottom) */
|
|
154
147
|
stackSidebar: (sidebarId: string, targetSidebarId: string, position?: "before" | "after") => void;
|
|
155
|
-
/** Move a sidebar into its own column before or after another sidebar's column */
|
|
156
|
-
moveSidebarToColumn: (sidebarId: string, targetSidebarId: string, position?: "before" | "after") => void;
|
|
157
148
|
/** Remove a sidebar from its stack into its own column */
|
|
158
149
|
unstackSidebar: (sidebarId: string) => void;
|
|
159
150
|
/** Reorder a sidebar within its current stack */
|
|
@@ -164,10 +155,20 @@ export type EditContextType = {
|
|
|
164
155
|
reorderOpenSidebars: (newOrder: string[]) => void;
|
|
165
156
|
/** Get resolved sidebar with panels materialized */
|
|
166
157
|
getResolvedSidebar: (sidebarId: string) => ResolvedSidebar | undefined;
|
|
167
|
-
/**
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
|
|
158
|
+
/** @deprecated Use workspace instead */
|
|
159
|
+
view?: EditorView;
|
|
160
|
+
/** @deprecated Use visibleWorkspaces instead */
|
|
161
|
+
visibleViews: EditorView[];
|
|
162
|
+
/** @deprecated Use workspaceId instead */
|
|
163
|
+
viewName: string;
|
|
164
|
+
/** @deprecated Use previousWorkspaceId instead */
|
|
165
|
+
previousViewName?: string;
|
|
166
|
+
/** @deprecated Use switchWorkspace instead */
|
|
167
|
+
switchView: (viewName: string, options?: {
|
|
168
|
+
skipConfirmation?: boolean;
|
|
169
|
+
skipNavigationHistory?: boolean;
|
|
170
|
+
ccpanel?: string;
|
|
171
|
+
}) => void;
|
|
171
172
|
compareMode: boolean;
|
|
172
173
|
setCompareMode: (compareMode: boolean) => void;
|
|
173
174
|
/** Fullscreen mode for the editor shell (active slot). */
|
|
@@ -214,7 +215,7 @@ export type EditContextType = {
|
|
|
214
215
|
isRefreshing: boolean;
|
|
215
216
|
openCreatePageDialog: () => void;
|
|
216
217
|
reviews: {
|
|
217
|
-
reviews:
|
|
218
|
+
reviews: Review[];
|
|
218
219
|
loadReviews: () => void;
|
|
219
220
|
};
|
|
220
221
|
droppedInPlaceholder: (placeholderKey: string, index: number, spotPositionElement?: Element, spotPositionAnchor?: "left" | "right" | "top" | "bottom", insertOption?: InsertOption) => void;
|
|
@@ -267,10 +268,6 @@ export type EditContextType = {
|
|
|
267
268
|
item?: FullItem;
|
|
268
269
|
loadItem: (itemToLoad: ItemDescriptor | string, options?: {
|
|
269
270
|
addToBrowseHistory?: boolean;
|
|
270
|
-
/** When true, do not push an entry onto the editor navigation history. */
|
|
271
|
-
skipNavigationHistory?: boolean;
|
|
272
|
-
/** Internal: avoid view/URL side effects when history already reflects state. */
|
|
273
|
-
skipViewChange?: boolean;
|
|
274
271
|
openInNewSlot?: boolean;
|
|
275
272
|
/** Explicit target slot to load into (used when switching active slot). */
|
|
276
273
|
targetSlotId?: string;
|
|
@@ -284,8 +281,6 @@ export type EditContextType = {
|
|
|
284
281
|
setShowOnlyMyChanges: React.Dispatch<React.SetStateAction<boolean>>;
|
|
285
282
|
filterByCurrentLanguage: boolean;
|
|
286
283
|
setFilterByCurrentLanguage: React.Dispatch<React.SetStateAction<boolean>>;
|
|
287
|
-
historySearchQuery: string;
|
|
288
|
-
setHistorySearchQuery: React.Dispatch<React.SetStateAction<string>>;
|
|
289
284
|
refreshHistory: (mode?: "global" | "page-centric" | "current-version" | "timeline", filterBySession?: boolean, filterByLanguage?: boolean) => Promise<void>;
|
|
290
285
|
activeSessions: EditSession[];
|
|
291
286
|
validating: boolean;
|
|
@@ -331,12 +326,9 @@ export type EditContextType = {
|
|
|
331
326
|
}) => void;
|
|
332
327
|
/** Increments on each WebSocket reconnection, used to trigger re-subscriptions */
|
|
333
328
|
socketConnectionVersion: number;
|
|
334
|
-
socketDiagnostics: EditorSocketDiagnostics;
|
|
335
329
|
revision?: string;
|
|
336
330
|
/** Called by editor slots when their page model finishes building, to trigger isRefreshing re-evaluation. */
|
|
337
331
|
notifyPageModelReady?: () => void;
|
|
338
|
-
/** Increments whenever a slot reports that a page model finished building. */
|
|
339
|
-
pageModelReadyToken?: number;
|
|
340
332
|
user?: User;
|
|
341
333
|
statusMessage: React.ReactNode;
|
|
342
334
|
setStatusMessage: React.Dispatch<React.SetStateAction<React.ReactNode>>;
|
|
@@ -348,8 +340,6 @@ export type EditContextType = {
|
|
|
348
340
|
isMobile: boolean;
|
|
349
341
|
showComponentNavigator: boolean;
|
|
350
342
|
setShowComponentNavigator: React.Dispatch<React.SetStateAction<boolean>>;
|
|
351
|
-
isComponentNavigatorOpenForSlot: (slotId: string | null) => boolean;
|
|
352
|
-
setComponentNavigatorOpenForSlot: (slotId: string | null, value: boolean | ((prev: boolean) => boolean)) => void;
|
|
353
343
|
showAgentsPanel: boolean;
|
|
354
344
|
setShowAgentsPanel: React.Dispatch<React.SetStateAction<boolean>>;
|
|
355
345
|
showMinimap: boolean;
|
|
@@ -365,12 +355,8 @@ export type EditContextType = {
|
|
|
365
355
|
helpTerminalProfileName?: string;
|
|
366
356
|
helpTerminalActiveTab?: "ask" | "manual";
|
|
367
357
|
setHelpTerminalActiveTab: React.Dispatch<React.SetStateAction<"ask" | "manual" | undefined>>;
|
|
368
|
-
selectedHelpSectionId: string | null;
|
|
369
|
-
setSelectedHelpSectionId: React.Dispatch<React.SetStateAction<string | null>>;
|
|
370
358
|
showAgentsWorkspaceEditor: boolean;
|
|
371
359
|
setShowAgentsWorkspaceEditor: React.Dispatch<React.SetStateAction<boolean>>;
|
|
372
|
-
selectedAgentsWorkspaceAgentId: string | null;
|
|
373
|
-
setSelectedAgentsWorkspaceAgentId: React.Dispatch<React.SetStateAction<string | null>>;
|
|
374
360
|
activeEditorTab: string | null;
|
|
375
361
|
setActiveEditorTab: React.Dispatch<React.SetStateAction<string | null>>;
|
|
376
362
|
showLayoutComponents: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editContext.js","sourceRoot":"","sources":["../../../src/editor/client/editContext.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,KAAK,EAAE,EAGZ,UAAU,EACV,SAAS,EACT,MAAM,GACP,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"editContext.js","sourceRoot":"","sources":["../../../src/editor/client/editContext.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,KAAK,EAAE,EAGZ,UAAU,EACV,SAAS,EACT,MAAM,GACP,MAAM,OAAO,CAAC;AAikBf,MAAM,WAAW,GAAG,KAAK,CAAC,aAAa,CAA8B,SAAS,CAAC,CAAC;AAChF,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAW,CAAC,QAAQ,CAAC;AAExD,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;AAE5D,MAAM,UAAU,iBAAiB;IAC/B,MAAM,YAAY,GAAG,cAAc,EAAE,CAAC;IACtC,MAAM,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;IAExC,SAAS,CAAC,GAAG,EAAE;QACb,UAAU,CAAC,OAAO,GAAG,YAAY,CAAC;IACpC,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,OAAO,UAAU,CAAC;AACpB,CAAC;AAyCD,MAAM,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAE3C,SAAS,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;AACxE,MAAM,CAAC,MAAM,yBAAyB,GAAG,iBAAiB,CAAC,QAAQ,CAAC;AAEpE,mDAAmD;AACnD,MAAM,UAAU,uBAAuB;IACrC,MAAM,YAAY,GAAG,oBAAoB,EAAE,CAAC;IAC5C,MAAM,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;IAExC,SAAS,CAAC,GAAG,EAAE;QACb,UAAU,CAAC,OAAO,GAAG,YAAY,CAAC;IACpC,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,OAAO,UAAU,CAAC;AACpB,CAAC;AASD,MAAM,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAE3C,SAAS,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;AACxE,MAAM,CAAC,MAAM,yBAAyB,GAAG,iBAAiB,CAAC,QAAQ,CAAC"}
|
|
@@ -8,12 +8,6 @@ export function handleErrorResult(result, ui, state) {
|
|
|
8
8
|
return true;
|
|
9
9
|
}
|
|
10
10
|
if (result.type === "unauthorized") {
|
|
11
|
-
if (result.summary === "Session revoked") {
|
|
12
|
-
window.dispatchEvent(new CustomEvent("parhelia:session-revoked", {
|
|
13
|
-
detail: { reason: result.details || "session-revoked" },
|
|
14
|
-
}));
|
|
15
|
-
return true;
|
|
16
|
-
}
|
|
17
11
|
if (state.configuration.events.onUnauthorized) {
|
|
18
12
|
state.configuration.events.onUnauthorized();
|
|
19
13
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/editor/client/helpers.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,iBAAiB,CAC/B,MAAgC,EAChC,EAGC,EACD,KAEC;IAED,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;QAC5B,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;QAExC,EAAE,CAAC,cAAc,CAAC;YAChB,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,OAAO;YAClC,OAAO,EAAE,M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
@@ -8,7 +8,8 @@ export function useEditorUrlSync(params) {
|
|
|
8
8
|
return;
|
|
9
9
|
const itemid = searchParams.get("itemid");
|
|
10
10
|
const wizardId = searchParams.get("wizardid");
|
|
11
|
-
|
|
11
|
+
// Check for new workspace param first, then legacy view param
|
|
12
|
+
const urlWorkspace = searchParams.get("workspace") ?? searchParams.get("view");
|
|
12
13
|
if (wizardId)
|
|
13
14
|
setCurrentWizardId(wizardId);
|
|
14
15
|
if (urlWorkspace)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEditorUrlSync.js","sourceRoot":"","sources":["../../../../src/editor/client/hooks/useEditorUrlSync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAGhD,MAAM,UAAU,gBAAgB,CAAC,MAchC;IACC,MAAM,EACJ,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,QAAQ,EACR,qBAAqB,EACrB,kBAAkB,GACnB,GAAG,MAAM,CAAC;IAEX,4BAA4B;IAC5B,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,aAAa;YAAE,OAAO;QAC3B,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC1C,MAAM,QAAQ,GAAG,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAC9C,MAAM,YAAY,GAAG,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"useEditorUrlSync.js","sourceRoot":"","sources":["../../../../src/editor/client/hooks/useEditorUrlSync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAGhD,MAAM,UAAU,gBAAgB,CA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ostics";
|
|
3
|
-
export type ConcurrentUserLimitError = {
|
|
4
|
-
currentUsers: number;
|
|
5
|
-
maxUsers: number;
|
|
6
|
-
message: string;
|
|
7
|
-
};
|
|
8
1
|
export declare function useEditorWebSocket(params: {
|
|
9
2
|
sessionId: string;
|
|
10
3
|
onMessage: (event: MessageEvent<any>) => void;
|
|
11
4
|
onOpen?: () => void;
|
|
12
5
|
onError?: (error: Event) => void;
|
|
13
|
-
onConcurrentUserLimit?: (error: ConcurrentUserLimitError) => void;
|
|
14
|
-
onSessionRevoked?: () => void;
|
|
15
6
|
connectSocket: (sessionId: string) => WebSocket;
|
|
16
7
|
requestQuota?: () => void;
|
|
17
8
|
sendClientInfo: () => Promise<void> | void;
|
|
18
|
-
setSocketDiagnostics?: Dispatch<SetStateAction<EditorSocketDiagnostics>>;
|
|
19
9
|
}): {
|
|
20
10
|
readonly socketRef: import("react").RefObject<WebSocket | null>;
|
|
21
11
|
};
|
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
import { useEffect, useRef } from "react";
|
|
2
|
-
import { checkConnectionAvailability, } from "../../services/editService";
|
|
3
|
-
import { createEditorSocketDiagnostics, getEditorSocketReadyStateLabel, } from "../socketDiagnostics";
|
|
4
2
|
export function useEditorWebSocket(params) {
|
|
5
|
-
const { sessionId, onMessage, onOpen, onError,
|
|
3
|
+
const { sessionId, onMessage, onOpen, onError, connectSocket, requestQuota, sendClientInfo, } = params;
|
|
6
4
|
const socketInstanceRef = useRef(null);
|
|
7
|
-
const attachedMessageHandlerRef = useRef(null);
|
|
8
5
|
const reconnectTimeoutRef = useRef(null);
|
|
9
6
|
const reconnectAttemptsRef = useRef(0);
|
|
10
|
-
const reconnectCountRef = useRef(0);
|
|
11
|
-
const isConcurrentUserLimitRef = useRef(false);
|
|
12
7
|
// Stable refs for callbacks to avoid re-connecting on every render
|
|
13
8
|
const onMessageRef = useRef(onMessage);
|
|
14
9
|
const onOpenRef = useRef(onOpen);
|
|
15
10
|
const onErrorRef = useRef(onError);
|
|
16
|
-
const onConcurrentUserLimitRef = useRef(onConcurrentUserLimit);
|
|
17
|
-
const onSessionRevokedRef = useRef(onSessionRevoked);
|
|
18
11
|
const requestQuotaRef = useRef(requestQuota);
|
|
19
12
|
const sendClientInfoRef = useRef(sendClientInfo);
|
|
20
13
|
useEffect(() => {
|
|
@@ -26,12 +19,6 @@ export function useEditorWebSocket(params) {
|
|
|
26
19
|
useEffect(() => {
|
|
27
20
|
onErrorRef.current = onError;
|
|
28
21
|
}, [onError]);
|
|
29
|
-
useEffect(() => {
|
|
30
|
-
onConcurrentUserLimitRef.current = onConcurrentUserLimit;
|
|
31
|
-
}, [onConcurrentUserLimit]);
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
onSessionRevokedRef.current = onSessionRevoked;
|
|
34
|
-
}, [onSessionRevoked]);
|
|
35
22
|
useEffect(() => {
|
|
36
23
|
requestQuotaRef.current = requestQuota;
|
|
37
24
|
}, [requestQuota]);
|
|
@@ -39,239 +26,57 @@ export function useEditorWebSocket(params) {
|
|
|
39
26
|
sendClientInfoRef.current = sendClientInfo;
|
|
40
27
|
}, [sendClientInfo]);
|
|
41
28
|
useEffect(() => {
|
|
42
|
-
|
|
43
|
-
}, [sessionId, setSocketDiagnostics]);
|
|
44
|
-
useEffect(() => {
|
|
45
|
-
let disposed = false;
|
|
46
|
-
const shouldRecordSocketMessageActivity = (event) => {
|
|
47
|
-
if (typeof event?.data !== "string") {
|
|
48
|
-
return true;
|
|
49
|
-
}
|
|
50
|
-
try {
|
|
51
|
-
const parsed = JSON.parse(event.data);
|
|
52
|
-
if (!parsed) {
|
|
53
|
-
return true;
|
|
54
|
-
}
|
|
55
|
-
if (parsed.type !== "agent:run:delta") {
|
|
56
|
-
return true;
|
|
57
|
-
}
|
|
58
|
-
const deltaType = parsed.payload?.type;
|
|
59
|
-
return String(deltaType || "").toLowerCase() !== "heartbeat";
|
|
60
|
-
}
|
|
61
|
-
catch {
|
|
62
|
-
return true;
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
const updateSocketDiagnostics = (patch, socket) => {
|
|
66
|
-
if (!setSocketDiagnostics) {
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
setSocketDiagnostics((previous) => {
|
|
70
|
-
const nextReadyState = socket?.readyState ??
|
|
71
|
-
(patch.readyState !== undefined ? patch.readyState : previous.readyState);
|
|
72
|
-
return {
|
|
73
|
-
...previous,
|
|
74
|
-
sessionId,
|
|
75
|
-
readyState: nextReadyState,
|
|
76
|
-
readyStateLabel: getEditorSocketReadyStateLabel(nextReadyState),
|
|
77
|
-
...patch,
|
|
78
|
-
};
|
|
79
|
-
});
|
|
80
|
-
};
|
|
81
|
-
const markSocketEvent = (eventType, socket, patch) => {
|
|
82
|
-
const now = new Date().toISOString();
|
|
83
|
-
updateSocketDiagnostics({
|
|
84
|
-
lastEventType: eventType,
|
|
85
|
-
lastEventAt: now,
|
|
86
|
-
...patch,
|
|
87
|
-
}, socket);
|
|
88
|
-
};
|
|
89
|
-
const scheduleReconnect = (socket) => {
|
|
90
|
-
if (reconnectTimeoutRef.current) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
const attempts = reconnectAttemptsRef.current;
|
|
94
|
-
const delay = Math.min(1000 * Math.pow(2, Math.min(attempts, 5)), 30000);
|
|
95
|
-
reconnectCountRef.current += 1;
|
|
96
|
-
markSocketEvent("reconnect-scheduled", socket, {
|
|
97
|
-
reconnectCount: reconnectCountRef.current,
|
|
98
|
-
});
|
|
99
|
-
reconnectTimeoutRef.current = setTimeout(() => {
|
|
100
|
-
reconnectTimeoutRef.current = null;
|
|
101
|
-
reconnectAttemptsRef.current = attempts + 1;
|
|
102
|
-
connect();
|
|
103
|
-
}, delay);
|
|
104
|
-
};
|
|
105
|
-
const attach = (socket, handler, reusedExistingSocket) => {
|
|
106
|
-
if (disposed) {
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
29
|
+
const attach = (socket, handler) => {
|
|
109
30
|
socket.addEventListener("message", handler);
|
|
110
31
|
socketInstanceRef.current = socket;
|
|
111
|
-
attachedMessageHandlerRef.current = handler;
|
|
112
|
-
markSocketEvent(reusedExistingSocket ? "reused-socket" : "connect-attempt", socket);
|
|
113
32
|
};
|
|
114
|
-
const connect =
|
|
115
|
-
// Check connection availability before attempting WebSocket connection
|
|
116
|
-
try {
|
|
117
|
-
const availability = await checkConnectionAvailability(sessionId);
|
|
118
|
-
if (disposed)
|
|
119
|
-
return;
|
|
120
|
-
if (!availability.allowed) {
|
|
121
|
-
// Connection not allowed - likely concurrent user limit
|
|
122
|
-
isConcurrentUserLimitRef.current = true;
|
|
123
|
-
if (availability.currentUsers !== undefined &&
|
|
124
|
-
availability.maxUsers !== undefined &&
|
|
125
|
-
availability.message) {
|
|
126
|
-
onConcurrentUserLimitRef.current?.({
|
|
127
|
-
currentUsers: availability.currentUsers,
|
|
128
|
-
maxUsers: availability.maxUsers,
|
|
129
|
-
message: availability.message,
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
// Don't attempt connection or retry for concurrent user limit
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
// Reset the flag if connection is allowed
|
|
136
|
-
isConcurrentUserLimitRef.current = false;
|
|
137
|
-
}
|
|
138
|
-
catch (error) {
|
|
139
|
-
console.error("Error checking connection availability:", error);
|
|
140
|
-
// Continue with connection attempt if check fails
|
|
141
|
-
}
|
|
142
|
-
if (disposed)
|
|
143
|
-
return;
|
|
33
|
+
const connect = () => {
|
|
144
34
|
let socket = globalThis.editorSocket;
|
|
145
|
-
const existingSocketSessionId = socket?.__parheliaSessionId;
|
|
146
35
|
const needsNewSocket = !socket ||
|
|
147
|
-
existingSocketSessionId !== sessionId ||
|
|
148
36
|
socket.readyState === WebSocket.CLOSING ||
|
|
149
37
|
socket.readyState === WebSocket.CLOSED;
|
|
150
38
|
const handleMessage = (event) => {
|
|
151
|
-
if (shouldRecordSocketMessageActivity(event)) {
|
|
152
|
-
markSocketEvent("message", socketInstanceRef.current ?? socket, {
|
|
153
|
-
lastMessageAt: new Date().toISOString(),
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
39
|
onMessageRef.current?.(event);
|
|
157
40
|
};
|
|
158
41
|
if (needsNewSocket) {
|
|
159
|
-
if (socket &&
|
|
160
|
-
existingSocketSessionId &&
|
|
161
|
-
existingSocketSessionId !== sessionId &&
|
|
162
|
-
socket.readyState !== WebSocket.CLOSED &&
|
|
163
|
-
socket.readyState !== WebSocket.CLOSING) {
|
|
164
|
-
socket.close();
|
|
165
|
-
}
|
|
166
42
|
socket = connectSocket(sessionId);
|
|
167
|
-
markSocketEvent("connect-attempt", socket);
|
|
168
|
-
socket.__parheliaSessionId =
|
|
169
|
-
sessionId;
|
|
170
43
|
socket.addEventListener("open", () => {
|
|
171
|
-
if (disposed) {
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
44
|
reconnectAttemptsRef.current = 0;
|
|
175
|
-
isConcurrentUserLimitRef.current = false;
|
|
176
|
-
markSocketEvent("open", socket, {
|
|
177
|
-
lastOpenAt: new Date().toISOString(),
|
|
178
|
-
lastCloseCode: null,
|
|
179
|
-
lastCloseReason: null,
|
|
180
|
-
lastErrorMessage: null,
|
|
181
|
-
});
|
|
182
45
|
onOpenRef.current?.();
|
|
183
46
|
sendClientInfoRef.current?.();
|
|
184
47
|
requestQuotaRef.current?.();
|
|
185
48
|
});
|
|
186
49
|
socket.addEventListener("close", (event) => {
|
|
187
|
-
if (
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
});
|
|
195
|
-
// Don't retry if we hit concurrent user limit
|
|
196
|
-
if (isConcurrentUserLimitRef.current) {
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
199
|
-
// For abnormal closes, re-check availability before reconnecting so
|
|
200
|
-
// concurrent-user-limit rejections do not get treated as transient failures.
|
|
201
|
-
const shouldCheckAvailability = event.code !== 1000;
|
|
202
|
-
const isSessionRevoked = event.code === 1008 || event.reason === "session-revoked";
|
|
203
|
-
if (isSessionRevoked) {
|
|
204
|
-
if (reconnectTimeoutRef.current) {
|
|
205
|
-
clearTimeout(reconnectTimeoutRef.current);
|
|
206
|
-
reconnectTimeoutRef.current = null;
|
|
207
|
-
}
|
|
208
|
-
onSessionRevokedRef.current?.();
|
|
209
|
-
return;
|
|
210
|
-
}
|
|
211
|
-
if (shouldCheckAvailability) {
|
|
212
|
-
checkConnectionAvailability(sessionId)
|
|
213
|
-
.then((availability) => {
|
|
214
|
-
if (!availability.allowed) {
|
|
215
|
-
isConcurrentUserLimitRef.current = true;
|
|
216
|
-
if (availability.currentUsers !== undefined &&
|
|
217
|
-
availability.maxUsers !== undefined &&
|
|
218
|
-
availability.message) {
|
|
219
|
-
onConcurrentUserLimitRef.current?.({
|
|
220
|
-
currentUsers: availability.currentUsers,
|
|
221
|
-
maxUsers: availability.maxUsers,
|
|
222
|
-
message: availability.message,
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
return; // Don't retry
|
|
226
|
-
}
|
|
227
|
-
// Not a concurrent user limit issue, proceed with retry.
|
|
228
|
-
scheduleReconnect(socket);
|
|
229
|
-
})
|
|
230
|
-
.catch(() => {
|
|
231
|
-
// If the availability check fails, fall back to the normal retry path.
|
|
232
|
-
scheduleReconnect(socket);
|
|
233
|
-
});
|
|
234
|
-
return;
|
|
50
|
+
if (event.code !== 1000) {
|
|
51
|
+
const attempts = reconnectAttemptsRef.current;
|
|
52
|
+
const delay = Math.min(1000 * Math.pow(2, Math.min(attempts, 5)), 30000);
|
|
53
|
+
reconnectTimeoutRef.current = setTimeout(() => {
|
|
54
|
+
reconnectAttemptsRef.current = attempts + 1;
|
|
55
|
+
connect();
|
|
56
|
+
}, delay);
|
|
235
57
|
}
|
|
236
58
|
});
|
|
237
59
|
socket.addEventListener("error", (error) => {
|
|
238
|
-
if (disposed) {
|
|
239
|
-
return;
|
|
240
|
-
}
|
|
241
|
-
const errorMessage = error instanceof ErrorEvent && error.message
|
|
242
|
-
? error.message
|
|
243
|
-
: null;
|
|
244
|
-
markSocketEvent("error", socket, {
|
|
245
|
-
lastErrorAt: new Date().toISOString(),
|
|
246
|
-
lastErrorMessage: errorMessage,
|
|
247
|
-
});
|
|
248
60
|
onErrorRef.current?.(error);
|
|
249
61
|
});
|
|
250
62
|
globalThis.editorSocket = socket;
|
|
251
63
|
}
|
|
252
64
|
if (socket) {
|
|
253
|
-
attach(socket, handleMessage
|
|
65
|
+
attach(socket, handleMessage);
|
|
254
66
|
if (socket.readyState === WebSocket.OPEN) {
|
|
255
|
-
updateSocketDiagnostics({}, socket);
|
|
256
67
|
sendClientInfoRef.current?.();
|
|
257
68
|
requestQuotaRef.current?.();
|
|
258
69
|
}
|
|
259
70
|
}
|
|
260
71
|
};
|
|
261
|
-
|
|
262
|
-
connect().catch((error) => {
|
|
263
|
-
console.error("Error in WebSocket connection:", error);
|
|
264
|
-
onErrorRef.current?.(new Event("error"));
|
|
265
|
-
});
|
|
72
|
+
connect();
|
|
266
73
|
return () => {
|
|
267
|
-
disposed = true;
|
|
268
74
|
if (reconnectTimeoutRef.current) {
|
|
269
75
|
clearTimeout(reconnectTimeoutRef.current);
|
|
270
76
|
reconnectTimeoutRef.current = null;
|
|
271
77
|
}
|
|
272
|
-
if (socketInstanceRef.current
|
|
273
|
-
socketInstanceRef.current.removeEventListener("message",
|
|
274
|
-
attachedMessageHandlerRef.current = null;
|
|
78
|
+
if (socketInstanceRef.current) {
|
|
79
|
+
socketInstanceRef.current.removeEventListener("message", onMessage);
|
|
275
80
|
socketInstanceRef.current = null;
|
|
276
81
|
}
|
|
277
82
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEditorWebSocket.js","sourceRoot":"","sources":["../../../../src/editor/client/hooks/useEditorWebSocket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"useEditorWebSocket.js","sourceRoot":"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C,EAAE,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;IAE/B,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAW,CAAC;AACnD,CAAC"}
|
|
@@ -7,14 +7,6 @@ export type QuotaUsage = {
|
|
|
7
7
|
totalCost: number;
|
|
8
8
|
/** Daily cost in USD (today only) */
|
|
9
9
|
dailyCost: number;
|
|
10
|
-
/** Optional per-day history for charting, keyed by UTC date (yyyy-MM-dd). */
|
|
11
|
-
dailyHistory?: Array<{
|
|
12
|
-
date: string;
|
|
13
|
-
tokens: number;
|
|
14
|
-
images: number;
|
|
15
|
-
tokenCost: number;
|
|
16
|
-
imageCost: number;
|
|
17
|
-
}>;
|
|
18
10
|
};
|
|
19
11
|
export type QuotaLimits = {
|
|
20
12
|
totalTokens: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useQuota.js","sourceRoot":"","sources":["../../../../src/editor/client/hooks/useQuota.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useQuota.js","sourceRoot":"","sources":["../../../../src/editor/client/hooks/useQuota.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAsBzD,MAAM,UAAU,QAAQ,CAAC,MAExB;IACC,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;IAC7B,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAmB,IAAI,CAAC,CAAC;IAEnE,MAAM,eAAe,GAAG,WAAW,CAAC,GAAG,EAAE;QACvC,IAAI,CAAC,SAAS;YAAE,OAAO,KAAK,CAAC;QAC7B,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;QACpC,IAAI,MAAM,CAAC,WAAW,GAAG,CAAC,IAAI,KAAK,CAA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