@parhelia/core 0.1.10745
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/LICENSE +8 -0
- package/README.md +34 -0
- package/dev.css +3 -0
- package/dist/agents-view/AgentCard.d.ts +12 -0
- package/dist/agents-view/AgentCard.js +30 -0
- package/dist/agents-view/AgentCard.js.map +1 -0
- package/dist/agents-view/AgentsView.d.ts +5 -0
- package/dist/agents-view/AgentsView.js +255 -0
- package/dist/agents-view/AgentsView.js.map +1 -0
- package/dist/agents-view/ProfileAgentsGroup.d.ts +17 -0
- package/dist/agents-view/ProfileAgentsGroup.js +13 -0
- package/dist/agents-view/ProfileAgentsGroup.js.map +1 -0
- package/dist/client-components/api.d.ts +1 -0
- package/dist/client-components/api.js +4 -0
- package/dist/client-components/api.js.map +1 -0
- package/dist/client-components/index.d.ts +17 -0
- package/dist/client-components/index.js +18 -0
- package/dist/client-components/index.js.map +1 -0
- package/dist/components/ActionButton.d.ts +14 -0
- package/dist/components/ActionButton.js +6 -0
- package/dist/components/ActionButton.js.map +1 -0
- package/dist/components/Error.d.ts +9 -0
- package/dist/components/Error.js +24 -0
- package/dist/components/Error.js.map +1 -0
- package/dist/components/FilterInput.d.ts +22 -0
- package/dist/components/FilterInput.js +29 -0
- package/dist/components/FilterInput.js.map +1 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/components/index.js +5 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/ui/CardConnector.d.ts +4 -0
- package/dist/components/ui/CardConnector.js +6 -0
- package/dist/components/ui/CardConnector.js.map +1 -0
- package/dist/components/ui/LanguageSelector.d.ts +8 -0
- package/dist/components/ui/LanguageSelector.js +47 -0
- package/dist/components/ui/LanguageSelector.js.map +1 -0
- package/dist/components/ui/PlaceholderInput.d.ts +41 -0
- package/dist/components/ui/PlaceholderInput.js +160 -0
- package/dist/components/ui/PlaceholderInput.js.map +1 -0
- package/dist/components/ui/PlaceholderInputTypes.d.ts +41 -0
- package/dist/components/ui/PlaceholderInputTypes.js +48 -0
- package/dist/components/ui/PlaceholderInputTypes.js.map +1 -0
- package/dist/components/ui/PlaceholderItemSelector.d.ts +7 -0
- package/dist/components/ui/PlaceholderItemSelector.js +154 -0
- package/dist/components/ui/PlaceholderItemSelector.js.map +1 -0
- package/dist/components/ui/alert.d.ts +7 -0
- package/dist/components/ui/alert.js +21 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/badge.js +23 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/button.d.ts +10 -0
- package/dist/components/ui/button.js +33 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +7 -0
- package/dist/components/ui/calendar.js +58 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.d.ts +19 -0
- package/dist/components/ui/card.js +78 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/checkbox.js +10 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/command.d.ts +18 -0
- package/dist/components/ui/command.js +35 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/context-menu.d.ts +53 -0
- package/dist/components/ui/context-menu.js +290 -0
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/copy-button.d.ts +10 -0
- package/dist/components/ui/copy-button.js +61 -0
- package/dist/components/ui/copy-button.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +16 -0
- package/dist/components/ui/dialog.js +37 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/components/ui/dropdown-menu.js +52 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/input.js +9 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/menubar.d.ts +26 -0
- package/dist/components/ui/menubar.js +55 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/paste-button.d.ts +14 -0
- package/dist/components/ui/paste-button.js +114 -0
- package/dist/components/ui/paste-button.js.map +1 -0
- package/dist/components/ui/popover.d.ts +11 -0
- package/dist/components/ui/popover.js +66 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +7 -0
- package/dist/components/ui/progress.js +9 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/select.d.ts +18 -0
- package/dist/components/ui/select.js +34 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/sonner.d.ts +3 -0
- package/dist/components/ui/sonner.js +16 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/switch.js +9 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +17 -0
- package/dist/components/ui/tabs.js +27 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/textarea.js +11 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +9 -0
- package/dist/components/ui/tooltip.js +18 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/ui/upload-button.d.ts +15 -0
- package/dist/components/ui/upload-button.js +56 -0
- package/dist/components/ui/upload-button.js.map +1 -0
- package/dist/config/config.d.ts +24 -0
- package/dist/config/config.js +1087 -0
- package/dist/config/config.js.map +1 -0
- package/dist/config/types.d.ts +249 -0
- package/dist/config/types.js +2 -0
- package/dist/config/types.js.map +1 -0
- package/dist/editor/AspectRatioSelector.d.ts +13 -0
- package/dist/editor/AspectRatioSelector.js +71 -0
- package/dist/editor/AspectRatioSelector.js.map +1 -0
- 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.d.ts +19 -0
- package/dist/editor/ConfirmationDialog.js +31 -0
- package/dist/editor/ConfirmationDialog.js.map +1 -0
- package/dist/editor/ContentTree.d.ts +39 -0
- package/dist/editor/ContentTree.js +586 -0
- package/dist/editor/ContentTree.js.map +1 -0
- package/dist/editor/ContextMenu.d.ts +15 -0
- package/dist/editor/ContextMenu.js +239 -0
- package/dist/editor/ContextMenu.js.map +1 -0
- package/dist/editor/Editor.d.ts +12 -0
- package/dist/editor/Editor.js +59 -0
- package/dist/editor/Editor.js.map +1 -0
- package/dist/editor/EditorWarning.d.ts +5 -0
- package/dist/editor/EditorWarning.js +12 -0
- package/dist/editor/EditorWarning.js.map +1 -0
- package/dist/editor/EditorWarnings.d.ts +9 -0
- package/dist/editor/EditorWarnings.js +19 -0
- package/dist/editor/EditorWarnings.js.map +1 -0
- package/dist/editor/FieldActionsOverlay.d.ts +18 -0
- package/dist/editor/FieldActionsOverlay.js +201 -0
- package/dist/editor/FieldActionsOverlay.js.map +1 -0
- package/dist/editor/FieldEditorPopup.d.ts +10 -0
- package/dist/editor/FieldEditorPopup.js +23 -0
- package/dist/editor/FieldEditorPopup.js.map +1 -0
- package/dist/editor/FieldHistory.d.ts +7 -0
- package/dist/editor/FieldHistory.js +42 -0
- package/dist/editor/FieldHistory.js.map +1 -0
- package/dist/editor/FieldList.d.ts +19 -0
- package/dist/editor/FieldList.js +90 -0
- package/dist/editor/FieldList.js.map +1 -0
- package/dist/editor/FieldListField.d.ts +16 -0
- package/dist/editor/FieldListField.js +231 -0
- package/dist/editor/FieldListField.js.map +1 -0
- package/dist/editor/FieldListFieldWithFallbacks.d.ts +11 -0
- package/dist/editor/FieldListFieldWithFallbacks.js +120 -0
- package/dist/editor/FieldListFieldWithFallbacks.js.map +1 -0
- package/dist/editor/FloatingToolbar.d.ts +7 -0
- package/dist/editor/FloatingToolbar.js +91 -0
- package/dist/editor/FloatingToolbar.js.map +1 -0
- package/dist/editor/ImageEditButton.d.ts +27 -0
- package/dist/editor/ImageEditButton.js +22 -0
- package/dist/editor/ImageEditButton.js.map +1 -0
- package/dist/editor/ImageEditor.d.ts +5 -0
- package/dist/editor/ImageEditor.js +76 -0
- package/dist/editor/ImageEditor.js.map +1 -0
- package/dist/editor/ItemInfo.d.ts +4 -0
- package/dist/editor/ItemInfo.js +36 -0
- package/dist/editor/ItemInfo.js.map +1 -0
- package/dist/editor/LinkEditorDialog.d.ts +18 -0
- package/dist/editor/LinkEditorDialog.js +101 -0
- package/dist/editor/LinkEditorDialog.js.map +1 -0
- package/dist/editor/MainLayout.d.ts +12 -0
- package/dist/editor/MainLayout.js +55 -0
- package/dist/editor/MainLayout.js.map +1 -0
- package/dist/editor/MobileLayout.d.ts +2 -0
- package/dist/editor/MobileLayout.js +34 -0
- package/dist/editor/MobileLayout.js.map +1 -0
- package/dist/editor/NewEditorClient.d.ts +5 -0
- package/dist/editor/NewEditorClient.js +7 -0
- package/dist/editor/NewEditorClient.js.map +1 -0
- package/dist/editor/PictureCropper.d.ts +6 -0
- package/dist/editor/PictureCropper.js +722 -0
- package/dist/editor/PictureCropper.js.map +1 -0
- package/dist/editor/PictureEditor.d.ts +9 -0
- package/dist/editor/PictureEditor.js +180 -0
- package/dist/editor/PictureEditor.js.map +1 -0
- package/dist/editor/PictureEditorDialog.d.ts +8 -0
- package/dist/editor/PictureEditorDialog.js +195 -0
- package/dist/editor/PictureEditorDialog.js.map +1 -0
- package/dist/editor/QuickItemSwitcher.d.ts +9 -0
- package/dist/editor/QuickItemSwitcher.js +78 -0
- package/dist/editor/QuickItemSwitcher.js.map +1 -0
- package/dist/editor/ScrollingContentTree.d.ts +10 -0
- package/dist/editor/ScrollingContentTree.js +54 -0
- package/dist/editor/ScrollingContentTree.js.map +1 -0
- package/dist/editor/Titlebar.d.ts +1 -0
- package/dist/editor/Titlebar.js +46 -0
- package/dist/editor/Titlebar.js.map +1 -0
- package/dist/editor/ai/AgentCostDisplay.d.ts +32 -0
- package/dist/editor/ai/AgentCostDisplay.js +93 -0
- package/dist/editor/ai/AgentCostDisplay.js.map +1 -0
- package/dist/editor/ai/AgentHistory.d.ts +11 -0
- package/dist/editor/ai/AgentHistory.js +12 -0
- package/dist/editor/ai/AgentHistory.js.map +1 -0
- package/dist/editor/ai/AgentProfilesOverview.d.ts +9 -0
- package/dist/editor/ai/AgentProfilesOverview.js +16 -0
- package/dist/editor/ai/AgentProfilesOverview.js.map +1 -0
- package/dist/editor/ai/AgentStatusBadge.d.ts +26 -0
- package/dist/editor/ai/AgentStatusBadge.js +126 -0
- package/dist/editor/ai/AgentStatusBadge.js.map +1 -0
- package/dist/editor/ai/AgentTerminal.d.ts +14 -0
- package/dist/editor/ai/AgentTerminal.js +2634 -0
- package/dist/editor/ai/AgentTerminal.js.map +1 -0
- package/dist/editor/ai/Agents.d.ts +4 -0
- package/dist/editor/ai/Agents.js +813 -0
- package/dist/editor/ai/Agents.js.map +1 -0
- package/dist/editor/ai/AiResponseMessage.d.ts +18 -0
- package/dist/editor/ai/AiResponseMessage.js +684 -0
- package/dist/editor/ai/AiResponseMessage.js.map +1 -0
- package/dist/editor/ai/ContextInfoBar.d.ts +11 -0
- package/dist/editor/ai/ContextInfoBar.js +355 -0
- package/dist/editor/ai/ContextInfoBar.js.map +1 -0
- package/dist/editor/ai/DancingDots.d.ts +1 -0
- package/dist/editor/ai/DancingDots.js +6 -0
- package/dist/editor/ai/DancingDots.js.map +1 -0
- package/dist/editor/ai/MediaImage.d.ts +6 -0
- package/dist/editor/ai/MediaImage.js +38 -0
- package/dist/editor/ai/MediaImage.js.map +1 -0
- package/dist/editor/ai/ToolCallDisplay.d.ts +45 -0
- package/dist/editor/ai/ToolCallDisplay.js +292 -0
- package/dist/editor/ai/ToolCallDisplay.js.map +1 -0
- package/dist/editor/ai/aiPageModel.d.ts +24 -0
- package/dist/editor/ai/aiPageModel.js +97 -0
- package/dist/editor/ai/aiPageModel.js.map +1 -0
- package/dist/editor/ai/editorAiContext.d.ts +10 -0
- package/dist/editor/ai/editorAiContext.js +10 -0
- package/dist/editor/ai/editorAiContext.js.map +1 -0
- package/dist/editor/ai/types.d.ts +30 -0
- package/dist/editor/ai/types.js +2 -0
- package/dist/editor/ai/types.js.map +1 -0
- package/dist/editor/ai/useAgentStatus.d.ts +14 -0
- package/dist/editor/ai/useAgentStatus.js +203 -0
- package/dist/editor/ai/useAgentStatus.js.map +1 -0
- package/dist/editor/client/AboutDialog.d.ts +2 -0
- package/dist/editor/client/AboutDialog.js +23 -0
- package/dist/editor/client/AboutDialog.js.map +1 -0
- package/dist/editor/client/EditorShell.d.ts +37 -0
- package/dist/editor/client/EditorShell.js +2388 -0
- package/dist/editor/client/EditorShell.js.map +1 -0
- package/dist/editor/client/GenericDialog.d.ts +10 -0
- package/dist/editor/client/GenericDialog.js +25 -0
- package/dist/editor/client/GenericDialog.js.map +1 -0
- package/dist/editor/client/editContext.d.ts +260 -0
- package/dist/editor/client/editContext.js +29 -0
- package/dist/editor/client/editContext.js.map +1 -0
- package/dist/editor/client/fieldModificationStore.d.ts +25 -0
- package/dist/editor/client/fieldModificationStore.js +184 -0
- package/dist/editor/client/fieldModificationStore.js.map +1 -0
- package/dist/editor/client/helpers.d.ts +12 -0
- package/dist/editor/client/helpers.js +29 -0
- package/dist/editor/client/helpers.js.map +1 -0
- package/dist/editor/client/hooks/useEditorUrlSync.d.ts +18 -0
- package/dist/editor/client/hooks/useEditorUrlSync.js +56 -0
- package/dist/editor/client/hooks/useEditorUrlSync.js.map +1 -0
- package/dist/editor/client/hooks/useEditorWebSocket.d.ts +11 -0
- package/dist/editor/client/hooks/useEditorWebSocket.js +86 -0
- package/dist/editor/client/hooks/useEditorWebSocket.js.map +1 -0
- package/dist/editor/client/hooks/useGlobalEditorKeyDown.d.ts +1 -0
- package/dist/editor/client/hooks/useGlobalEditorKeyDown.js +12 -0
- package/dist/editor/client/hooks/useGlobalEditorKeyDown.js.map +1 -0
- package/dist/editor/client/hooks/useMediaQuery.d.ts +1 -0
- package/dist/editor/client/hooks/useMediaQuery.js +19 -0
- package/dist/editor/client/hooks/useMediaQuery.js.map +1 -0
- package/dist/editor/client/hooks/useMediaSelector.d.ts +12 -0
- package/dist/editor/client/hooks/useMediaSelector.js +30 -0
- package/dist/editor/client/hooks/useMediaSelector.js.map +1 -0
- package/dist/editor/client/hooks/useQuota.d.ts +29 -0
- package/dist/editor/client/hooks/useQuota.js +53 -0
- package/dist/editor/client/hooks/useQuota.js.map +1 -0
- package/dist/editor/client/hooks/useSocketMessageHandler.d.ts +35 -0
- package/dist/editor/client/hooks/useSocketMessageHandler.js +234 -0
- package/dist/editor/client/hooks/useSocketMessageHandler.js.map +1 -0
- package/dist/editor/client/hooks/useWorkbox.d.ts +9 -0
- package/dist/editor/client/hooks/useWorkbox.js +52 -0
- package/dist/editor/client/hooks/useWorkbox.js.map +1 -0
- package/dist/editor/client/itemsRepository.d.ts +38 -0
- package/dist/editor/client/itemsRepository.js +468 -0
- package/dist/editor/client/itemsRepository.js.map +1 -0
- package/dist/editor/client/operations.d.ts +69 -0
- package/dist/editor/client/operations.js +627 -0
- package/dist/editor/client/operations.js.map +1 -0
- package/dist/editor/client/pageModelBuilder.d.ts +6 -0
- package/dist/editor/client/pageModelBuilder.js +155 -0
- package/dist/editor/client/pageModelBuilder.js.map +1 -0
- package/dist/editor/client/ui/EditorChrome.d.ts +12 -0
- package/dist/editor/client/ui/EditorChrome.js +30 -0
- package/dist/editor/client/ui/EditorChrome.js.map +1 -0
- package/dist/editor/client/ui/FullscreenControls.d.ts +7 -0
- package/dist/editor/client/ui/FullscreenControls.js +21 -0
- package/dist/editor/client/ui/FullscreenControls.js.map +1 -0
- package/dist/editor/commands/agentCommands.d.ts +9 -0
- package/dist/editor/commands/agentCommands.js +30 -0
- package/dist/editor/commands/agentCommands.js.map +1 -0
- package/dist/editor/commands/commands.d.ts +19 -0
- package/dist/editor/commands/commands.js +2 -0
- package/dist/editor/commands/commands.js.map +1 -0
- package/dist/editor/commands/componentCommands.d.ts +12 -0
- package/dist/editor/commands/componentCommands.js +378 -0
- package/dist/editor/commands/componentCommands.js.map +1 -0
- package/dist/editor/commands/createVersionCommand.d.ts +4 -0
- package/dist/editor/commands/createVersionCommand.js +24 -0
- package/dist/editor/commands/createVersionCommand.js.map +1 -0
- package/dist/editor/commands/deleteVersionCommand.d.ts +4 -0
- package/dist/editor/commands/deleteVersionCommand.js +53 -0
- package/dist/editor/commands/deleteVersionCommand.js.map +1 -0
- package/dist/editor/commands/itemCommands.d.ts +29 -0
- package/dist/editor/commands/itemCommands.js +428 -0
- package/dist/editor/commands/itemCommands.js.map +1 -0
- package/dist/editor/commands/localizeItem/LocalizeItemDialog.d.ts +8 -0
- package/dist/editor/commands/localizeItem/LocalizeItemDialog.js +91 -0
- package/dist/editor/commands/localizeItem/LocalizeItemDialog.js.map +1 -0
- package/dist/editor/commands/undo.d.ts +15 -0
- package/dist/editor/commands/undo.js +29 -0
- package/dist/editor/commands/undo.js.map +1 -0
- package/dist/editor/componentTreeHelper.d.ts +18 -0
- package/dist/editor/componentTreeHelper.js +123 -0
- package/dist/editor/componentTreeHelper.js.map +1 -0
- package/dist/editor/context-menu/CopyMoveMenu.d.ts +7 -0
- package/dist/editor/context-menu/CopyMoveMenu.js +58 -0
- package/dist/editor/context-menu/CopyMoveMenu.js.map +1 -0
- package/dist/editor/context-menu/InsertMenu.d.ts +9 -0
- package/dist/editor/context-menu/InsertMenu.js +229 -0
- package/dist/editor/context-menu/InsertMenu.js.map +1 -0
- package/dist/editor/control-center/About.d.ts +1 -0
- package/dist/editor/control-center/About.js +8 -0
- package/dist/editor/control-center/About.js.map +1 -0
- package/dist/editor/control-center/AllAgentsPanel.d.ts +5 -0
- package/dist/editor/control-center/AllAgentsPanel.js +126 -0
- package/dist/editor/control-center/AllAgentsPanel.js.map +1 -0
- package/dist/editor/control-center/ControlCenterMenu.d.ts +1 -0
- package/dist/editor/control-center/ControlCenterMenu.js +66 -0
- package/dist/editor/control-center/ControlCenterMenu.js.map +1 -0
- package/dist/editor/control-center/IndexOverview.d.ts +1 -0
- package/dist/editor/control-center/IndexOverview.js +323 -0
- package/dist/editor/control-center/IndexOverview.js.map +1 -0
- package/dist/editor/control-center/Info.d.ts +1 -0
- package/dist/editor/control-center/Info.js +10 -0
- package/dist/editor/control-center/Info.js.map +1 -0
- package/dist/editor/control-center/LatestFeedback.d.ts +1 -0
- package/dist/editor/control-center/LatestFeedback.js +136 -0
- package/dist/editor/control-center/LatestFeedback.js.map +1 -0
- package/dist/editor/control-center/QuotaInfo.d.ts +1 -0
- package/dist/editor/control-center/QuotaInfo.js +102 -0
- package/dist/editor/control-center/QuotaInfo.js.map +1 -0
- package/dist/editor/control-center/Setup.d.ts +1 -0
- package/dist/editor/control-center/Setup.js +18 -0
- package/dist/editor/control-center/Setup.js.map +1 -0
- package/dist/editor/control-center/Status.d.ts +1 -0
- package/dist/editor/control-center/Status.js +79 -0
- package/dist/editor/control-center/Status.js.map +1 -0
- package/dist/editor/control-center/WebSocketMessages.d.ts +1 -0
- package/dist/editor/control-center/WebSocketMessages.js +71 -0
- package/dist/editor/control-center/WebSocketMessages.js.map +1 -0
- package/dist/editor/control-center/parhelia-setup/Overview.d.ts +1 -0
- package/dist/editor/control-center/parhelia-setup/Overview.js +91 -0
- package/dist/editor/control-center/parhelia-setup/Overview.js.map +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/EmbeddingsModelSection.d.ts +2 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/EmbeddingsModelSection.js +195 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/EmbeddingsModelSection.js.map +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/index.d.ts +2 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/index.js +22 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/index.js.map +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/provider/ProviderSection.d.ts +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/provider/ProviderSection.js +233 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/provider/ProviderSection.js.map +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/required-containers/RequiredContainersList.d.ts +15 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/required-containers/RequiredContainersList.js +14 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/required-containers/RequiredContainersList.js.map +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/required-containers/RequiredContainersSection.d.ts +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/required-containers/RequiredContainersSection.js +94 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/required-containers/RequiredContainersSection.js.map +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/tools/GenerateToolsSection.d.ts +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/tools/GenerateToolsSection.js +367 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/tools/GenerateToolsSection.js.map +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/types.d.ts +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/types.js +2 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/types.js.map +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/utils.d.ts +4 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/utils.js +25 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/utils.js.map +1 -0
- package/dist/editor/control-center/setup-steps/DbSetupStep.d.ts +2 -0
- package/dist/editor/control-center/setup-steps/DbSetupStep.js +46 -0
- package/dist/editor/control-center/setup-steps/DbSetupStep.js.map +1 -0
- package/dist/editor/control-center/setup-steps/IndexSetupStep.d.ts +2 -0
- package/dist/editor/control-center/setup-steps/IndexSetupStep.js +36 -0
- package/dist/editor/control-center/setup-steps/IndexSetupStep.js.map +1 -0
- package/dist/editor/control-center/setup-steps/SettingsSetupStep.d.ts +2 -0
- package/dist/editor/control-center/setup-steps/SettingsSetupStep.js +107 -0
- package/dist/editor/control-center/setup-steps/SettingsSetupStep.js.map +1 -0
- package/dist/editor/editor-warnings/ItemLocked.d.ts +2 -0
- package/dist/editor/editor-warnings/ItemLocked.js +38 -0
- package/dist/editor/editor-warnings/ItemLocked.js.map +1 -0
- package/dist/editor/editor-warnings/NoLanguageWriteAccess.d.ts +2 -0
- package/dist/editor/editor-warnings/NoLanguageWriteAccess.js +14 -0
- package/dist/editor/editor-warnings/NoLanguageWriteAccess.js.map +1 -0
- package/dist/editor/editor-warnings/NoWorkflowWriteAccess.d.ts +2 -0
- package/dist/editor/editor-warnings/NoWorkflowWriteAccess.js +14 -0
- package/dist/editor/editor-warnings/NoWorkflowWriteAccess.js.map +1 -0
- package/dist/editor/editor-warnings/NoWriteAccess.d.ts +2 -0
- package/dist/editor/editor-warnings/NoWriteAccess.js +14 -0
- package/dist/editor/editor-warnings/NoWriteAccess.js.map +1 -0
- package/dist/editor/editor-warnings/ValidationErrors.d.ts +2 -0
- package/dist/editor/editor-warnings/ValidationErrors.js +28 -0
- package/dist/editor/editor-warnings/ValidationErrors.js.map +1 -0
- package/dist/editor/field-types/AttachmentEditor.d.ts +9 -0
- package/dist/editor/field-types/AttachmentEditor.js +73 -0
- package/dist/editor/field-types/AttachmentEditor.js.map +1 -0
- package/dist/editor/field-types/CheckboxEditor.d.ts +5 -0
- package/dist/editor/field-types/CheckboxEditor.js +30 -0
- package/dist/editor/field-types/CheckboxEditor.js.map +1 -0
- package/dist/editor/field-types/DateFieldEditor.d.ts +5 -0
- package/dist/editor/field-types/DateFieldEditor.js +93 -0
- package/dist/editor/field-types/DateFieldEditor.js.map +1 -0
- package/dist/editor/field-types/DateTimeFieldEditor.d.ts +5 -0
- package/dist/editor/field-types/DateTimeFieldEditor.js +151 -0
- package/dist/editor/field-types/DateTimeFieldEditor.js.map +1 -0
- package/dist/editor/field-types/DropLinkEditor.d.ts +5 -0
- package/dist/editor/field-types/DropLinkEditor.js +42 -0
- package/dist/editor/field-types/DropLinkEditor.js.map +1 -0
- package/dist/editor/field-types/DropListEditor.d.ts +5 -0
- package/dist/editor/field-types/DropListEditor.js +46 -0
- package/dist/editor/field-types/DropListEditor.js.map +1 -0
- package/dist/editor/field-types/ImageFieldEditor.d.ts +5 -0
- package/dist/editor/field-types/ImageFieldEditor.js +34 -0
- package/dist/editor/field-types/ImageFieldEditor.js.map +1 -0
- package/dist/editor/field-types/InternalLinkFieldEditor.d.ts +5 -0
- package/dist/editor/field-types/InternalLinkFieldEditor.js +120 -0
- package/dist/editor/field-types/InternalLinkFieldEditor.js.map +1 -0
- package/dist/editor/field-types/LinkFieldEditor.d.ts +5 -0
- package/dist/editor/field-types/LinkFieldEditor.js +62 -0
- package/dist/editor/field-types/LinkFieldEditor.js.map +1 -0
- package/dist/editor/field-types/MultiLineText.d.ts +7 -0
- package/dist/editor/field-types/MultiLineText.js +48 -0
- package/dist/editor/field-types/MultiLineText.js.map +1 -0
- package/dist/editor/field-types/NameValueListEditor.d.ts +7 -0
- package/dist/editor/field-types/NameValueListEditor.js +101 -0
- package/dist/editor/field-types/NameValueListEditor.js.map +1 -0
- package/dist/editor/field-types/PictureFieldEditor.d.ts +5 -0
- package/dist/editor/field-types/PictureFieldEditor.js +58 -0
- package/dist/editor/field-types/PictureFieldEditor.js.map +1 -0
- package/dist/editor/field-types/RawEditor.d.ts +6 -0
- package/dist/editor/field-types/RawEditor.js +31 -0
- package/dist/editor/field-types/RawEditor.js.map +1 -0
- 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.d.ts +7 -0
- package/dist/editor/field-types/RichTextEditor.js +21 -0
- package/dist/editor/field-types/RichTextEditor.js.map +1 -0
- package/dist/editor/field-types/RichTextEditorComponent.d.ts +8 -0
- package/dist/editor/field-types/RichTextEditorComponent.js +74 -0
- package/dist/editor/field-types/RichTextEditorComponent.js.map +1 -0
- package/dist/editor/field-types/SingleLineText.d.ts +7 -0
- package/dist/editor/field-types/SingleLineText.js +113 -0
- package/dist/editor/field-types/SingleLineText.js.map +1 -0
- package/dist/editor/field-types/TreeListEditor.d.ts +5 -0
- package/dist/editor/field-types/TreeListEditor.js +316 -0
- package/dist/editor/field-types/TreeListEditor.js.map +1 -0
- package/dist/editor/field-types/richtext/components/EditorDropdown.d.ts +11 -0
- package/dist/editor/field-types/richtext/components/EditorDropdown.js +83 -0
- package/dist/editor/field-types/richtext/components/EditorDropdown.js.map +1 -0
- package/dist/editor/field-types/richtext/components/ReactSlate.d.ts +5 -0
- package/dist/editor/field-types/richtext/components/ReactSlate.js +607 -0
- package/dist/editor/field-types/richtext/components/ReactSlate.js.map +1 -0
- package/dist/editor/field-types/richtext/components/SimpleDropdown.d.ts +18 -0
- package/dist/editor/field-types/richtext/components/SimpleDropdown.js +71 -0
- package/dist/editor/field-types/richtext/components/SimpleDropdown.js.map +1 -0
- package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.d.ts +5 -0
- package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.js +359 -0
- package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.js.map +1 -0
- package/dist/editor/field-types/richtext/components/SimpleToolbar.d.ts +16 -0
- package/dist/editor/field-types/richtext/components/SimpleToolbar.js +181 -0
- package/dist/editor/field-types/richtext/components/SimpleToolbar.js.map +1 -0
- package/dist/editor/field-types/richtext/components/SimpleToolbarButton.d.ts +9 -0
- package/dist/editor/field-types/richtext/components/SimpleToolbarButton.js +14 -0
- package/dist/editor/field-types/richtext/components/SimpleToolbarButton.js.map +1 -0
- package/dist/editor/field-types/richtext/components/ToolbarButton.d.ts +3 -0
- package/dist/editor/field-types/richtext/components/ToolbarButton.js +6 -0
- package/dist/editor/field-types/richtext/components/ToolbarButton.js.map +1 -0
- package/dist/editor/field-types/richtext/config/pluginFactory.d.ts +19 -0
- package/dist/editor/field-types/richtext/config/pluginFactory.js +17 -0
- package/dist/editor/field-types/richtext/config/pluginFactory.js.map +1 -0
- package/dist/editor/field-types/richtext/contextMenuFactory.d.ts +4 -0
- package/dist/editor/field-types/richtext/contextMenuFactory.js +201 -0
- package/dist/editor/field-types/richtext/contextMenuFactory.js.map +1 -0
- package/dist/editor/field-types/richtext/hooks/useProfileCache.d.ts +68 -0
- package/dist/editor/field-types/richtext/hooks/useProfileCache.js +214 -0
- package/dist/editor/field-types/richtext/hooks/useProfileCache.js.map +1 -0
- package/dist/editor/field-types/richtext/hooks/useRichTextProfile.d.ts +25 -0
- package/dist/editor/field-types/richtext/hooks/useRichTextProfile.js +64 -0
- package/dist/editor/field-types/richtext/hooks/useRichTextProfile.js.map +1 -0
- package/dist/editor/field-types/richtext/index.d.ts +6 -0
- package/dist/editor/field-types/richtext/index.js +7 -0
- package/dist/editor/field-types/richtext/index.js.map +1 -0
- package/dist/editor/field-types/richtext/types.d.ts +288 -0
- package/dist/editor/field-types/richtext/types.js +107 -0
- package/dist/editor/field-types/richtext/types.js.map +1 -0
- package/dist/editor/field-types/richtext/utils/conversion.d.ts +7 -0
- package/dist/editor/field-types/richtext/utils/conversion.js +762 -0
- package/dist/editor/field-types/richtext/utils/conversion.js.map +1 -0
- package/dist/editor/field-types/richtext/utils/plugins.d.ts +170 -0
- package/dist/editor/field-types/richtext/utils/plugins.js +490 -0
- package/dist/editor/field-types/richtext/utils/plugins.js.map +1 -0
- package/dist/editor/field-types/richtext/utils/profileMapper.d.ts +38 -0
- package/dist/editor/field-types/richtext/utils/profileMapper.js +386 -0
- package/dist/editor/field-types/richtext/utils/profileMapper.js.map +1 -0
- package/dist/editor/field-types/richtext/utils/profileServiceCache.d.ts +37 -0
- package/dist/editor/field-types/richtext/utils/profileServiceCache.js +119 -0
- package/dist/editor/field-types/richtext/utils/profileServiceCache.js.map +1 -0
- package/dist/editor/fieldTypes.d.ts +129 -0
- package/dist/editor/fieldTypes.js +2 -0
- package/dist/editor/fieldTypes.js.map +1 -0
- package/dist/editor/hooks/useEditorSettings.d.ts +17 -0
- package/dist/editor/hooks/useEditorSettings.js +61 -0
- package/dist/editor/hooks/useEditorSettings.js.map +1 -0
- package/dist/editor/media-selector/AiImageSearch.d.ts +4 -0
- package/dist/editor/media-selector/AiImageSearch.js +164 -0
- package/dist/editor/media-selector/AiImageSearch.js.map +1 -0
- package/dist/editor/media-selector/AiImageSearchPrompt.d.ts +3 -0
- package/dist/editor/media-selector/AiImageSearchPrompt.js +57 -0
- package/dist/editor/media-selector/AiImageSearchPrompt.js.map +1 -0
- package/dist/editor/media-selector/MediaFolderBrowser.d.ts +5 -0
- package/dist/editor/media-selector/MediaFolderBrowser.js +182 -0
- package/dist/editor/media-selector/MediaFolderBrowser.js.map +1 -0
- package/dist/editor/media-selector/MediaSelector.d.ts +9 -0
- package/dist/editor/media-selector/MediaSelector.js +8 -0
- package/dist/editor/media-selector/MediaSelector.js.map +1 -0
- package/dist/editor/media-selector/Preview.d.ts +4 -0
- package/dist/editor/media-selector/Preview.js +19 -0
- package/dist/editor/media-selector/Preview.js.map +1 -0
- package/dist/editor/media-selector/Thumbnails.d.ts +8 -0
- package/dist/editor/media-selector/Thumbnails.js +10 -0
- package/dist/editor/media-selector/Thumbnails.js.map +1 -0
- package/dist/editor/media-selector/TreeSelector.d.ts +7 -0
- package/dist/editor/media-selector/TreeSelector.js +183 -0
- package/dist/editor/media-selector/TreeSelector.js.map +1 -0
- package/dist/editor/media-selector/UploadZone.d.ts +4 -0
- package/dist/editor/media-selector/UploadZone.js +81 -0
- package/dist/editor/media-selector/UploadZone.js.map +1 -0
- package/dist/editor/media-selector/index.d.ts +8 -0
- package/dist/editor/media-selector/index.js +9 -0
- package/dist/editor/media-selector/index.js.map +1 -0
- package/dist/editor/menubar/ActiveUsers.d.ts +1 -0
- package/dist/editor/menubar/ActiveUsers.js +120 -0
- package/dist/editor/menubar/ActiveUsers.js.map +1 -0
- package/dist/editor/menubar/ApproveAndPublish.d.ts +1 -0
- package/dist/editor/menubar/ApproveAndPublish.js +13 -0
- package/dist/editor/menubar/ApproveAndPublish.js.map +1 -0
- package/dist/editor/menubar/FavoritesControls.d.ts +8 -0
- package/dist/editor/menubar/FavoritesControls.js +124 -0
- package/dist/editor/menubar/FavoritesControls.js.map +1 -0
- package/dist/editor/menubar/GenericToolbar.d.ts +11 -0
- package/dist/editor/menubar/GenericToolbar.js +10 -0
- package/dist/editor/menubar/GenericToolbar.js.map +1 -0
- package/dist/editor/menubar/ItemActionsMenu.d.ts +3 -0
- package/dist/editor/menubar/ItemActionsMenu.js +23 -0
- package/dist/editor/menubar/ItemActionsMenu.js.map +1 -0
- package/dist/editor/menubar/ItemLanguageVersion.d.ts +1 -0
- package/dist/editor/menubar/ItemLanguageVersion.js +54 -0
- package/dist/editor/menubar/ItemLanguageVersion.js.map +1 -0
- package/dist/editor/menubar/ItemToolbar.d.ts +1 -0
- package/dist/editor/menubar/ItemToolbar.js +11 -0
- package/dist/editor/menubar/ItemToolbar.js.map +1 -0
- package/dist/editor/menubar/NavButtons.d.ts +1 -0
- package/dist/editor/menubar/NavButtons.js +40 -0
- package/dist/editor/menubar/NavButtons.js.map +1 -0
- package/dist/editor/menubar/PageSelector.d.ts +4 -0
- package/dist/editor/menubar/PageSelector.js +149 -0
- package/dist/editor/menubar/PageSelector.js.map +1 -0
- package/dist/editor/menubar/Separator.d.ts +3 -0
- package/dist/editor/menubar/Separator.js +6 -0
- package/dist/editor/menubar/Separator.js.map +1 -0
- package/dist/editor/menubar/SiteInfo.d.ts +1 -0
- package/dist/editor/menubar/SiteInfo.js +24 -0
- package/dist/editor/menubar/SiteInfo.js.map +1 -0
- package/dist/editor/menubar/ToolbarFactory.d.ts +2 -0
- package/dist/editor/menubar/ToolbarFactory.js +55 -0
- package/dist/editor/menubar/ToolbarFactory.js.map +1 -0
- package/dist/editor/menubar/User.d.ts +4 -0
- package/dist/editor/menubar/User.js +18 -0
- package/dist/editor/menubar/User.js.map +1 -0
- package/dist/editor/menubar/VersionSelector.d.ts +10 -0
- package/dist/editor/menubar/VersionSelector.js +53 -0
- package/dist/editor/menubar/VersionSelector.js.map +1 -0
- package/dist/editor/menubar/WorkflowButton.d.ts +1 -0
- package/dist/editor/menubar/WorkflowButton.js +93 -0
- package/dist/editor/menubar/WorkflowButton.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/CompareControls.d.ts +1 -0
- package/dist/editor/menubar/toolbar-sections/CompareControls.js +11 -0
- package/dist/editor/menubar/toolbar-sections/CompareControls.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/EditControls.d.ts +7 -0
- package/dist/editor/menubar/toolbar-sections/EditControls.js +15 -0
- package/dist/editor/menubar/toolbar-sections/EditControls.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/InsertControls.d.ts +1 -0
- package/dist/editor/menubar/toolbar-sections/InsertControls.js +15 -0
- package/dist/editor/menubar/toolbar-sections/InsertControls.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/ReviewCommands.d.ts +1 -0
- package/dist/editor/menubar/toolbar-sections/ReviewCommands.js +41 -0
- package/dist/editor/menubar/toolbar-sections/ReviewCommands.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/UtilityControls.d.ts +1 -0
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js +17 -0
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/ViewportControls.d.ts +1 -0
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js +21 -0
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/index.d.ts +6 -0
- package/dist/editor/menubar/toolbar-sections/index.js +7 -0
- package/dist/editor/menubar/toolbar-sections/index.js.map +1 -0
- package/dist/editor/page-editor-chrome/CommentHighlighting.d.ts +6 -0
- package/dist/editor/page-editor-chrome/CommentHighlighting.js +270 -0
- package/dist/editor/page-editor-chrome/CommentHighlighting.js.map +1 -0
- package/dist/editor/page-editor-chrome/CommentHighlightings.d.ts +4 -0
- package/dist/editor/page-editor-chrome/CommentHighlightings.js +15 -0
- package/dist/editor/page-editor-chrome/CommentHighlightings.js.map +1 -0
- package/dist/editor/page-editor-chrome/FieldActionIndicator.d.ts +4 -0
- package/dist/editor/page-editor-chrome/FieldActionIndicator.js +35 -0
- package/dist/editor/page-editor-chrome/FieldActionIndicator.js.map +1 -0
- package/dist/editor/page-editor-chrome/FieldActionIndicators.d.ts +1 -0
- package/dist/editor/page-editor-chrome/FieldActionIndicators.js +13 -0
- package/dist/editor/page-editor-chrome/FieldActionIndicators.js.map +1 -0
- package/dist/editor/page-editor-chrome/FieldEditedIndicator.d.ts +8 -0
- package/dist/editor/page-editor-chrome/FieldEditedIndicator.js +26 -0
- package/dist/editor/page-editor-chrome/FieldEditedIndicator.js.map +1 -0
- package/dist/editor/page-editor-chrome/FieldEditedIndicators.d.ts +6 -0
- package/dist/editor/page-editor-chrome/FieldEditedIndicators.js +14 -0
- package/dist/editor/page-editor-chrome/FieldEditedIndicators.js.map +1 -0
- package/dist/editor/page-editor-chrome/FrameMenu.d.ts +7 -0
- package/dist/editor/page-editor-chrome/FrameMenu.js +346 -0
- package/dist/editor/page-editor-chrome/FrameMenu.js.map +1 -0
- package/dist/editor/page-editor-chrome/FrameMenus.d.ts +5 -0
- package/dist/editor/page-editor-chrome/FrameMenus.js +22 -0
- package/dist/editor/page-editor-chrome/FrameMenus.js.map +1 -0
- package/dist/editor/page-editor-chrome/InlineEditor.d.ts +5 -0
- package/dist/editor/page-editor-chrome/InlineEditor.js +704 -0
- package/dist/editor/page-editor-chrome/InlineEditor.js.map +1 -0
- package/dist/editor/page-editor-chrome/LockedFieldIndicator.d.ts +1 -0
- package/dist/editor/page-editor-chrome/LockedFieldIndicator.js +33 -0
- package/dist/editor/page-editor-chrome/LockedFieldIndicator.js.map +1 -0
- package/dist/editor/page-editor-chrome/NoLayout.d.ts +1 -0
- package/dist/editor/page-editor-chrome/NoLayout.js +19 -0
- package/dist/editor/page-editor-chrome/NoLayout.js.map +1 -0
- package/dist/editor/page-editor-chrome/PageEditorChrome.d.ts +6 -0
- package/dist/editor/page-editor-chrome/PageEditorChrome.js +64 -0
- package/dist/editor/page-editor-chrome/PageEditorChrome.js.map +1 -0
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.d.ts +1 -0
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.js +152 -0
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.js.map +1 -0
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.d.ts +18 -0
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js +122 -0
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js.map +1 -0
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.d.ts +5 -0
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.js +289 -0
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.js.map +1 -0
- package/dist/editor/page-editor-chrome/SuggestionHighlighting.d.ts +6 -0
- package/dist/editor/page-editor-chrome/SuggestionHighlighting.js +224 -0
- package/dist/editor/page-editor-chrome/SuggestionHighlighting.js.map +1 -0
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.d.ts +4 -0
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.js +16 -0
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.js.map +1 -0
- package/dist/editor/page-editor-chrome/useInlineAICompletion.d.ts +7 -0
- package/dist/editor/page-editor-chrome/useInlineAICompletion.js +699 -0
- package/dist/editor/page-editor-chrome/useInlineAICompletion.js.map +1 -0
- package/dist/editor/page-viewer/DeviceToolbar.d.ts +6 -0
- package/dist/editor/page-viewer/DeviceToolbar.js +21 -0
- package/dist/editor/page-viewer/DeviceToolbar.js.map +1 -0
- package/dist/editor/page-viewer/EditorForm.d.ts +8 -0
- package/dist/editor/page-viewer/EditorForm.js +257 -0
- package/dist/editor/page-viewer/EditorForm.js.map +1 -0
- package/dist/editor/page-viewer/EditorFormPopup.d.ts +11 -0
- package/dist/editor/page-viewer/EditorFormPopup.js +41 -0
- package/dist/editor/page-viewer/EditorFormPopup.js.map +1 -0
- package/dist/editor/page-viewer/MiniMap.d.ts +9 -0
- package/dist/editor/page-viewer/MiniMap.js +233 -0
- package/dist/editor/page-viewer/MiniMap.js.map +1 -0
- package/dist/editor/page-viewer/PageViewer.d.ts +10 -0
- package/dist/editor/page-viewer/PageViewer.js +67 -0
- package/dist/editor/page-viewer/PageViewer.js.map +1 -0
- package/dist/editor/page-viewer/PageViewerFrame.d.ts +11 -0
- package/dist/editor/page-viewer/PageViewerFrame.js +857 -0
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -0
- package/dist/editor/page-viewer/pageModelSkeletonBuilder.d.ts +3 -0
- package/dist/editor/page-viewer/pageModelSkeletonBuilder.js +339 -0
- package/dist/editor/page-viewer/pageModelSkeletonBuilder.js.map +1 -0
- package/dist/editor/page-viewer/pageViewContext.d.ts +40 -0
- package/dist/editor/page-viewer/pageViewContext.js +156 -0
- package/dist/editor/page-viewer/pageViewContext.js.map +1 -0
- package/dist/editor/pageModel.d.ts +222 -0
- package/dist/editor/pageModel.js +2 -0
- package/dist/editor/pageModel.js.map +1 -0
- package/dist/editor/picture-shared.d.ts +16 -0
- package/dist/editor/picture-shared.js +25 -0
- package/dist/editor/picture-shared.js.map +1 -0
- package/dist/editor/reviews/Comment.d.ts +8 -0
- package/dist/editor/reviews/Comment.js +162 -0
- package/dist/editor/reviews/Comment.js.map +1 -0
- package/dist/editor/reviews/CommentDisplayPopover.d.ts +9 -0
- package/dist/editor/reviews/CommentDisplayPopover.js +104 -0
- package/dist/editor/reviews/CommentDisplayPopover.js.map +1 -0
- package/dist/editor/reviews/CommentEditor.d.ts +20 -0
- package/dist/editor/reviews/CommentEditor.js +57 -0
- package/dist/editor/reviews/CommentEditor.js.map +1 -0
- package/dist/editor/reviews/CommentPopover.d.ts +22 -0
- package/dist/editor/reviews/CommentPopover.js +145 -0
- package/dist/editor/reviews/CommentPopover.js.map +1 -0
- package/dist/editor/reviews/CommentView.d.ts +21 -0
- package/dist/editor/reviews/CommentView.js +52 -0
- package/dist/editor/reviews/CommentView.js.map +1 -0
- package/dist/editor/reviews/Comments.d.ts +3 -0
- package/dist/editor/reviews/Comments.js +118 -0
- package/dist/editor/reviews/Comments.js.map +1 -0
- package/dist/editor/reviews/DiffView.d.ts +17 -0
- package/dist/editor/reviews/DiffView.js +57 -0
- package/dist/editor/reviews/DiffView.js.map +1 -0
- package/dist/editor/reviews/PreviewInfo.d.ts +1 -0
- package/dist/editor/reviews/PreviewInfo.js +12 -0
- package/dist/editor/reviews/PreviewInfo.js.map +1 -0
- package/dist/editor/reviews/Reviews.d.ts +1 -0
- package/dist/editor/reviews/Reviews.js +186 -0
- package/dist/editor/reviews/Reviews.js.map +1 -0
- package/dist/editor/reviews/SuggestedEdit.d.ts +4 -0
- package/dist/editor/reviews/SuggestedEdit.js +200 -0
- package/dist/editor/reviews/SuggestedEdit.js.map +1 -0
- package/dist/editor/reviews/SuggestionDisplayPopover.d.ts +9 -0
- package/dist/editor/reviews/SuggestionDisplayPopover.js +204 -0
- package/dist/editor/reviews/SuggestionDisplayPopover.js.map +1 -0
- package/dist/editor/reviews/commentAi.d.ts +7 -0
- package/dist/editor/reviews/commentAi.js +100 -0
- package/dist/editor/reviews/commentAi.js.map +1 -0
- package/dist/editor/reviews/reviewCommands.d.ts +3 -0
- package/dist/editor/reviews/reviewCommands.js +38 -0
- package/dist/editor/reviews/reviewCommands.js.map +1 -0
- package/dist/editor/reviews/useReviews.d.ts +12 -0
- package/dist/editor/reviews/useReviews.js +43 -0
- package/dist/editor/reviews/useReviews.js.map +1 -0
- package/dist/editor/services/agentService.d.ts +306 -0
- package/dist/editor/services/agentService.js +627 -0
- package/dist/editor/services/agentService.js.map +1 -0
- package/dist/editor/services/aiService.d.ts +106 -0
- package/dist/editor/services/aiService.js +294 -0
- package/dist/editor/services/aiService.js.map +1 -0
- package/dist/editor/services/componentDesignerService.d.ts +46 -0
- package/dist/editor/services/componentDesignerService.js +72 -0
- package/dist/editor/services/componentDesignerService.js.map +1 -0
- package/dist/editor/services/contentService.d.ts +79 -0
- package/dist/editor/services/contentService.js +119 -0
- package/dist/editor/services/contentService.js.map +1 -0
- package/dist/editor/services/contextService.d.ts +26 -0
- package/dist/editor/services/contextService.js +103 -0
- package/dist/editor/services/contextService.js.map +1 -0
- package/dist/editor/services/editService.d.ts +66 -0
- package/dist/editor/services/editService.js +325 -0
- package/dist/editor/services/editService.js.map +1 -0
- package/dist/editor/services/favouritesService.d.ts +33 -0
- package/dist/editor/services/favouritesService.js +22 -0
- package/dist/editor/services/favouritesService.js.map +1 -0
- package/dist/editor/services/indexService.d.ts +13 -0
- package/dist/editor/services/indexService.js +45 -0
- package/dist/editor/services/indexService.js.map +1 -0
- package/dist/editor/services/reviewsService.d.ts +18 -0
- package/dist/editor/services/reviewsService.js +60 -0
- package/dist/editor/services/reviewsService.js.map +1 -0
- package/dist/editor/services/searchService.d.ts +17 -0
- package/dist/editor/services/searchService.js +25 -0
- package/dist/editor/services/searchService.js.map +1 -0
- package/dist/editor/services/serviceHelper.d.ts +10 -0
- package/dist/editor/services/serviceHelper.js +118 -0
- package/dist/editor/services/serviceHelper.js.map +1 -0
- package/dist/editor/services/setupService.d.ts +21 -0
- package/dist/editor/services/setupService.js +10 -0
- package/dist/editor/services/setupService.js.map +1 -0
- package/dist/editor/services/suggestedEditsService.d.ts +18 -0
- package/dist/editor/services/suggestedEditsService.js +36 -0
- package/dist/editor/services/suggestedEditsService.js.map +1 -0
- package/dist/editor/services/systemService.d.ts +4 -0
- package/dist/editor/services/systemService.js +11 -0
- package/dist/editor/services/systemService.js.map +1 -0
- package/dist/editor/services-server/api.d.ts +19 -0
- package/dist/editor/services-server/api.js +111 -0
- package/dist/editor/services-server/api.js.map +1 -0
- 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/sidebar/Completions.d.ts +1 -0
- package/dist/editor/sidebar/Completions.js +55 -0
- package/dist/editor/sidebar/Completions.js.map +1 -0
- package/dist/editor/sidebar/ComponentPalette.d.ts +1 -0
- package/dist/editor/sidebar/ComponentPalette.js +86 -0
- package/dist/editor/sidebar/ComponentPalette.js.map +1 -0
- package/dist/editor/sidebar/ComponentTree.d.ts +1 -0
- package/dist/editor/sidebar/ComponentTree.js +691 -0
- package/dist/editor/sidebar/ComponentTree.js.map +1 -0
- package/dist/editor/sidebar/Debug.d.ts +1 -0
- package/dist/editor/sidebar/Debug.js +71 -0
- package/dist/editor/sidebar/Debug.js.map +1 -0
- package/dist/editor/sidebar/DictionaryEditor.d.ts +1 -0
- package/dist/editor/sidebar/DictionaryEditor.js +158 -0
- package/dist/editor/sidebar/DictionaryEditor.js.map +1 -0
- package/dist/editor/sidebar/Divider.d.ts +6 -0
- package/dist/editor/sidebar/Divider.js +6 -0
- package/dist/editor/sidebar/Divider.js.map +1 -0
- package/dist/editor/sidebar/EditHistory.d.ts +1 -0
- package/dist/editor/sidebar/EditHistory.js +78 -0
- package/dist/editor/sidebar/EditHistory.js.map +1 -0
- 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/Insert.d.ts +1 -0
- package/dist/editor/sidebar/Insert.js +22 -0
- package/dist/editor/sidebar/Insert.js.map +1 -0
- package/dist/editor/sidebar/LeftToolbar.d.ts +1 -0
- package/dist/editor/sidebar/LeftToolbar.js +16 -0
- package/dist/editor/sidebar/LeftToolbar.js.map +1 -0
- package/dist/editor/sidebar/MainContentTree.d.ts +5 -0
- package/dist/editor/sidebar/MainContentTree.js +70 -0
- package/dist/editor/sidebar/MainContentTree.js.map +1 -0
- package/dist/editor/sidebar/Performance.d.ts +1 -0
- package/dist/editor/sidebar/Performance.js +32 -0
- package/dist/editor/sidebar/Performance.js.map +1 -0
- package/dist/editor/sidebar/SEOInfo.d.ts +1 -0
- package/dist/editor/sidebar/SEOInfo.js +158 -0
- package/dist/editor/sidebar/SEOInfo.js.map +1 -0
- package/dist/editor/sidebar/Sessions.d.ts +1 -0
- package/dist/editor/sidebar/Sessions.js +29 -0
- package/dist/editor/sidebar/Sessions.js.map +1 -0
- package/dist/editor/sidebar/Sidebar.d.ts +1 -0
- package/dist/editor/sidebar/Sidebar.js +13 -0
- package/dist/editor/sidebar/Sidebar.js.map +1 -0
- package/dist/editor/sidebar/SidebarView.d.ts +10 -0
- package/dist/editor/sidebar/SidebarView.js +40 -0
- package/dist/editor/sidebar/SidebarView.js.map +1 -0
- package/dist/editor/sidebar/Validation.d.ts +1 -0
- package/dist/editor/sidebar/Validation.js +51 -0
- package/dist/editor/sidebar/Validation.js.map +1 -0
- package/dist/editor/sidebar/ViewSelector.d.ts +4 -0
- package/dist/editor/sidebar/ViewSelector.js +191 -0
- package/dist/editor/sidebar/ViewSelector.js.map +1 -0
- package/dist/editor/sidebar/Workbox.d.ts +1 -0
- package/dist/editor/sidebar/Workbox.js +79 -0
- package/dist/editor/sidebar/Workbox.js.map +1 -0
- package/dist/editor/ui/CenteredMessage.d.ts +3 -0
- package/dist/editor/ui/CenteredMessage.js +5 -0
- package/dist/editor/ui/CenteredMessage.js.map +1 -0
- package/dist/editor/ui/CopyMoveTargetSelectorDialog.d.ts +10 -0
- package/dist/editor/ui/CopyMoveTargetSelectorDialog.js +38 -0
- package/dist/editor/ui/CopyMoveTargetSelectorDialog.js.map +1 -0
- package/dist/editor/ui/DialogButtons.d.ts +3 -0
- package/dist/editor/ui/DialogButtons.js +5 -0
- package/dist/editor/ui/DialogButtons.js.map +1 -0
- package/dist/editor/ui/DragPreview.d.ts +14 -0
- package/dist/editor/ui/DragPreview.js +33 -0
- package/dist/editor/ui/DragPreview.js.map +1 -0
- package/dist/editor/ui/Icons.d.ts +74 -0
- package/dist/editor/ui/Icons.js +106 -0
- package/dist/editor/ui/Icons.js.map +1 -0
- package/dist/editor/ui/ItemList.d.ts +16 -0
- package/dist/editor/ui/ItemList.js +19 -0
- package/dist/editor/ui/ItemList.js.map +1 -0
- package/dist/editor/ui/ItemNameDialogNew.d.ts +10 -0
- package/dist/editor/ui/ItemNameDialogNew.js +68 -0
- package/dist/editor/ui/ItemNameDialogNew.js.map +1 -0
- package/dist/editor/ui/ItemSearch.d.ts +25 -0
- package/dist/editor/ui/ItemSearch.js +92 -0
- package/dist/editor/ui/ItemSearch.js.map +1 -0
- package/dist/editor/ui/PerfectTree.d.ts +78 -0
- package/dist/editor/ui/PerfectTree.js +858 -0
- package/dist/editor/ui/PerfectTree.js.map +1 -0
- package/dist/editor/ui/Section.d.ts +4 -0
- package/dist/editor/ui/Section.js +12 -0
- package/dist/editor/ui/Section.js.map +1 -0
- package/dist/editor/ui/SimpleIconButton.d.ts +14 -0
- package/dist/editor/ui/SimpleIconButton.js +15 -0
- package/dist/editor/ui/SimpleIconButton.js.map +1 -0
- package/dist/editor/ui/SimpleMenu.d.ts +6 -0
- package/dist/editor/ui/SimpleMenu.js +7 -0
- package/dist/editor/ui/SimpleMenu.js.map +1 -0
- package/dist/editor/ui/SimpleTable.d.ts +14 -0
- package/dist/editor/ui/SimpleTable.js +9 -0
- package/dist/editor/ui/SimpleTable.js.map +1 -0
- package/dist/editor/ui/SimpleTabs.d.ts +15 -0
- package/dist/editor/ui/SimpleTabs.js +20 -0
- package/dist/editor/ui/SimpleTabs.js.map +1 -0
- package/dist/editor/ui/SimpleToolbar.d.ts +3 -0
- package/dist/editor/ui/SimpleToolbar.js +5 -0
- package/dist/editor/ui/SimpleToolbar.js.map +1 -0
- package/dist/editor/ui/Spinner.d.ts +4 -0
- package/dist/editor/ui/Spinner.js +18 -0
- package/dist/editor/ui/Spinner.js.map +1 -0
- package/dist/editor/ui/Splitter.d.ts +22 -0
- package/dist/editor/ui/Splitter.js +443 -0
- package/dist/editor/ui/Splitter.js.map +1 -0
- package/dist/editor/ui/TemplateSelectorDialog.d.ts +8 -0
- package/dist/editor/ui/TemplateSelectorDialog.js +61 -0
- package/dist/editor/ui/TemplateSelectorDialog.js.map +1 -0
- package/dist/editor/ui/Toolbar.d.ts +3 -0
- package/dist/editor/ui/Toolbar.js +5 -0
- package/dist/editor/ui/Toolbar.js.map +1 -0
- package/dist/editor/utils/id-helper.d.ts +1 -0
- package/dist/editor/utils/id-helper.js +5 -0
- package/dist/editor/utils/id-helper.js.map +1 -0
- package/dist/editor/utils/insertOptions.d.ts +3 -0
- package/dist/editor/utils/insertOptions.js +43 -0
- package/dist/editor/utils/insertOptions.js.map +1 -0
- package/dist/editor/utils/itemConverters.d.ts +3 -0
- package/dist/editor/utils/itemConverters.js +53 -0
- package/dist/editor/utils/itemConverters.js.map +1 -0
- package/dist/editor/utils/itemutils.d.ts +3 -0
- package/dist/editor/utils/itemutils.js +24 -0
- package/dist/editor/utils/itemutils.js.map +1 -0
- package/dist/editor/utils/jsonCleaner.d.ts +8 -0
- package/dist/editor/utils/jsonCleaner.js +76 -0
- package/dist/editor/utils/jsonCleaner.js.map +1 -0
- package/dist/editor/utils/keyboardNavigation.d.ts +34 -0
- package/dist/editor/utils/keyboardNavigation.js +237 -0
- package/dist/editor/utils/keyboardNavigation.js.map +1 -0
- package/dist/editor/utils/urlUtils.d.ts +9 -0
- package/dist/editor/utils/urlUtils.js +25 -0
- package/dist/editor/utils/urlUtils.js.map +1 -0
- package/dist/editor/utils/useMemoDebug.d.ts +1 -0
- package/dist/editor/utils/useMemoDebug.js +18 -0
- package/dist/editor/utils/useMemoDebug.js.map +1 -0
- package/dist/editor/utils.d.ts +65 -0
- package/dist/editor/utils.js +468 -0
- package/dist/editor/utils.js.map +1 -0
- package/dist/editor/views/CompareView.d.ts +1 -0
- package/dist/editor/views/CompareView.js +148 -0
- package/dist/editor/views/CompareView.js.map +1 -0
- package/dist/editor/views/EditView.d.ts +1 -0
- package/dist/editor/views/EditView.js +15 -0
- package/dist/editor/views/EditView.js.map +1 -0
- package/dist/editor/views/ItemEditor.d.ts +7 -0
- package/dist/editor/views/ItemEditor.js +29 -0
- package/dist/editor/views/ItemEditor.js.map +1 -0
- package/dist/editor/views/MediaFolderEditView.d.ts +4 -0
- package/dist/editor/views/MediaFolderEditView.js +40 -0
- package/dist/editor/views/MediaFolderEditView.js.map +1 -0
- package/dist/editor/views/ParheliaView.d.ts +5 -0
- package/dist/editor/views/ParheliaView.js +136 -0
- package/dist/editor/views/ParheliaView.js.map +1 -0
- package/dist/editor/views/SingleEditView.d.ts +9 -0
- package/dist/editor/views/SingleEditView.js +33 -0
- package/dist/editor/views/SingleEditView.js.map +1 -0
- package/dist/images/bg-shape-black.webp +0 -0
- package/dist/images/wizard-bg.png +0 -0
- package/dist/images/wizard-tour.png +0 -0
- package/dist/images/wizard.png +0 -0
- package/dist/index.d.ts +62 -0
- package/dist/index.js +53 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/safelist.d.ts +1 -0
- package/dist/lib/safelist.js +5 -0
- package/dist/lib/safelist.js.map +1 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +6 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/revision.d.ts +2 -0
- package/dist/revision.js +3 -0
- package/dist/revision.js.map +1 -0
- package/dist/splash-screen/ModernSplashScreen.d.ts +8 -0
- package/dist/splash-screen/ModernSplashScreen.js +92 -0
- package/dist/splash-screen/ModernSplashScreen.js.map +1 -0
- package/dist/splash-screen/NewPage.d.ts +3 -0
- package/dist/splash-screen/NewPage.js +145 -0
- package/dist/splash-screen/NewPage.js.map +1 -0
- package/dist/splash-screen/OpenPage.d.ts +1 -0
- package/dist/splash-screen/OpenPage.js +56 -0
- package/dist/splash-screen/OpenPage.js.map +1 -0
- package/dist/splash-screen/ParheliaAssistantChat.d.ts +8 -0
- package/dist/splash-screen/ParheliaAssistantChat.js +155 -0
- package/dist/splash-screen/ParheliaAssistantChat.js.map +1 -0
- package/dist/splash-screen/RecentAgents.d.ts +7 -0
- package/dist/splash-screen/RecentAgents.js +76 -0
- package/dist/splash-screen/RecentAgents.js.map +1 -0
- package/dist/splash-screen/RecentPages.d.ts +1 -0
- package/dist/splash-screen/RecentPages.js +47 -0
- package/dist/splash-screen/RecentPages.js.map +1 -0
- package/dist/splash-screen/SectionHeadline.d.ts +4 -0
- package/dist/splash-screen/SectionHeadline.js +7 -0
- package/dist/splash-screen/SectionHeadline.js.map +1 -0
- package/dist/styles.css +5914 -0
- package/dist/tour/Tour.d.ts +3 -0
- package/dist/tour/Tour.js +426 -0
- package/dist/tour/Tour.js.map +1 -0
- package/dist/tour/default-tour.d.ts +9 -0
- package/dist/tour/default-tour.js +302 -0
- package/dist/tour/default-tour.js.map +1 -0
- package/dist/tour/preview-tour.d.ts +2 -0
- package/dist/tour/preview-tour.js +93 -0
- package/dist/tour/preview-tour.js.map +1 -0
- package/dist/types.d.ts +396 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/images/bg-shape-black.webp +0 -0
- package/images/wizard-bg.png +0 -0
- package/images/wizard-tour.png +0 -0
- package/images/wizard.png +0 -0
- package/package.json +93 -0
|
@@ -0,0 +1,684 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect, useMemo } from "react";
|
|
3
|
+
import { formatTime } from "../utils";
|
|
4
|
+
import { useEditContext } from "../client/editContext";
|
|
5
|
+
import { ToolCallDisplay } from "./ToolCallDisplay";
|
|
6
|
+
import { MediaImage } from "./MediaImage";
|
|
7
|
+
import { X } from "lucide-react";
|
|
8
|
+
import { Button } from "../../components/ui/button";
|
|
9
|
+
import { Checkbox } from "../../components/ui/checkbox";
|
|
10
|
+
import { SecretAgentIcon } from "../ui/Icons";
|
|
11
|
+
// Helper to extract partial quick actions from potentially incomplete JSON during streaming
|
|
12
|
+
const extractPartialQuickActions = (jsonText) => {
|
|
13
|
+
const actions = [];
|
|
14
|
+
// First try to parse complete JSON
|
|
15
|
+
try {
|
|
16
|
+
const parsed = JSON.parse(jsonText);
|
|
17
|
+
const rawActions = Array.isArray(parsed)
|
|
18
|
+
? parsed
|
|
19
|
+
: parsed?.actions || parsed?.buttons || parsed?.choices || [];
|
|
20
|
+
if (Array.isArray(rawActions)) {
|
|
21
|
+
rawActions.forEach((a) => {
|
|
22
|
+
if (!a)
|
|
23
|
+
return;
|
|
24
|
+
const label = a.label || a.text || String(a.value || a.prompt || "");
|
|
25
|
+
if (label) {
|
|
26
|
+
actions.push({
|
|
27
|
+
id: a.id,
|
|
28
|
+
label,
|
|
29
|
+
prompt: a.prompt,
|
|
30
|
+
value: a.value,
|
|
31
|
+
style: a.style,
|
|
32
|
+
behavior: a.behavior &&
|
|
33
|
+
(a.behavior === "compose" || a.behavior === "submit")
|
|
34
|
+
? a.behavior
|
|
35
|
+
: a.submit === false ||
|
|
36
|
+
a.compose === true ||
|
|
37
|
+
a.draft === true ||
|
|
38
|
+
a.mode === "compose"
|
|
39
|
+
? "compose"
|
|
40
|
+
: undefined,
|
|
41
|
+
placeholder: a.placeholder,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
return actions;
|
|
47
|
+
}
|
|
48
|
+
catch (e) {
|
|
49
|
+
// JSON is incomplete, try to extract whatever complete action objects we can find
|
|
50
|
+
}
|
|
51
|
+
// Look for individual action objects in the partial JSON
|
|
52
|
+
// Match patterns like: { "label": "...", ... }
|
|
53
|
+
const labelPattern = /"(?:label|text)"\s*:\s*"([^"\\]*(\\.[^"\\]*)*)"/g;
|
|
54
|
+
const labelMatches = [];
|
|
55
|
+
let labelMatch;
|
|
56
|
+
while ((labelMatch = labelPattern.exec(jsonText)) !== null) {
|
|
57
|
+
if (labelMatch[1]) {
|
|
58
|
+
labelMatches.push({
|
|
59
|
+
label: labelMatch[1],
|
|
60
|
+
startIdx: labelMatch.index,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
// For each label field found, try to find and parse the enclosing object
|
|
65
|
+
for (const { label, startIdx } of labelMatches) {
|
|
66
|
+
// Find the opening brace before this label field
|
|
67
|
+
let openBrace = -1;
|
|
68
|
+
for (let i = startIdx - 1; i >= 0; i--) {
|
|
69
|
+
if (jsonText[i] === "{") {
|
|
70
|
+
openBrace = i;
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
if (jsonText[i] === "}")
|
|
74
|
+
break; // Hit another object's end
|
|
75
|
+
}
|
|
76
|
+
if (openBrace === -1)
|
|
77
|
+
continue;
|
|
78
|
+
// Find the closing brace after this label field
|
|
79
|
+
let closeBrace = -1;
|
|
80
|
+
let depth = 0;
|
|
81
|
+
for (let i = openBrace; i < jsonText.length; i++) {
|
|
82
|
+
if (jsonText[i] === "{")
|
|
83
|
+
depth++;
|
|
84
|
+
if (jsonText[i] === "}") {
|
|
85
|
+
depth--;
|
|
86
|
+
if (depth === 0) {
|
|
87
|
+
closeBrace = i;
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
// Extract the object and try to parse it
|
|
93
|
+
const objStr = closeBrace !== -1
|
|
94
|
+
? jsonText.substring(openBrace, closeBrace + 1)
|
|
95
|
+
: jsonText.substring(openBrace) + "}"; // Try to close incomplete object
|
|
96
|
+
try {
|
|
97
|
+
const obj = JSON.parse(objStr);
|
|
98
|
+
const actionLabel = obj.label || obj.text || String(obj.value || obj.prompt || "");
|
|
99
|
+
if (actionLabel) {
|
|
100
|
+
actions.push({
|
|
101
|
+
id: obj.id,
|
|
102
|
+
label: actionLabel,
|
|
103
|
+
prompt: obj.prompt,
|
|
104
|
+
value: obj.value,
|
|
105
|
+
style: obj.style,
|
|
106
|
+
behavior: obj.behavior &&
|
|
107
|
+
(obj.behavior === "compose" || obj.behavior === "submit")
|
|
108
|
+
? obj.behavior
|
|
109
|
+
: obj.submit === false ||
|
|
110
|
+
obj.compose === true ||
|
|
111
|
+
obj.draft === true ||
|
|
112
|
+
obj.mode === "compose"
|
|
113
|
+
? "compose"
|
|
114
|
+
: undefined,
|
|
115
|
+
placeholder: obj.placeholder,
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
catch (e) {
|
|
120
|
+
// Skip malformed objects
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return actions;
|
|
124
|
+
};
|
|
125
|
+
function parseContentSegments(content, hideIncomplete) {
|
|
126
|
+
if (!content)
|
|
127
|
+
return [];
|
|
128
|
+
const segments = [];
|
|
129
|
+
const fencedQuickToken = "```quick_action_buttons";
|
|
130
|
+
const plainQuickToken = "quick_action_buttons";
|
|
131
|
+
const fencedTodoToken = "```todo_list";
|
|
132
|
+
const plainTodoToken = "todo_list";
|
|
133
|
+
const fencedMediaToken = "```media_item";
|
|
134
|
+
// Helper: find next valid plain token occurrence (at line start or after newline)
|
|
135
|
+
const findNextPlainHeader = (token, fromIndex) => {
|
|
136
|
+
let idx = content.indexOf(token, fromIndex);
|
|
137
|
+
while (idx !== -1) {
|
|
138
|
+
const before = idx > 0 ? content[idx - 1] : "\n";
|
|
139
|
+
const after = content[idx + token.length] || "\n";
|
|
140
|
+
const isBoundaryBefore = before === "\n" || before === "\r";
|
|
141
|
+
const isBoundaryAfter = after === "\n" || after === "\r" || after === ":" || /\s/.test(after);
|
|
142
|
+
// Ensure it's not the fenced token which would have ``` right before
|
|
143
|
+
const isFencedPrefix = content.slice(Math.max(0, idx - 3), idx) === "```";
|
|
144
|
+
if (isBoundaryBefore && isBoundaryAfter && !isFencedPrefix)
|
|
145
|
+
return idx;
|
|
146
|
+
idx = content.indexOf(token, idx + 1);
|
|
147
|
+
}
|
|
148
|
+
return -1;
|
|
149
|
+
};
|
|
150
|
+
// Helper: match JSON object braces starting at first '{'
|
|
151
|
+
const findMatchingBraceEnd = (startPos) => {
|
|
152
|
+
let i = startPos;
|
|
153
|
+
let depth = 0;
|
|
154
|
+
let inString = false;
|
|
155
|
+
let stringQuote = null;
|
|
156
|
+
let escaped = false;
|
|
157
|
+
for (; i < content.length; i++) {
|
|
158
|
+
const ch = content[i];
|
|
159
|
+
if (inString) {
|
|
160
|
+
if (escaped) {
|
|
161
|
+
escaped = false;
|
|
162
|
+
}
|
|
163
|
+
else if (ch === "\\") {
|
|
164
|
+
escaped = true;
|
|
165
|
+
}
|
|
166
|
+
else if (ch === stringQuote) {
|
|
167
|
+
inString = false;
|
|
168
|
+
stringQuote = null;
|
|
169
|
+
}
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
if (ch === '"' || ch === "'") {
|
|
174
|
+
inString = true;
|
|
175
|
+
stringQuote = ch;
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
if (ch === "{")
|
|
179
|
+
depth++;
|
|
180
|
+
if (ch === "}") {
|
|
181
|
+
depth--;
|
|
182
|
+
if (depth === 0)
|
|
183
|
+
return i;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return -1;
|
|
188
|
+
};
|
|
189
|
+
let cursor = 0;
|
|
190
|
+
while (cursor < content.length) {
|
|
191
|
+
const nextFencedQuick = content.indexOf(fencedQuickToken, cursor);
|
|
192
|
+
const nextPlainQuick = findNextPlainHeader(plainQuickToken, cursor);
|
|
193
|
+
const nextFencedTodo = content.indexOf(fencedTodoToken, cursor);
|
|
194
|
+
const nextPlainTodo = findNextPlainHeader(plainTodoToken, cursor);
|
|
195
|
+
const nextFencedMedia = content.indexOf(fencedMediaToken, cursor);
|
|
196
|
+
const candidates = [];
|
|
197
|
+
if (nextFencedQuick !== -1)
|
|
198
|
+
candidates.push({
|
|
199
|
+
start: nextFencedQuick,
|
|
200
|
+
kind: "fenced",
|
|
201
|
+
type: "quick",
|
|
202
|
+
});
|
|
203
|
+
if (nextPlainQuick !== -1)
|
|
204
|
+
candidates.push({ start: nextPlainQuick, kind: "plain", type: "quick" });
|
|
205
|
+
if (nextFencedTodo !== -1)
|
|
206
|
+
candidates.push({ start: nextFencedTodo, kind: "fenced", type: "todo" });
|
|
207
|
+
if (nextPlainTodo !== -1)
|
|
208
|
+
candidates.push({ start: nextPlainTodo, kind: "plain", type: "todo" });
|
|
209
|
+
if (nextFencedMedia !== -1)
|
|
210
|
+
candidates.push({ start: nextFencedMedia, kind: "fenced", type: "media" });
|
|
211
|
+
let pick = null;
|
|
212
|
+
if (candidates.length > 0) {
|
|
213
|
+
pick = candidates.reduce((min, cur) => cur.start < min.start ? cur : min);
|
|
214
|
+
}
|
|
215
|
+
if (pick === null) {
|
|
216
|
+
const tail = content.slice(cursor);
|
|
217
|
+
if (tail)
|
|
218
|
+
segments.push({ kind: "text", text: tail });
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
// Push any text before the token
|
|
222
|
+
const textBefore = content.slice(cursor, pick.start);
|
|
223
|
+
if (textBefore)
|
|
224
|
+
segments.push({ kind: "text", text: textBefore });
|
|
225
|
+
if (pick.kind === "fenced") {
|
|
226
|
+
const openTokenLength = pick.type === "quick"
|
|
227
|
+
? fencedQuickToken.length
|
|
228
|
+
: pick.type === "todo"
|
|
229
|
+
? fencedTodoToken.length
|
|
230
|
+
: fencedMediaToken.length;
|
|
231
|
+
const afterOpenLineStart = pick.start + openTokenLength;
|
|
232
|
+
const openLineMatch = content
|
|
233
|
+
.slice(afterOpenLineStart)
|
|
234
|
+
.match(/^[^\n\r]*\r?\n?/);
|
|
235
|
+
const openLineLength = openLineMatch ? openLineMatch[0].length : 0;
|
|
236
|
+
const jsonStart = afterOpenLineStart + openLineLength;
|
|
237
|
+
const close = content.indexOf("```", jsonStart);
|
|
238
|
+
const jsonText = (close === -1
|
|
239
|
+
? content.slice(jsonStart)
|
|
240
|
+
: content.slice(jsonStart, close)).trim();
|
|
241
|
+
if (close === -1) {
|
|
242
|
+
// Incomplete fenced block during streaming
|
|
243
|
+
if (hideIncomplete && pick.type === "quick") {
|
|
244
|
+
// Try to parse partial quick actions and show what we have so far
|
|
245
|
+
const partialActions = extractPartialQuickActions(jsonText);
|
|
246
|
+
if (partialActions.length > 0) {
|
|
247
|
+
segments.push({ kind: "actions", actions: partialActions });
|
|
248
|
+
}
|
|
249
|
+
break;
|
|
250
|
+
}
|
|
251
|
+
else if (hideIncomplete) {
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
segments.push({ kind: "text", text: content.slice(pick.start) });
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
// Handle media_item blocks separately (pipe-delimited format, not JSON)
|
|
260
|
+
if (pick.type === "media") {
|
|
261
|
+
const items = [];
|
|
262
|
+
// Parse pipe-delimited format: {GUID}|Label or just {GUID}
|
|
263
|
+
const lines = jsonText.split(/\r?\n/).map(l => l.trim()).filter(l => l);
|
|
264
|
+
for (const line of lines) {
|
|
265
|
+
// Only parse complete lines (must have closing brace)
|
|
266
|
+
if (line.includes('}')) {
|
|
267
|
+
const pipeIndex = line.indexOf('|');
|
|
268
|
+
if (pipeIndex !== -1) {
|
|
269
|
+
// Has label
|
|
270
|
+
const itemId = line.substring(0, pipeIndex).trim();
|
|
271
|
+
const label = line.substring(pipeIndex + 1).trim();
|
|
272
|
+
if (itemId && /\{[0-9a-fA-F-]+\}/.test(itemId)) {
|
|
273
|
+
items.push({ itemId, label: label || undefined });
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
else {
|
|
277
|
+
// No label
|
|
278
|
+
const itemId = line.trim();
|
|
279
|
+
if (itemId && /\{[0-9a-fA-F-]+\}/.test(itemId)) {
|
|
280
|
+
items.push({ itemId });
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
if (items.length > 0) {
|
|
286
|
+
segments.push({
|
|
287
|
+
kind: "media",
|
|
288
|
+
items: items
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
cursor = close + 3;
|
|
292
|
+
continue;
|
|
293
|
+
}
|
|
294
|
+
try {
|
|
295
|
+
const parsed = JSON.parse(jsonText);
|
|
296
|
+
if (pick.type === "quick") {
|
|
297
|
+
const rawActions = Array.isArray(parsed)
|
|
298
|
+
? parsed
|
|
299
|
+
: parsed?.actions || parsed?.buttons || parsed?.choices || [];
|
|
300
|
+
const actions = [];
|
|
301
|
+
if (Array.isArray(rawActions)) {
|
|
302
|
+
rawActions.forEach((a) => {
|
|
303
|
+
if (!a)
|
|
304
|
+
return;
|
|
305
|
+
const action = {
|
|
306
|
+
id: a.id,
|
|
307
|
+
label: a.label || a.text || String(a.value || a.prompt || ""),
|
|
308
|
+
prompt: a.prompt,
|
|
309
|
+
value: a.value,
|
|
310
|
+
style: a.style,
|
|
311
|
+
behavior: a.behavior &&
|
|
312
|
+
(a.behavior === "compose" || a.behavior === "submit")
|
|
313
|
+
? a.behavior
|
|
314
|
+
: a.submit === false ||
|
|
315
|
+
a.compose === true ||
|
|
316
|
+
a.draft === true ||
|
|
317
|
+
a.mode === "compose"
|
|
318
|
+
? "compose"
|
|
319
|
+
: undefined,
|
|
320
|
+
placeholder: a.placeholder,
|
|
321
|
+
};
|
|
322
|
+
if (action.label)
|
|
323
|
+
actions.push(action);
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
if (actions.length > 0) {
|
|
327
|
+
segments.push({ kind: "actions", actions });
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
else if (pick.type === "todo") {
|
|
331
|
+
// todo_list
|
|
332
|
+
const todoItems = Array.isArray(parsed)
|
|
333
|
+
? parsed
|
|
334
|
+
: parsed?.items || [];
|
|
335
|
+
const title = Array.isArray(parsed) ? undefined : parsed?.title;
|
|
336
|
+
const cleaned = (Array.isArray(todoItems) ? todoItems : [])
|
|
337
|
+
.map((i) => {
|
|
338
|
+
if (!i)
|
|
339
|
+
return null;
|
|
340
|
+
const text = i.text || i.label || String(i.task || i.title || "");
|
|
341
|
+
if (!text)
|
|
342
|
+
return null;
|
|
343
|
+
return {
|
|
344
|
+
id: i.id,
|
|
345
|
+
text,
|
|
346
|
+
done: !!(i.done ?? i.completed ?? i.checked),
|
|
347
|
+
note: i.note || i.description,
|
|
348
|
+
};
|
|
349
|
+
})
|
|
350
|
+
.filter(Boolean);
|
|
351
|
+
if (cleaned.length > 0) {
|
|
352
|
+
segments.push({ kind: "todo", title, items: cleaned });
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
catch {
|
|
357
|
+
if (!hideIncomplete) {
|
|
358
|
+
segments.push({
|
|
359
|
+
kind: "text",
|
|
360
|
+
text: content.slice(pick.start, close + 3),
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
cursor = close + 3;
|
|
365
|
+
continue;
|
|
366
|
+
}
|
|
367
|
+
// Plain header without backticks
|
|
368
|
+
const headerTokenLength = pick.type === "quick" ? plainQuickToken.length : plainTodoToken.length;
|
|
369
|
+
const afterHeaderStart = pick.start + headerTokenLength;
|
|
370
|
+
const headerRestMatch = content
|
|
371
|
+
.slice(afterHeaderStart)
|
|
372
|
+
.match(/^[^\n\r]*\r?\n?/);
|
|
373
|
+
const headerRestLen = headerRestMatch ? headerRestMatch[0].length : 0;
|
|
374
|
+
const afterHeader = afterHeaderStart + headerRestLen;
|
|
375
|
+
// Find first '{' after header (could be same line or following lines)
|
|
376
|
+
const braceStart = content.indexOf("{", afterHeader);
|
|
377
|
+
if (braceStart === -1) {
|
|
378
|
+
if (hideIncomplete) {
|
|
379
|
+
break;
|
|
380
|
+
}
|
|
381
|
+
else {
|
|
382
|
+
// Treat as plain text if no JSON object is present
|
|
383
|
+
cursor = afterHeader;
|
|
384
|
+
continue;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
const braceEnd = findMatchingBraceEnd(braceStart);
|
|
388
|
+
const jsonText = (braceEnd === -1
|
|
389
|
+
? content.slice(braceStart)
|
|
390
|
+
: content.slice(braceStart, braceEnd + 1)).trim();
|
|
391
|
+
if (braceEnd === -1) {
|
|
392
|
+
// Incomplete plain JSON block during streaming
|
|
393
|
+
if (hideIncomplete && pick.type === "quick") {
|
|
394
|
+
// Try to parse partial quick actions and show what we have so far
|
|
395
|
+
const partialActions = extractPartialQuickActions(jsonText);
|
|
396
|
+
if (partialActions.length > 0) {
|
|
397
|
+
segments.push({ kind: "actions", actions: partialActions });
|
|
398
|
+
}
|
|
399
|
+
break;
|
|
400
|
+
}
|
|
401
|
+
else if (hideIncomplete) {
|
|
402
|
+
break;
|
|
403
|
+
}
|
|
404
|
+
else {
|
|
405
|
+
// Incomplete JSON; include the rest as text
|
|
406
|
+
const remaining = content.slice(pick.start);
|
|
407
|
+
if (remaining)
|
|
408
|
+
segments.push({ kind: "text", text: remaining });
|
|
409
|
+
break;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
try {
|
|
413
|
+
const parsed = JSON.parse(jsonText);
|
|
414
|
+
if (pick.type === "quick") {
|
|
415
|
+
const rawActions = Array.isArray(parsed)
|
|
416
|
+
? parsed
|
|
417
|
+
: parsed?.actions || parsed?.buttons || parsed?.choices || [];
|
|
418
|
+
const actions = [];
|
|
419
|
+
if (Array.isArray(rawActions)) {
|
|
420
|
+
rawActions.forEach((a) => {
|
|
421
|
+
if (!a)
|
|
422
|
+
return;
|
|
423
|
+
const action = {
|
|
424
|
+
id: a.id,
|
|
425
|
+
label: a.label || a.text || String(a.value || a.prompt || ""),
|
|
426
|
+
prompt: a.prompt,
|
|
427
|
+
value: a.value,
|
|
428
|
+
style: a.style,
|
|
429
|
+
behavior: a.behavior &&
|
|
430
|
+
(a.behavior === "compose" || a.behavior === "submit")
|
|
431
|
+
? a.behavior
|
|
432
|
+
: a.submit === false ||
|
|
433
|
+
a.compose === true ||
|
|
434
|
+
a.draft === true ||
|
|
435
|
+
a.mode === "compose"
|
|
436
|
+
? "compose"
|
|
437
|
+
: undefined,
|
|
438
|
+
placeholder: a.placeholder,
|
|
439
|
+
};
|
|
440
|
+
if (action.label)
|
|
441
|
+
actions.push(action);
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
if (actions.length > 0) {
|
|
445
|
+
segments.push({ kind: "actions", actions });
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
else {
|
|
449
|
+
const todoItems = Array.isArray(parsed) ? parsed : parsed?.items || [];
|
|
450
|
+
const title = Array.isArray(parsed) ? undefined : parsed?.title;
|
|
451
|
+
const cleaned = (Array.isArray(todoItems) ? todoItems : [])
|
|
452
|
+
.map((i) => {
|
|
453
|
+
if (!i)
|
|
454
|
+
return null;
|
|
455
|
+
const text = i.text || i.label || String(i.task || i.title || "");
|
|
456
|
+
if (!text)
|
|
457
|
+
return null;
|
|
458
|
+
return {
|
|
459
|
+
id: i.id,
|
|
460
|
+
text,
|
|
461
|
+
done: !!(i.done ?? i.completed ?? i.checked),
|
|
462
|
+
note: i.note || i.description,
|
|
463
|
+
};
|
|
464
|
+
})
|
|
465
|
+
.filter(Boolean);
|
|
466
|
+
if (cleaned.length > 0) {
|
|
467
|
+
segments.push({ kind: "todo", title, items: cleaned });
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
catch {
|
|
472
|
+
// On parse failure, keep original as text (excluding already-pushed prefix)
|
|
473
|
+
const fallbackText = content.slice(pick.start, braceEnd + 1);
|
|
474
|
+
if (!hideIncomplete && fallbackText) {
|
|
475
|
+
segments.push({ kind: "text", text: fallbackText });
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
cursor = braceEnd + 1;
|
|
479
|
+
}
|
|
480
|
+
return segments;
|
|
481
|
+
}
|
|
482
|
+
// Helper to extract command links from markdown
|
|
483
|
+
function extractCommandLinks(text) {
|
|
484
|
+
const links = [];
|
|
485
|
+
const commandLinkPattern = /\[([^\]]+)\]\(command:([^)]+)\)/g;
|
|
486
|
+
let match;
|
|
487
|
+
while ((match = commandLinkPattern.exec(text)) !== null) {
|
|
488
|
+
if (match[1] && match[2]) {
|
|
489
|
+
links.push({
|
|
490
|
+
label: match[1],
|
|
491
|
+
command: match[2],
|
|
492
|
+
index: match.index,
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
return { text, links };
|
|
497
|
+
}
|
|
498
|
+
function simpleFormatToHtml(text) {
|
|
499
|
+
return text
|
|
500
|
+
.replace(/^######\s+(.+)$/gm, '<h6 style="font-size: 0.75rem; font-weight: 500; margin: 0.75rem 0 0.25rem 0; color: #6b7280; letter-spacing: 0.01em; line-height: 1.3;">$1</h6>')
|
|
501
|
+
.replace(/^#####\s+(.+)$/gm, '<h5 style="font-size: 0.875rem; font-weight: 500; margin: 0.875rem 0 0.375rem 0; color: #4b5563; letter-spacing: 0.01em; line-height: 1.35;">$1</h5>')
|
|
502
|
+
.replace(/^####\s+(.+)$/gm, '<h4 style="font-size: 1rem; font-weight: 600; margin: 1rem 0 0.5rem 0; color: #374151; letter-spacing: -0.01em; line-height: 1.4;">$1</h4>')
|
|
503
|
+
.replace(/^###\s+(.+)$/gm, '<h3 style="font-size: 1.125rem; font-weight: 600; margin: 1.125rem 0 0.5rem 0; color: #1f2937; letter-spacing: -0.015em; line-height: 1.4;">$1</h3>')
|
|
504
|
+
.replace(/^##\s+(.+)$/gm, '<h2 style="font-size: 1.375rem; font-weight: 600; margin: 1.25rem 0 0.625rem 0; color: #111827; letter-spacing: -0.02em; line-height: 1.3;">$1</h2>')
|
|
505
|
+
.replace(/^#\s+(.+)$/gm, '<h1 style="font-size: 1.75rem; font-weight: 700; margin: 1.5rem 0 0.75rem 0; color: #0f172a; letter-spacing: -0.025em; line-height: 1.2;">$1</h1>')
|
|
506
|
+
.replace(/\*\*(.*?)\*\*/g, "<strong>$1</strong>")
|
|
507
|
+
.replace(/\n/g, "<br/>")
|
|
508
|
+
.replace(/<\/(h[1-6])><br\/>/g, "</$1>");
|
|
509
|
+
}
|
|
510
|
+
export function AiResponseMessage({ messages, finished, editOperations, error, onQuickAction, profileSvgIcon, agentId, agentName, }) {
|
|
511
|
+
const editContext = useEditContext();
|
|
512
|
+
// const [showFunctions, setShowFunctions] = useState(false);
|
|
513
|
+
const [changesRejected, setChangesRejected] = useState(undefined);
|
|
514
|
+
// Store tool calls to preserve them during streaming
|
|
515
|
+
const [preservedToolCalls, setPreservedToolCalls] = useState({});
|
|
516
|
+
// Track popover open state for each tool call
|
|
517
|
+
const [openPopovers, setOpenPopovers] = useState({});
|
|
518
|
+
// Helper to avoid unnecessary updates when tool calls are unchanged
|
|
519
|
+
const areToolCallsEqual = (a, b) => {
|
|
520
|
+
if (a === b)
|
|
521
|
+
return true;
|
|
522
|
+
if (!a || !b)
|
|
523
|
+
return false;
|
|
524
|
+
if (a.length !== b.length)
|
|
525
|
+
return false;
|
|
526
|
+
for (let i = 0; i < a.length; i++) {
|
|
527
|
+
const ai = a[i];
|
|
528
|
+
const bi = b[i];
|
|
529
|
+
if (ai?.id !== bi?.id ||
|
|
530
|
+
ai?.displayName !== bi?.displayName ||
|
|
531
|
+
ai?.function?.name !== bi?.function?.name ||
|
|
532
|
+
ai?.function?.arguments !== bi?.function?.arguments) {
|
|
533
|
+
return false;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
return true;
|
|
537
|
+
};
|
|
538
|
+
// Update preserved tool calls when messages change, but only if values actually change
|
|
539
|
+
useEffect(() => {
|
|
540
|
+
setPreservedToolCalls((prev) => {
|
|
541
|
+
let changed = false;
|
|
542
|
+
const next = { ...prev };
|
|
543
|
+
for (const message of messages) {
|
|
544
|
+
const hasToolCalls = !!(message.tool_calls && message.tool_calls.length > 0);
|
|
545
|
+
if (!hasToolCalls)
|
|
546
|
+
continue;
|
|
547
|
+
if (!areToolCallsEqual(next[message.id], message.tool_calls)) {
|
|
548
|
+
next[message.id] = message.tool_calls;
|
|
549
|
+
changed = true;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
return changed ? next : prev;
|
|
553
|
+
});
|
|
554
|
+
}, [messages]);
|
|
555
|
+
const reversedEditOperations = [...editOperations].reverse();
|
|
556
|
+
const editHistory = editContext?.editHistory ?? [];
|
|
557
|
+
const canReject = editHistory.length >= editOperations.length &&
|
|
558
|
+
reversedEditOperations.find((x, index) => editHistory[index]?.id !== x.id || !editHistory[index]?.canUndo) === undefined;
|
|
559
|
+
// Calculate if we're currently streaming (for loading indicator)
|
|
560
|
+
const isStreaming = !finished && messages.length > 0;
|
|
561
|
+
// Get the last message for timestamp
|
|
562
|
+
const lastMessage = messages[messages.length - 1];
|
|
563
|
+
// Memoize filtered messages and their parsed content segments to avoid hooks inside loops
|
|
564
|
+
const nonToolAssistantMessages = useMemo(() => messages.filter((x) => x.role !== "tool" && x.role !== "user"), [messages]);
|
|
565
|
+
const flatItems = useMemo(() => {
|
|
566
|
+
const items = [];
|
|
567
|
+
nonToolAssistantMessages.forEach((message) => {
|
|
568
|
+
const contentString = (message.content ||
|
|
569
|
+
message.formattedContent ||
|
|
570
|
+
"");
|
|
571
|
+
const segments = parseContentSegments(contentString, isStreaming);
|
|
572
|
+
// Add content segments
|
|
573
|
+
segments.forEach((segment) => {
|
|
574
|
+
items.push({
|
|
575
|
+
type: "segment",
|
|
576
|
+
segment,
|
|
577
|
+
messageId: message.id,
|
|
578
|
+
message,
|
|
579
|
+
});
|
|
580
|
+
});
|
|
581
|
+
// Add tool calls if present
|
|
582
|
+
const toolCalls = message.tool_calls && message.tool_calls.length > 0
|
|
583
|
+
? message.tool_calls
|
|
584
|
+
: preservedToolCalls[message.id] || [];
|
|
585
|
+
if (toolCalls.length > 0) {
|
|
586
|
+
items.push({
|
|
587
|
+
type: "toolcalls",
|
|
588
|
+
toolCalls,
|
|
589
|
+
messageId: message.id,
|
|
590
|
+
message,
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
});
|
|
594
|
+
return items;
|
|
595
|
+
}, [nonToolAssistantMessages, isStreaming, preservedToolCalls]);
|
|
596
|
+
return (_jsxs("div", { className: "flex gap-3 px-4 py-3", "data-testid": "agent-message", children: [_jsx("div", { className: "flex-shrink-0", children: profileSvgIcon ? (_jsx("div", { className: "text-gray-2 flex h-7 w-7 items-center justify-center [&>svg]:h-full [&>svg]:w-full", dangerouslySetInnerHTML: {
|
|
597
|
+
__html: profileSvgIcon,
|
|
598
|
+
} })) : (_jsx(SecretAgentIcon, { size: 24, strokeWidth: 1, className: "text-gray-2" })) }), _jsxs("div", { className: "min-w-0 flex-1 select-text", children: [_jsxs("div", { className: "mb-0.5 flex items-center gap-2", children: [_jsx("span", { className: "text-dark text-xs font-medium", children: agentName || "Agent" }), lastMessage && lastMessage.createdDate && (_jsx("span", { className: "text-xs text-gray-400", "data-testid": "agent-message-timestamp", "data-timestamp": lastMessage.createdDate, children: formatTime(new Date(lastMessage.createdDate)) }))] }), error && (_jsx("div", { className: "mb-2 rounded-lg border-l-4 border-red-500 bg-red-50 p-2.5", "data-testid": "agent-error", children: _jsxs("div", { className: "flex items-start", children: [_jsx("div", { className: "flex-shrink-0", children: _jsx(X, { className: "h-5 w-5 text-red-400", strokeWidth: 1 }) }), _jsxs("div", { className: "ml-3", children: [_jsx("p", { className: "text-sm font-medium text-red-800", children: "Agent Error" }), _jsx("p", { className: "mt-1 text-sm text-red-700", children: error })] })] }) })), flatItems.map((item, itemIndex) => {
|
|
599
|
+
const prevItem = itemIndex > 0 ? flatItems[itemIndex - 1] : null;
|
|
600
|
+
const shouldAddSpacing = prevItem?.type === "toolcalls" && item.type === "segment";
|
|
601
|
+
if (item.type === "segment") {
|
|
602
|
+
const segment = item.segment;
|
|
603
|
+
const message = item.message;
|
|
604
|
+
if (segment.kind === "text") {
|
|
605
|
+
const trimmedText = segment.text.trim();
|
|
606
|
+
if (!trimmedText)
|
|
607
|
+
return null;
|
|
608
|
+
// Check for command links in the text
|
|
609
|
+
const { text, links } = extractCommandLinks(trimmedText);
|
|
610
|
+
if (links.length > 0) {
|
|
611
|
+
// Split text around command links and render buttons
|
|
612
|
+
const parts = [];
|
|
613
|
+
let lastIndex = 0;
|
|
614
|
+
links.forEach((link, linkIdx) => {
|
|
615
|
+
// Add text before the link
|
|
616
|
+
if (link.index > lastIndex) {
|
|
617
|
+
const textBefore = text.substring(lastIndex, link.index);
|
|
618
|
+
const html = simpleFormatToHtml(textBefore);
|
|
619
|
+
if (html) {
|
|
620
|
+
parts.push(_jsx("span", { dangerouslySetInnerHTML: { __html: html } }, `text-${itemIndex}-${linkIdx}`));
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
// Add the button
|
|
624
|
+
parts.push(_jsx(Button, { size: "sm", variant: "outline", className: "mx-1 inline-flex", onClick: () => onQuickAction?.({
|
|
625
|
+
label: link.label,
|
|
626
|
+
value: link.command,
|
|
627
|
+
prompt: link.command,
|
|
628
|
+
}, message), children: link.label }, `btn-${itemIndex}-${linkIdx}`));
|
|
629
|
+
// Find the end of this match in the original text
|
|
630
|
+
const matchEnd = link.index +
|
|
631
|
+
`[${link.label}](command:${link.command})`.length;
|
|
632
|
+
lastIndex = matchEnd;
|
|
633
|
+
});
|
|
634
|
+
// Add any remaining text after the last link
|
|
635
|
+
if (lastIndex < text.length) {
|
|
636
|
+
const textAfter = text.substring(lastIndex);
|
|
637
|
+
const html = simpleFormatToHtml(textAfter);
|
|
638
|
+
if (html) {
|
|
639
|
+
parts.push(_jsx("span", { dangerouslySetInnerHTML: { __html: html } }, `text-${itemIndex}-end`));
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
return (_jsx("div", { className: `prose prose-sm max-w-none text-xs text-gray-700 select-text ${shouldAddSpacing ? "mt-2" : ""}`, children: parts }, `item-${itemIndex}`));
|
|
643
|
+
}
|
|
644
|
+
// No command links, render as normal
|
|
645
|
+
const html = simpleFormatToHtml(trimmedText);
|
|
646
|
+
if (!html)
|
|
647
|
+
return null;
|
|
648
|
+
return (_jsx("div", { className: `prose prose-sm max-w-none text-xs text-gray-700 select-text ${shouldAddSpacing ? "mt-2" : ""}`, dangerouslySetInnerHTML: { __html: html } }, `item-${itemIndex}`));
|
|
649
|
+
}
|
|
650
|
+
if (segment.kind === "todo") {
|
|
651
|
+
const todo = segment;
|
|
652
|
+
return (_jsxs("div", { className: `my-1 ${shouldAddSpacing ? "mt-2" : ""}`, children: [todo.title && (_jsx("div", { className: "mb-1 text-xs font-medium text-gray-800", children: todo.title })), _jsx("div", { className: "flex flex-col gap-1", children: todo.items.map((todoItem, iIdx) => (_jsxs("label", { className: "flex items-start gap-2 text-xs text-gray-700", children: [_jsx(Checkbox, { checked: !!todoItem.done, onCheckedChange: () => { }, "aria-readonly": true, className: "mt-0.5" }), _jsxs("div", { children: [_jsx("div", { className: todoItem.done ? "line-through opacity-70" : "", children: todoItem.text }), todoItem.note && (_jsx("div", { className: "text-gray-1 text-xs", children: todoItem.note }))] })] }, (todoItem.id || todoItem.text || "todo") + "-" + iIdx))) })] }, `item-${itemIndex}`));
|
|
653
|
+
}
|
|
654
|
+
if (segment.kind === "media") {
|
|
655
|
+
const media = segment;
|
|
656
|
+
return (_jsx("div", { className: `my-2 flex flex-col gap-3 ${shouldAddSpacing ? "mt-2" : ""}`, children: media.items.map((mediaItem, mIdx) => (_jsx(MediaImage, { itemId: mediaItem.itemId, label: mediaItem.label }, mediaItem.itemId || `media-${itemIndex}-${mIdx}`))) }, `item-${itemIndex}`));
|
|
657
|
+
}
|
|
658
|
+
// segment.kind === "actions"
|
|
659
|
+
const actions = segment.actions;
|
|
660
|
+
return (_jsx("div", { className: `my-3 flex flex-wrap gap-2 ${shouldAddSpacing ? "mt-2" : ""}`, children: actions.map((a, aIdx) => {
|
|
661
|
+
const variant = a.style === "destructive"
|
|
662
|
+
? "destructive"
|
|
663
|
+
: a.style === "outline"
|
|
664
|
+
? "outline"
|
|
665
|
+
: a.style === "secondary"
|
|
666
|
+
? "secondary"
|
|
667
|
+
: "default"; // primary
|
|
668
|
+
return (_jsx(Button, { size: "sm", variant: variant, onClick: () => onQuickAction?.({
|
|
669
|
+
label: a.label,
|
|
670
|
+
prompt: a.prompt,
|
|
671
|
+
value: a.value,
|
|
672
|
+
behavior: a.behavior,
|
|
673
|
+
placeholder: a.placeholder,
|
|
674
|
+
}, message), children: a.label }, (a.id || a.label || "btn") + "-" + aIdx));
|
|
675
|
+
}) }, `item-${itemIndex}`));
|
|
676
|
+
}
|
|
677
|
+
// item.type === "toolcalls"
|
|
678
|
+
return (_jsx("div", { className: shouldAddSpacing ? "mt-2" : "", children: _jsx(ToolCallDisplay, { toolCalls: item.toolCalls, finished: finished, openPopovers: openPopovers, setOpenPopovers: setOpenPopovers, messageId: item.messageId, agentId: agentId }) }, `item-${itemIndex}`));
|
|
679
|
+
}), finished && editOperations.length > 0 && (_jsxs("div", { className: "mt-2 flex items-center gap-2", children: [_jsxs("div", { className: "tour-ai-response-message-changes text-xs", children: [editOperations.length, " changes"] }), canReject && !changesRejected && (_jsxs("div", { className: "flex cursor-pointer items-center gap-1 text-xs text-red-500", onClick: async () => {
|
|
680
|
+
await editContext?.operations?.undo?.(editOperations.length);
|
|
681
|
+
setChangesRejected(true);
|
|
682
|
+
}, children: [_jsx(X, { strokeWidth: 1, size: 14 }), " Reject"] })), changesRejected && (_jsx("div", { className: "text-xs text-red-500", children: "rejected" }))] }))] })] }));
|
|
683
|
+
}
|
|
684
|
+
//# sourceMappingURL=AiResponseMessage.js.map
|