@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,813 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { useState, useRef, useEffect, useMemo } from "react";
|
|
3
|
+
import { SimpleIconButton } from "../ui/SimpleIconButton";
|
|
4
|
+
import { Plus, X, MoreVertical } from "lucide-react";
|
|
5
|
+
import { cn } from "../../lib/utils";
|
|
6
|
+
import { getAgentStatusConfig } from "./AgentStatusBadge";
|
|
7
|
+
import { Popover, PopoverContent, PopoverTrigger, } from "../../components/ui/popover";
|
|
8
|
+
import { getActiveAgents, getClosedAgents, closeAgent as closeAgentService, } from "../services/agentService";
|
|
9
|
+
import { AgentTerminal } from "./AgentTerminal";
|
|
10
|
+
import { useEditContext } from "../client/editContext";
|
|
11
|
+
import { Tooltip, TooltipContent, TooltipTrigger, } from "../../components/ui/tooltip";
|
|
12
|
+
// import { Button } from "../../components/ui/button";
|
|
13
|
+
import { loadAiProfiles } from "../services/aiService";
|
|
14
|
+
import { ChevronDown, List } from "lucide-react";
|
|
15
|
+
import { AgentProfilesOverview } from "./AgentProfilesOverview";
|
|
16
|
+
import { AgentsView } from "../../agents-view/AgentsView";
|
|
17
|
+
import { SecretAgentIcon } from "../ui/Icons";
|
|
18
|
+
// function convertAgentMessagesToTerminalMessages(
|
|
19
|
+
// agentMessages: AgentChatMessage[],
|
|
20
|
+
// ): Message[] {
|
|
21
|
+
// return agentMessages.map((msg) => ({
|
|
22
|
+
// id: msg.id,
|
|
23
|
+
// content: msg.content,
|
|
24
|
+
// name: msg.name,
|
|
25
|
+
// role: msg.role,
|
|
26
|
+
// tool_calls: msg.functionName
|
|
27
|
+
// ? [
|
|
28
|
+
// {
|
|
29
|
+
// id: msg.toolCallId || msg.id,
|
|
30
|
+
// displayName: msg.functionName,
|
|
31
|
+
// function: {
|
|
32
|
+
// name: msg.functionName,
|
|
33
|
+
// arguments: msg.functionArguments || "",
|
|
34
|
+
// },
|
|
35
|
+
// },
|
|
36
|
+
// ]
|
|
37
|
+
// : [],
|
|
38
|
+
// tool_call_id: msg.toolCallId,
|
|
39
|
+
// }));
|
|
40
|
+
// }
|
|
41
|
+
const ACTIVE_AGENT_STORAGE_KEY = "editor.activeAgentId";
|
|
42
|
+
export const Agents = React.memo(function Agents({ closeButton, }) {
|
|
43
|
+
const [agents, setAgents] = useState([]);
|
|
44
|
+
const [activeAgentId, setActiveAgentId] = useState(null);
|
|
45
|
+
const activeAgentIdRef = useRef(null);
|
|
46
|
+
const singleAgentModeRef = useRef(false);
|
|
47
|
+
const [profileTabDropdownOpen, setProfileTabDropdownOpen] = useState(null);
|
|
48
|
+
const [menuPopoverOpen, setMenuPopoverOpen] = useState(false);
|
|
49
|
+
const [addPopoverOpen, setAddPopoverOpen] = useState(false);
|
|
50
|
+
const [loadingAgents, setLoadingAgents] = useState(false);
|
|
51
|
+
const [inactiveAgents, setInactiveAgents] = useState([]);
|
|
52
|
+
const [initialMetadataMap, setInitialMetadataMap] = useState({});
|
|
53
|
+
const [availableProfiles, setAvailableProfiles] = useState([]);
|
|
54
|
+
const [selectedProfileId, setSelectedProfileId] = useState("");
|
|
55
|
+
const [loadingProfiles, setLoadingProfiles] = useState(false);
|
|
56
|
+
const editContext = useEditContext();
|
|
57
|
+
// Memoize the current item ID to avoid reloading profiles when descriptor object reference changes
|
|
58
|
+
const currentItemId = useMemo(() => editContext?.currentItemDescriptor?.id, [editContext?.currentItemDescriptor?.id]);
|
|
59
|
+
// Group agents by profile for profile-based tabs
|
|
60
|
+
const agentsGroupedByProfile = useMemo(() => {
|
|
61
|
+
const profileMap = new Map();
|
|
62
|
+
agents.forEach((agent) => {
|
|
63
|
+
const profileId = agent.profileId || null;
|
|
64
|
+
const profileKey = profileId || "general";
|
|
65
|
+
const profile = availableProfiles.find((p) => p.id === profileId);
|
|
66
|
+
if (!profileMap.has(profileKey)) {
|
|
67
|
+
profileMap.set(profileKey, {
|
|
68
|
+
profileId,
|
|
69
|
+
profileName: agent.profileName || "General",
|
|
70
|
+
profileSvgIcon: profile?.svgIcon,
|
|
71
|
+
agents: [],
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
// Update icon if current group doesn't have one but this agent does
|
|
76
|
+
const group = profileMap.get(profileKey);
|
|
77
|
+
if (!group.profileSvgIcon && profile?.svgIcon) {
|
|
78
|
+
group.profileSvgIcon = profile?.svgIcon;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
profileMap.get(profileKey).agents.push(agent);
|
|
82
|
+
});
|
|
83
|
+
return profileMap;
|
|
84
|
+
}, [agents, availableProfiles]);
|
|
85
|
+
// Detect single-agent mode from query parameter once on mount
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
try {
|
|
88
|
+
const params = new URLSearchParams(window.location.search);
|
|
89
|
+
const value = params.get("singleAgent");
|
|
90
|
+
singleAgentModeRef.current =
|
|
91
|
+
value === "true" || params.has("singleAgent");
|
|
92
|
+
}
|
|
93
|
+
catch { }
|
|
94
|
+
}, []);
|
|
95
|
+
// Helper function to get the most recently updated agent
|
|
96
|
+
const getMostRecentAgent = (agentList) => {
|
|
97
|
+
if (agentList.length === 0)
|
|
98
|
+
return null;
|
|
99
|
+
return agentList.reduce((mostRecent, current) => {
|
|
100
|
+
return new Date(current.updatedDate) > new Date(mostRecent.updatedDate)
|
|
101
|
+
? current
|
|
102
|
+
: mostRecent;
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
// Helper function to get highest priority status for a group of agents
|
|
106
|
+
const getHighestPriorityStatus = (agentList) => {
|
|
107
|
+
const statusPriority = {
|
|
108
|
+
waitingForApproval: 5,
|
|
109
|
+
error: 4,
|
|
110
|
+
running: 3,
|
|
111
|
+
idle: 2,
|
|
112
|
+
completed: 1,
|
|
113
|
+
closed: 0,
|
|
114
|
+
new: 0,
|
|
115
|
+
};
|
|
116
|
+
let highestPriority = -1;
|
|
117
|
+
let highestStatus = "idle";
|
|
118
|
+
agentList.forEach((agent) => {
|
|
119
|
+
const statusKey = typeof agent.status === "string" ? agent.status : "idle";
|
|
120
|
+
const priority = statusPriority[statusKey] ?? 0;
|
|
121
|
+
if (priority > highestPriority) {
|
|
122
|
+
highestPriority = priority;
|
|
123
|
+
highestStatus = agent.status;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
return highestStatus;
|
|
127
|
+
};
|
|
128
|
+
// Helper function to set active agent and persist to localStorage
|
|
129
|
+
const setActiveAgentIdWithStorage = (agentId) => {
|
|
130
|
+
setActiveAgentId(agentId);
|
|
131
|
+
activeAgentIdRef.current = agentId;
|
|
132
|
+
if (agentId) {
|
|
133
|
+
localStorage.setItem(ACTIVE_AGENT_STORAGE_KEY, agentId);
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
localStorage.removeItem(ACTIVE_AGENT_STORAGE_KEY);
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
// Load agents from backend on mount
|
|
140
|
+
useEffect(() => {
|
|
141
|
+
loadAgentsFromBackend();
|
|
142
|
+
}, []);
|
|
143
|
+
// When the add popover opens or when no agents are present (empty state),
|
|
144
|
+
// keep selection state consistent without triggering extra fetches.
|
|
145
|
+
useEffect(() => {
|
|
146
|
+
if (!addPopoverOpen && agents.length > 0)
|
|
147
|
+
return;
|
|
148
|
+
// When showing empty state (no agents), force placeholder selection
|
|
149
|
+
if (agents.length === 0) {
|
|
150
|
+
setSelectedProfileId("");
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
// Otherwise preserve placeholder if not set yet
|
|
154
|
+
setSelectedProfileId((prev) => prev || "");
|
|
155
|
+
}
|
|
156
|
+
}, [addPopoverOpen, agents.length]);
|
|
157
|
+
// Ensure profiles are loaded once for terminals (centralized load)
|
|
158
|
+
useEffect(() => {
|
|
159
|
+
let cancelled = false;
|
|
160
|
+
(async () => {
|
|
161
|
+
try {
|
|
162
|
+
setLoadingProfiles(true);
|
|
163
|
+
const profiles = await loadAiProfiles(editContext?.currentItemDescriptor);
|
|
164
|
+
if (cancelled)
|
|
165
|
+
return;
|
|
166
|
+
setAvailableProfiles(profiles || []);
|
|
167
|
+
}
|
|
168
|
+
catch (e) {
|
|
169
|
+
console.error("Failed to load AI profiles", e);
|
|
170
|
+
}
|
|
171
|
+
finally {
|
|
172
|
+
if (!cancelled)
|
|
173
|
+
setLoadingProfiles(false);
|
|
174
|
+
}
|
|
175
|
+
})();
|
|
176
|
+
return () => {
|
|
177
|
+
cancelled = true;
|
|
178
|
+
};
|
|
179
|
+
}, [currentItemId]);
|
|
180
|
+
// Listen for external requests to add a new agent (e.g., AI command)
|
|
181
|
+
useEffect(() => {
|
|
182
|
+
const handleAddNewAgent = (ev) => {
|
|
183
|
+
let initialMetadata = undefined;
|
|
184
|
+
try {
|
|
185
|
+
const ce = ev;
|
|
186
|
+
initialMetadata = (ce.detail && ce.detail.metadata);
|
|
187
|
+
}
|
|
188
|
+
catch { }
|
|
189
|
+
addAgent(initialMetadata);
|
|
190
|
+
// Ensure the prompt focuses after the agent tab mounts
|
|
191
|
+
setTimeout(() => {
|
|
192
|
+
try {
|
|
193
|
+
window.dispatchEvent(new CustomEvent("editor:focusAgentPrompt"));
|
|
194
|
+
}
|
|
195
|
+
catch { }
|
|
196
|
+
}, 60);
|
|
197
|
+
};
|
|
198
|
+
window.addEventListener("editor:addNewAgent", handleAddNewAgent);
|
|
199
|
+
return () => window.removeEventListener("editor:addNewAgent", handleAddNewAgent);
|
|
200
|
+
}, []);
|
|
201
|
+
// Listen for external requests to select an existing open agent without switching views
|
|
202
|
+
useEffect(() => {
|
|
203
|
+
const handleSelectAgent = (ev) => {
|
|
204
|
+
try {
|
|
205
|
+
const ce = ev;
|
|
206
|
+
const agentId = (ce.detail && ce.detail.agentId);
|
|
207
|
+
if (!agentId)
|
|
208
|
+
return;
|
|
209
|
+
const existingAgent = agents.find((a) => a.id === agentId);
|
|
210
|
+
if (existingAgent) {
|
|
211
|
+
setActiveAgentIdWithStorage(agentId);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
catch { }
|
|
215
|
+
};
|
|
216
|
+
window.addEventListener("editor:selectAgent", handleSelectAgent);
|
|
217
|
+
return () => window.removeEventListener("editor:selectAgent", handleSelectAgent);
|
|
218
|
+
}, [agents]);
|
|
219
|
+
// Listen for external requests to open an existing agent
|
|
220
|
+
useEffect(() => {
|
|
221
|
+
const handleOpenAgent = (ev) => {
|
|
222
|
+
try {
|
|
223
|
+
const ce = ev;
|
|
224
|
+
const agentId = (ce.detail && ce.detail.agentId);
|
|
225
|
+
if (!agentId)
|
|
226
|
+
return;
|
|
227
|
+
// Check if agent is already open
|
|
228
|
+
const existingAgent = agents.find((a) => a.id === agentId);
|
|
229
|
+
if (existingAgent) {
|
|
230
|
+
// Just switch to it
|
|
231
|
+
setActiveAgentIdWithStorage(agentId);
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
// Load the agent from history and add to open agents
|
|
235
|
+
openAgentFromHistory({ id: agentId });
|
|
236
|
+
}
|
|
237
|
+
catch (error) {
|
|
238
|
+
console.error("Error opening agent:", error);
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
window.addEventListener("editor:openAgent", handleOpenAgent);
|
|
242
|
+
return () => window.removeEventListener("editor:openAgent", handleOpenAgent);
|
|
243
|
+
}, [agents]);
|
|
244
|
+
// Subscribe to websocket messages for agent events
|
|
245
|
+
useEffect(() => {
|
|
246
|
+
if (!editContext?.addSocketMessageListener)
|
|
247
|
+
return;
|
|
248
|
+
const unsubscribe = editContext.addSocketMessageListener((message) => {
|
|
249
|
+
// In single-agent mode, ignore events that would add or remove agents,
|
|
250
|
+
// but still allow updates (e.g., name/status) for the current tab.
|
|
251
|
+
if (singleAgentModeRef.current) {
|
|
252
|
+
if (message.type === "agent:run:start" ||
|
|
253
|
+
message.type === "agent:run:closed") {
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
if (message.type === "agent:run:start") {
|
|
258
|
+
const { agentId, agentName, autoSelect, profileId, profileName } = message.payload;
|
|
259
|
+
if (!agentId || !agentName) {
|
|
260
|
+
console.warn("Invalid agent:run:start message payload:", message.payload);
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
// Show the agent panel when an agent starts
|
|
264
|
+
editContext.setShowAgentsPanel?.(true);
|
|
265
|
+
setAgents((prevAgents) => {
|
|
266
|
+
// Check if agent already exists
|
|
267
|
+
const existingAgentIndex = prevAgents.findIndex((agent) => agent.id === agentId);
|
|
268
|
+
if (existingAgentIndex !== -1) {
|
|
269
|
+
// Update existing agent name and profile info
|
|
270
|
+
const updatedAgents = [...prevAgents];
|
|
271
|
+
const existingAgent = updatedAgents[existingAgentIndex];
|
|
272
|
+
updatedAgents[existingAgentIndex] = {
|
|
273
|
+
...existingAgent,
|
|
274
|
+
name: agentName,
|
|
275
|
+
status: "running",
|
|
276
|
+
updatedDate: new Date().toISOString(),
|
|
277
|
+
...(profileId && { profileId }),
|
|
278
|
+
...(profileName && { profileName }),
|
|
279
|
+
};
|
|
280
|
+
return updatedAgents;
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
// Add new agent to the array
|
|
284
|
+
const newAgent = {
|
|
285
|
+
id: agentId,
|
|
286
|
+
name: agentName,
|
|
287
|
+
status: "running",
|
|
288
|
+
userId: "", // Will be populated from backend if needed
|
|
289
|
+
updatedDate: new Date().toISOString(),
|
|
290
|
+
...(profileId && { profileId }),
|
|
291
|
+
...(profileName && { profileName }),
|
|
292
|
+
};
|
|
293
|
+
return [...prevAgents, newAgent];
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
// Auto-switch to the spawned agent if requested
|
|
297
|
+
if (autoSelect === true) {
|
|
298
|
+
setActiveAgentIdWithStorage(agentId);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
else if (message.type === "agent:info:updated") {
|
|
302
|
+
const { agentId, agentName, agentDescription } = message.payload || {};
|
|
303
|
+
if (!agentId)
|
|
304
|
+
return;
|
|
305
|
+
// Update the agent name and/or description in the tabs list
|
|
306
|
+
setAgents((prevAgents) => {
|
|
307
|
+
const existingIndex = prevAgents.findIndex((a) => a.id === agentId);
|
|
308
|
+
if (existingIndex === -1)
|
|
309
|
+
return prevAgents;
|
|
310
|
+
const updatedAgents = [...prevAgents];
|
|
311
|
+
const existingAgent = updatedAgents[existingIndex];
|
|
312
|
+
updatedAgents[existingIndex] = {
|
|
313
|
+
...existingAgent,
|
|
314
|
+
...(agentName !== undefined && { name: agentName }),
|
|
315
|
+
...(agentDescription !== undefined && {
|
|
316
|
+
description: agentDescription,
|
|
317
|
+
}),
|
|
318
|
+
updatedDate: new Date().toISOString(),
|
|
319
|
+
};
|
|
320
|
+
return updatedAgents;
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
else if (message.type === "agent:run:status") {
|
|
324
|
+
// Unified status updates (state only)
|
|
325
|
+
const { agentId, data } = message.payload || {};
|
|
326
|
+
if (!agentId)
|
|
327
|
+
return;
|
|
328
|
+
const rawState = data?.state;
|
|
329
|
+
const status = (() => {
|
|
330
|
+
if (!rawState)
|
|
331
|
+
return undefined;
|
|
332
|
+
switch (rawState) {
|
|
333
|
+
case "Running":
|
|
334
|
+
return "running";
|
|
335
|
+
case "WaitingForApproval":
|
|
336
|
+
return "waitingForApproval";
|
|
337
|
+
case "Completed":
|
|
338
|
+
return "completed";
|
|
339
|
+
case "Closed":
|
|
340
|
+
return "closed";
|
|
341
|
+
case "Error":
|
|
342
|
+
return "error";
|
|
343
|
+
case "Idle":
|
|
344
|
+
return "idle";
|
|
345
|
+
case "CostLimitReached":
|
|
346
|
+
return "costLimitReached";
|
|
347
|
+
default:
|
|
348
|
+
// allow already-lowercased strings
|
|
349
|
+
return rawState;
|
|
350
|
+
}
|
|
351
|
+
})();
|
|
352
|
+
if (!status)
|
|
353
|
+
return;
|
|
354
|
+
setAgents((prevAgents) => {
|
|
355
|
+
const existingIndex = prevAgents.findIndex((a) => a.id === agentId);
|
|
356
|
+
if (existingIndex !== -1) {
|
|
357
|
+
const updatedAgents = [...prevAgents];
|
|
358
|
+
const existingAgent = updatedAgents[existingIndex];
|
|
359
|
+
updatedAgents[existingIndex] = {
|
|
360
|
+
...existingAgent,
|
|
361
|
+
status,
|
|
362
|
+
updatedDate: new Date().toISOString(),
|
|
363
|
+
};
|
|
364
|
+
return updatedAgents;
|
|
365
|
+
}
|
|
366
|
+
return prevAgents;
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
else if (message.type === "agent:run:closed") {
|
|
370
|
+
// Remove agent from tabs when closed in another browser instance
|
|
371
|
+
const { agentId } = message.payload || {};
|
|
372
|
+
if (!agentId)
|
|
373
|
+
return;
|
|
374
|
+
setAgents((prevAgents) => {
|
|
375
|
+
const filtered = prevAgents.filter((a) => a.id !== agentId);
|
|
376
|
+
// Find the closed agent to add to history
|
|
377
|
+
const closedAgent = prevAgents.find((a) => a.id === agentId);
|
|
378
|
+
if (closedAgent) {
|
|
379
|
+
// Add to inactive agents list (history) if it doesn't already exist
|
|
380
|
+
setInactiveAgents((prevInactive) => {
|
|
381
|
+
const alreadyExists = prevInactive.some((a) => a.id === agentId);
|
|
382
|
+
if (alreadyExists) {
|
|
383
|
+
return prevInactive;
|
|
384
|
+
}
|
|
385
|
+
return [
|
|
386
|
+
{
|
|
387
|
+
...closedAgent,
|
|
388
|
+
status: "closed",
|
|
389
|
+
updatedDate: new Date().toISOString(),
|
|
390
|
+
},
|
|
391
|
+
...prevInactive,
|
|
392
|
+
];
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
// If we're closing the active agent, switch to the most recent remaining one
|
|
396
|
+
if (activeAgentIdRef.current === agentId) {
|
|
397
|
+
if (filtered.length > 0) {
|
|
398
|
+
const mostRecentAgent = getMostRecentAgent(filtered);
|
|
399
|
+
setActiveAgentIdWithStorage(mostRecentAgent?.id || null);
|
|
400
|
+
}
|
|
401
|
+
else {
|
|
402
|
+
setActiveAgentIdWithStorage(null);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
// If no agents remain, reset profile selection to placeholder
|
|
406
|
+
if (filtered.length === 0) {
|
|
407
|
+
setSelectedProfileId("");
|
|
408
|
+
}
|
|
409
|
+
return filtered;
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
return unsubscribe;
|
|
414
|
+
}, [editContext?.addSocketMessageListener]);
|
|
415
|
+
const loadAgentsFromBackend = async () => {
|
|
416
|
+
try {
|
|
417
|
+
// In single-agent mode, skip loading any pre-existing/open agents or history
|
|
418
|
+
if (singleAgentModeRef.current) {
|
|
419
|
+
setAgents([]);
|
|
420
|
+
setInactiveAgents([]);
|
|
421
|
+
setActiveAgentIdWithStorage(null);
|
|
422
|
+
setLoadingAgents(false);
|
|
423
|
+
return;
|
|
424
|
+
}
|
|
425
|
+
setLoadingAgents(true);
|
|
426
|
+
// Load active agents (exclude shared agents for the agent panel)
|
|
427
|
+
const activeAgentsResponse = await getActiveAgents({
|
|
428
|
+
limit: 1000,
|
|
429
|
+
includeShared: false, // Agent panel only shows user's own agents
|
|
430
|
+
includeOwned: true,
|
|
431
|
+
excludeClosed: true, // Exclude closed and cancelled agents
|
|
432
|
+
});
|
|
433
|
+
const activeAgentsResult = activeAgentsResponse.agents;
|
|
434
|
+
setAgents(activeAgentsResult);
|
|
435
|
+
// Try to restore the previously active agent from localStorage if one exists
|
|
436
|
+
let selectedAgentId = null;
|
|
437
|
+
if (activeAgentsResult.length > 0) {
|
|
438
|
+
const storedAgentId = localStorage.getItem(ACTIVE_AGENT_STORAGE_KEY);
|
|
439
|
+
const storedAgent = activeAgentsResult.find((agent) => agent.id === storedAgentId);
|
|
440
|
+
if (storedAgent) {
|
|
441
|
+
selectedAgentId = storedAgent.id;
|
|
442
|
+
}
|
|
443
|
+
else {
|
|
444
|
+
// If no stored agent or stored agent not found, select the most recent agent
|
|
445
|
+
const mostRecentAgent = getMostRecentAgent(activeAgentsResult);
|
|
446
|
+
selectedAgentId = mostRecentAgent?.id || null;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
setActiveAgentIdWithStorage(selectedAgentId);
|
|
450
|
+
// If there are no active agents after load, ensure placeholder is selected
|
|
451
|
+
if (activeAgentsResult.length === 0) {
|
|
452
|
+
setSelectedProfileId("");
|
|
453
|
+
}
|
|
454
|
+
// Load closed agents for history
|
|
455
|
+
const closedAgentsResult = await getClosedAgents();
|
|
456
|
+
// Deduplicate agents by ID in case the backend returns duplicates
|
|
457
|
+
const uniqueClosedAgents = closedAgentsResult.filter((agent, index, self) => index === self.findIndex((a) => a.id === agent.id));
|
|
458
|
+
setInactiveAgents(uniqueClosedAgents);
|
|
459
|
+
}
|
|
460
|
+
catch (error) {
|
|
461
|
+
console.error("Failed to load agents:", error);
|
|
462
|
+
}
|
|
463
|
+
finally {
|
|
464
|
+
setLoadingAgents(false);
|
|
465
|
+
}
|
|
466
|
+
};
|
|
467
|
+
// const loadAgentMessages = async (
|
|
468
|
+
// agentId: string,
|
|
469
|
+
// ): Promise<AgentChat | null> => {
|
|
470
|
+
// try {
|
|
471
|
+
// const result = await getAgent(agentId);
|
|
472
|
+
// if (result.type === "success" && result.data) {
|
|
473
|
+
// return result.data;
|
|
474
|
+
// }
|
|
475
|
+
// } catch (error) {
|
|
476
|
+
// console.error(`Failed to load messages for agent ${agentId}:`, error);
|
|
477
|
+
// }
|
|
478
|
+
// return null;
|
|
479
|
+
// };
|
|
480
|
+
const addAgent = (metadata) => {
|
|
481
|
+
const newAgent = {
|
|
482
|
+
status: "new",
|
|
483
|
+
id: crypto.randomUUID(),
|
|
484
|
+
name: `New Agent`,
|
|
485
|
+
updatedDate: new Date().toISOString(),
|
|
486
|
+
userId: "",
|
|
487
|
+
profileId: metadata?.additionalData?.profileId,
|
|
488
|
+
profileName: metadata?.additionalData?.profileName || metadata?.profile,
|
|
489
|
+
};
|
|
490
|
+
setAgents((prev) => [...prev, newAgent]);
|
|
491
|
+
// User-initiated creation should activate the new agent tab
|
|
492
|
+
setActiveAgentIdWithStorage(newAgent.id);
|
|
493
|
+
if (metadata) {
|
|
494
|
+
setInitialMetadataMap((prev) => ({ ...prev, [newAgent.id]: metadata }));
|
|
495
|
+
}
|
|
496
|
+
// Ensure the prompt focuses after the agent tab mounts
|
|
497
|
+
setTimeout(() => {
|
|
498
|
+
try {
|
|
499
|
+
window.dispatchEvent(new CustomEvent("editor:focusAgentPrompt"));
|
|
500
|
+
}
|
|
501
|
+
catch { }
|
|
502
|
+
}, 60);
|
|
503
|
+
};
|
|
504
|
+
const createAgentWithSelectedProfile = (profileId) => {
|
|
505
|
+
try {
|
|
506
|
+
const selected = availableProfiles.find((p) => p.id === profileId);
|
|
507
|
+
const metadata = selected
|
|
508
|
+
? {
|
|
509
|
+
profile: selected.name,
|
|
510
|
+
additionalData: {
|
|
511
|
+
profileId: selected.id,
|
|
512
|
+
profileName: selected.name,
|
|
513
|
+
},
|
|
514
|
+
}
|
|
515
|
+
: undefined;
|
|
516
|
+
addAgent(metadata);
|
|
517
|
+
}
|
|
518
|
+
finally {
|
|
519
|
+
setAddPopoverOpen(false);
|
|
520
|
+
}
|
|
521
|
+
};
|
|
522
|
+
const closeAgent = async (agentId) => {
|
|
523
|
+
try {
|
|
524
|
+
// Permanently close the agent in the backend
|
|
525
|
+
await closeAgentService(agentId);
|
|
526
|
+
}
|
|
527
|
+
catch (error) {
|
|
528
|
+
console.error("Failed to close agent:", error);
|
|
529
|
+
// Continue with UI cleanup even if backend call fails
|
|
530
|
+
}
|
|
531
|
+
setAgents((prev) => {
|
|
532
|
+
const filtered = prev.filter((a) => a.id !== agentId);
|
|
533
|
+
// Find the closed agent to add to history
|
|
534
|
+
const closedAgent = prev.find((a) => a.id === agentId);
|
|
535
|
+
if (closedAgent) {
|
|
536
|
+
// Add the closed agent to the inactive agents list (history) if it doesn't already exist
|
|
537
|
+
setInactiveAgents((prevInactive) => {
|
|
538
|
+
// Check if this agent is already in the history
|
|
539
|
+
const alreadyExists = prevInactive.some((a) => a.id === agentId);
|
|
540
|
+
if (alreadyExists) {
|
|
541
|
+
return prevInactive;
|
|
542
|
+
}
|
|
543
|
+
return [
|
|
544
|
+
{
|
|
545
|
+
...closedAgent,
|
|
546
|
+
status: "closed",
|
|
547
|
+
updatedDate: new Date().toISOString(),
|
|
548
|
+
},
|
|
549
|
+
...prevInactive,
|
|
550
|
+
];
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
// If we're closing the active terminal, switch to the most recent remaining one or clear storage
|
|
554
|
+
if (activeAgentIdRef.current === agentId) {
|
|
555
|
+
if (filtered.length > 0) {
|
|
556
|
+
const mostRecentAgent = getMostRecentAgent(filtered);
|
|
557
|
+
setActiveAgentIdWithStorage(mostRecentAgent?.id || null);
|
|
558
|
+
}
|
|
559
|
+
else {
|
|
560
|
+
setActiveAgentIdWithStorage(null);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
// If no agents remain, reset profile selection to placeholder
|
|
564
|
+
if (filtered.length === 0) {
|
|
565
|
+
setSelectedProfileId("");
|
|
566
|
+
}
|
|
567
|
+
return filtered;
|
|
568
|
+
});
|
|
569
|
+
};
|
|
570
|
+
const handleCloseAgent = (agentId, e) => {
|
|
571
|
+
e.stopPropagation();
|
|
572
|
+
// Find the agent to check its status
|
|
573
|
+
const agent = agents.find((a) => a.id === agentId);
|
|
574
|
+
if (!agent) {
|
|
575
|
+
// Agent not found, close anyway
|
|
576
|
+
closeAgent(agentId);
|
|
577
|
+
return;
|
|
578
|
+
}
|
|
579
|
+
// Check if agent is in an active state (running or waiting for approval)
|
|
580
|
+
// Handle both string and numeric status values
|
|
581
|
+
// Enum: New=0, Running=1, WaitingForApproval=2, Completed=3, Error=4, Closed=5
|
|
582
|
+
const isActivelyRunning = agent.status === "running" ||
|
|
583
|
+
agent.status === "waitingForApproval" ||
|
|
584
|
+
agent.status === 1 ||
|
|
585
|
+
agent.status === 2;
|
|
586
|
+
// If agent is actively running, show confirmation dialog
|
|
587
|
+
if (isActivelyRunning) {
|
|
588
|
+
if (editContext?.confirm) {
|
|
589
|
+
editContext.confirm({
|
|
590
|
+
header: "Abort Agent",
|
|
591
|
+
message: "This agent is currently running. Are you sure you want to abort it?",
|
|
592
|
+
acceptLabel: "Abort Agent",
|
|
593
|
+
accept: () => {
|
|
594
|
+
closeAgent(agentId);
|
|
595
|
+
},
|
|
596
|
+
showCancel: true,
|
|
597
|
+
});
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
else {
|
|
601
|
+
// Agent is not actively running, close immediately
|
|
602
|
+
closeAgent(agentId);
|
|
603
|
+
}
|
|
604
|
+
};
|
|
605
|
+
const handleCloseProfileAgents = async (profileAgents, profileName, e) => {
|
|
606
|
+
e.stopPropagation();
|
|
607
|
+
const agentCount = profileAgents.length;
|
|
608
|
+
const hasActiveAgents = profileAgents.some((agent) => agent.status === "running" ||
|
|
609
|
+
agent.status === "waitingForApproval" ||
|
|
610
|
+
agent.status === 1 ||
|
|
611
|
+
agent.status === 2);
|
|
612
|
+
if (editContext?.confirm) {
|
|
613
|
+
editContext.confirm({
|
|
614
|
+
header: `Close ${agentCount} Agent${agentCount > 1 ? "s" : ""}`,
|
|
615
|
+
message: hasActiveAgents
|
|
616
|
+
? `This will close all ${agentCount} ${profileName} agent${agentCount > 1 ? "s" : ""}, including ${profileAgents.filter((a) => a.status === "running" || a.status === 1).length} running agent(s). Are you sure?`
|
|
617
|
+
: `Are you sure you want to close all ${agentCount} ${profileName} agent${agentCount > 1 ? "s" : ""}?`,
|
|
618
|
+
acceptLabel: `Close ${agentCount > 1 ? "All" : "Agent"}`,
|
|
619
|
+
accept: async () => {
|
|
620
|
+
// Close all agents in this profile
|
|
621
|
+
const closePromises = profileAgents.map((agent) => closeAgentService(agent.id).catch((error) => {
|
|
622
|
+
console.error(`Failed to close agent ${agent.id}:`, error);
|
|
623
|
+
}));
|
|
624
|
+
await Promise.all(closePromises);
|
|
625
|
+
// Update UI state
|
|
626
|
+
setAgents((prev) => {
|
|
627
|
+
const agentIds = new Set(profileAgents.map((a) => a.id));
|
|
628
|
+
const filtered = prev.filter((a) => !agentIds.has(a.id));
|
|
629
|
+
// Add closed agents to history
|
|
630
|
+
const closedAgents = profileAgents.map((agent) => ({
|
|
631
|
+
...agent,
|
|
632
|
+
status: "closed",
|
|
633
|
+
updatedDate: new Date().toISOString(),
|
|
634
|
+
}));
|
|
635
|
+
setInactiveAgents((prevInactive) => {
|
|
636
|
+
const newAgents = closedAgents.filter((closedAgent) => !prevInactive.some((a) => a.id === closedAgent.id));
|
|
637
|
+
return [...newAgents, ...prevInactive];
|
|
638
|
+
});
|
|
639
|
+
// If we're closing the active agent, switch to most recent remaining or null
|
|
640
|
+
if (activeAgentIdRef.current &&
|
|
641
|
+
agentIds.has(activeAgentIdRef.current)) {
|
|
642
|
+
if (filtered.length > 0) {
|
|
643
|
+
const mostRecentAgent = getMostRecentAgent(filtered);
|
|
644
|
+
setActiveAgentIdWithStorage(mostRecentAgent?.id || null);
|
|
645
|
+
}
|
|
646
|
+
else {
|
|
647
|
+
setActiveAgentIdWithStorage(null);
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
// Reset profile selection if no agents remain
|
|
651
|
+
if (filtered.length === 0) {
|
|
652
|
+
setSelectedProfileId("");
|
|
653
|
+
}
|
|
654
|
+
return filtered;
|
|
655
|
+
});
|
|
656
|
+
},
|
|
657
|
+
showCancel: true,
|
|
658
|
+
});
|
|
659
|
+
}
|
|
660
|
+
};
|
|
661
|
+
const closeOtherAgents = async () => {
|
|
662
|
+
if (!activeAgentIdRef.current)
|
|
663
|
+
return;
|
|
664
|
+
// Get agents to close (all except active)
|
|
665
|
+
const agentsToClose = agents.filter((a) => a.id !== activeAgentIdRef.current);
|
|
666
|
+
// Permanently close each agent in the backend
|
|
667
|
+
const closePromises = agentsToClose.map(async (agent) => {
|
|
668
|
+
try {
|
|
669
|
+
await closeAgentService(agent.id);
|
|
670
|
+
}
|
|
671
|
+
catch (error) {
|
|
672
|
+
console.error(`Failed to close agent ${agent.id}:`, error);
|
|
673
|
+
}
|
|
674
|
+
});
|
|
675
|
+
// Wait for all close operations to complete
|
|
676
|
+
await Promise.all(closePromises);
|
|
677
|
+
// Add closed agents to history (deduplicate to prevent duplicates)
|
|
678
|
+
if (agentsToClose.length > 0) {
|
|
679
|
+
const closedAgents = agentsToClose.map((agent) => ({
|
|
680
|
+
...agent,
|
|
681
|
+
status: "closed",
|
|
682
|
+
updatedDate: new Date().toISOString(),
|
|
683
|
+
}));
|
|
684
|
+
setInactiveAgents((prevInactive) => {
|
|
685
|
+
// Filter out agents that already exist in history
|
|
686
|
+
const newAgents = closedAgents.filter((closedAgent) => !prevInactive.some((a) => a.id === closedAgent.id));
|
|
687
|
+
return [...newAgents, ...prevInactive];
|
|
688
|
+
});
|
|
689
|
+
}
|
|
690
|
+
setAgents((prev) => {
|
|
691
|
+
return prev.filter((a) => a.id === activeAgentIdRef.current);
|
|
692
|
+
});
|
|
693
|
+
setMenuPopoverOpen(false);
|
|
694
|
+
};
|
|
695
|
+
const getTabsMenuItems = () => {
|
|
696
|
+
return [
|
|
697
|
+
{
|
|
698
|
+
id: "close-other",
|
|
699
|
+
label: "Close Other",
|
|
700
|
+
command: async () => {
|
|
701
|
+
await closeOtherAgents();
|
|
702
|
+
},
|
|
703
|
+
disabled: agents.length <= 1,
|
|
704
|
+
},
|
|
705
|
+
];
|
|
706
|
+
};
|
|
707
|
+
const openAgentFromHistory = async (agent) => {
|
|
708
|
+
// Check if this agent is already open as a terminal
|
|
709
|
+
const existingAgent = agents.find((a) => a.id === agent.id);
|
|
710
|
+
if (existingAgent) {
|
|
711
|
+
// Switch to existing agent
|
|
712
|
+
setActiveAgentIdWithStorage(existingAgent.id);
|
|
713
|
+
return;
|
|
714
|
+
}
|
|
715
|
+
// If agent data is incomplete (e.g., only has ID), fetch full details from backend
|
|
716
|
+
let fullAgent = agent;
|
|
717
|
+
if (!agent.name || !agent.userId) {
|
|
718
|
+
try {
|
|
719
|
+
const { getAgent } = await import("../services/agentService");
|
|
720
|
+
const agentDetails = await getAgent(agent.id);
|
|
721
|
+
fullAgent = {
|
|
722
|
+
id: agentDetails.id,
|
|
723
|
+
name: agentDetails.name,
|
|
724
|
+
description: agentDetails.description,
|
|
725
|
+
userId: agentDetails.userId,
|
|
726
|
+
updatedDate: agentDetails.updatedDate,
|
|
727
|
+
status: agentDetails.status,
|
|
728
|
+
isShared: agentDetails.isShared,
|
|
729
|
+
ownerName: agentDetails.ownerName,
|
|
730
|
+
profileId: agentDetails.profileId,
|
|
731
|
+
profileName: agentDetails.profileName,
|
|
732
|
+
profileSvgIcon: agentDetails.profileSvgIcon,
|
|
733
|
+
messageCount: agentDetails.messageCount,
|
|
734
|
+
totalCost: agentDetails.totalCost,
|
|
735
|
+
totalTokensUsed: agentDetails.totalTokensUsed,
|
|
736
|
+
};
|
|
737
|
+
}
|
|
738
|
+
catch (error) {
|
|
739
|
+
console.error("Failed to fetch agent details:", error);
|
|
740
|
+
// Fall back to using whatever data we have
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
// Add the closed agent to the active agents list
|
|
744
|
+
const reopenedAgent = {
|
|
745
|
+
...fullAgent,
|
|
746
|
+
// Keep the original status to allow AgentTerminal to load the full agent data
|
|
747
|
+
};
|
|
748
|
+
setAgents((prev) => [...prev, reopenedAgent]);
|
|
749
|
+
setActiveAgentIdWithStorage(reopenedAgent.id);
|
|
750
|
+
};
|
|
751
|
+
if (loadingAgents) {
|
|
752
|
+
return (_jsx("div", { className: "flex h-full items-center justify-center", children: _jsx("div", { className: "text-xs text-gray-500", children: "Loading agents..." }) }));
|
|
753
|
+
}
|
|
754
|
+
// Empty state when no agents are open
|
|
755
|
+
if (!loadingAgents && agents.length === 0) {
|
|
756
|
+
return (_jsxs("div", { className: "flex h-full flex-col", children: [_jsxs("div", { className: "flex items-center justify-between border-b border-gray-200 bg-gray-50 px-4 py-2", children: [_jsx("div", { className: "text-xs font-medium text-gray-600", children: "No Active Agents" }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(SimpleIconButton, { onClick: () => setActiveAgentIdWithStorage(null), icon: _jsx(List, { className: "size-4", strokeWidth: 1 }), label: "Agent Overview", className: "text-gray-600 hover:text-gray-800" }), closeButton && (_jsx("div", { className: "flex items-center", children: closeButton }))] })] }), _jsx("div", { className: "flex flex-1 items-center justify-center p-4", children: _jsx("div", { className: "w-full max-w-4xl", children: loadingProfiles ? (_jsx("div", { className: "text-center text-xs text-gray-500", children: "Loading profiles..." })) : availableProfiles.length > 0 ? (_jsxs("div", { className: "flex flex-col gap-4", children: [_jsxs("div", { className: "text-center", children: [_jsx("h2", { className: "text-lg font-semibold text-gray-900", children: "Select an AI Agent Profile" }), _jsx("p", { className: "text-xs text-gray-500", children: "Choose a profile to start a new agent" })] }), _jsx(AgentProfilesOverview, { profiles: availableProfiles, onSelectProfile: createAgentWithSelectedProfile })] })) : (_jsx("div", { className: "text-center text-xs text-gray-500", children: "No profiles available" })) }) })] }));
|
|
757
|
+
}
|
|
758
|
+
return (_jsxs("div", { className: "flex h-full flex-col", children: [_jsxs("div", { className: "flex items-center border-b border-gray-200 bg-gray-50", children: [_jsx("div", { className: "flex flex-1 min-w-0 overflow-hidden", children: Array.from(agentsGroupedByProfile.values()).map((profileGroup) => {
|
|
759
|
+
const profileKey = profileGroup.profileId || "general";
|
|
760
|
+
const activeAgent = profileGroup.agents.find((a) => a.id === activeAgentId);
|
|
761
|
+
const isActive = !!activeAgent;
|
|
762
|
+
const agentCount = profileGroup.agents.length;
|
|
763
|
+
const singleAgent = agentCount === 1 ? profileGroup.agents[0] : null;
|
|
764
|
+
const highestStatus = getHighestPriorityStatus(profileGroup.agents);
|
|
765
|
+
const statusConfig = getAgentStatusConfig({
|
|
766
|
+
status: highestStatus,
|
|
767
|
+
});
|
|
768
|
+
// Use agent name if: single agent OR active agent from this profile
|
|
769
|
+
const displayName = activeAgent
|
|
770
|
+
? activeAgent.name
|
|
771
|
+
: singleAgent
|
|
772
|
+
? singleAgent.name
|
|
773
|
+
: profileGroup.profileName;
|
|
774
|
+
// Always use profile group icon since all agents in the group share the same profile
|
|
775
|
+
const displayIcon = profileGroup.profileSvgIcon;
|
|
776
|
+
// For data-agent-id: prioritize singleAgent, then activeAgent
|
|
777
|
+
// This ensures a single agent always has its ID on the tab
|
|
778
|
+
const tabAgentId = singleAgent?.id || activeAgent?.id || "";
|
|
779
|
+
return (_jsx("div", { className: "min-w-0 shrink", "data-active": isActive ? "true" : "false", "data-agent-id": tabAgentId, children: _jsxs(Popover, { open: profileTabDropdownOpen === profileKey, onOpenChange: (open) => {
|
|
780
|
+
setProfileTabDropdownOpen(open ? profileKey : null);
|
|
781
|
+
}, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("div", { className: cn("flex min-w-0 cursor-pointer items-center gap-2 border-r border-gray-200 p-2 text-xs", isActive
|
|
782
|
+
? "border-b-white bg-white"
|
|
783
|
+
: "hover:bg-gray-100"), onClick: () => {
|
|
784
|
+
if (singleAgent) {
|
|
785
|
+
// Single agent: switch directly
|
|
786
|
+
setActiveAgentIdWithStorage(singleAgent.id);
|
|
787
|
+
}
|
|
788
|
+
// Multiple agents: popover will open via PopoverTrigger
|
|
789
|
+
}, children: [_jsx("div", { className: "flex-shrink-0", children: displayIcon ? (_jsx("div", { className: "flex h-[18px] w-[18px] items-center justify-center text-gray-500 [&>svg]:h-full [&>svg]:w-full", dangerouslySetInnerHTML: {
|
|
790
|
+
__html: displayIcon,
|
|
791
|
+
} })) : (_jsx(SecretAgentIcon, { size: 18, strokeWidth: 1, className: "text-gray-500" })) }), _jsx("span", { className: "truncate font-medium min-w-0 flex-1", children: displayName }), agentCount > 1 && (_jsx("div", { className: "flex-shrink-0 rounded-full bg-gray-200 px-1.5 py-0.5 text-[10px] leading-none font-medium text-gray-700", children: agentCount })), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("div", { className: cn("h-1.5 w-1.5 flex-shrink-0 rounded-full", statusConfig.color, statusConfig.shouldPulse && "animate-pulse"), title: statusConfig.label }) }), _jsx(TooltipContent, { children: statusConfig.label })] }), agentCount > 1 && (_jsx(ChevronDown, { className: "size-3 flex-shrink-0 text-gray-500", strokeWidth: 1 })), _jsx(SimpleIconButton, { onClick: (e) => singleAgent
|
|
792
|
+
? handleCloseAgent(singleAgent.id, e)
|
|
793
|
+
: handleCloseProfileAgents(profileGroup.agents, profileGroup.profileName, e), icon: _jsx(X, { className: "size-3", strokeWidth: 1 }), label: agentCount > 1
|
|
794
|
+
? `Close all ${agentCount} agents`
|
|
795
|
+
: "Close", className: "opacity-60 hover:opacity-100 flex-shrink-0", showTooltip: false })] }) }), agentCount > 1 && (_jsxs(PopoverContent, { className: "w-80 p-0", align: "start", children: [_jsxs("div", { className: "border-b border-gray-100 px-3 py-2 text-xs font-medium text-gray-500", children: [profileGroup.profileName, " Agents"] }), _jsx("div", { className: "max-h-64 overflow-y-auto", children: profileGroup.agents.map((agent) => {
|
|
796
|
+
const agentStatusConfig = getAgentStatusConfig(agent);
|
|
797
|
+
return (_jsx("div", { "data-agent-id": agent.id, className: cn("cursor-pointer border-b border-gray-50 px-3 py-2 hover:bg-gray-50", activeAgentId === agent.id && "bg-blue-50"), onClick: () => {
|
|
798
|
+
setActiveAgentIdWithStorage(agent.id);
|
|
799
|
+
setProfileTabDropdownOpen(null);
|
|
800
|
+
}, children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("div", { className: cn("h-2 w-2 flex-shrink-0 rounded-full", agentStatusConfig.color, agentStatusConfig.shouldPulse &&
|
|
801
|
+
"animate-pulse"), title: agentStatusConfig.label }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: "truncate text-xs font-medium text-gray-900", children: agent.name }), agent.description && (_jsx("div", { className: "truncate text-[11px] leading-tight text-gray-400", children: agent.description }))] }), _jsx(SimpleIconButton, { onClick: (e) => handleCloseAgent(agent.id, e), icon: _jsx(X, { className: "size-3", strokeWidth: 1 }), label: "Close", className: "opacity-60 hover:opacity-100" })] }) }, agent.id));
|
|
802
|
+
}) })] }))] }) }, profileKey));
|
|
803
|
+
}) }), activeAgentId !== null && (_jsx("div", { className: "flex items-center px-1", children: _jsx(SimpleIconButton, { onClick: () => setActiveAgentIdWithStorage(null), icon: _jsx(List, { className: "size-4", strokeWidth: 1 }), label: "Agent Overview", className: "text-gray-600 hover:text-gray-800" }) })), activeAgentId === null && (_jsx("div", { className: "flex items-center px-1", children: _jsxs("div", { className: cn("flex min-w-0 cursor-default items-center gap-2 border-r border-gray-200 p-2 text-xs", "border-b-white bg-white"), children: [_jsx(List, { className: "size-4 flex-shrink-0 text-gray-600", strokeWidth: 1 }), _jsx("span", { className: "truncate font-medium", children: "Overview" })] }) })), agents.length > 0 && (_jsx("div", { className: "flex items-center px-1", children: _jsxs(Popover, { open: menuPopoverOpen, onOpenChange: setMenuPopoverOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx(SimpleIconButton, { onClick: () => { }, icon: _jsx(MoreVertical, { className: "size-4", strokeWidth: 1 }), label: "Menu", className: "text-gray-600 hover:text-gray-800" }) }), _jsx(PopoverContent, { className: "w-48 p-0", align: "end", children: _jsx("div", { className: "py-1", children: getTabsMenuItems().map((item) => item.separator ? (_jsx("div", { className: "my-1 h-px bg-gray-100" }, item.id)) : (_jsx("button", { onClick: async (e) => {
|
|
804
|
+
if (item.command)
|
|
805
|
+
await item.command(e);
|
|
806
|
+
setMenuPopoverOpen(false);
|
|
807
|
+
}, disabled: !!item.disabled, className: "w-full px-3 py-2 text-left text-xs hover:bg-gray-50 disabled:cursor-not-allowed disabled:text-gray-400", children: item.label }, item.id))) }) })] }) })), _jsx("div", { className: "flex items-center px-1", children: _jsxs(Popover, { open: addPopoverOpen, onOpenChange: setAddPopoverOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx(SimpleIconButton, { onClick: () => { }, icon: _jsx(Plus, { className: "size-4", strokeWidth: 1 }), label: agents.length === 0 ? "Create Agent" : "Add Agent", className: "text-gray-600 hover:text-gray-800" }) }), _jsxs(PopoverContent, { className: "w-auto max-w-4xl p-4", align: "end", "data-testid": "agents-add-popover", children: [_jsxs("div", { className: "mb-3 text-center", children: [_jsx("div", { className: "text-sm font-semibold text-gray-900", children: "Select an AI Agent Profile" }), _jsx("div", { className: "text-xs text-gray-500", children: "Choose a profile to start a new agent" })] }), loadingProfiles ? (_jsx("div", { className: "text-xs text-gray-500", children: "Loading profiles..." })) : availableProfiles.length > 0 ? (_jsx(AgentProfilesOverview, { profiles: availableProfiles, onSelectProfile: createAgentWithSelectedProfile, className: "max-h-96 overflow-y-auto" })) : (_jsx("div", { className: "text-xs text-gray-500", children: "No profiles available" }))] })] }) }), closeButton && (_jsx("div", { className: "flex items-center px-2", children: closeButton }))] }), _jsx("div", { className: "relative flex-1", children: activeAgentId === null ? (
|
|
808
|
+
// Show AgentsView when no agent is selected
|
|
809
|
+
_jsx("div", { className: "absolute inset-0", children: _jsx(AgentsView, {}) })) : (
|
|
810
|
+
// Show agent terminals
|
|
811
|
+
agents.map((agent) => (_jsx("div", { className: cn("absolute inset-0", activeAgentId === agent.id ? "block" : "hidden"), children: _jsx(AgentTerminal, { agentStub: agent, initialMetadata: initialMetadataMap[agent.id], profiles: availableProfiles, isActive: activeAgentId === agent.id }) }, agent.id)))) })] }));
|
|
812
|
+
});
|
|
813
|
+
//# sourceMappingURL=Agents.js.map
|