@blocklet/pages-kit 0.2.432 → 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.
Files changed (319) hide show
  1. package/lib/cjs/builtin/async/ai-runtime.js +17 -0
  2. package/lib/cjs/builtin/{async/ai-runtime/components/AgentInputField/LanguageField.js → components/LanguageField/index.js} +3 -3
  3. package/lib/cjs/builtin/{components.js → components/index.js} +1 -1
  4. package/lib/cjs/components/CustomComponentRenderer/context.js +13 -0
  5. package/lib/cjs/components/CustomComponentRenderer/index.js +5 -1
  6. package/lib/cjs/components/CustomComponentRenderer/state.js +20 -6
  7. package/lib/cjs/tsconfig.tsbuildinfo +1 -1
  8. package/lib/esm/builtin/async/ai-runtime.js +1 -0
  9. package/lib/esm/builtin/{async/ai-runtime/components/AgentInputField/LanguageField.js → components/LanguageField/index.js} +2 -2
  10. package/lib/esm/builtin/components/index.js +1 -0
  11. package/lib/esm/components/CustomComponentRenderer/context.js +9 -0
  12. package/lib/esm/components/CustomComponentRenderer/index.js +5 -1
  13. package/lib/esm/components/CustomComponentRenderer/state.js +21 -7
  14. package/lib/esm/tsconfig.tsbuildinfo +1 -1
  15. package/lib/types/builtin/async/ai-runtime.d.ts +1 -0
  16. package/lib/types/builtin/components/index.d.ts +1 -0
  17. package/lib/types/components/CustomComponentRenderer/context.d.ts +14 -0
  18. package/lib/types/components/CustomComponentRenderer/index.d.ts +1 -0
  19. package/lib/types/components/CustomComponentRenderer/state.d.ts +5 -1
  20. package/lib/types/tsconfig.tsbuildinfo +1 -1
  21. package/package.json +12 -5
  22. package/tsconfig.json +1 -1
  23. package/lib/cjs/builtin/async/ai-runtime/api/agent.js +0 -24
  24. package/lib/cjs/builtin/async/ai-runtime/api/asset.js +0 -25
  25. package/lib/cjs/builtin/async/ai-runtime/api/dataset.js +0 -134
  26. package/lib/cjs/builtin/async/ai-runtime/api/message.js +0 -46
  27. package/lib/cjs/builtin/async/ai-runtime/api/request.js +0 -74
  28. package/lib/cjs/builtin/async/ai-runtime/api/secret.js +0 -24
  29. package/lib/cjs/builtin/async/ai-runtime/api/session.js +0 -137
  30. package/lib/cjs/builtin/async/ai-runtime/components/ActionButton.js +0 -62
  31. package/lib/cjs/builtin/async/ai-runtime/components/AgentErrorBoundary.js +0 -34
  32. package/lib/cjs/builtin/async/ai-runtime/components/AgentInputField/BooleanField.js +0 -21
  33. package/lib/cjs/builtin/async/ai-runtime/components/AgentInputField/NumberField.js +0 -21
  34. package/lib/cjs/builtin/async/ai-runtime/components/AgentInputField/RadioField.js +0 -39
  35. package/lib/cjs/builtin/async/ai-runtime/components/AgentInputField/SelectField.js +0 -24
  36. package/lib/cjs/builtin/async/ai-runtime/components/AgentInputField/StringField.js +0 -35
  37. package/lib/cjs/builtin/async/ai-runtime/components/AgentInputField/index.js +0 -44
  38. package/lib/cjs/builtin/async/ai-runtime/components/AgentSettings/AgentSettingsDialog.js +0 -80
  39. package/lib/cjs/builtin/async/ai-runtime/components/GlobalLoading/index.js +0 -27
  40. package/lib/cjs/builtin/async/ai-runtime/components/GlobalLoading/state.js +0 -39
  41. package/lib/cjs/builtin/async/ai-runtime/components/Header/SimpleHeader.js +0 -49
  42. package/lib/cjs/builtin/async/ai-runtime/components/Layout/SimpleLayout.js +0 -21
  43. package/lib/cjs/builtin/async/ai-runtime/components/LoadingButton.js +0 -40
  44. package/lib/cjs/builtin/async/ai-runtime/components/MarkdownRenderer/index.js +0 -146
  45. package/lib/cjs/builtin/async/ai-runtime/components/MenuButton.js +0 -55
  46. package/lib/cjs/builtin/async/ai-runtime/components/OutputFieldContainer/index.js +0 -22
  47. package/lib/cjs/builtin/async/ai-runtime/components/PopperMenuButton/LoadingMenuItem.js +0 -49
  48. package/lib/cjs/builtin/async/ai-runtime/components/PopperMenuButton/index.js +0 -68
  49. package/lib/cjs/builtin/async/ai-runtime/components/RuntimeCommonProvider.js +0 -25
  50. package/lib/cjs/builtin/async/ai-runtime/components/ScrollView.js +0 -92
  51. package/lib/cjs/builtin/async/ai-runtime/components/ShareActions/Community.js +0 -6
  52. package/lib/cjs/builtin/async/ai-runtime/components/ShareActions/index.js +0 -255
  53. package/lib/cjs/builtin/async/ai-runtime/components/SocialShare.js +0 -108
  54. package/lib/cjs/builtin/async/ai-runtime/components/ThemeProvider.js +0 -191
  55. package/lib/cjs/builtin/async/ai-runtime/components/UserInfo.js +0 -55
  56. package/lib/cjs/builtin/async/ai-runtime/constants.js +0 -43
  57. package/lib/cjs/builtin/async/ai-runtime/contexts/ActiveAgent.js +0 -27
  58. package/lib/cjs/builtin/async/ai-runtime/contexts/ComponentPreferences.js +0 -31
  59. package/lib/cjs/builtin/async/ai-runtime/contexts/CurrentAgent.js +0 -34
  60. package/lib/cjs/builtin/async/ai-runtime/contexts/CurrentMessage.js +0 -18
  61. package/lib/cjs/builtin/async/ai-runtime/contexts/Identity.js +0 -36
  62. package/lib/cjs/builtin/async/ai-runtime/contexts/Runtime.js +0 -52
  63. package/lib/cjs/builtin/async/ai-runtime/error.js +0 -10
  64. package/lib/cjs/builtin/async/ai-runtime/hooks/use-agent-admin.js +0 -13
  65. package/lib/cjs/builtin/async/ai-runtime/hooks/use-appearances.js +0 -109
  66. package/lib/cjs/builtin/async/ai-runtime/hooks/use-header-menu.js +0 -50
  67. package/lib/cjs/builtin/async/ai-runtime/index.js +0 -83
  68. package/lib/cjs/builtin/async/ai-runtime/locales/index.js +0 -237
  69. package/lib/cjs/builtin/async/ai-runtime/runtime/ChatBotButton/index.js +0 -116
  70. package/lib/cjs/builtin/async/ai-runtime/runtime/Runtime/index.js +0 -48
  71. package/lib/cjs/builtin/async/ai-runtime/runtime-components/AutoForm/index.js +0 -138
  72. package/lib/cjs/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageErrorView.js +0 -19
  73. package/lib/cjs/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageItemView.js +0 -186
  74. package/lib/cjs/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageMetadataRenderer.js +0 -24
  75. package/lib/cjs/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageSuggestedQuestions.js +0 -34
  76. package/lib/cjs/builtin/async/ai-runtime/runtime-components/ChatOutput/ReferenceLinks.js +0 -11
  77. package/lib/cjs/builtin/async/ai-runtime/runtime-components/ChatOutput/index.js +0 -24
  78. package/lib/cjs/builtin/async/ai-runtime/runtime-components/GoogleSearch/GoogleSearchRelatedQuestionsView.js +0 -85
  79. package/lib/cjs/builtin/async/ai-runtime/runtime-components/GoogleSearch/GoogleSearchSourcesView.js +0 -64
  80. package/lib/cjs/builtin/async/ai-runtime/runtime-components/ImagesView/index.js +0 -30
  81. package/lib/cjs/builtin/async/ai-runtime/runtime-components/MarkdownView/index.js +0 -13
  82. package/lib/cjs/builtin/async/ai-runtime/runtime-components/OpeningQuestionsView/index.js +0 -46
  83. package/lib/cjs/builtin/async/ai-runtime/runtime-components/OutputFieldView/type.js +0 -2
  84. package/lib/cjs/builtin/async/ai-runtime/runtime-components/PhotoGallery/index.js +0 -65
  85. package/lib/cjs/builtin/async/ai-runtime/runtime-components/PhotoGalleryItem/index.js +0 -150
  86. package/lib/cjs/builtin/async/ai-runtime/runtime-components/ReferencedLinksView/index.js +0 -26
  87. package/lib/cjs/builtin/async/ai-runtime/runtime-components/ShareView/index.js +0 -16
  88. package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleChat/BackgroundImage.js +0 -38
  89. package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleChat/DrawerOpenCloseIcon.js +0 -42
  90. package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleChat/InputsView.js +0 -94
  91. package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleChat/MessageView.js +0 -79
  92. package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleChat/MessagesView.js +0 -34
  93. package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleChat/OpeningMessageView.js +0 -45
  94. package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleChat/UserMessageView.js +0 -28
  95. package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleChat/index.js +0 -82
  96. package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleOutput/index.js +0 -69
  97. package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimplePage/index.js +0 -55
  98. package/lib/cjs/builtin/async/ai-runtime/runtime-components/SuggestedQuestionsView/index.js +0 -54
  99. package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/Input.js +0 -189
  100. package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/Output.js +0 -252
  101. package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/Page.js +0 -300
  102. package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/components/CodePreview.js +0 -158
  103. package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/components/ConfirmDialog.js +0 -60
  104. package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/components/Loading.js +0 -153
  105. package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/components/PropertiesSetting.js +0 -80
  106. package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/components/TransparentTooltip.js +0 -25
  107. package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/components/UserQuestion.js +0 -68
  108. package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/contexts/V0Runtime.js +0 -56
  109. package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/index.js +0 -12
  110. package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/utils.js +0 -13
  111. package/lib/cjs/builtin/async/ai-runtime/state/agent.js +0 -58
  112. package/lib/cjs/builtin/async/ai-runtime/state/runtime.js +0 -48
  113. package/lib/cjs/builtin/async/ai-runtime/state/session.js +0 -415
  114. package/lib/cjs/builtin/async/ai-runtime/utils/agent-inputs.js +0 -14
  115. package/lib/cjs/builtin/async/ai-runtime/utils/download-image.js +0 -40
  116. package/lib/cjs/builtin/async/ai-runtime/utils/fonts.js +0 -35
  117. package/lib/cjs/builtin/async/ai-runtime/utils/map-right.js +0 -10
  118. package/lib/cjs/builtin/async/ai-runtime/utils/runtime-output-schema.js +0 -7
  119. package/lib/cjs/builtin/async/ai-runtime/utils/zustand.js +0 -9
  120. package/lib/esm/builtin/async/ai-runtime/api/agent.js +0 -21
  121. package/lib/esm/builtin/async/ai-runtime/api/asset.js +0 -22
  122. package/lib/esm/builtin/async/ai-runtime/api/dataset.js +0 -121
  123. package/lib/esm/builtin/async/ai-runtime/api/message.js +0 -42
  124. package/lib/esm/builtin/async/ai-runtime/api/request.js +0 -68
  125. package/lib/esm/builtin/async/ai-runtime/api/secret.js +0 -21
  126. package/lib/esm/builtin/async/ai-runtime/api/session.js +0 -128
  127. package/lib/esm/builtin/async/ai-runtime/components/ActionButton.js +0 -56
  128. package/lib/esm/builtin/async/ai-runtime/components/AgentErrorBoundary.js +0 -30
  129. package/lib/esm/builtin/async/ai-runtime/components/AgentInputField/BooleanField.js +0 -19
  130. package/lib/esm/builtin/async/ai-runtime/components/AgentInputField/NumberField.js +0 -19
  131. package/lib/esm/builtin/async/ai-runtime/components/AgentInputField/RadioField.js +0 -37
  132. package/lib/esm/builtin/async/ai-runtime/components/AgentInputField/SelectField.js +0 -22
  133. package/lib/esm/builtin/async/ai-runtime/components/AgentInputField/StringField.js +0 -33
  134. package/lib/esm/builtin/async/ai-runtime/components/AgentInputField/index.js +0 -38
  135. package/lib/esm/builtin/async/ai-runtime/components/AgentSettings/AgentSettingsDialog.js +0 -76
  136. package/lib/esm/builtin/async/ai-runtime/components/GlobalLoading/index.js +0 -22
  137. package/lib/esm/builtin/async/ai-runtime/components/GlobalLoading/state.js +0 -36
  138. package/lib/esm/builtin/async/ai-runtime/components/Header/SimpleHeader.js +0 -23
  139. package/lib/esm/builtin/async/ai-runtime/components/Layout/SimpleLayout.js +0 -18
  140. package/lib/esm/builtin/async/ai-runtime/components/LoadingButton.js +0 -38
  141. package/lib/esm/builtin/async/ai-runtime/components/MarkdownRenderer/index.js +0 -118
  142. package/lib/esm/builtin/async/ai-runtime/components/MenuButton.js +0 -52
  143. package/lib/esm/builtin/async/ai-runtime/components/OutputFieldContainer/index.js +0 -19
  144. package/lib/esm/builtin/async/ai-runtime/components/PopperMenuButton/LoadingMenuItem.js +0 -46
  145. package/lib/esm/builtin/async/ai-runtime/components/PopperMenuButton/index.js +0 -42
  146. package/lib/esm/builtin/async/ai-runtime/components/RuntimeCommonProvider.js +0 -18
  147. package/lib/esm/builtin/async/ai-runtime/components/ScrollView.js +0 -63
  148. package/lib/esm/builtin/async/ai-runtime/components/ShareActions/Community.js +0 -4
  149. package/lib/esm/builtin/async/ai-runtime/components/ShareActions/index.js +0 -226
  150. package/lib/esm/builtin/async/ai-runtime/components/SocialShare.js +0 -100
  151. package/lib/esm/builtin/async/ai-runtime/components/ThemeProvider.js +0 -185
  152. package/lib/esm/builtin/async/ai-runtime/components/UserInfo.js +0 -47
  153. package/lib/esm/builtin/async/ai-runtime/constants.js +0 -39
  154. package/lib/esm/builtin/async/ai-runtime/contexts/ActiveAgent.js +0 -23
  155. package/lib/esm/builtin/async/ai-runtime/contexts/ComponentPreferences.js +0 -24
  156. package/lib/esm/builtin/async/ai-runtime/contexts/CurrentAgent.js +0 -30
  157. package/lib/esm/builtin/async/ai-runtime/contexts/CurrentMessage.js +0 -14
  158. package/lib/esm/builtin/async/ai-runtime/contexts/Identity.js +0 -28
  159. package/lib/esm/builtin/async/ai-runtime/contexts/Runtime.js +0 -22
  160. package/lib/esm/builtin/async/ai-runtime/error.js +0 -6
  161. package/lib/esm/builtin/async/ai-runtime/hooks/use-agent-admin.js +0 -10
  162. package/lib/esm/builtin/async/ai-runtime/hooks/use-appearances.js +0 -103
  163. package/lib/esm/builtin/async/ai-runtime/hooks/use-header-menu.js +0 -44
  164. package/lib/esm/builtin/async/ai-runtime/index.js +0 -37
  165. package/lib/esm/builtin/async/ai-runtime/locales/index.js +0 -234
  166. package/lib/esm/builtin/async/ai-runtime/runtime/ChatBotButton/index.js +0 -87
  167. package/lib/esm/builtin/async/ai-runtime/runtime/Runtime/index.js +0 -19
  168. package/lib/esm/builtin/async/ai-runtime/runtime-components/AutoForm/index.js +0 -132
  169. package/lib/esm/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageErrorView.js +0 -13
  170. package/lib/esm/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageItemView.js +0 -157
  171. package/lib/esm/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageMetadataRenderer.js +0 -18
  172. package/lib/esm/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageSuggestedQuestions.js +0 -30
  173. package/lib/esm/builtin/async/ai-runtime/runtime-components/ChatOutput/ReferenceLinks.js +0 -8
  174. package/lib/esm/builtin/async/ai-runtime/runtime-components/ChatOutput/index.js +0 -18
  175. package/lib/esm/builtin/async/ai-runtime/runtime-components/GoogleSearch/GoogleSearchRelatedQuestionsView.js +0 -56
  176. package/lib/esm/builtin/async/ai-runtime/runtime-components/GoogleSearch/GoogleSearchSourcesView.js +0 -58
  177. package/lib/esm/builtin/async/ai-runtime/runtime-components/ImagesView/index.js +0 -24
  178. package/lib/esm/builtin/async/ai-runtime/runtime-components/MarkdownView/index.js +0 -7
  179. package/lib/esm/builtin/async/ai-runtime/runtime-components/OpeningQuestionsView/index.js +0 -40
  180. package/lib/esm/builtin/async/ai-runtime/runtime-components/OutputFieldView/type.js +0 -1
  181. package/lib/esm/builtin/async/ai-runtime/runtime-components/PhotoGallery/index.js +0 -59
  182. package/lib/esm/builtin/async/ai-runtime/runtime-components/PhotoGalleryItem/index.js +0 -144
  183. package/lib/esm/builtin/async/ai-runtime/runtime-components/ReferencedLinksView/index.js +0 -20
  184. package/lib/esm/builtin/async/ai-runtime/runtime-components/ShareView/index.js +0 -10
  185. package/lib/esm/builtin/async/ai-runtime/runtime-components/SimpleChat/BackgroundImage.js +0 -35
  186. package/lib/esm/builtin/async/ai-runtime/runtime-components/SimpleChat/DrawerOpenCloseIcon.js +0 -39
  187. package/lib/esm/builtin/async/ai-runtime/runtime-components/SimpleChat/InputsView.js +0 -65
  188. package/lib/esm/builtin/async/ai-runtime/runtime-components/SimpleChat/MessageView.js +0 -50
  189. package/lib/esm/builtin/async/ai-runtime/runtime-components/SimpleChat/MessagesView.js +0 -28
  190. package/lib/esm/builtin/async/ai-runtime/runtime-components/SimpleChat/OpeningMessageView.js +0 -40
  191. package/lib/esm/builtin/async/ai-runtime/runtime-components/SimpleChat/UserMessageView.js +0 -22
  192. package/lib/esm/builtin/async/ai-runtime/runtime-components/SimpleChat/index.js +0 -53
  193. package/lib/esm/builtin/async/ai-runtime/runtime-components/SimpleOutput/index.js +0 -40
  194. package/lib/esm/builtin/async/ai-runtime/runtime-components/SimplePage/index.js +0 -49
  195. package/lib/esm/builtin/async/ai-runtime/runtime-components/SuggestedQuestionsView/index.js +0 -48
  196. package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/Input.js +0 -183
  197. package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/Output.js +0 -246
  198. package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/Page.js +0 -294
  199. package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/components/CodePreview.js +0 -149
  200. package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/components/ConfirmDialog.js +0 -55
  201. package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/components/Loading.js +0 -146
  202. package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/components/PropertiesSetting.js +0 -75
  203. package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/components/TransparentTooltip.js +0 -23
  204. package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/components/UserQuestion.js +0 -42
  205. package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/contexts/V0Runtime.js +0 -52
  206. package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/index.js +0 -3
  207. package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/utils.js +0 -9
  208. package/lib/esm/builtin/async/ai-runtime/state/agent.js +0 -55
  209. package/lib/esm/builtin/async/ai-runtime/state/runtime.js +0 -45
  210. package/lib/esm/builtin/async/ai-runtime/state/session.js +0 -408
  211. package/lib/esm/builtin/async/ai-runtime/utils/agent-inputs.js +0 -10
  212. package/lib/esm/builtin/async/ai-runtime/utils/download-image.js +0 -36
  213. package/lib/esm/builtin/async/ai-runtime/utils/fonts.js +0 -32
  214. package/lib/esm/builtin/async/ai-runtime/utils/map-right.js +0 -7
  215. package/lib/esm/builtin/async/ai-runtime/utils/runtime-output-schema.js +0 -4
  216. package/lib/esm/builtin/async/ai-runtime/utils/zustand.js +0 -6
  217. package/lib/esm/builtin/components.js +0 -1
  218. package/lib/types/builtin/async/ai-runtime/api/agent.d.ts +0 -51
  219. package/lib/types/builtin/async/ai-runtime/api/asset.d.ts +0 -16
  220. package/lib/types/builtin/async/ai-runtime/api/dataset.d.ts +0 -39
  221. package/lib/types/builtin/async/ai-runtime/api/message.d.ts +0 -35
  222. package/lib/types/builtin/async/ai-runtime/api/request.d.ts +0 -12
  223. package/lib/types/builtin/async/ai-runtime/api/secret.d.ts +0 -12
  224. package/lib/types/builtin/async/ai-runtime/api/session.d.ts +0 -61
  225. package/lib/types/builtin/async/ai-runtime/components/ActionButton.d.ts +0 -14
  226. package/lib/types/builtin/async/ai-runtime/components/AgentErrorBoundary.d.ts +0 -7
  227. package/lib/types/builtin/async/ai-runtime/components/AgentInputField/BooleanField.d.ts +0 -8
  228. package/lib/types/builtin/async/ai-runtime/components/AgentInputField/NumberField.d.ts +0 -8
  229. package/lib/types/builtin/async/ai-runtime/components/AgentInputField/RadioField.d.ts +0 -8
  230. package/lib/types/builtin/async/ai-runtime/components/AgentInputField/SelectField.d.ts +0 -8
  231. package/lib/types/builtin/async/ai-runtime/components/AgentInputField/StringField.d.ts +0 -8
  232. package/lib/types/builtin/async/ai-runtime/components/AgentInputField/index.d.ts +0 -7
  233. package/lib/types/builtin/async/ai-runtime/components/AgentSettings/AgentSettingsDialog.d.ts +0 -10
  234. package/lib/types/builtin/async/ai-runtime/components/GlobalLoading/index.d.ts +0 -3
  235. package/lib/types/builtin/async/ai-runtime/components/GlobalLoading/state.d.ts +0 -10
  236. package/lib/types/builtin/async/ai-runtime/components/Header/SimpleHeader.d.ts +0 -5
  237. package/lib/types/builtin/async/ai-runtime/components/Layout/SimpleLayout.d.ts +0 -2
  238. package/lib/types/builtin/async/ai-runtime/components/LoadingButton.d.ts +0 -3
  239. package/lib/types/builtin/async/ai-runtime/components/MarkdownRenderer/index.d.ts +0 -2
  240. package/lib/types/builtin/async/ai-runtime/components/MenuButton.d.ts +0 -10
  241. package/lib/types/builtin/async/ai-runtime/components/OutputFieldContainer/index.d.ts +0 -5
  242. package/lib/types/builtin/async/ai-runtime/components/PopperMenuButton/LoadingMenuItem.d.ts +0 -5
  243. package/lib/types/builtin/async/ai-runtime/components/PopperMenuButton/index.d.ts +0 -6
  244. package/lib/types/builtin/async/ai-runtime/components/RuntimeCommonProvider.d.ts +0 -7
  245. package/lib/types/builtin/async/ai-runtime/components/ScrollView.d.ts +0 -10
  246. package/lib/types/builtin/async/ai-runtime/components/ShareActions/Community.d.ts +0 -4
  247. package/lib/types/builtin/async/ai-runtime/components/ShareActions/index.d.ts +0 -2
  248. package/lib/types/builtin/async/ai-runtime/components/SocialShare.d.ts +0 -20
  249. package/lib/types/builtin/async/ai-runtime/components/ThemeProvider.d.ts +0 -4
  250. package/lib/types/builtin/async/ai-runtime/components/UserInfo.d.ts +0 -18
  251. package/lib/types/builtin/async/ai-runtime/constants.d.ts +0 -21
  252. package/lib/types/builtin/async/ai-runtime/contexts/ActiveAgent.d.ts +0 -9
  253. package/lib/types/builtin/async/ai-runtime/contexts/ComponentPreferences.d.ts +0 -11
  254. package/lib/types/builtin/async/ai-runtime/contexts/CurrentAgent.d.ts +0 -16
  255. package/lib/types/builtin/async/ai-runtime/contexts/CurrentMessage.d.ts +0 -15
  256. package/lib/types/builtin/async/ai-runtime/contexts/Identity.d.ts +0 -16
  257. package/lib/types/builtin/async/ai-runtime/contexts/Runtime.d.ts +0 -4
  258. package/lib/types/builtin/async/ai-runtime/error.d.ts +0 -4
  259. package/lib/types/builtin/async/ai-runtime/hooks/use-agent-admin.d.ts +0 -2
  260. package/lib/types/builtin/async/ai-runtime/hooks/use-appearances.d.ts +0 -78
  261. package/lib/types/builtin/async/ai-runtime/hooks/use-header-menu.d.ts +0 -1
  262. package/lib/types/builtin/async/ai-runtime/index.d.ts +0 -36
  263. package/lib/types/builtin/async/ai-runtime/locales/index.d.ts +0 -210
  264. package/lib/types/builtin/async/ai-runtime/runtime/ChatBotButton/index.d.ts +0 -5
  265. package/lib/types/builtin/async/ai-runtime/runtime/Runtime/index.d.ts +0 -5
  266. package/lib/types/builtin/async/ai-runtime/runtime-components/AutoForm/index.d.ts +0 -7
  267. package/lib/types/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageErrorView.d.ts +0 -4
  268. package/lib/types/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageItemView.d.ts +0 -12
  269. package/lib/types/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageMetadataRenderer.d.ts +0 -4
  270. package/lib/types/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageSuggestedQuestions.d.ts +0 -7
  271. package/lib/types/builtin/async/ai-runtime/runtime-components/ChatOutput/ReferenceLinks.d.ts +0 -4
  272. package/lib/types/builtin/async/ai-runtime/runtime-components/ChatOutput/index.d.ts +0 -4
  273. package/lib/types/builtin/async/ai-runtime/runtime-components/GoogleSearch/GoogleSearchRelatedQuestionsView.d.ts +0 -4
  274. package/lib/types/builtin/async/ai-runtime/runtime-components/GoogleSearch/GoogleSearchSourcesView.d.ts +0 -2
  275. package/lib/types/builtin/async/ai-runtime/runtime-components/ImagesView/index.d.ts +0 -2
  276. package/lib/types/builtin/async/ai-runtime/runtime-components/MarkdownView/index.d.ts +0 -5
  277. package/lib/types/builtin/async/ai-runtime/runtime-components/OpeningQuestionsView/index.d.ts +0 -2
  278. package/lib/types/builtin/async/ai-runtime/runtime-components/OutputFieldView/type.d.ts +0 -5
  279. package/lib/types/builtin/async/ai-runtime/runtime-components/PhotoGallery/index.d.ts +0 -3
  280. package/lib/types/builtin/async/ai-runtime/runtime-components/PhotoGalleryItem/index.d.ts +0 -1
  281. package/lib/types/builtin/async/ai-runtime/runtime-components/ReferencedLinksView/index.d.ts +0 -2
  282. package/lib/types/builtin/async/ai-runtime/runtime-components/ShareView/index.d.ts +0 -2
  283. package/lib/types/builtin/async/ai-runtime/runtime-components/SimpleChat/BackgroundImage.d.ts +0 -1
  284. package/lib/types/builtin/async/ai-runtime/runtime-components/SimpleChat/DrawerOpenCloseIcon.d.ts +0 -4
  285. package/lib/types/builtin/async/ai-runtime/runtime-components/SimpleChat/InputsView.d.ts +0 -2
  286. package/lib/types/builtin/async/ai-runtime/runtime-components/SimpleChat/MessageView.d.ts +0 -9
  287. package/lib/types/builtin/async/ai-runtime/runtime-components/SimpleChat/MessagesView.d.ts +0 -2
  288. package/lib/types/builtin/async/ai-runtime/runtime-components/SimpleChat/OpeningMessageView.d.ts +0 -4
  289. package/lib/types/builtin/async/ai-runtime/runtime-components/SimpleChat/UserMessageView.d.ts +0 -1
  290. package/lib/types/builtin/async/ai-runtime/runtime-components/SimpleChat/index.d.ts +0 -16
  291. package/lib/types/builtin/async/ai-runtime/runtime-components/SimpleOutput/index.d.ts +0 -1
  292. package/lib/types/builtin/async/ai-runtime/runtime-components/SimplePage/index.d.ts +0 -6
  293. package/lib/types/builtin/async/ai-runtime/runtime-components/SuggestedQuestionsView/index.d.ts +0 -4
  294. package/lib/types/builtin/async/ai-runtime/runtime-components/V0/Input.d.ts +0 -7
  295. package/lib/types/builtin/async/ai-runtime/runtime-components/V0/Output.d.ts +0 -1
  296. package/lib/types/builtin/async/ai-runtime/runtime-components/V0/Page.d.ts +0 -1
  297. package/lib/types/builtin/async/ai-runtime/runtime-components/V0/components/CodePreview.d.ts +0 -20
  298. package/lib/types/builtin/async/ai-runtime/runtime-components/V0/components/ConfirmDialog.d.ts +0 -5
  299. package/lib/types/builtin/async/ai-runtime/runtime-components/V0/components/Loading.d.ts +0 -3
  300. package/lib/types/builtin/async/ai-runtime/runtime-components/V0/components/PropertiesSetting.d.ts +0 -5
  301. package/lib/types/builtin/async/ai-runtime/runtime-components/V0/components/TransparentTooltip.d.ts +0 -3
  302. package/lib/types/builtin/async/ai-runtime/runtime-components/V0/components/UserQuestion.d.ts +0 -3
  303. package/lib/types/builtin/async/ai-runtime/runtime-components/V0/contexts/V0Runtime.d.ts +0 -17
  304. package/lib/types/builtin/async/ai-runtime/runtime-components/V0/index.d.ts +0 -3
  305. package/lib/types/builtin/async/ai-runtime/runtime-components/V0/utils.d.ts +0 -7
  306. package/lib/types/builtin/async/ai-runtime/state/agent.d.ts +0 -12
  307. package/lib/types/builtin/async/ai-runtime/state/runtime.d.ts +0 -14
  308. package/lib/types/builtin/async/ai-runtime/state/session.d.ts +0 -60
  309. package/lib/types/builtin/async/ai-runtime/utils/agent-inputs.d.ts +0 -5
  310. package/lib/types/builtin/async/ai-runtime/utils/download-image.d.ts +0 -4
  311. package/lib/types/builtin/async/ai-runtime/utils/fonts.d.ts +0 -5
  312. package/lib/types/builtin/async/ai-runtime/utils/map-right.d.ts +0 -1
  313. package/lib/types/builtin/async/ai-runtime/utils/runtime-output-schema.d.ts +0 -3
  314. package/lib/types/builtin/async/ai-runtime/utils/zustand.d.ts +0 -2
  315. package/lib/types/builtin/components.d.ts +0 -1
  316. /package/lib/cjs/builtin/{async/ai-runtime/utils → components/LanguageField}/languages.js +0 -0
  317. /package/lib/esm/builtin/{async/ai-runtime/utils → components/LanguageField}/languages.js +0 -0
  318. /package/lib/types/builtin/{async/ai-runtime/components/AgentInputField/LanguageField.d.ts → components/LanguageField/index.d.ts} +0 -0
  319. /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
- }