@blocklet/pages-kit 0.2.433 → 0.2.434
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/lib/cjs/builtin/async/ai-runtime.js +17 -0
- package/lib/cjs/builtin/{async/ai-runtime/components/AgentInputField/LanguageField.js → components/LanguageField/index.js} +3 -3
- package/lib/cjs/builtin/{components.js → components/index.js} +1 -1
- package/lib/cjs/components/CustomComponentRenderer/context.js +13 -0
- package/lib/cjs/components/CustomComponentRenderer/index.js +5 -1
- package/lib/cjs/components/CustomComponentRenderer/state.js +20 -6
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/builtin/async/ai-runtime.js +1 -0
- package/lib/esm/builtin/{async/ai-runtime/components/AgentInputField/LanguageField.js → components/LanguageField/index.js} +2 -2
- package/lib/esm/builtin/components/index.js +1 -0
- package/lib/esm/components/CustomComponentRenderer/context.js +9 -0
- package/lib/esm/components/CustomComponentRenderer/index.js +5 -1
- package/lib/esm/components/CustomComponentRenderer/state.js +21 -7
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/types/builtin/async/ai-runtime.d.ts +1 -0
- package/lib/types/builtin/components/index.d.ts +1 -0
- package/lib/types/components/CustomComponentRenderer/context.d.ts +14 -0
- package/lib/types/components/CustomComponentRenderer/index.d.ts +1 -0
- package/lib/types/components/CustomComponentRenderer/state.d.ts +5 -1
- package/lib/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -5
- package/tsconfig.json +1 -1
- package/lib/cjs/builtin/async/ai-runtime/api/agent.js +0 -24
- package/lib/cjs/builtin/async/ai-runtime/api/asset.js +0 -25
- package/lib/cjs/builtin/async/ai-runtime/api/dataset.js +0 -134
- package/lib/cjs/builtin/async/ai-runtime/api/message.js +0 -46
- package/lib/cjs/builtin/async/ai-runtime/api/request.js +0 -74
- package/lib/cjs/builtin/async/ai-runtime/api/secret.js +0 -24
- package/lib/cjs/builtin/async/ai-runtime/api/session.js +0 -137
- package/lib/cjs/builtin/async/ai-runtime/components/ActionButton.js +0 -62
- package/lib/cjs/builtin/async/ai-runtime/components/AgentErrorBoundary.js +0 -34
- package/lib/cjs/builtin/async/ai-runtime/components/AgentInputField/BooleanField.js +0 -21
- package/lib/cjs/builtin/async/ai-runtime/components/AgentInputField/NumberField.js +0 -21
- package/lib/cjs/builtin/async/ai-runtime/components/AgentInputField/RadioField.js +0 -39
- package/lib/cjs/builtin/async/ai-runtime/components/AgentInputField/SelectField.js +0 -24
- package/lib/cjs/builtin/async/ai-runtime/components/AgentInputField/StringField.js +0 -35
- package/lib/cjs/builtin/async/ai-runtime/components/AgentInputField/index.js +0 -44
- package/lib/cjs/builtin/async/ai-runtime/components/AgentSettings/AgentSettingsDialog.js +0 -80
- package/lib/cjs/builtin/async/ai-runtime/components/GlobalLoading/index.js +0 -27
- package/lib/cjs/builtin/async/ai-runtime/components/GlobalLoading/state.js +0 -39
- package/lib/cjs/builtin/async/ai-runtime/components/Header/SimpleHeader.js +0 -49
- package/lib/cjs/builtin/async/ai-runtime/components/Layout/SimpleLayout.js +0 -21
- package/lib/cjs/builtin/async/ai-runtime/components/LoadingButton.js +0 -40
- package/lib/cjs/builtin/async/ai-runtime/components/MarkdownRenderer/index.js +0 -146
- package/lib/cjs/builtin/async/ai-runtime/components/MenuButton.js +0 -55
- package/lib/cjs/builtin/async/ai-runtime/components/OutputFieldContainer/index.js +0 -22
- package/lib/cjs/builtin/async/ai-runtime/components/PopperMenuButton/LoadingMenuItem.js +0 -49
- package/lib/cjs/builtin/async/ai-runtime/components/PopperMenuButton/index.js +0 -68
- package/lib/cjs/builtin/async/ai-runtime/components/RuntimeCommonProvider.js +0 -25
- package/lib/cjs/builtin/async/ai-runtime/components/ScrollView.js +0 -92
- package/lib/cjs/builtin/async/ai-runtime/components/ShareActions/Community.js +0 -6
- package/lib/cjs/builtin/async/ai-runtime/components/ShareActions/index.js +0 -255
- package/lib/cjs/builtin/async/ai-runtime/components/SocialShare.js +0 -108
- package/lib/cjs/builtin/async/ai-runtime/components/ThemeProvider.js +0 -191
- package/lib/cjs/builtin/async/ai-runtime/components/UserInfo.js +0 -55
- package/lib/cjs/builtin/async/ai-runtime/constants.js +0 -43
- package/lib/cjs/builtin/async/ai-runtime/contexts/ActiveAgent.js +0 -27
- package/lib/cjs/builtin/async/ai-runtime/contexts/ComponentPreferences.js +0 -31
- package/lib/cjs/builtin/async/ai-runtime/contexts/CurrentAgent.js +0 -34
- package/lib/cjs/builtin/async/ai-runtime/contexts/CurrentMessage.js +0 -18
- package/lib/cjs/builtin/async/ai-runtime/contexts/Identity.js +0 -36
- package/lib/cjs/builtin/async/ai-runtime/contexts/Runtime.js +0 -52
- package/lib/cjs/builtin/async/ai-runtime/error.js +0 -10
- package/lib/cjs/builtin/async/ai-runtime/hooks/use-agent-admin.js +0 -13
- package/lib/cjs/builtin/async/ai-runtime/hooks/use-appearances.js +0 -109
- package/lib/cjs/builtin/async/ai-runtime/hooks/use-header-menu.js +0 -50
- package/lib/cjs/builtin/async/ai-runtime/index.js +0 -83
- package/lib/cjs/builtin/async/ai-runtime/locales/index.js +0 -237
- package/lib/cjs/builtin/async/ai-runtime/runtime/ChatBotButton/index.js +0 -116
- package/lib/cjs/builtin/async/ai-runtime/runtime/Runtime/index.js +0 -48
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/AutoForm/index.js +0 -138
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageErrorView.js +0 -19
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageItemView.js +0 -186
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageMetadataRenderer.js +0 -24
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageSuggestedQuestions.js +0 -34
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/ChatOutput/ReferenceLinks.js +0 -11
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/ChatOutput/index.js +0 -24
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/GoogleSearch/GoogleSearchRelatedQuestionsView.js +0 -85
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/GoogleSearch/GoogleSearchSourcesView.js +0 -64
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/ImagesView/index.js +0 -30
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/MarkdownView/index.js +0 -13
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/OpeningQuestionsView/index.js +0 -46
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/OutputFieldView/type.js +0 -2
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/PhotoGallery/index.js +0 -65
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/PhotoGalleryItem/index.js +0 -150
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/ReferencedLinksView/index.js +0 -26
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/ShareView/index.js +0 -16
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleChat/BackgroundImage.js +0 -38
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleChat/DrawerOpenCloseIcon.js +0 -42
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleChat/InputsView.js +0 -94
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleChat/MessageView.js +0 -79
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleChat/MessagesView.js +0 -34
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleChat/OpeningMessageView.js +0 -45
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleChat/UserMessageView.js +0 -28
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleChat/index.js +0 -82
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleOutput/index.js +0 -69
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimplePage/index.js +0 -55
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/SuggestedQuestionsView/index.js +0 -54
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/Input.js +0 -189
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/Output.js +0 -252
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/Page.js +0 -300
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/components/CodePreview.js +0 -158
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/components/ConfirmDialog.js +0 -60
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/components/Loading.js +0 -153
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/components/PropertiesSetting.js +0 -80
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/components/TransparentTooltip.js +0 -25
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/components/UserQuestion.js +0 -68
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/contexts/V0Runtime.js +0 -56
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/index.js +0 -12
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/utils.js +0 -13
- package/lib/cjs/builtin/async/ai-runtime/state/agent.js +0 -58
- package/lib/cjs/builtin/async/ai-runtime/state/runtime.js +0 -48
- package/lib/cjs/builtin/async/ai-runtime/state/session.js +0 -415
- package/lib/cjs/builtin/async/ai-runtime/utils/agent-inputs.js +0 -14
- package/lib/cjs/builtin/async/ai-runtime/utils/download-image.js +0 -40
- package/lib/cjs/builtin/async/ai-runtime/utils/fonts.js +0 -35
- package/lib/cjs/builtin/async/ai-runtime/utils/map-right.js +0 -10
- package/lib/cjs/builtin/async/ai-runtime/utils/runtime-output-schema.js +0 -7
- package/lib/cjs/builtin/async/ai-runtime/utils/zustand.js +0 -9
- package/lib/esm/builtin/async/ai-runtime/api/agent.js +0 -21
- package/lib/esm/builtin/async/ai-runtime/api/asset.js +0 -22
- package/lib/esm/builtin/async/ai-runtime/api/dataset.js +0 -121
- package/lib/esm/builtin/async/ai-runtime/api/message.js +0 -42
- package/lib/esm/builtin/async/ai-runtime/api/request.js +0 -68
- package/lib/esm/builtin/async/ai-runtime/api/secret.js +0 -21
- package/lib/esm/builtin/async/ai-runtime/api/session.js +0 -128
- package/lib/esm/builtin/async/ai-runtime/components/ActionButton.js +0 -56
- package/lib/esm/builtin/async/ai-runtime/components/AgentErrorBoundary.js +0 -30
- package/lib/esm/builtin/async/ai-runtime/components/AgentInputField/BooleanField.js +0 -19
- package/lib/esm/builtin/async/ai-runtime/components/AgentInputField/NumberField.js +0 -19
- package/lib/esm/builtin/async/ai-runtime/components/AgentInputField/RadioField.js +0 -37
- package/lib/esm/builtin/async/ai-runtime/components/AgentInputField/SelectField.js +0 -22
- package/lib/esm/builtin/async/ai-runtime/components/AgentInputField/StringField.js +0 -33
- package/lib/esm/builtin/async/ai-runtime/components/AgentInputField/index.js +0 -38
- package/lib/esm/builtin/async/ai-runtime/components/AgentSettings/AgentSettingsDialog.js +0 -76
- package/lib/esm/builtin/async/ai-runtime/components/GlobalLoading/index.js +0 -22
- package/lib/esm/builtin/async/ai-runtime/components/GlobalLoading/state.js +0 -36
- package/lib/esm/builtin/async/ai-runtime/components/Header/SimpleHeader.js +0 -23
- package/lib/esm/builtin/async/ai-runtime/components/Layout/SimpleLayout.js +0 -18
- package/lib/esm/builtin/async/ai-runtime/components/LoadingButton.js +0 -38
- package/lib/esm/builtin/async/ai-runtime/components/MarkdownRenderer/index.js +0 -118
- package/lib/esm/builtin/async/ai-runtime/components/MenuButton.js +0 -52
- package/lib/esm/builtin/async/ai-runtime/components/OutputFieldContainer/index.js +0 -19
- package/lib/esm/builtin/async/ai-runtime/components/PopperMenuButton/LoadingMenuItem.js +0 -46
- package/lib/esm/builtin/async/ai-runtime/components/PopperMenuButton/index.js +0 -42
- package/lib/esm/builtin/async/ai-runtime/components/RuntimeCommonProvider.js +0 -18
- package/lib/esm/builtin/async/ai-runtime/components/ScrollView.js +0 -63
- package/lib/esm/builtin/async/ai-runtime/components/ShareActions/Community.js +0 -4
- package/lib/esm/builtin/async/ai-runtime/components/ShareActions/index.js +0 -226
- package/lib/esm/builtin/async/ai-runtime/components/SocialShare.js +0 -100
- package/lib/esm/builtin/async/ai-runtime/components/ThemeProvider.js +0 -185
- package/lib/esm/builtin/async/ai-runtime/components/UserInfo.js +0 -47
- package/lib/esm/builtin/async/ai-runtime/constants.js +0 -39
- package/lib/esm/builtin/async/ai-runtime/contexts/ActiveAgent.js +0 -23
- package/lib/esm/builtin/async/ai-runtime/contexts/ComponentPreferences.js +0 -24
- package/lib/esm/builtin/async/ai-runtime/contexts/CurrentAgent.js +0 -30
- package/lib/esm/builtin/async/ai-runtime/contexts/CurrentMessage.js +0 -14
- package/lib/esm/builtin/async/ai-runtime/contexts/Identity.js +0 -28
- package/lib/esm/builtin/async/ai-runtime/contexts/Runtime.js +0 -22
- package/lib/esm/builtin/async/ai-runtime/error.js +0 -6
- package/lib/esm/builtin/async/ai-runtime/hooks/use-agent-admin.js +0 -10
- package/lib/esm/builtin/async/ai-runtime/hooks/use-appearances.js +0 -103
- package/lib/esm/builtin/async/ai-runtime/hooks/use-header-menu.js +0 -44
- package/lib/esm/builtin/async/ai-runtime/index.js +0 -37
- package/lib/esm/builtin/async/ai-runtime/locales/index.js +0 -234
- package/lib/esm/builtin/async/ai-runtime/runtime/ChatBotButton/index.js +0 -87
- package/lib/esm/builtin/async/ai-runtime/runtime/Runtime/index.js +0 -19
- package/lib/esm/builtin/async/ai-runtime/runtime-components/AutoForm/index.js +0 -132
- package/lib/esm/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageErrorView.js +0 -13
- package/lib/esm/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageItemView.js +0 -157
- package/lib/esm/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageMetadataRenderer.js +0 -18
- package/lib/esm/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageSuggestedQuestions.js +0 -30
- package/lib/esm/builtin/async/ai-runtime/runtime-components/ChatOutput/ReferenceLinks.js +0 -8
- package/lib/esm/builtin/async/ai-runtime/runtime-components/ChatOutput/index.js +0 -18
- package/lib/esm/builtin/async/ai-runtime/runtime-components/GoogleSearch/GoogleSearchRelatedQuestionsView.js +0 -56
- package/lib/esm/builtin/async/ai-runtime/runtime-components/GoogleSearch/GoogleSearchSourcesView.js +0 -58
- package/lib/esm/builtin/async/ai-runtime/runtime-components/ImagesView/index.js +0 -24
- package/lib/esm/builtin/async/ai-runtime/runtime-components/MarkdownView/index.js +0 -7
- package/lib/esm/builtin/async/ai-runtime/runtime-components/OpeningQuestionsView/index.js +0 -40
- package/lib/esm/builtin/async/ai-runtime/runtime-components/OutputFieldView/type.js +0 -1
- package/lib/esm/builtin/async/ai-runtime/runtime-components/PhotoGallery/index.js +0 -59
- package/lib/esm/builtin/async/ai-runtime/runtime-components/PhotoGalleryItem/index.js +0 -144
- package/lib/esm/builtin/async/ai-runtime/runtime-components/ReferencedLinksView/index.js +0 -20
- package/lib/esm/builtin/async/ai-runtime/runtime-components/ShareView/index.js +0 -10
- package/lib/esm/builtin/async/ai-runtime/runtime-components/SimpleChat/BackgroundImage.js +0 -35
- package/lib/esm/builtin/async/ai-runtime/runtime-components/SimpleChat/DrawerOpenCloseIcon.js +0 -39
- package/lib/esm/builtin/async/ai-runtime/runtime-components/SimpleChat/InputsView.js +0 -65
- package/lib/esm/builtin/async/ai-runtime/runtime-components/SimpleChat/MessageView.js +0 -50
- package/lib/esm/builtin/async/ai-runtime/runtime-components/SimpleChat/MessagesView.js +0 -28
- package/lib/esm/builtin/async/ai-runtime/runtime-components/SimpleChat/OpeningMessageView.js +0 -40
- package/lib/esm/builtin/async/ai-runtime/runtime-components/SimpleChat/UserMessageView.js +0 -22
- package/lib/esm/builtin/async/ai-runtime/runtime-components/SimpleChat/index.js +0 -53
- package/lib/esm/builtin/async/ai-runtime/runtime-components/SimpleOutput/index.js +0 -40
- package/lib/esm/builtin/async/ai-runtime/runtime-components/SimplePage/index.js +0 -49
- package/lib/esm/builtin/async/ai-runtime/runtime-components/SuggestedQuestionsView/index.js +0 -48
- package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/Input.js +0 -183
- package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/Output.js +0 -246
- package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/Page.js +0 -294
- package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/components/CodePreview.js +0 -149
- package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/components/ConfirmDialog.js +0 -55
- package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/components/Loading.js +0 -146
- package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/components/PropertiesSetting.js +0 -75
- package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/components/TransparentTooltip.js +0 -23
- package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/components/UserQuestion.js +0 -42
- package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/contexts/V0Runtime.js +0 -52
- package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/index.js +0 -3
- package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/utils.js +0 -9
- package/lib/esm/builtin/async/ai-runtime/state/agent.js +0 -55
- package/lib/esm/builtin/async/ai-runtime/state/runtime.js +0 -45
- package/lib/esm/builtin/async/ai-runtime/state/session.js +0 -408
- package/lib/esm/builtin/async/ai-runtime/utils/agent-inputs.js +0 -10
- package/lib/esm/builtin/async/ai-runtime/utils/download-image.js +0 -36
- package/lib/esm/builtin/async/ai-runtime/utils/fonts.js +0 -32
- package/lib/esm/builtin/async/ai-runtime/utils/map-right.js +0 -7
- package/lib/esm/builtin/async/ai-runtime/utils/runtime-output-schema.js +0 -4
- package/lib/esm/builtin/async/ai-runtime/utils/zustand.js +0 -6
- package/lib/esm/builtin/components.js +0 -1
- package/lib/types/builtin/async/ai-runtime/api/agent.d.ts +0 -51
- package/lib/types/builtin/async/ai-runtime/api/asset.d.ts +0 -16
- package/lib/types/builtin/async/ai-runtime/api/dataset.d.ts +0 -39
- package/lib/types/builtin/async/ai-runtime/api/message.d.ts +0 -35
- package/lib/types/builtin/async/ai-runtime/api/request.d.ts +0 -12
- package/lib/types/builtin/async/ai-runtime/api/secret.d.ts +0 -12
- package/lib/types/builtin/async/ai-runtime/api/session.d.ts +0 -61
- package/lib/types/builtin/async/ai-runtime/components/ActionButton.d.ts +0 -14
- package/lib/types/builtin/async/ai-runtime/components/AgentErrorBoundary.d.ts +0 -7
- package/lib/types/builtin/async/ai-runtime/components/AgentInputField/BooleanField.d.ts +0 -8
- package/lib/types/builtin/async/ai-runtime/components/AgentInputField/NumberField.d.ts +0 -8
- package/lib/types/builtin/async/ai-runtime/components/AgentInputField/RadioField.d.ts +0 -8
- package/lib/types/builtin/async/ai-runtime/components/AgentInputField/SelectField.d.ts +0 -8
- package/lib/types/builtin/async/ai-runtime/components/AgentInputField/StringField.d.ts +0 -8
- package/lib/types/builtin/async/ai-runtime/components/AgentInputField/index.d.ts +0 -7
- package/lib/types/builtin/async/ai-runtime/components/AgentSettings/AgentSettingsDialog.d.ts +0 -10
- package/lib/types/builtin/async/ai-runtime/components/GlobalLoading/index.d.ts +0 -3
- package/lib/types/builtin/async/ai-runtime/components/GlobalLoading/state.d.ts +0 -10
- package/lib/types/builtin/async/ai-runtime/components/Header/SimpleHeader.d.ts +0 -5
- package/lib/types/builtin/async/ai-runtime/components/Layout/SimpleLayout.d.ts +0 -2
- package/lib/types/builtin/async/ai-runtime/components/LoadingButton.d.ts +0 -3
- package/lib/types/builtin/async/ai-runtime/components/MarkdownRenderer/index.d.ts +0 -2
- package/lib/types/builtin/async/ai-runtime/components/MenuButton.d.ts +0 -10
- package/lib/types/builtin/async/ai-runtime/components/OutputFieldContainer/index.d.ts +0 -5
- package/lib/types/builtin/async/ai-runtime/components/PopperMenuButton/LoadingMenuItem.d.ts +0 -5
- package/lib/types/builtin/async/ai-runtime/components/PopperMenuButton/index.d.ts +0 -6
- package/lib/types/builtin/async/ai-runtime/components/RuntimeCommonProvider.d.ts +0 -7
- package/lib/types/builtin/async/ai-runtime/components/ScrollView.d.ts +0 -10
- package/lib/types/builtin/async/ai-runtime/components/ShareActions/Community.d.ts +0 -4
- package/lib/types/builtin/async/ai-runtime/components/ShareActions/index.d.ts +0 -2
- package/lib/types/builtin/async/ai-runtime/components/SocialShare.d.ts +0 -20
- package/lib/types/builtin/async/ai-runtime/components/ThemeProvider.d.ts +0 -4
- package/lib/types/builtin/async/ai-runtime/components/UserInfo.d.ts +0 -18
- package/lib/types/builtin/async/ai-runtime/constants.d.ts +0 -21
- package/lib/types/builtin/async/ai-runtime/contexts/ActiveAgent.d.ts +0 -9
- package/lib/types/builtin/async/ai-runtime/contexts/ComponentPreferences.d.ts +0 -11
- package/lib/types/builtin/async/ai-runtime/contexts/CurrentAgent.d.ts +0 -16
- package/lib/types/builtin/async/ai-runtime/contexts/CurrentMessage.d.ts +0 -15
- package/lib/types/builtin/async/ai-runtime/contexts/Identity.d.ts +0 -16
- package/lib/types/builtin/async/ai-runtime/contexts/Runtime.d.ts +0 -4
- package/lib/types/builtin/async/ai-runtime/error.d.ts +0 -4
- package/lib/types/builtin/async/ai-runtime/hooks/use-agent-admin.d.ts +0 -2
- package/lib/types/builtin/async/ai-runtime/hooks/use-appearances.d.ts +0 -78
- package/lib/types/builtin/async/ai-runtime/hooks/use-header-menu.d.ts +0 -1
- package/lib/types/builtin/async/ai-runtime/index.d.ts +0 -36
- package/lib/types/builtin/async/ai-runtime/locales/index.d.ts +0 -210
- package/lib/types/builtin/async/ai-runtime/runtime/ChatBotButton/index.d.ts +0 -5
- package/lib/types/builtin/async/ai-runtime/runtime/Runtime/index.d.ts +0 -5
- package/lib/types/builtin/async/ai-runtime/runtime-components/AutoForm/index.d.ts +0 -7
- package/lib/types/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageErrorView.d.ts +0 -4
- package/lib/types/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageItemView.d.ts +0 -12
- package/lib/types/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageMetadataRenderer.d.ts +0 -4
- package/lib/types/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageSuggestedQuestions.d.ts +0 -7
- package/lib/types/builtin/async/ai-runtime/runtime-components/ChatOutput/ReferenceLinks.d.ts +0 -4
- package/lib/types/builtin/async/ai-runtime/runtime-components/ChatOutput/index.d.ts +0 -4
- package/lib/types/builtin/async/ai-runtime/runtime-components/GoogleSearch/GoogleSearchRelatedQuestionsView.d.ts +0 -4
- package/lib/types/builtin/async/ai-runtime/runtime-components/GoogleSearch/GoogleSearchSourcesView.d.ts +0 -2
- package/lib/types/builtin/async/ai-runtime/runtime-components/ImagesView/index.d.ts +0 -2
- package/lib/types/builtin/async/ai-runtime/runtime-components/MarkdownView/index.d.ts +0 -5
- package/lib/types/builtin/async/ai-runtime/runtime-components/OpeningQuestionsView/index.d.ts +0 -2
- package/lib/types/builtin/async/ai-runtime/runtime-components/OutputFieldView/type.d.ts +0 -5
- package/lib/types/builtin/async/ai-runtime/runtime-components/PhotoGallery/index.d.ts +0 -3
- package/lib/types/builtin/async/ai-runtime/runtime-components/PhotoGalleryItem/index.d.ts +0 -1
- package/lib/types/builtin/async/ai-runtime/runtime-components/ReferencedLinksView/index.d.ts +0 -2
- package/lib/types/builtin/async/ai-runtime/runtime-components/ShareView/index.d.ts +0 -2
- package/lib/types/builtin/async/ai-runtime/runtime-components/SimpleChat/BackgroundImage.d.ts +0 -1
- package/lib/types/builtin/async/ai-runtime/runtime-components/SimpleChat/DrawerOpenCloseIcon.d.ts +0 -4
- package/lib/types/builtin/async/ai-runtime/runtime-components/SimpleChat/InputsView.d.ts +0 -2
- package/lib/types/builtin/async/ai-runtime/runtime-components/SimpleChat/MessageView.d.ts +0 -9
- package/lib/types/builtin/async/ai-runtime/runtime-components/SimpleChat/MessagesView.d.ts +0 -2
- package/lib/types/builtin/async/ai-runtime/runtime-components/SimpleChat/OpeningMessageView.d.ts +0 -4
- package/lib/types/builtin/async/ai-runtime/runtime-components/SimpleChat/UserMessageView.d.ts +0 -1
- package/lib/types/builtin/async/ai-runtime/runtime-components/SimpleChat/index.d.ts +0 -16
- package/lib/types/builtin/async/ai-runtime/runtime-components/SimpleOutput/index.d.ts +0 -1
- package/lib/types/builtin/async/ai-runtime/runtime-components/SimplePage/index.d.ts +0 -6
- package/lib/types/builtin/async/ai-runtime/runtime-components/SuggestedQuestionsView/index.d.ts +0 -4
- package/lib/types/builtin/async/ai-runtime/runtime-components/V0/Input.d.ts +0 -7
- package/lib/types/builtin/async/ai-runtime/runtime-components/V0/Output.d.ts +0 -1
- package/lib/types/builtin/async/ai-runtime/runtime-components/V0/Page.d.ts +0 -1
- package/lib/types/builtin/async/ai-runtime/runtime-components/V0/components/CodePreview.d.ts +0 -20
- package/lib/types/builtin/async/ai-runtime/runtime-components/V0/components/ConfirmDialog.d.ts +0 -5
- package/lib/types/builtin/async/ai-runtime/runtime-components/V0/components/Loading.d.ts +0 -3
- package/lib/types/builtin/async/ai-runtime/runtime-components/V0/components/PropertiesSetting.d.ts +0 -5
- package/lib/types/builtin/async/ai-runtime/runtime-components/V0/components/TransparentTooltip.d.ts +0 -3
- package/lib/types/builtin/async/ai-runtime/runtime-components/V0/components/UserQuestion.d.ts +0 -3
- package/lib/types/builtin/async/ai-runtime/runtime-components/V0/contexts/V0Runtime.d.ts +0 -17
- package/lib/types/builtin/async/ai-runtime/runtime-components/V0/index.d.ts +0 -3
- package/lib/types/builtin/async/ai-runtime/runtime-components/V0/utils.d.ts +0 -7
- package/lib/types/builtin/async/ai-runtime/state/agent.d.ts +0 -12
- package/lib/types/builtin/async/ai-runtime/state/runtime.d.ts +0 -14
- package/lib/types/builtin/async/ai-runtime/state/session.d.ts +0 -60
- package/lib/types/builtin/async/ai-runtime/utils/agent-inputs.d.ts +0 -5
- package/lib/types/builtin/async/ai-runtime/utils/download-image.d.ts +0 -4
- package/lib/types/builtin/async/ai-runtime/utils/fonts.d.ts +0 -5
- package/lib/types/builtin/async/ai-runtime/utils/map-right.d.ts +0 -1
- package/lib/types/builtin/async/ai-runtime/utils/runtime-output-schema.d.ts +0 -3
- package/lib/types/builtin/async/ai-runtime/utils/zustand.d.ts +0 -2
- package/lib/types/builtin/components.d.ts +0 -1
- /package/lib/cjs/builtin/{async/ai-runtime/utils → components/LanguageField}/languages.js +0 -0
- /package/lib/esm/builtin/{async/ai-runtime/utils → components/LanguageField}/languages.js +0 -0
- /package/lib/types/builtin/{async/ai-runtime/components/AgentInputField/LanguageField.d.ts → components/LanguageField/index.d.ts} +0 -0
- /package/lib/types/builtin/{async/ai-runtime/utils → components/LanguageField}/languages.d.ts +0 -0
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.useHeaderMenu = useHeaderMenu;
|
|
16
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
17
|
-
const react_1 = require("@iconify/react");
|
|
18
|
-
const material_1 = require("@mui/material");
|
|
19
|
-
const locale_1 = require("../../../locale");
|
|
20
|
-
const header_1 = require("../../../page/header");
|
|
21
|
-
const AgentSettingsDialog_1 = require("../components/AgentSettings/AgentSettingsDialog");
|
|
22
|
-
const PopperMenuButton_1 = __importDefault(require("../components/PopperMenuButton"));
|
|
23
|
-
const LoadingMenuItem_1 = __importDefault(require("../components/PopperMenuButton/LoadingMenuItem"));
|
|
24
|
-
const SocialShare_1 = __importDefault(require("../components/SocialShare"));
|
|
25
|
-
const ComponentPreferences_1 = require("../contexts/ComponentPreferences");
|
|
26
|
-
const runtime_1 = require("../state/runtime");
|
|
27
|
-
const session_1 = require("../state/session");
|
|
28
|
-
const use_agent_admin_1 = require("./use-agent-admin");
|
|
29
|
-
function useHeaderMenu() {
|
|
30
|
-
var _a, _b, _c;
|
|
31
|
-
const { t, locale } = (0, locale_1.useLocaleContext)();
|
|
32
|
-
const { hideHeaderMenuButton } = (_a = (0, ComponentPreferences_1.useComponentPreferences)()) !== null && _a !== void 0 ? _a : {};
|
|
33
|
-
const clearSession = (0, session_1.useSessionState)((s) => s.clearSession);
|
|
34
|
-
const { agent } = (0, runtime_1.useRuntimeState)();
|
|
35
|
-
const isAdmin = (0, use_agent_admin_1.useIsAgentAdmin)(agent);
|
|
36
|
-
const hasSettings = agent.config.secrets.length > 0;
|
|
37
|
-
const shareContent = ((_b = agent.project) === null || _b === void 0 ? void 0 : _b.name) ? `${agent.project.name}\n\n${(_c = agent.project) === null || _c === void 0 ? void 0 : _c.description}` : '';
|
|
38
|
-
(0, header_1.useHeader)(() => hideHeaderMenuButton
|
|
39
|
-
? {}
|
|
40
|
-
: {
|
|
41
|
-
addons: (exists) => [
|
|
42
|
-
(0, jsx_runtime_1.jsx)(PopperMenuButton_1.default, { "data-testid": "aigne-runtime-header-menu-button", component: material_1.IconButton, PopperProps: { placement: 'bottom-end', sx: { zIndex: 'appBar' } }, menus: [
|
|
43
|
-
hasSettings && isAdmin && ((0, jsx_runtime_1.jsxs)(material_1.MenuItem, { onClick: () => AgentSettingsDialog_1.settingsDialogState.getState().open(), children: [(0, jsx_runtime_1.jsx)(material_1.ListItemIcon, { children: (0, jsx_runtime_1.jsx)(react_1.Icon, { icon: "tabler:settings" }) }), t('settings')] }, "settings")),
|
|
44
|
-
(0, jsx_runtime_1.jsxs)(LoadingMenuItem_1.default, { onClick: () => __awaiter(this, void 0, void 0, function* () { return clearSession(); }), children: [(0, jsx_runtime_1.jsx)(material_1.ListItemIcon, { children: (0, jsx_runtime_1.jsx)(react_1.Icon, { icon: "mingcute:broom-line" }) }), t('clearSession')] }, "clearSession"),
|
|
45
|
-
], children: (0, jsx_runtime_1.jsx)(react_1.Icon, { icon: "tabler:dots" }) }),
|
|
46
|
-
(0, jsx_runtime_1.jsx)(SocialShare_1.default, { "data-testid": "aigen-runtime-header-share-button", content: shareContent }),
|
|
47
|
-
...exists,
|
|
48
|
-
],
|
|
49
|
-
}, [locale, hideHeaderMenuButton]);
|
|
50
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
-
};
|
|
19
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.NFTDisplay = exports.MarkdownView = exports.GoogleSearchSourcesView = exports.GoogleSearchRelatedQuestionsView = exports.ImagesView = exports.OpeningQuestionsView = exports.ShareView = exports.ReferencedLinksView = exports.SuggestedQuestionsView = exports.PhotoGalleryItem = exports.ChatOutput = exports.SimpleOutput = exports.AutoForm = exports.PhotoGallery = exports.SimpleChat = exports.SimplePage = exports.ChatBotButton = exports.Runtime = exports.useAppearances = exports.ActiveAgentProvider = exports.CurrentMessageProvider = exports.CurrentAgentProvider = exports.ComponentPreferencesProvider = exports.RuntimeProvider = exports.AgentErrorBoundary = exports.runAgent = void 0;
|
|
21
|
-
var session_1 = require("./api/session");
|
|
22
|
-
Object.defineProperty(exports, "runAgent", { enumerable: true, get: function () { return session_1.runAgent; } });
|
|
23
|
-
var AgentErrorBoundary_1 = require("./components/AgentErrorBoundary");
|
|
24
|
-
Object.defineProperty(exports, "AgentErrorBoundary", { enumerable: true, get: function () { return __importDefault(AgentErrorBoundary_1).default; } });
|
|
25
|
-
__exportStar(require("./components/AgentErrorBoundary"), exports);
|
|
26
|
-
__exportStar(require("./contexts/Runtime"), exports);
|
|
27
|
-
var Runtime_1 = require("./contexts/Runtime");
|
|
28
|
-
Object.defineProperty(exports, "RuntimeProvider", { enumerable: true, get: function () { return __importDefault(Runtime_1).default; } });
|
|
29
|
-
__exportStar(require("./contexts/ComponentPreferences"), exports);
|
|
30
|
-
var ComponentPreferences_1 = require("./contexts/ComponentPreferences");
|
|
31
|
-
Object.defineProperty(exports, "ComponentPreferencesProvider", { enumerable: true, get: function () { return __importDefault(ComponentPreferences_1).default; } });
|
|
32
|
-
__exportStar(require("./contexts/CurrentAgent"), exports);
|
|
33
|
-
var CurrentAgent_1 = require("./contexts/CurrentAgent");
|
|
34
|
-
Object.defineProperty(exports, "CurrentAgentProvider", { enumerable: true, get: function () { return __importDefault(CurrentAgent_1).default; } });
|
|
35
|
-
__exportStar(require("./contexts/CurrentMessage"), exports);
|
|
36
|
-
var CurrentMessage_1 = require("./contexts/CurrentMessage");
|
|
37
|
-
Object.defineProperty(exports, "CurrentMessageProvider", { enumerable: true, get: function () { return __importDefault(CurrentMessage_1).default; } });
|
|
38
|
-
__exportStar(require("./contexts/ActiveAgent"), exports);
|
|
39
|
-
var ActiveAgent_1 = require("./contexts/ActiveAgent");
|
|
40
|
-
Object.defineProperty(exports, "ActiveAgentProvider", { enumerable: true, get: function () { return __importDefault(ActiveAgent_1).default; } });
|
|
41
|
-
var use_appearances_1 = require("./hooks/use-appearances");
|
|
42
|
-
Object.defineProperty(exports, "useAppearances", { enumerable: true, get: function () { return __importDefault(use_appearances_1).default; } });
|
|
43
|
-
__exportStar(require("./hooks/use-appearances"), exports);
|
|
44
|
-
__exportStar(require("./state/runtime"), exports);
|
|
45
|
-
__exportStar(require("./state/session"), exports);
|
|
46
|
-
var Runtime_2 = require("./runtime/Runtime");
|
|
47
|
-
Object.defineProperty(exports, "Runtime", { enumerable: true, get: function () { return __importDefault(Runtime_2).default; } });
|
|
48
|
-
var ChatBotButton_1 = require("./runtime/ChatBotButton");
|
|
49
|
-
Object.defineProperty(exports, "ChatBotButton", { enumerable: true, get: function () { return __importDefault(ChatBotButton_1).default; } });
|
|
50
|
-
var SimplePage_1 = require("./runtime-components/SimplePage");
|
|
51
|
-
Object.defineProperty(exports, "SimplePage", { enumerable: true, get: function () { return __importDefault(SimplePage_1).default; } });
|
|
52
|
-
var SimpleChat_1 = require("./runtime-components/SimpleChat");
|
|
53
|
-
Object.defineProperty(exports, "SimpleChat", { enumerable: true, get: function () { return __importDefault(SimpleChat_1).default; } });
|
|
54
|
-
var PhotoGallery_1 = require("./runtime-components/PhotoGallery");
|
|
55
|
-
Object.defineProperty(exports, "PhotoGallery", { enumerable: true, get: function () { return __importDefault(PhotoGallery_1).default; } });
|
|
56
|
-
var AutoForm_1 = require("./runtime-components/AutoForm");
|
|
57
|
-
Object.defineProperty(exports, "AutoForm", { enumerable: true, get: function () { return __importDefault(AutoForm_1).default; } });
|
|
58
|
-
var SimpleOutput_1 = require("./runtime-components/SimpleOutput");
|
|
59
|
-
Object.defineProperty(exports, "SimpleOutput", { enumerable: true, get: function () { return __importDefault(SimpleOutput_1).default; } });
|
|
60
|
-
var ChatOutput_1 = require("./runtime-components/ChatOutput");
|
|
61
|
-
Object.defineProperty(exports, "ChatOutput", { enumerable: true, get: function () { return __importDefault(ChatOutput_1).default; } });
|
|
62
|
-
var PhotoGalleryItem_1 = require("./runtime-components/PhotoGalleryItem");
|
|
63
|
-
Object.defineProperty(exports, "PhotoGalleryItem", { enumerable: true, get: function () { return __importDefault(PhotoGalleryItem_1).default; } });
|
|
64
|
-
var SuggestedQuestionsView_1 = require("./runtime-components/SuggestedQuestionsView");
|
|
65
|
-
Object.defineProperty(exports, "SuggestedQuestionsView", { enumerable: true, get: function () { return __importDefault(SuggestedQuestionsView_1).default; } });
|
|
66
|
-
var ReferencedLinksView_1 = require("./runtime-components/ReferencedLinksView");
|
|
67
|
-
Object.defineProperty(exports, "ReferencedLinksView", { enumerable: true, get: function () { return __importDefault(ReferencedLinksView_1).default; } });
|
|
68
|
-
var ShareView_1 = require("./runtime-components/ShareView");
|
|
69
|
-
Object.defineProperty(exports, "ShareView", { enumerable: true, get: function () { return __importDefault(ShareView_1).default; } });
|
|
70
|
-
var OpeningQuestionsView_1 = require("./runtime-components/OpeningQuestionsView");
|
|
71
|
-
Object.defineProperty(exports, "OpeningQuestionsView", { enumerable: true, get: function () { return __importDefault(OpeningQuestionsView_1).default; } });
|
|
72
|
-
var ImagesView_1 = require("./runtime-components/ImagesView");
|
|
73
|
-
Object.defineProperty(exports, "ImagesView", { enumerable: true, get: function () { return __importDefault(ImagesView_1).default; } });
|
|
74
|
-
var GoogleSearchRelatedQuestionsView_1 = require("./runtime-components/GoogleSearch/GoogleSearchRelatedQuestionsView");
|
|
75
|
-
Object.defineProperty(exports, "GoogleSearchRelatedQuestionsView", { enumerable: true, get: function () { return __importDefault(GoogleSearchRelatedQuestionsView_1).default; } });
|
|
76
|
-
var GoogleSearchSourcesView_1 = require("./runtime-components/GoogleSearch/GoogleSearchSourcesView");
|
|
77
|
-
Object.defineProperty(exports, "GoogleSearchSourcesView", { enumerable: true, get: function () { return __importDefault(GoogleSearchSourcesView_1).default; } });
|
|
78
|
-
var MarkdownView_1 = require("./runtime-components/MarkdownView");
|
|
79
|
-
Object.defineProperty(exports, "MarkdownView", { enumerable: true, get: function () { return __importDefault(MarkdownView_1).default; } });
|
|
80
|
-
var NFTDisplay_1 = require("@arcblock/ux/lib/NFTDisplay");
|
|
81
|
-
Object.defineProperty(exports, "NFTDisplay", { enumerable: true, get: function () { return __importDefault(NFTDisplay_1).default; } });
|
|
82
|
-
// only use to debug, should be removed when PR
|
|
83
|
-
__exportStar(require("./runtime-components/V0"), exports);
|
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.translations = void 0;
|
|
4
|
-
exports.translations = {
|
|
5
|
-
en: {
|
|
6
|
-
by: 'By',
|
|
7
|
-
socialShare: {
|
|
8
|
-
title: 'Share',
|
|
9
|
-
shareToX: 'Share to X',
|
|
10
|
-
shareToTelegram: 'Share to Telegram',
|
|
11
|
-
shareToReddit: 'Share to Reddit',
|
|
12
|
-
shareToWeibo: 'Share to Weibo',
|
|
13
|
-
shareToFacebook: 'Share to Facebook',
|
|
14
|
-
shareToLinkedin: 'Share to Linkedin',
|
|
15
|
-
copyLink: 'Copy Link',
|
|
16
|
-
shareToCommunity: 'Share to ArcBlock Community',
|
|
17
|
-
},
|
|
18
|
-
photoWall: {
|
|
19
|
-
dialog: {
|
|
20
|
-
title: 'AI Art Image',
|
|
21
|
-
prompt: 'Prompt',
|
|
22
|
-
metadata: 'Metadata',
|
|
23
|
-
author: 'Author',
|
|
24
|
-
time: 'Creation Time',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
questionPlaceholder: 'Ask Anything...',
|
|
28
|
-
parameters: 'Parameters',
|
|
29
|
-
parametersTitle: 'Tell me what do you want?',
|
|
30
|
-
parametersSetting: 'Setting',
|
|
31
|
-
clearSession: 'Clear Session',
|
|
32
|
-
generate: 'Generate',
|
|
33
|
-
startChat: 'Start Chat',
|
|
34
|
-
collections: 'Collections',
|
|
35
|
-
collection: 'Collection',
|
|
36
|
-
collectionName: 'Collection Name',
|
|
37
|
-
document: 'Document',
|
|
38
|
-
rename: 'Rename',
|
|
39
|
-
delete: 'Delete',
|
|
40
|
-
confirmDelete: 'Confirm Delete?',
|
|
41
|
-
confirm: 'Confirm',
|
|
42
|
-
noData: 'No {data} yet',
|
|
43
|
-
createObject: 'Create {object}',
|
|
44
|
-
title: 'Title',
|
|
45
|
-
titlePlaceholder: 'Title',
|
|
46
|
-
content: 'Content',
|
|
47
|
-
contentPlaceholder: 'Write anything...',
|
|
48
|
-
cancel: 'Cancel',
|
|
49
|
-
save: 'Save',
|
|
50
|
-
saved: 'Saved',
|
|
51
|
-
edit: 'Edit',
|
|
52
|
-
chat: 'Chat',
|
|
53
|
-
subscribeNow: 'Subscribe Now',
|
|
54
|
-
subscribe: 'Subscribe',
|
|
55
|
-
subscribed: 'Subscribed',
|
|
56
|
-
requireNewSubscription: `Thank you for using our service!
|
|
57
|
-
|
|
58
|
-
To get more features and exclusive content, please subscribe to our service. After subscribing, you will enjoy the following privileges:
|
|
59
|
-
|
|
60
|
-
- Unlock all features and tools
|
|
61
|
-
- Support us to continue to provide quality services
|
|
62
|
-
|
|
63
|
-
Pricing: {price} ABT/Message
|
|
64
|
-
|
|
65
|
-
Subscribe now to unlock more possibilities!`,
|
|
66
|
-
requireNewSubscriptionFooter: 'You need to subscribe to access this feature:',
|
|
67
|
-
thanksForSubscription: 'Thanks for subscribing, now you can start enjoying it!',
|
|
68
|
-
requireLogin: `Thank you for using our service!
|
|
69
|
-
|
|
70
|
-
In order to use our service properly, please click below to log in now!
|
|
71
|
-
`,
|
|
72
|
-
thanksForLogin: 'Now you can start experiencing it to the fullest!',
|
|
73
|
-
loginNow: 'Login Now',
|
|
74
|
-
clickTheButton: 'Click The Button 👉',
|
|
75
|
-
cleanSessionTip: 'Clean conversation messages',
|
|
76
|
-
poweredBy: 'Powered by',
|
|
77
|
-
selectPromptToStart: 'Select a prompt to get started',
|
|
78
|
-
history: 'History',
|
|
79
|
-
unnamed: 'Unnamed',
|
|
80
|
-
newObject: 'New {object}',
|
|
81
|
-
editObject: 'Edit {object}',
|
|
82
|
-
name: 'Name',
|
|
83
|
-
description: 'Description',
|
|
84
|
-
create: 'Create',
|
|
85
|
-
back: 'Back',
|
|
86
|
-
unauthorized: 'Unauthorized',
|
|
87
|
-
unauthorizedDescription: 'Please log in to visit this page',
|
|
88
|
-
login: 'Login',
|
|
89
|
-
copy: 'Copy',
|
|
90
|
-
copied: 'Copied',
|
|
91
|
-
copyToClipboard: 'Copy to clipboard',
|
|
92
|
-
saveToNoteTip: 'Save to collection',
|
|
93
|
-
saveToNote: 'Save',
|
|
94
|
-
savedToNote: 'Saved as a new document',
|
|
95
|
-
uploadFile: 'Upload File',
|
|
96
|
-
submit: 'Submit',
|
|
97
|
-
send: 'Send',
|
|
98
|
-
session: 'Session',
|
|
99
|
-
loadMore: 'Load More',
|
|
100
|
-
v0: {
|
|
101
|
-
title: 'Mock 0',
|
|
102
|
-
description: 'Mock 0 is an AI-based code tool that can help you generate code quickly.',
|
|
103
|
-
noData: 'No conversation information yet, click the button below to start generating!',
|
|
104
|
-
deleteSessionTitle: 'Delete Conversation Information',
|
|
105
|
-
deleteSessionTip: 'Are you sure you want to delete this Conversation Information?',
|
|
106
|
-
propertiesSetting: 'Properties Setting',
|
|
107
|
-
propertiesSettingTip: 'This function is used for debugging components and does not affect the final code',
|
|
108
|
-
cannotSetPropertiesTip: 'Failed to parse PROPERTIES_SCHEMA, this code cannot be set properties',
|
|
109
|
-
codePreview: 'Code Preview',
|
|
110
|
-
codePreviewTip: 'Here is the code preview, you can view the generated code, and editing is not supported yet.',
|
|
111
|
-
hideSlider: 'Hide Versions',
|
|
112
|
-
showSlider: 'Show Versions',
|
|
113
|
-
retryTip: 'Agent not enough power, please try again later...',
|
|
114
|
-
retry: 'Try Again',
|
|
115
|
-
errorCodeTip: 'Agent found some syntax errors in the code, and want to try again...',
|
|
116
|
-
},
|
|
117
|
-
settings: 'Settings',
|
|
118
|
-
setup: 'Setup',
|
|
119
|
-
docLink: 'Document Link',
|
|
120
|
-
},
|
|
121
|
-
zh: {
|
|
122
|
-
by: '作者',
|
|
123
|
-
socialShare: {
|
|
124
|
-
title: '分享',
|
|
125
|
-
shareToX: '分享到 X',
|
|
126
|
-
shareToTelegram: '分享到 Telegram',
|
|
127
|
-
shareToReddit: '分享到 Reddit',
|
|
128
|
-
shareToWeibo: '分享到 微博',
|
|
129
|
-
shareToFacebook: '分享到 Facebook',
|
|
130
|
-
shareToLinkedin: '分享到 Linkedin',
|
|
131
|
-
copyLink: '复制链接',
|
|
132
|
-
shareToCommunity: '分享到 ArcBlock 社区',
|
|
133
|
-
},
|
|
134
|
-
photoWall: {
|
|
135
|
-
dialog: {
|
|
136
|
-
title: 'AI 艺术图片',
|
|
137
|
-
prompt: '提示词',
|
|
138
|
-
metadata: '元数据',
|
|
139
|
-
author: '作者',
|
|
140
|
-
time: '创作时间',
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
questionPlaceholder: '问点什么...',
|
|
144
|
-
parameters: '参数',
|
|
145
|
-
parametersTitle: '告诉我你想要什么?',
|
|
146
|
-
parametersSetting: '设置',
|
|
147
|
-
clearSession: '清空会话',
|
|
148
|
-
generate: '生成',
|
|
149
|
-
startChat: '开始对话',
|
|
150
|
-
collections: '知识库',
|
|
151
|
-
collection: '知识库',
|
|
152
|
-
collectionName: '知识库名称',
|
|
153
|
-
document: '文档',
|
|
154
|
-
rename: '重命名',
|
|
155
|
-
delete: '删除',
|
|
156
|
-
confirmDelete: '确定删除?',
|
|
157
|
-
confirm: '确定',
|
|
158
|
-
noData: '暂无{data}',
|
|
159
|
-
createObject: '创建{object}',
|
|
160
|
-
title: '标题',
|
|
161
|
-
titlePlaceholder: '标题',
|
|
162
|
-
content: '内容',
|
|
163
|
-
contentPlaceholder: '写点什么吧...',
|
|
164
|
-
cancel: '取消',
|
|
165
|
-
save: '保存',
|
|
166
|
-
saved: '已保存',
|
|
167
|
-
edit: '编辑',
|
|
168
|
-
chat: '对话',
|
|
169
|
-
subscribeNow: '立即订阅',
|
|
170
|
-
subscribe: '订阅',
|
|
171
|
-
subscribed: '已订阅',
|
|
172
|
-
requireNewSubscription: `感谢您使用我们的服务!
|
|
173
|
-
|
|
174
|
-
为了获得更多功能和专属内容,请订阅我们的服务。订阅后,您将享有以下特权:
|
|
175
|
-
|
|
176
|
-
- 解锁全部功能和工具
|
|
177
|
-
- 支持我们持续提供优质服务
|
|
178
|
-
|
|
179
|
-
价格: {price} ABT/次对话
|
|
180
|
-
|
|
181
|
-
立即订阅以解锁更多可能性!`,
|
|
182
|
-
requireNewSubscriptionFooter: '您需要订阅才能访问此功能:',
|
|
183
|
-
thanksForSubscription: '感谢您的订阅,现在,您可以开始尽情体验了!',
|
|
184
|
-
requireLogin: `感谢您使用我们的服务!
|
|
185
|
-
|
|
186
|
-
为了能正常使用我们的服务,请点击下方立即登录!
|
|
187
|
-
`,
|
|
188
|
-
thanksForLogin: '现在,您可以开始尽情体验了!',
|
|
189
|
-
loginNow: '立即登录',
|
|
190
|
-
clickTheButton: '点我生成 👉',
|
|
191
|
-
cleanSessionTip: '清除会话消息记录',
|
|
192
|
-
poweredBy: '技术支持来自',
|
|
193
|
-
selectPromptToStart: '选择一个提示词开始吧',
|
|
194
|
-
history: '历史记录',
|
|
195
|
-
unnamed: '未命名',
|
|
196
|
-
newObject: '新建{object}',
|
|
197
|
-
editObject: '编辑{object}',
|
|
198
|
-
name: '名称',
|
|
199
|
-
description: '描述',
|
|
200
|
-
create: '创建',
|
|
201
|
-
back: '返回',
|
|
202
|
-
unauthorized: '未登录',
|
|
203
|
-
unauthorizedDescription: '请登录后访问该页面',
|
|
204
|
-
login: '登录',
|
|
205
|
-
copy: '复制',
|
|
206
|
-
copied: '已复制',
|
|
207
|
-
copyToClipboard: '复制到剪贴板',
|
|
208
|
-
saveToNoteTip: '保存到知识库',
|
|
209
|
-
saveToNote: '保存',
|
|
210
|
-
savedToNote: '已保存到知识库',
|
|
211
|
-
uploadFile: '上传文件',
|
|
212
|
-
submit: '提交',
|
|
213
|
-
send: '发送',
|
|
214
|
-
session: '会话',
|
|
215
|
-
loadMore: '加载更多',
|
|
216
|
-
v0: {
|
|
217
|
-
title: 'Mock 0',
|
|
218
|
-
description: 'Mock 0 是一个基于人工智能的代码工具,可以帮助您快速生成代码。',
|
|
219
|
-
noData: '暂无生成记录,点击下方按钮开始生成吧!',
|
|
220
|
-
deleteSessionTitle: '删除生成记录',
|
|
221
|
-
deleteSessionTip: '确定要删除此生成记录吗?',
|
|
222
|
-
propertiesSetting: '属性设置',
|
|
223
|
-
propertiesSettingTip: '此功能用于调试组件,不影响最终代码',
|
|
224
|
-
cannotSetPropertiesTip: '解析 PROPERTIES_SCHEMA 失败,此代码无法进行属性设置',
|
|
225
|
-
codePreview: '代码预览',
|
|
226
|
-
codePreviewTip: '以下是代码预览,您可以查看生成的代码,目前还不支持编辑。',
|
|
227
|
-
hideSlider: '隐藏版本历史',
|
|
228
|
-
showSlider: '显示版本历史',
|
|
229
|
-
retryTip: 'Agent 算力不足,请稍后重试...',
|
|
230
|
-
retry: '重试',
|
|
231
|
-
errorCodeTip: 'Agent 发现代码存在一些语法问题,请求重试...',
|
|
232
|
-
},
|
|
233
|
-
settings: '设置',
|
|
234
|
-
setup: '设置',
|
|
235
|
-
docLink: '文档链接',
|
|
236
|
-
},
|
|
237
|
-
};
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
-
};
|
|
37
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
exports.default = ChatBotButton;
|
|
39
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
40
|
-
const react_1 = require("@iconify/react");
|
|
41
|
-
const icons_material_1 = require("@mui/icons-material");
|
|
42
|
-
const material_1 = require("@mui/material");
|
|
43
|
-
const react_2 = require("react");
|
|
44
|
-
const CustomComponentRenderer_1 = __importDefault(require("../../../../../components/CustomComponentRenderer"));
|
|
45
|
-
const ux_1 = require("../../../../arcblock/ux");
|
|
46
|
-
const locale_1 = require("../../../../locale");
|
|
47
|
-
const PopperMenuButton_1 = __importDefault(require("../../components/PopperMenuButton"));
|
|
48
|
-
const LoadingMenuItem_1 = __importDefault(require("../../components/PopperMenuButton/LoadingMenuItem"));
|
|
49
|
-
const ScrollView_1 = __importDefault(require("../../components/ScrollView"));
|
|
50
|
-
const constants_1 = require("../../constants");
|
|
51
|
-
const ActiveAgent_1 = __importDefault(require("../../contexts/ActiveAgent"));
|
|
52
|
-
const Runtime_1 = __importDefault(require("../../contexts/Runtime"));
|
|
53
|
-
const use_appearances_1 = __importStar(require("../../hooks/use-appearances"));
|
|
54
|
-
const runtime_1 = require("../../state/runtime");
|
|
55
|
-
const session_1 = require("../../state/session");
|
|
56
|
-
function ChatBotButton({ aid, working }) {
|
|
57
|
-
return ((0, jsx_runtime_1.jsx)(Runtime_1.default, { aid: aid, working: working, children: (0, jsx_runtime_1.jsx)(ActiveAgent_1.default, { children: (0, jsx_runtime_1.jsx)(ChatBotContent, {}) }) }));
|
|
58
|
-
}
|
|
59
|
-
function ChatBotContent() {
|
|
60
|
-
var _a, _b;
|
|
61
|
-
const anchorEl = (0, react_2.useRef)(null);
|
|
62
|
-
(0, session_1.useAutoLoadSessionState)();
|
|
63
|
-
const { aid } = (0, runtime_1.useRuntimeState)();
|
|
64
|
-
const { appearancePage } = (0, use_appearances_1.default)({ aid });
|
|
65
|
-
const profile = (0, use_appearances_1.useProfile)({ aid });
|
|
66
|
-
const [open, setOpen] = (0, react_2.useState)(false);
|
|
67
|
-
const componentId = (_a = appearancePage === null || appearancePage === void 0 ? void 0 : appearancePage.componentId) !== null && _a !== void 0 ? _a : constants_1.DEFAULT_PAGE_COMPONENT_ID;
|
|
68
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { position: 'fixed', bottom: 32, right: 16, zIndex: 'modal' }, children: [(0, jsx_runtime_1.jsx)(material_1.Fab, { sx: { width: 44, height: 44, boxShadow: open ? 0 : undefined }, onClick: () => setOpen(true), children: (0, jsx_runtime_1.jsx)(ux_1.Avatar, { size: 44, did: (_b = globalThis.blocklet) === null || _b === void 0 ? void 0 : _b.appId, variant: "circle", shape: "circle",
|
|
69
|
-
// @ts-ignore
|
|
70
|
-
src: profile.avatar }) }), (0, jsx_runtime_1.jsx)(material_1.Stack, { width: "100%", ref: anchorEl }), anchorEl.current && ((0, jsx_runtime_1.jsx)(ResponsiveChatBotContainer, { anchorEl: anchorEl.current, open: open, onClose: () => setOpen(false), children: (0, jsx_runtime_1.jsx)(ScrollView_1.default, { initialScrollBehavior: "auto", component: material_1.Stack, sx: {
|
|
71
|
-
overscrollBehavior: 'contain',
|
|
72
|
-
height: '100%',
|
|
73
|
-
width: '100%',
|
|
74
|
-
overflow: 'auto',
|
|
75
|
-
'.aigne-layout': {
|
|
76
|
-
px: 2,
|
|
77
|
-
},
|
|
78
|
-
}, children: (0, jsx_runtime_1.jsx)(react_2.Suspense, { fallback: (0, jsx_runtime_1.jsx)(material_1.Stack, { flexGrow: 1, alignItems: "center", justifyContent: "center", children: (0, jsx_runtime_1.jsx)(material_1.CircularProgress, { size: 24 }) }), children: (0, jsx_runtime_1.jsx)(CustomComponentRenderer_1.default, { componentId: componentId, properties: appearancePage === null || appearancePage === void 0 ? void 0 : appearancePage.componentProperties, props: { scrollViewProps: { disabled: true }, hideHeaderMenuButton: true } }) }) }) }))] }));
|
|
79
|
-
}
|
|
80
|
-
function ResponsiveChatBotContainer({ open, anchorEl, children, onClose, }) {
|
|
81
|
-
const theme = (0, material_1.useTheme)();
|
|
82
|
-
const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('sm'));
|
|
83
|
-
const { aid } = (0, runtime_1.useRuntimeState)();
|
|
84
|
-
const profile = (0, use_appearances_1.useProfile)({ aid });
|
|
85
|
-
if (isMobile) {
|
|
86
|
-
return ((0, jsx_runtime_1.jsx)(ChatBotDialog, { title: profile.name, open: open, onClose: onClose, children: children }));
|
|
87
|
-
}
|
|
88
|
-
return ((0, jsx_runtime_1.jsx)(ChatBotPopper, { anchorEl: anchorEl, title: profile.name, open: open, onClose: onClose, children: children }));
|
|
89
|
-
}
|
|
90
|
-
function ChatBotPopper({ title, anchorEl, open, children, onClose, }) {
|
|
91
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Popper, { anchorEl: anchorEl, open: open, disablePortal: true, placement: "top-end", transition: true, sx: {
|
|
92
|
-
zIndex: 'modal',
|
|
93
|
-
maxWidth: 500,
|
|
94
|
-
maxHeight: 'min(calc(100vh - 128px), 1000px)',
|
|
95
|
-
width: 500,
|
|
96
|
-
height: '90vh',
|
|
97
|
-
}, children: ({ TransitionProps }) => ((0, jsx_runtime_1.jsx)(material_1.ClickAwayListener, { onClickAway: (e) => {
|
|
98
|
-
e.preventDefault();
|
|
99
|
-
e.stopPropagation();
|
|
100
|
-
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
101
|
-
}, children: (0, jsx_runtime_1.jsx)(material_1.Grow, Object.assign({}, TransitionProps, { style: { transformOrigin: 'right bottom' }, timeout: 350, children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { sx: {
|
|
102
|
-
height: '100%',
|
|
103
|
-
boxShadow: 1,
|
|
104
|
-
position: 'relative',
|
|
105
|
-
background: 'white',
|
|
106
|
-
borderRadius: 1,
|
|
107
|
-
}, children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", alignItems: "center", borderBottom: 1, borderColor: "divider", p: 2, gap: 2, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h6", noWrap: true, sx: { flex: 1, width: 1 }, children: title }), (0, jsx_runtime_1.jsx)(ChatMenuButton, {}), (0, jsx_runtime_1.jsx)(material_1.Button, { sx: { minWidth: 28, minHeight: 28, p: 0 }, onClick: onClose, children: (0, jsx_runtime_1.jsx)(react_1.Icon, { icon: "tabler:x", fontSize: 24, color: "rgba(75, 85, 99, 1)" }) })] }), children] }) })) })) }));
|
|
108
|
-
}
|
|
109
|
-
function ChatBotDialog({ title, open, children, onClose, }) {
|
|
110
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Dialog, { open: open, onClose: onClose, fullScreen: true, children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, { sx: { px: 1 }, children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", alignItems: "center", gap: 2, children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "small", onClick: onClose, children: (0, jsx_runtime_1.jsx)(icons_material_1.ArrowBackIosNewRounded, { fontSize: "inherit" }) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h6", noWrap: true, sx: { flex: 1, width: 1 }, children: title }), (0, jsx_runtime_1.jsx)(ChatMenuButton, {})] }) }), (0, jsx_runtime_1.jsx)(material_1.DialogContent, { sx: { p: 0 }, dividers: true, children: children })] }));
|
|
111
|
-
}
|
|
112
|
-
function ChatMenuButton() {
|
|
113
|
-
const { t } = (0, locale_1.useLocaleContext)();
|
|
114
|
-
const clearSession = (0, session_1.useSessionState)((s) => s.clearSession);
|
|
115
|
-
return ((0, jsx_runtime_1.jsx)(PopperMenuButton_1.default, { component: material_1.IconButton, PopperProps: { placement: 'bottom-end', sx: { zIndex: 'snackbar' } }, menus: (0, jsx_runtime_1.jsxs)(LoadingMenuItem_1.default, { onClick: () => __awaiter(this, void 0, void 0, function* () { return clearSession(); }), children: [(0, jsx_runtime_1.jsx)(material_1.ListItemIcon, { children: (0, jsx_runtime_1.jsx)(react_1.Icon, { icon: "mingcute:broom-line" }) }), t('clearSession')] }), children: (0, jsx_runtime_1.jsx)(react_1.Icon, { icon: "tabler:dots" }) }));
|
|
116
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.default = Runtime;
|
|
30
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
31
|
-
const react_helmet_1 = require("react-helmet");
|
|
32
|
-
const CustomComponentRenderer_1 = __importDefault(require("../../../../../components/CustomComponentRenderer"));
|
|
33
|
-
const AgentSettingsDialog_1 = __importDefault(require("../../components/AgentSettings/AgentSettingsDialog"));
|
|
34
|
-
const ActiveAgent_1 = __importDefault(require("../../contexts/ActiveAgent"));
|
|
35
|
-
const Runtime_1 = __importStar(require("../../contexts/Runtime"));
|
|
36
|
-
const use_appearances_1 = __importDefault(require("../../hooks/use-appearances"));
|
|
37
|
-
const use_header_menu_1 = require("../../hooks/use-header-menu");
|
|
38
|
-
const runtime_1 = require("../../state/runtime");
|
|
39
|
-
function Runtime({ blockletDid, aid, working, }) {
|
|
40
|
-
const children = ((0, jsx_runtime_1.jsx)(ActiveAgent_1.default, { children: (0, jsx_runtime_1.jsx)(RuntimeView, {}) }));
|
|
41
|
-
return aid ? ((0, jsx_runtime_1.jsx)(Runtime_1.default, { blockletDid: blockletDid, aid: aid, working: working, children: children })) : ((0, jsx_runtime_1.jsx)(Runtime_1.RuntimeProviderFromUrl, { children: children }));
|
|
42
|
-
}
|
|
43
|
-
function RuntimeView() {
|
|
44
|
-
const { aid, agent } = (0, runtime_1.useRuntimeState)();
|
|
45
|
-
const { appearancePage } = (0, use_appearances_1.default)({ aid });
|
|
46
|
-
(0, use_header_menu_1.useHeaderMenu)();
|
|
47
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_helmet_1.Helmet, { children: [agent.project.name && (0, jsx_runtime_1.jsx)("title", { children: agent.project.name }), agent.project.description && (0, jsx_runtime_1.jsx)("meta", { name: "description", content: agent.project.description })] }), (0, jsx_runtime_1.jsx)(CustomComponentRenderer_1.default, { componentId: appearancePage.componentId, properties: appearancePage.componentProperties }), (0, jsx_runtime_1.jsx)(AgentSettingsDialog_1.default, {})] }));
|
|
48
|
-
}
|