@agentscope-ai/chat 1.1.4 → 1.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +74 -0
- package/README.md +156 -56
- package/README.zh-CN.md +188 -0
- package/lib/AGUI/components/HelpModal/icons.d.ts +5 -0
- package/lib/AGUI/components/HelpModal/icons.js +84 -0
- package/lib/AGUI/components/HelpModal/index.d.ts +1 -0
- package/lib/AGUI/components/HelpModal/index.js +1 -0
- package/lib/AGUI/components/HelpModal/modal.d.ts +1 -0
- package/lib/AGUI/components/HelpModal/modal.js +104 -0
- package/lib/AGUI/components/chat/Button.d.ts +2 -0
- package/lib/AGUI/components/chat/Button.js +27 -0
- package/lib/AGUI/components/chat/Chat.d.ts +242 -0
- package/lib/AGUI/components/chat/Chat.js +634 -0
- package/lib/AGUI/components/chat/ChatContext.d.ts +142 -0
- package/lib/AGUI/components/chat/ChatContext.js +75 -0
- package/lib/AGUI/components/chat/CodeBlock.d.ts +12 -0
- package/lib/AGUI/components/chat/CodeBlock.js +398 -0
- package/lib/AGUI/components/chat/Header.d.ts +2 -0
- package/lib/AGUI/components/chat/Header.js +28 -0
- package/lib/AGUI/components/chat/Icons.d.ts +16 -0
- package/lib/AGUI/components/chat/Icons.js +247 -0
- package/lib/AGUI/components/chat/ImageUploadQueue.d.ts +11 -0
- package/lib/AGUI/components/chat/ImageUploadQueue.js +65 -0
- package/lib/AGUI/components/chat/Input.d.ts +2 -0
- package/lib/AGUI/components/chat/Input.js +30 -0
- package/lib/AGUI/components/chat/Markdown.d.ts +7 -0
- package/lib/AGUI/components/chat/Markdown.js +187 -0
- package/lib/AGUI/components/chat/Messages.d.ts +7 -0
- package/lib/AGUI/components/chat/Messages.js +242 -0
- package/lib/AGUI/components/chat/Modal.d.ts +43 -0
- package/lib/AGUI/components/chat/Modal.js +113 -0
- package/lib/AGUI/components/chat/Popup.d.ts +49 -0
- package/lib/AGUI/components/chat/Popup.js +64 -0
- package/lib/AGUI/components/chat/PoweredByTag.d.ts +3 -0
- package/lib/AGUI/components/chat/PoweredByTag.js +27 -0
- package/lib/AGUI/components/chat/Sidebar.d.ts +2 -0
- package/lib/AGUI/components/chat/Sidebar.js +85 -0
- package/lib/AGUI/components/chat/Suggestion.d.ts +16 -0
- package/{dist/voice-chat/VoiceChatService/index.js → lib/AGUI/components/chat/Suggestion.js} +138 -201
- package/lib/AGUI/components/chat/Suggestions.d.ts +2 -0
- package/lib/AGUI/components/chat/Suggestions.js +21 -0
- package/lib/AGUI/components/chat/Textarea.d.ts +11 -0
- package/lib/AGUI/components/chat/Textarea.js +60 -0
- package/lib/AGUI/components/chat/Window.d.ts +2 -0
- package/lib/AGUI/components/chat/Window.js +115 -0
- package/lib/AGUI/components/chat/index.d.ts +11 -0
- package/lib/AGUI/components/chat/index.js +11 -0
- package/lib/AGUI/components/chat/messages/AssistantMessage.d.ts +2 -0
- package/lib/AGUI/components/chat/messages/AssistantMessage.js +56 -0
- package/lib/AGUI/components/chat/messages/RenderActionExecutionMessage.d.ts +2 -0
- package/lib/AGUI/components/chat/messages/RenderActionExecutionMessage.js +114 -0
- package/lib/AGUI/components/chat/messages/RenderAgentStateMessage.d.ts +2 -0
- package/lib/AGUI/components/chat/messages/RenderAgentStateMessage.js +97 -0
- package/lib/AGUI/components/chat/messages/RenderImageMessage.d.ts +2 -0
- package/lib/AGUI/components/chat/messages/RenderImageMessage.js +61 -0
- package/lib/AGUI/components/chat/messages/RenderResultMessage.d.ts +2 -0
- package/lib/AGUI/components/chat/messages/RenderResultMessage.js +27 -0
- package/lib/AGUI/components/chat/messages/RenderTextMessage.d.ts +2 -0
- package/lib/AGUI/components/chat/messages/RenderTextMessage.js +47 -0
- package/lib/AGUI/components/chat/messages/UserMessage.d.ts +2 -0
- package/lib/AGUI/components/chat/messages/UserMessage.js +9 -0
- package/lib/AGUI/components/chat/props.d.ts +157 -0
- package/lib/AGUI/components/index.d.ts +1 -0
- package/lib/AGUI/components/index.js +1 -0
- package/lib/AGUI/context/index.d.ts +1 -0
- package/lib/AGUI/hooks/index.d.ts +1 -0
- package/lib/AGUI/hooks/index.js +1 -0
- package/lib/AGUI/hooks/use-copilot-chat-suggestions.d.ts +87 -0
- package/lib/AGUI/hooks/use-copilot-chat-suggestions.js +95 -0
- package/lib/AGUI/hooks/use-copy-to-clipboard.d.ts +7 -0
- package/{dist/theme/genStyleUtils.js → lib/AGUI/hooks/use-copy-to-clipboard.js} +27 -42
- package/lib/AGUI/hooks/use-dark-mode.d.ts +1 -0
- package/lib/AGUI/hooks/use-dark-mode.js +4 -0
- package/lib/AGUI/hooks/use-push-to-talk.d.ts +16 -0
- package/lib/AGUI/hooks/use-push-to-talk.js +260 -0
- package/lib/AGUI/index.d.ts +4 -0
- package/lib/AGUI/index.js +4 -0
- package/lib/AGUI/lib/utils.d.ts +2 -0
- package/lib/AGUI/lib/utils.js +52 -0
- package/lib/AGUI/types/index.d.ts +1 -0
- package/lib/AGUI/types/suggestions.d.ts +6 -0
- package/lib/Accordion/Accordion.d.ts +64 -0
- package/{dist/accordion → lib/Accordion}/Accordion.js +101 -40
- package/{dist/accordion → lib/Accordion}/BodyContent.d.ts +1 -1
- package/lib/Accordion/BodyContent.js +23 -0
- package/lib/Accordion/DeepThinking.d.ts +28 -0
- package/lib/Accordion/DeepThinking.js +35 -0
- package/lib/Accordion/SoftLightTitle.d.ts +3 -0
- package/lib/Accordion/SoftLightTitle.js +17 -0
- package/lib/Accordion/index.d.ts +2 -0
- package/lib/Accordion/style.d.ts +2 -0
- package/lib/Accordion/style.js +60 -0
- package/lib/Attachments/DropArea.d.ts +24 -0
- package/{dist/attachments → lib/Attachments}/DropArea.js +5 -11
- package/lib/Attachments/FileList/AudioIcon.d.ts +1 -0
- package/lib/Attachments/FileList/AudioIcon.js +24 -0
- package/lib/Attachments/FileList/FileListCard.d.ts +36 -0
- package/{dist/attachments → lib/Attachments}/FileList/FileListCard.js +109 -83
- package/lib/Attachments/FileList/Progress.d.ts +13 -0
- package/{dist/attachments → lib/Attachments}/FileList/Progress.js +7 -5
- package/lib/Attachments/FileList/VideoIcon.d.ts +1 -0
- package/lib/Attachments/FileList/VideoIcon.js +24 -0
- package/lib/Attachments/FileList/index.d.ts +56 -0
- package/{dist/attachments → lib/Attachments}/FileList/index.js +48 -48
- package/lib/Attachments/PlaceholderUploader.d.ts +49 -0
- package/{dist/attachments → lib/Attachments}/PlaceholderUploader.js +33 -28
- package/lib/Attachments/SilentUploader.d.ts +21 -0
- package/lib/Attachments/SilentUploader.js +30 -0
- package/lib/Attachments/context.d.ts +9 -0
- package/lib/Attachments/index.d.ts +97 -0
- package/lib/Attachments/index.en-US.md.bk +10 -0
- package/{dist/attachments → lib/Attachments}/index.js +51 -55
- package/lib/Attachments/index.zh-CN.md.bk +10 -0
- package/lib/Attachments/style/fileCard.d.ts +2 -0
- package/lib/Attachments/style/fileCard.js +68 -0
- package/lib/Attachments/style/index.d.ts +2 -0
- package/lib/Attachments/style/index.js +98 -0
- package/{dist/bubble → lib/Bubble}/Avatar.d.ts +0 -1
- package/{dist/bubble → lib/Bubble}/Avatar.js +8 -5
- package/lib/Bubble/Bubble.d.ts +19 -0
- package/{dist/bubble → lib/Bubble}/Bubble.js +39 -52
- package/lib/Bubble/BubbleList.d.ts +41 -0
- package/lib/Bubble/BubbleList.js +64 -0
- package/{dist/bubble → lib/Bubble}/Cards.d.ts +2 -8
- package/{dist/bubble → lib/Bubble}/Cards.js +9 -9
- package/{dist/bubble → lib/Bubble}/ScrollToBottom.d.ts +0 -1
- package/{dist/bubble → lib/Bubble}/ScrollToBottom.js +15 -14
- package/lib/Bubble/Spin.d.ts +1 -0
- package/lib/Bubble/Spin.js +21 -0
- package/lib/Bubble/hooks/useListData.d.ts +0 -0
- package/lib/Bubble/hooks/useListData.js +0 -0
- package/lib/Bubble/interface.d.ts +62 -0
- package/lib/Bubble/loading.js +17 -0
- package/lib/Bubble/style/avatar.d.ts +2 -0
- package/lib/Bubble/style/avatar.js +8 -0
- package/lib/Bubble/style/index.d.ts +2 -0
- package/lib/Bubble/style/index.js +46 -0
- package/lib/Bubble/style/list.d.ts +2 -0
- package/lib/Bubble/style/list.js +16 -0
- package/{dist/chat-anywhere → lib/ChatAnywhere}/Chat/index.d.ts +0 -1
- package/{dist/chat-anywhere → lib/ChatAnywhere}/Chat/index.js +39 -28
- package/lib/ChatAnywhere/Chat/style.d.ts +2 -0
- package/lib/ChatAnywhere/Chat/style.js +14 -0
- package/lib/ChatAnywhere/Header/index.d.ts +1 -0
- package/lib/ChatAnywhere/Header/index.js +39 -0
- package/lib/ChatAnywhere/Header/style.d.ts +2 -0
- package/lib/ChatAnywhere/Header/style.js +12 -0
- package/lib/ChatAnywhere/Input/index.d.ts +3 -0
- package/{dist/chat-anywhere → lib/ChatAnywhere}/Input/index.js +92 -70
- package/lib/ChatAnywhere/Input/style.d.ts +2 -0
- package/lib/ChatAnywhere/Input/style.js +6 -0
- package/{dist/chat-anywhere → lib/ChatAnywhere}/Layout/index.d.ts +1 -2
- package/lib/ChatAnywhere/Layout/index.js +91 -0
- package/lib/ChatAnywhere/Layout/style.d.ts +2 -0
- package/lib/ChatAnywhere/Layout/style.js +16 -0
- package/lib/ChatAnywhere/SessionList/index.d.ts +3 -0
- package/{dist/chat-anywhere → lib/ChatAnywhere}/SessionList/index.js +67 -55
- package/lib/ChatAnywhere/SessionList/style.d.ts +2 -0
- package/lib/ChatAnywhere/SessionList/style.js +14 -0
- package/lib/ChatAnywhere/hooks/ChatAnywhereProvider.d.ts +148 -0
- package/{dist/chat-anywhere → lib/ChatAnywhere}/hooks/ChatAnywhereProvider.js +11 -5
- package/lib/ChatAnywhere/hooks/types.d.ts +312 -0
- package/{dist/chat-anywhere → lib/ChatAnywhere}/hooks/useInput.d.ts +2 -0
- package/{dist/chat-anywhere → lib/ChatAnywhere}/hooks/useInput.js +8 -2
- package/{dist/chat-anywhere → lib/ChatAnywhere}/hooks/useMessages.d.ts +3 -1
- package/{dist/chat-anywhere → lib/ChatAnywhere}/hooks/useMessages.js +10 -2
- package/{dist/chat-anywhere → lib/ChatAnywhere}/index.d.ts +4 -1
- package/{dist/chat-anywhere → lib/ChatAnywhere}/index.js +28 -15
- package/{dist/conversations → lib/Conversations}/GroupTitle.d.ts +4 -0
- package/{dist/conversations → lib/Conversations}/GroupTitle.js +7 -5
- package/{dist/conversations → lib/Conversations}/Item.d.ts +1 -0
- package/lib/Conversations/Item.js +208 -0
- package/lib/Conversations/hooks/useGroupable.d.ts +8 -0
- package/lib/Conversations/index.d.ts +55 -0
- package/{dist/conversations → lib/Conversations}/index.js +50 -61
- package/lib/Conversations/interface.d.ts +56 -0
- package/lib/Conversations/style.d.ts +2 -0
- package/lib/Conversations/style.js +60 -0
- package/{dist/default-cards/DeepThink → lib/DefaultCards/DeepThinking}/index.d.ts +2 -3
- package/lib/DefaultCards/DeepThinking/index.js +12 -0
- package/lib/DefaultCards/Files/index.d.ts +1 -0
- package/lib/DefaultCards/Files/index.js +56 -0
- package/{dist/default-cards → lib/DefaultCards}/Footer/index.d.ts +3 -4
- package/lib/DefaultCards/Footer/index.js +74 -0
- package/lib/DefaultCards/Images/index.d.ts +1 -0
- package/lib/DefaultCards/Images/index.js +49 -0
- package/{dist/default-cards → lib/DefaultCards}/Interrupted/index.d.ts +1 -3
- package/lib/DefaultCards/Interrupted/index.js +54 -0
- package/lib/DefaultCards/Text/index.d.ts +1 -0
- package/{dist/default-cards → lib/DefaultCards}/Text/index.js +4 -2
- package/lib/DefaultCards/count/index.d.ts +1 -0
- package/lib/DefaultCards/count/index.js +36 -0
- package/{dist/default-cards → lib/DefaultCards}/index.d.ts +1 -1
- package/{dist/default-cards → lib/DefaultCards}/index.js +1 -1
- package/lib/Disclaimer/index.d.ts +22 -0
- package/lib/Disclaimer/index.js +26 -0
- package/lib/Disclaimer/style.d.ts +2 -0
- package/lib/Disclaimer/style.js +10 -0
- package/lib/ImageGenerator/index.d.ts +41 -0
- package/lib/ImageGenerator/index.js +75 -0
- package/lib/ImageGenerator/style.d.ts +2 -0
- package/lib/ImageGenerator/style.js +20 -0
- package/{dist/markdown → lib/Markdown}/Citation.js +19 -14
- package/{dist/markdown → lib/Markdown}/CodeBlock.d.ts +1 -0
- package/{dist/markdown → lib/Markdown}/CodeBlock.js +51 -30
- package/lib/Markdown/ImageOrMedia.d.ts +1 -0
- package/lib/Markdown/ImageOrMedia.js +113 -0
- package/lib/Markdown/Link.js +48 -0
- package/{dist/markdown → lib/Markdown}/Markdown.js +22 -11
- package/lib/Markdown/cursor/Dot.d.ts +1 -0
- package/lib/Markdown/cursor/Dot.js +36 -0
- package/lib/Markdown/cursor/Underline.d.ts +1 -0
- package/lib/Markdown/cursor/Underline.js +20 -0
- package/lib/Markdown/hooks/index.d.ts +0 -0
- package/lib/Markdown/hooks/index.js +0 -0
- package/{dist/markdown → lib/Markdown}/hooks/useTypedEffect.js +1 -1
- package/lib/Markdown/index.d.ts +63 -0
- package/lib/Markdown/index.js +40 -0
- package/lib/Markdown/style.d.ts +2 -0
- package/lib/Markdown/style.js +30 -0
- package/lib/Markdown/type.d.ts +186 -0
- package/{dist/markdown → lib/Markdown}/utils.js +1 -2
- package/lib/Mermaid/index.d.ts +18 -0
- package/{dist/voice-chat/Recorder → lib/Mermaid}/index.js +144 -160
- package/{dist/provider → lib/Provider}/CustomCardsProvider.d.ts +2 -1
- package/{dist/provider → lib/Provider}/CustomCardsProvider.js +5 -3
- package/{dist/provider → lib/Provider}/GlobalProvider.d.ts +1 -1
- package/{dist/provider → lib/Provider}/GlobalProvider.js +5 -3
- package/{dist/provider → lib/Provider}/index.d.ts +1 -2
- package/{dist/provider → lib/Provider}/index.js +9 -6
- package/lib/Provider/types.d.ts +24 -0
- package/lib/Provider/types.js +1 -0
- package/lib/ResponsesAPI/index.d.ts +0 -0
- package/lib/ResponsesAPI/index.js +0 -0
- package/lib/Sender/ModeSelect/index.d.ts +17 -0
- package/lib/Sender/ModeSelect/index.js +109 -0
- package/lib/Sender/ModeSelect/styles.d.ts +0 -0
- package/lib/Sender/ModeSelect/styles.js +0 -0
- package/lib/Sender/SenderHeader.d.ts +63 -0
- package/{dist/sender → lib/Sender}/SenderHeader.js +40 -32
- package/{dist/sender → lib/Sender}/StopLoading.d.ts +1 -1
- package/lib/Sender/StopLoading.js +25 -0
- package/lib/Sender/components/ActionButton.d.ts +72 -0
- package/{dist/sender → lib/Sender}/components/ActionButton.js +9 -5
- package/lib/Sender/components/ClearButton.js +19 -0
- package/lib/Sender/components/LoadingButton.js +28 -0
- package/lib/Sender/components/SendButton.js +20 -0
- package/lib/Sender/components/SpeechButton/RecordingIcon.d.ts +8 -0
- package/lib/Sender/components/SpeechButton/RecordingIcon.js +54 -0
- package/lib/Sender/components/SpeechButton/index.js +35 -0
- package/lib/Sender/index.d.ts +142 -0
- package/{dist/sender → lib/Sender}/index.js +128 -121
- package/lib/Sender/style/index.d.ts +2 -0
- package/lib/Sender/style/index.js +41 -0
- package/{dist/stream → lib/Stream}/index.d.ts +4 -2
- package/{dist/stream → lib/Stream}/index.js +1 -1
- package/lib/Util/createStyle.d.ts +5 -0
- package/lib/Util/createStyle.js +20 -0
- package/lib/Util/sleep.d.ts +1 -0
- package/lib/Util/sleep.js +5 -0
- package/lib/Util/type.js +1 -0
- package/{dist/_util → lib/Util}/warning.d.ts +2 -2
- package/lib/Voice/Recorder.d.ts +1 -0
- package/lib/Voice/Recorder.js +6 -0
- package/lib/Voice/index.d.ts +0 -0
- package/lib/Voice/index.js +0 -0
- package/lib/Welcome/index.d.ts +24 -0
- package/lib/Welcome/index.js +39 -0
- package/lib/index.d.ts +25 -0
- package/lib/index.js +24 -0
- package/package.json +28 -14
- package/dist/accordion/Accordion.d.ts +0 -22
- package/dist/accordion/BodyContent.js +0 -18
- package/dist/accordion/DeepThink.d.ts +0 -7
- package/dist/accordion/DeepThink.js +0 -35
- package/dist/accordion/index.d.ts +0 -2
- package/dist/accordion/index.less +0 -170
- package/dist/attachments/DropArea.d.ts +0 -8
- package/dist/attachments/FileList/AudioIcon.d.ts +0 -2
- package/dist/attachments/FileList/AudioIcon.js +0 -19
- package/dist/attachments/FileList/FileListCard.d.ts +0 -12
- package/dist/attachments/FileList/Progress.d.ts +0 -6
- package/dist/attachments/FileList/VideoIcon.d.ts +0 -2
- package/dist/attachments/FileList/VideoIcon.js +0 -19
- package/dist/attachments/FileList/index.d.ts +0 -16
- package/dist/attachments/PlaceholderUploader.d.ts +0 -17
- package/dist/attachments/SilentUploader.d.ts +0 -9
- package/dist/attachments/SilentUploader.js +0 -23
- package/dist/attachments/context.d.ts +0 -5
- package/dist/attachments/index.d.ts +0 -33
- package/dist/attachments/style/fileCard.d.ts +0 -4
- package/dist/attachments/style/fileCard.js +0 -124
- package/dist/attachments/style/index.d.ts +0 -10
- package/dist/attachments/style/index.js +0 -211
- package/dist/bubble/Bubble.d.ts +0 -11
- package/dist/bubble/BubbleList.d.ts +0 -15
- package/dist/bubble/BubbleList.js +0 -44
- package/dist/bubble/Spin.d.ts +0 -2
- package/dist/bubble/Spin.js +0 -18
- package/dist/bubble/interface.d.ts +0 -26
- package/dist/bubble/loading.js +0 -17
- package/dist/bubble/style/avatar.less +0 -40
- package/dist/bubble/style/content.d.ts +0 -4
- package/dist/bubble/style/content.js +0 -43
- package/dist/bubble/style/index.d.ts +0 -9
- package/dist/bubble/style/index.js +0 -53
- package/dist/bubble/style/list.less +0 -15
- package/dist/bubble/style/scrollToBottom.less +0 -174
- package/dist/chat-anywhere/Chat/index.less +0 -54
- package/dist/chat-anywhere/Header/index.d.ts +0 -3
- package/dist/chat-anywhere/Header/index.js +0 -32
- package/dist/chat-anywhere/Header/index.less +0 -24
- package/dist/chat-anywhere/Input/index.d.ts +0 -3
- package/dist/chat-anywhere/Input/index.less +0 -12
- package/dist/chat-anywhere/Layout/index.js +0 -73
- package/dist/chat-anywhere/Layout/index.less +0 -61
- package/dist/chat-anywhere/SessionList/index.d.ts +0 -5
- package/dist/chat-anywhere/SessionList/index.less +0 -52
- package/dist/chat-anywhere/hooks/ChatAnywhereProvider.d.ts +0 -43
- package/dist/chat-anywhere/hooks/types.d.ts +0 -57
- package/dist/conversations/Item.js +0 -96
- package/dist/conversations/hooks/useGroupable.d.ts +0 -9
- package/dist/conversations/index.d.ts +0 -62
- package/dist/conversations/interface.d.ts +0 -60
- package/dist/conversations/style/index.d.ts +0 -9
- package/dist/conversations/style/index.js +0 -80
- package/dist/default-cards/Count/index.d.ts +0 -3
- package/dist/default-cards/Count/index.js +0 -16
- package/dist/default-cards/Count/index.less +0 -19
- package/dist/default-cards/DeepThink/index.js +0 -11
- package/dist/default-cards/Files/index.d.ts +0 -2
- package/dist/default-cards/Files/index.js +0 -18
- package/dist/default-cards/Footer/index.js +0 -50
- package/dist/default-cards/Footer/index.less +0 -41
- package/dist/default-cards/Images/index.d.ts +0 -3
- package/dist/default-cards/Images/index.js +0 -33
- package/dist/default-cards/Images/index.less +0 -17
- package/dist/default-cards/Interrupted/index.js +0 -40
- package/dist/default-cards/Interrupted/index.less +0 -57
- package/dist/default-cards/Text/index.d.ts +0 -2
- package/dist/disclaimer/index.d.ts +0 -11
- package/dist/disclaimer/index.js +0 -26
- package/dist/docs/1896.async.js +0 -457
- package/dist/docs/2710.async.js +0 -62
- package/dist/docs/2863.async.js +0 -400
- package/dist/docs/3057.async.js +0 -46
- package/dist/docs/3364.async.js +0 -25
- package/dist/docs/404.html +0 -15
- package/dist/docs/4820.async.js +0 -1381
- package/dist/docs/5623.async.js +0 -60
- package/dist/docs/5757.async.js +0 -1
- package/dist/docs/5804.async.js +0 -271
- package/dist/docs/6198.async.js +0 -18
- package/dist/docs/6671.async.js +0 -137
- package/dist/docs/7195.async.js +0 -1
- package/dist/docs/7485.async.js +0 -29
- package/dist/docs/7931.async.js +0 -19
- package/dist/docs/7997.async.js +0 -5
- package/dist/docs/8156.async.js +0 -110
- package/dist/docs/8368.async.js +0 -2
- package/dist/docs/8480.async.js +0 -1449
- package/dist/docs/8618.async.js +0 -246
- package/dist/docs/9016.async.js +0 -32
- package/dist/docs/9016.chunk.css +0 -1
- package/dist/docs/9335.async.js +0 -11
- package/dist/docs/accordion__demos.async.js +0 -9
- package/dist/docs/attachments__demos.async.js +0 -1
- package/dist/docs/bubble__demos.async.js +0 -50
- package/dist/docs/components/accordion/index.html +0 -15
- package/dist/docs/components/accordion-cn/index.html +0 -15
- package/dist/docs/components/attachments/index.html +0 -15
- package/dist/docs/components/attachments-cn/index.html +0 -15
- package/dist/docs/components/bubble/index.html +0 -15
- package/dist/docs/components/bubble-cn/index.html +0 -15
- package/dist/docs/components/bubble-list/index.html +0 -15
- package/dist/docs/components/bubble-list-cn/index.html +0 -15
- package/dist/docs/components/conversations/index.html +0 -15
- package/dist/docs/components/conversations-cn/index.html +0 -15
- package/dist/docs/components/disclaimer/index.html +0 -15
- package/dist/docs/components/disclaimer-cn/index.html +0 -15
- package/dist/docs/components/footer/index.html +0 -15
- package/dist/docs/components/footer-cn/index.html +0 -15
- package/dist/docs/components/markdown/index.html +0 -15
- package/dist/docs/components/markdown-cn/index.html +0 -15
- package/dist/docs/components/sender/index.html +0 -15
- package/dist/docs/components/sender-cn/index.html +0 -15
- package/dist/docs/components/status/index.html +0 -15
- package/dist/docs/components/status-cn/index.html +0 -15
- package/dist/docs/components/welcome/index.html +0 -15
- package/dist/docs/components/welcome-cn/index.html +0 -15
- package/dist/docs/components__accordion__index.en-US.md.async.js +0 -6
- package/dist/docs/components__accordion__index.en-US.md.chunk.css +0 -1
- package/dist/docs/components__accordion__index.zh-CN.md.async.js +0 -6
- package/dist/docs/components__accordion__index.zh-CN.md.chunk.css +0 -1
- package/dist/docs/components__attachments__index.en-US.md.async.js +0 -1
- package/dist/docs/components__attachments__index.en-US.md.chunk.css +0 -1
- package/dist/docs/components__attachments__index.zh-CN.md.async.js +0 -1
- package/dist/docs/components__attachments__index.zh-CN.md.chunk.css +0 -1
- package/dist/docs/components__bubble-list__index.en-US.md.async.js +0 -2
- package/dist/docs/components__bubble-list__index.en-US.md.chunk.css +0 -1
- package/dist/docs/components__bubble-list__index.zh-CN.md.async.js +0 -2
- package/dist/docs/components__bubble-list__index.zh-CN.md.chunk.css +0 -1
- package/dist/docs/components__bubble__index.en-US.md.async.js +0 -1
- package/dist/docs/components__bubble__index.en-US.md.chunk.css +0 -1
- package/dist/docs/components__bubble__index.zh-CN.md.async.js +0 -1
- package/dist/docs/components__bubble__index.zh-CN.md.chunk.css +0 -1
- package/dist/docs/components__conversations__index.en-US.md.async.js +0 -2
- package/dist/docs/components__conversations__index.en-US.md.chunk.css +0 -1
- package/dist/docs/components__conversations__index.zh-CN.md.async.js +0 -1
- package/dist/docs/components__conversations__index.zh-CN.md.chunk.css +0 -1
- package/dist/docs/components__disclaimer__index.en-US.md.async.js +0 -1
- package/dist/docs/components__disclaimer__index.en-US.md.chunk.css +0 -1
- package/dist/docs/components__disclaimer__index.zh-CN.md.async.js +0 -1
- package/dist/docs/components__disclaimer__index.zh-CN.md.chunk.css +0 -1
- package/dist/docs/components__footer__index.en-US.md.async.js +0 -1
- package/dist/docs/components__footer__index.en-US.md.chunk.css +0 -1
- package/dist/docs/components__footer__index.zh-CN.md.async.js +0 -2
- package/dist/docs/components__footer__index.zh-CN.md.chunk.css +0 -1
- package/dist/docs/components__markdown__index.en-US.md.async.js +0 -1
- package/dist/docs/components__markdown__index.en-US.md.chunk.css +0 -1
- package/dist/docs/components__markdown__index.zh-CN.md.async.js +0 -1
- package/dist/docs/components__markdown__index.zh-CN.md.chunk.css +0 -1
- package/dist/docs/components__sender__index.en-US.md.async.js +0 -1
- package/dist/docs/components__sender__index.en-US.md.chunk.css +0 -1
- package/dist/docs/components__sender__index.zh-CN.md.async.js +0 -1
- package/dist/docs/components__sender__index.zh-CN.md.chunk.css +0 -1
- package/dist/docs/components__status__index.en-US.md.async.js +0 -1
- package/dist/docs/components__status__index.en-US.md.chunk.css +0 -1
- package/dist/docs/components__status__index.zh-CN.md.async.js +0 -2
- package/dist/docs/components__status__index.zh-CN.md.chunk.css +0 -1
- package/dist/docs/components__welcome__index.en-US.md.async.js +0 -2
- package/dist/docs/components__welcome__index.en-US.md.chunk.css +0 -1
- package/dist/docs/components__welcome__index.zh-CN.md.async.js +0 -2
- package/dist/docs/components__welcome__index.zh-CN.md.chunk.css +0 -1
- package/dist/docs/conversations__demos.async.js +0 -1
- package/dist/docs/demos.async.js +0 -47
- package/dist/docs/demos.chunk.css +0 -1
- package/dist/docs/disclaimer__demos.async.js +0 -1
- package/dist/docs/docs/development/ag-ui/index.html +0 -15
- package/dist/docs/docs/development/ag-ui-cn/index.html +0 -15
- package/dist/docs/docs/development/backend/index.html +0 -15
- package/dist/docs/docs/development/backend-cn/index.html +0 -15
- package/dist/docs/docs/development/cards/index.html +0 -15
- package/dist/docs/docs/development/cards-cn/index.html +0 -15
- package/dist/docs/docs/development/chatanywhere/index.html +0 -15
- package/dist/docs/docs/development/chatanywhere-api/index.html +0 -15
- package/dist/docs/docs/development/chatanywhere-api-cn/index.html +0 -15
- package/dist/docs/docs/development/chatanywhere-cn/index.html +0 -15
- package/dist/docs/docs/development/custom/index.html +0 -15
- package/dist/docs/docs/development/custom-cn/index.html +0 -15
- package/dist/docs/docs/development/overview/index.html +0 -15
- package/dist/docs/docs/development/overview-cn/index.html +0 -15
- package/dist/docs/docs/development/qwen/index.html +0 -15
- package/dist/docs/docs/development/qwen-cn/index.html +0 -15
- package/dist/docs/docs/templates/copilot/index.html +0 -15
- package/dist/docs/docs/templates/copilot-cn/index.html +0 -15
- package/dist/docs/docs/templates/native/index.html +0 -15
- package/dist/docs/docs/templates/native-cn/index.html +0 -15
- package/dist/docs/docs/templates/voice/index.html +0 -15
- package/dist/docs/docs/templates/voice-cn/index.html +0 -15
- package/dist/docs/docs__development__ag-ui.en-US.md.async.js +0 -210
- package/dist/docs/docs__development__ag-ui.en-US.md.chunk.css +0 -1
- package/dist/docs/docs__development__ag-ui.zh-CN.md.async.js +0 -210
- package/dist/docs/docs__development__ag-ui.zh-CN.md.chunk.css +0 -1
- package/dist/docs/docs__development__backend.en-US.md.async.js +0 -12
- package/dist/docs/docs__development__backend.en-US.md.chunk.css +0 -1
- package/dist/docs/docs__development__backend.zh-CN.md.async.js +0 -12
- package/dist/docs/docs__development__backend.zh-CN.md.chunk.css +0 -1
- package/dist/docs/docs__development__cards.en-US.md.async.js +0 -27
- package/dist/docs/docs__development__cards.en-US.md.chunk.css +0 -1
- package/dist/docs/docs__development__cards.zh-CN.md.async.js +0 -27
- package/dist/docs/docs__development__cards.zh-CN.md.chunk.css +0 -1
- package/dist/docs/docs__development__chatanywhere-api.en-US.md.async.js +0 -69
- package/dist/docs/docs__development__chatanywhere-api.en-US.md.chunk.css +0 -1
- package/dist/docs/docs__development__chatanywhere-api.zh-CN.md.async.js +0 -69
- package/dist/docs/docs__development__chatanywhere-api.zh-CN.md.chunk.css +0 -1
- package/dist/docs/docs__development__chatanywhere.en-US.md.async.js +0 -77
- package/dist/docs/docs__development__chatanywhere.en-US.md.chunk.css +0 -1
- package/dist/docs/docs__development__chatanywhere.zh-CN.md.async.js +0 -77
- package/dist/docs/docs__development__chatanywhere.zh-CN.md.chunk.css +0 -1
- package/dist/docs/docs__development__custom.en-US.md.async.js +0 -22
- package/dist/docs/docs__development__custom.en-US.md.chunk.css +0 -1
- package/dist/docs/docs__development__custom.zh-CN.md.async.js +0 -22
- package/dist/docs/docs__development__custom.zh-CN.md.chunk.css +0 -1
- package/dist/docs/docs__development__overview.en-US.md.async.js +0 -21
- package/dist/docs/docs__development__overview.en-US.md.chunk.css +0 -1
- package/dist/docs/docs__development__overview.zh-CN.md.async.js +0 -21
- package/dist/docs/docs__development__overview.zh-CN.md.chunk.css +0 -1
- package/dist/docs/docs__development__qwen.en-US.md.async.js +0 -25
- package/dist/docs/docs__development__qwen.en-US.md.chunk.css +0 -1
- package/dist/docs/docs__development__qwen.zh-CN.md.async.js +0 -25
- package/dist/docs/docs__development__qwen.zh-CN.md.chunk.css +0 -1
- package/dist/docs/docs__templates__copilot.en-US.md.async.js +0 -1
- package/dist/docs/docs__templates__copilot.en-US.md.chunk.css +0 -1
- package/dist/docs/docs__templates__copilot.zh-CN.md.async.js +0 -1
- package/dist/docs/docs__templates__copilot.zh-CN.md.chunk.css +0 -1
- package/dist/docs/docs__templates__native.en-US.md.async.js +0 -1
- package/dist/docs/docs__templates__native.en-US.md.chunk.css +0 -1
- package/dist/docs/docs__templates__native.zh-CN.md.async.js +0 -1
- package/dist/docs/docs__templates__native.zh-CN.md.chunk.css +0 -1
- package/dist/docs/docs__templates__voice.en-US.md.async.js +0 -20
- package/dist/docs/docs__templates__voice.en-US.md.chunk.css +0 -1
- package/dist/docs/docs__templates__voice.zh-CN.md.async.js +0 -1
- package/dist/docs/docs__templates__voice.zh-CN.md.chunk.css +0 -1
- package/dist/docs/dumi__pages__index__index.en-US.async.js +0 -1
- package/dist/docs/dumi__pages__index__index.en-US.chunk.css +0 -1
- package/dist/docs/dumi__pages__index__index.zh-CN.async.js +0 -1
- package/dist/docs/dumi__pages__index__index.zh-CN.chunk.css +0 -1
- package/dist/docs/dumi__theme__layouts__DocLayout__index.async.js +0 -1
- package/dist/docs/dumi__theme__layouts__DocLayout__index.chunk.css +0 -1
- package/dist/docs/dumi__theme__layouts__GlobalLayout__index.async.js +0 -18
- package/dist/docs/dumi__theme__layouts__GlobalLayout__index.chunk.css +0 -1
- package/dist/docs/dumi__tmp-production__dumi__theme__ContextWrapper.async.js +0 -1
- package/dist/docs/index/index.html +0 -15
- package/dist/docs/index-cn/index.html +0 -15
- package/dist/docs/markdown__demos.async.js +0 -164
- package/dist/docs/meta__components__en-US.async.js +0 -9
- package/dist/docs/meta__components__zh-CN.async.js +0 -10
- package/dist/docs/meta__docs__en-US.async.js +0 -475
- package/dist/docs/meta__docs__en-US.chunk.css +0 -1
- package/dist/docs/meta__docs__zh-CN.async.js +0 -456
- package/dist/docs/meta__docs__zh-CN.chunk.css +0 -1
- package/dist/docs/nm__dumi__dist__client__pages__404.async.js +0 -1
- package/dist/docs/nm__dumi__dist__client__pages__Demo__index.async.js +0 -1
- package/dist/docs/nm__dumi__dist__client__pages__Demo__index.chunk.css +0 -1
- package/dist/docs/preload_helper.js +0 -1
- package/dist/docs/sender__demos.async.js +0 -1
- package/dist/docs/umi.css +0 -1
- package/dist/docs/umi.js +0 -107
- package/dist/docs/welcome__demos.async.js +0 -1
- package/dist/docs/~demos/:id/index.html +0 -15
- package/dist/docs/~demos/accordion-demo-inline/index.html +0 -15
- package/dist/docs/~demos/accordion-demo-mutisteps/index.html +0 -15
- package/dist/docs/~demos/accordion-demo-thinking/index.html +0 -15
- package/dist/docs/~demos/attachments-demo-files/index.html +0 -15
- package/dist/docs/~demos/bubble-demo-basic/index.html +0 -15
- package/dist/docs/~demos/bubble-demo-havestopped/index.html +0 -15
- package/dist/docs/~demos/bubble-demo-userwithfile/index.html +0 -15
- package/dist/docs/~demos/bubble-demo-userwithimage/index.html +0 -15
- package/dist/docs/~demos/bubble-demo-userwithnormal/index.html +0 -15
- package/dist/docs/~demos/bubble-demo-withavatar/index.html +0 -15
- package/dist/docs/~demos/bubble-demo-withcode/index.html +0 -15
- package/dist/docs/~demos/bubble-demo-witherror/index.html +0 -15
- package/dist/docs/~demos/bubble-demo-witherrordetail/index.html +0 -15
- package/dist/docs/~demos/bubble-demo-withimage/index.html +0 -15
- package/dist/docs/~demos/bubble-demo-withusage/index.html +0 -15
- package/dist/docs/~demos/bubble-demo-withwaitingmessage/index.html +0 -15
- package/dist/docs/~demos/components-bubble-list-demo-basic/index.html +0 -15
- package/dist/docs/~demos/components-footer-demo-basic/index.html +0 -15
- package/dist/docs/~demos/components-footer-demo-withusage/index.html +0 -15
- package/dist/docs/~demos/components-status-demo-basic/index.html +0 -15
- package/dist/docs/~demos/conversations-demo-basic/index.html +0 -15
- package/dist/docs/~demos/disclaimer-demo-demo/index.html +0 -15
- package/dist/docs/~demos/disclaimer-demo-withlink/index.html +0 -15
- package/dist/docs/~demos/docs-development-ag-ui-demo-with-copilotkit/index.html +0 -15
- package/dist/docs/~demos/docs-development-cards-demo-file/index.html +0 -15
- package/dist/docs/~demos/docs-development-cards-demo-footer/index.html +0 -15
- package/dist/docs/~demos/docs-development-cards-demo-image/index.html +0 -15
- package/dist/docs/~demos/docs-development-cards-demo-text/index.html +0 -15
- package/dist/docs/~demos/docs-development-custom-demo-custom/index.html +0 -15
- package/dist/docs/~demos/docs-templates-copilot-demo-copilot/index.html +0 -15
- package/dist/docs/~demos/docs-templates-native-demo-basic/index.html +0 -15
- package/dist/docs/~demos/docs-templates-voice-demo-demo/index.html +0 -15
- package/dist/docs/~demos/markdown-demo-citations/index.html +0 -15
- package/dist/docs/~demos/markdown-demo-cursor/index.html +0 -15
- package/dist/docs/~demos/markdown-demo-mathjax/index.html +0 -15
- package/dist/docs/~demos/markdown-demo-md/index.html +0 -15
- package/dist/docs/~demos/sender-demo-basic/index.html +0 -15
- package/dist/docs/~demos/sender-demo-disabled/index.html +0 -15
- package/dist/docs/~demos/sender-demo-loading/index.html +0 -15
- package/dist/docs/~demos/sender-demo-moreprefixaction/index.html +0 -15
- package/dist/docs/~demos/sender-demo-withfile/index.html +0 -15
- package/dist/docs/~demos/welcome-demo-demo0/index.html +0 -15
- package/dist/docs/~demos/welcome-demo-demo1/index.html +0 -15
- package/dist/docs/~demos/welcome-demo-demo2/index.html +0 -15
- package/dist/index.d.ts +0 -26
- package/dist/index.js +0 -20
- package/dist/index.less +0 -1
- package/dist/markdown/ImageOrVideo.d.ts +0 -2
- package/dist/markdown/ImageOrVideo.js +0 -81
- package/dist/markdown/Link.js +0 -28
- package/dist/markdown/cursor/Blur.d.ts +0 -3
- package/dist/markdown/cursor/Blur.js +0 -7
- package/dist/markdown/cursor/Dot.d.ts +0 -3
- package/dist/markdown/cursor/Dot.js +0 -16
- package/dist/markdown/cursor/Underline.d.ts +0 -3
- package/dist/markdown/cursor/Underline.js +0 -7
- package/dist/markdown/cursor/index.less +0 -124
- package/dist/markdown/hooks/index.d.ts +0 -1
- package/dist/markdown/hooks/index.js +0 -49
- package/dist/markdown/index.d.ts +0 -16
- package/dist/markdown/index.js +0 -37
- package/dist/markdown/index.less +0 -204
- package/dist/markdown/type.d.ts +0 -46
- package/dist/provider/types.d.ts +0 -8
- package/dist/sender/SenderHeader.d.ts +0 -19
- package/dist/sender/StopLoading.js +0 -20
- package/dist/sender/components/ActionButton.d.ts +0 -22
- package/dist/sender/components/ClearButton.js +0 -13
- package/dist/sender/components/LoadingButton.js +0 -22
- package/dist/sender/components/SendButton.js +0 -14
- package/dist/sender/components/SpeechButton/RecordingIcon.d.ts +0 -5
- package/dist/sender/components/SpeechButton/RecordingIcon.js +0 -49
- package/dist/sender/components/SpeechButton/index.js +0 -30
- package/dist/sender/index.d.ts +0 -61
- package/dist/sender/style/header.d.ts +0 -4
- package/dist/sender/style/header.js +0 -46
- package/dist/sender/style/index.d.ts +0 -10
- package/dist/sender/style/index.js +0 -123
- package/dist/stream/index.en-US.md.bk +0 -50
- package/dist/stream/index.zh-CN.md.bk +0 -51
- package/dist/theme/components.d.ts +0 -10
- package/dist/theme/cssinjs-utils.d.ts +0 -14
- package/dist/theme/genStyleUtils.d.ts +0 -28
- package/dist/theme/useToken.d.ts +0 -18
- package/dist/theme/useToken.js +0 -110
- package/dist/voice-chat/Recorder/index.d.ts +0 -26
- package/dist/voice-chat/VoiceChatProvider/context.d.ts +0 -22
- package/dist/voice-chat/VoiceChatProvider/context.js +0 -3
- package/dist/voice-chat/VoiceChatProvider/hooks/useChatState.d.ts +0 -1
- package/dist/voice-chat/VoiceChatProvider/hooks/useChatState.js +0 -5
- package/dist/voice-chat/VoiceChatProvider/hooks/useMessages.d.ts +0 -8
- package/dist/voice-chat/VoiceChatProvider/hooks/useMessages.js +0 -31
- package/dist/voice-chat/VoiceChatProvider/hooks/useRecorder.d.ts +0 -5
- package/dist/voice-chat/VoiceChatProvider/hooks/useRecorder.js +0 -48
- package/dist/voice-chat/VoiceChatProvider/hooks/useVoiceChat.d.ts +0 -4
- package/dist/voice-chat/VoiceChatProvider/hooks/useVoiceChat.js +0 -10
- package/dist/voice-chat/VoiceChatProvider/index.d.ts +0 -9
- package/dist/voice-chat/VoiceChatProvider/index.js +0 -55
- package/dist/voice-chat/VoiceChatService/index.d.ts +0 -34
- package/dist/voice-chat/index.d.ts +0 -2
- package/dist/voice-chat/index.js +0 -2
- package/dist/voice-chat/types/index.d.ts +0 -12
- package/dist/voice-chat/types/index.js +0 -4
- package/dist/welcome/icon.d.ts +0 -2
- package/dist/welcome/icon.js +0 -38
- package/dist/welcome/index.d.ts +0 -9
- package/dist/welcome/index.js +0 -57
- /package/{dist/_util/type.js → lib/AGUI/components/chat/props.js} +0 -0
- /package/{dist/bubble/interface.js → lib/AGUI/context/index.js} +0 -0
- /package/{dist/bubble/hooks/useDisplayData.d.ts → lib/AGUI/styles.css} +0 -0
- /package/{dist/bubble/hooks/useDisplayData.js → lib/AGUI/types/css.d.ts} +0 -0
- /package/{dist/bubble/hooks/useListData.d.ts → lib/AGUI/types/css.js} +0 -0
- /package/{dist/chat-anywhere/hooks/types.js → lib/AGUI/types/index.js} +0 -0
- /package/{dist/conversations/interface.js → lib/AGUI/types/suggestions.js} +0 -0
- /package/{dist/accordion → lib/Accordion}/index.js +0 -0
- /package/{dist/attachments → lib/Attachments}/context.js +0 -0
- /package/{dist/attachments → lib/Attachments}/util.d.ts +0 -0
- /package/{dist/attachments → lib/Attachments}/util.js +0 -0
- /package/{dist/bubble/hooks/useListData.js → lib/Bubble/hooks/useDisplayData.d.ts} +0 -0
- /package/{dist/default-cards/DeepThink/index.less → lib/Bubble/hooks/useDisplayData.js} +0 -0
- /package/{dist/bubble → lib/Bubble}/index.d.ts +0 -0
- /package/{dist/bubble → lib/Bubble}/index.js +0 -0
- /package/{dist/markdown/type.js → lib/Bubble/interface.js} +0 -0
- /package/{dist/bubble → lib/Bubble}/loading.d.ts +0 -0
- /package/{dist/chat-anywhere → lib/ChatAnywhere}/Chat/Ref.d.ts +0 -0
- /package/{dist/chat-anywhere → lib/ChatAnywhere}/Chat/Ref.js +0 -0
- /package/{dist/provider → lib/ChatAnywhere/hooks}/types.js +0 -0
- /package/{dist/chat-anywhere → lib/ChatAnywhere}/hooks/useSessionList.d.ts +0 -0
- /package/{dist/chat-anywhere → lib/ChatAnywhere}/hooks/useSessionList.js +0 -0
- /package/{dist/conversations → lib/Conversations}/hooks/useGroupable.js +0 -0
- /package/{dist/theme/components.js → lib/Conversations/interface.js} +0 -0
- /package/{dist/markdown → lib/Markdown}/Citation.d.ts +0 -0
- /package/{dist/markdown → lib/Markdown}/Link.d.ts +0 -0
- /package/{dist/markdown → lib/Markdown}/Markdown.d.ts +0 -0
- /package/{dist/markdown → lib/Markdown}/hooks/useTypedEffect.d.ts +0 -0
- /package/{dist/markdown → lib/Markdown}/plugins/footnote.d.ts +0 -0
- /package/{dist/markdown → lib/Markdown}/plugins/footnote.js +0 -0
- /package/{dist/markdown → lib/Markdown}/plugins/katexDir.d.ts +0 -0
- /package/{dist/markdown → lib/Markdown}/plugins/katexDir.js +0 -0
- /package/{dist/markdown → lib/Markdown}/rehype/fadeIn.d.ts +0 -0
- /package/{dist/markdown → lib/Markdown}/rehype/fadeIn.js +0 -0
- /package/{dist/theme/cssinjs-utils.js → lib/Markdown/type.js} +0 -0
- /package/{dist/markdown → lib/Markdown}/utils.d.ts +0 -0
- /package/{dist/sender → lib/Sender}/components/ClearButton.d.ts +0 -0
- /package/{dist/sender → lib/Sender}/components/LoadingButton.d.ts +0 -0
- /package/{dist/sender → lib/Sender}/components/SendButton.d.ts +0 -0
- /package/{dist/sender → lib/Sender}/components/SpeechButton/index.d.ts +0 -0
- /package/{dist/sender → lib/Sender}/useSpeech.d.ts +0 -0
- /package/{dist/sender → lib/Sender}/useSpeech.js +0 -0
- /package/{dist/_util → lib/Util}/hooks/use-proxy-imperative-handle.d.ts +0 -0
- /package/{dist/_util → lib/Util}/hooks/use-proxy-imperative-handle.js +0 -0
- /package/{dist/_util → lib/Util}/type.d.ts +0 -0
- /package/{dist/_util → lib/Util}/warning.js +0 -0
- /package/{dist/version → lib/Version}/index.d.ts +0 -0
- /package/{dist/version → lib/Version}/index.js +0 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface SendHeaderContextProps {
|
|
3
|
+
/**
|
|
4
|
+
* @description 自定义CSS类名前缀,用于样式隔离和主题定制
|
|
5
|
+
* @descriptionEn Custom CSS class name prefix for style isolation and theme customization
|
|
6
|
+
*/
|
|
7
|
+
prefixCls: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const SendHeaderContext: React.Context<SendHeaderContextProps>;
|
|
10
|
+
export type SemanticType = 'header' | 'content';
|
|
11
|
+
export interface SenderHeaderProps {
|
|
12
|
+
/**
|
|
13
|
+
* @description 是否强制渲染组件,即使不可见也保持DOM结构
|
|
14
|
+
* @descriptionEn Whether to force render the component, maintaining DOM structure even when invisible
|
|
15
|
+
*/
|
|
16
|
+
forceRender?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* @description 是否展开头部区域,控制显示状态
|
|
19
|
+
* @descriptionEn Whether to expand the header area, controls display state
|
|
20
|
+
*/
|
|
21
|
+
open?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* @description 展开状态变化时的回调函数
|
|
24
|
+
* @descriptionEn Callback function when expand state changes
|
|
25
|
+
*/
|
|
26
|
+
onOpenChange?: (open: boolean) => void;
|
|
27
|
+
/**
|
|
28
|
+
* @description 头部标题内容,支持文本或React元素
|
|
29
|
+
* @descriptionEn Header title content, supports text or React elements
|
|
30
|
+
*/
|
|
31
|
+
title?: React.ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* @description 头部内容区域,用于显示额外的信息或控件
|
|
34
|
+
* @descriptionEn Header content area for displaying additional information or controls
|
|
35
|
+
*/
|
|
36
|
+
children?: React.ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* @description 组件的CSS类名
|
|
39
|
+
* @descriptionEn CSS class name for the component
|
|
40
|
+
*/
|
|
41
|
+
className?: string;
|
|
42
|
+
/**
|
|
43
|
+
* @description 组件的内联样式对象
|
|
44
|
+
* @descriptionEn Inline style object for the component
|
|
45
|
+
*/
|
|
46
|
+
style?: React.CSSProperties;
|
|
47
|
+
/**
|
|
48
|
+
* @description 语义化CSS类名,用于为不同区域添加自定义类名
|
|
49
|
+
* @descriptionEn Semantic CSS class names for adding custom classes to different areas
|
|
50
|
+
*/
|
|
51
|
+
classNames?: Partial<Record<SemanticType, string>>;
|
|
52
|
+
/**
|
|
53
|
+
* @description 语义化样式对象,用于精确控制不同区域的样式
|
|
54
|
+
* @descriptionEn Semantic style object for precise control of different area styles
|
|
55
|
+
*/
|
|
56
|
+
styles?: Partial<Record<SemanticType, React.CSSProperties>>;
|
|
57
|
+
/**
|
|
58
|
+
* @description 是否显示关闭按钮,用于控制头部区域的展开/收起
|
|
59
|
+
* @descriptionEn Whether to show close button for controlling header area expand/collapse
|
|
60
|
+
*/
|
|
61
|
+
closable?: boolean;
|
|
62
|
+
}
|
|
63
|
+
export default function SenderHeader(props: SenderHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,11 +4,13 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
import { CloseOutlined } from
|
|
7
|
+
import { CloseOutlined } from "@agentscope-ai/icons-override-antd";
|
|
8
8
|
import { Button } from 'antd';
|
|
9
9
|
import classNames from 'classnames';
|
|
10
10
|
import CSSMotion from 'rc-motion';
|
|
11
11
|
import * as React from 'react';
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
14
|
export var SendHeaderContext = /*#__PURE__*/React.createContext({});
|
|
13
15
|
var collapseHeight = function collapseHeight() {
|
|
14
16
|
return {
|
|
@@ -24,7 +26,7 @@ export default function SenderHeader(props) {
|
|
|
24
26
|
var title = props.title,
|
|
25
27
|
onOpenChange = props.onOpenChange,
|
|
26
28
|
open = props.open,
|
|
27
|
-
|
|
29
|
+
_children = props.children,
|
|
28
30
|
className = props.className,
|
|
29
31
|
style = props.style,
|
|
30
32
|
_props$classNames = props.classNames,
|
|
@@ -36,7 +38,7 @@ export default function SenderHeader(props) {
|
|
|
36
38
|
var _React$useContext = React.useContext(SendHeaderContext),
|
|
37
39
|
prefixCls = _React$useContext.prefixCls;
|
|
38
40
|
var headerCls = "".concat(prefixCls, "-header");
|
|
39
|
-
return /*#__PURE__*/
|
|
41
|
+
return /*#__PURE__*/_jsx(CSSMotion, {
|
|
40
42
|
motionEnter: true,
|
|
41
43
|
motionLeave: true,
|
|
42
44
|
motionName: "".concat(headerCls, "-motion"),
|
|
@@ -46,34 +48,40 @@ export default function SenderHeader(props) {
|
|
|
46
48
|
onLeaveStart: expandedHeight,
|
|
47
49
|
onLeaveActive: collapseHeight,
|
|
48
50
|
visible: open,
|
|
49
|
-
forceRender: forceRender
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
51
|
+
forceRender: forceRender,
|
|
52
|
+
children: function children(_ref) {
|
|
53
|
+
var motionClassName = _ref.className,
|
|
54
|
+
motionStyle = _ref.style;
|
|
55
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
56
|
+
className: classNames(headerCls, motionClassName, className),
|
|
57
|
+
style: _objectSpread(_objectSpread({}, motionStyle), style),
|
|
58
|
+
children: [(closable !== false || title) && /*#__PURE__*/_jsxs("div", {
|
|
59
|
+
className:
|
|
60
|
+
// We follow antd naming standard here.
|
|
61
|
+
// So the header part is use `-header` suffix.
|
|
62
|
+
// Though its little bit weird for double `-header`.
|
|
63
|
+
classNames("".concat(headerCls, "-header"), classes.header),
|
|
64
|
+
style: _objectSpread({}, styles.header),
|
|
65
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
66
|
+
className: "".concat(headerCls, "-title"),
|
|
67
|
+
children: title
|
|
68
|
+
}), closable !== false && /*#__PURE__*/_jsx("div", {
|
|
69
|
+
className: "".concat(headerCls, "-close"),
|
|
70
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
71
|
+
type: "text",
|
|
72
|
+
icon: /*#__PURE__*/_jsx(CloseOutlined, {}),
|
|
73
|
+
size: "small",
|
|
74
|
+
onClick: function onClick() {
|
|
75
|
+
onOpenChange === null || onOpenChange === void 0 || onOpenChange(!open);
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
})]
|
|
79
|
+
}), _children && /*#__PURE__*/_jsx("div", {
|
|
80
|
+
className: classNames("".concat(headerCls, "-content"), classes.content),
|
|
81
|
+
style: _objectSpread({}, styles.content),
|
|
82
|
+
children: _children
|
|
83
|
+
})]
|
|
84
|
+
});
|
|
85
|
+
}
|
|
78
86
|
});
|
|
79
87
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React, { memo } from 'react';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
var StopLoadingIcon = /*#__PURE__*/memo(function (props) {
|
|
5
|
+
var className = props.className;
|
|
6
|
+
return /*#__PURE__*/_jsxs("svg", {
|
|
7
|
+
color: "currentColor",
|
|
8
|
+
viewBox: "0 0 1000 1000",
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
11
|
+
className: className,
|
|
12
|
+
children: [/*#__PURE__*/_jsx("title", {
|
|
13
|
+
children: "Stop Loading"
|
|
14
|
+
}), /*#__PURE__*/_jsx("rect", {
|
|
15
|
+
fill: "currentColor",
|
|
16
|
+
height: "250",
|
|
17
|
+
rx: "24",
|
|
18
|
+
ry: "24",
|
|
19
|
+
width: "250",
|
|
20
|
+
x: "375",
|
|
21
|
+
y: "375"
|
|
22
|
+
})]
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
export default StopLoadingIcon;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ActionButtonContextProps {
|
|
3
|
+
/**
|
|
4
|
+
* @description 自定义CSS类名前缀,用于样式隔离和主题定制
|
|
5
|
+
* @descriptionEn Custom CSS class name prefix for style isolation and theme customization
|
|
6
|
+
*/
|
|
7
|
+
prefixCls: string;
|
|
8
|
+
/**
|
|
9
|
+
* @description 发送消息的回调函数
|
|
10
|
+
* @descriptionEn Callback function for sending messages
|
|
11
|
+
*/
|
|
12
|
+
onSend?: VoidFunction;
|
|
13
|
+
/**
|
|
14
|
+
* @description 是否禁用发送按钮
|
|
15
|
+
* @descriptionEn Whether to disable the send button
|
|
16
|
+
*/
|
|
17
|
+
onSendDisabled?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* @description 清空输入的回调函数
|
|
20
|
+
* @descriptionEn Callback function for clearing input
|
|
21
|
+
*/
|
|
22
|
+
onClear?: VoidFunction;
|
|
23
|
+
/**
|
|
24
|
+
* @description 是否禁用清空按钮
|
|
25
|
+
* @descriptionEn Whether to disable the clear button
|
|
26
|
+
*/
|
|
27
|
+
onClearDisabled?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* @description 取消操作的回调函数
|
|
30
|
+
* @descriptionEn Callback function for canceling operations
|
|
31
|
+
*/
|
|
32
|
+
onCancel?: VoidFunction;
|
|
33
|
+
/**
|
|
34
|
+
* @description 是否禁用取消按钮
|
|
35
|
+
* @descriptionEn Whether to disable the cancel button
|
|
36
|
+
*/
|
|
37
|
+
onCancelDisabled?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* @description 语音输入的回调函数
|
|
40
|
+
* @descriptionEn Callback function for voice input
|
|
41
|
+
*/
|
|
42
|
+
onSpeech?: VoidFunction;
|
|
43
|
+
/**
|
|
44
|
+
* @description 是否禁用语音按钮
|
|
45
|
+
* @descriptionEn Whether to disable the speech button
|
|
46
|
+
*/
|
|
47
|
+
onSpeechDisabled?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* @description 是否正在录音,影响语音按钮的显示状态
|
|
50
|
+
* @descriptionEn Whether currently recording, affects the display state of the speech button
|
|
51
|
+
*/
|
|
52
|
+
speechRecording?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* @description 是否禁用所有操作按钮
|
|
55
|
+
* @descriptionEn Whether to disable all action buttons
|
|
56
|
+
*/
|
|
57
|
+
disabled?: boolean;
|
|
58
|
+
}
|
|
59
|
+
export declare const ActionButtonContext: React.Context<ActionButtonContextProps>;
|
|
60
|
+
export interface ActionButtonProps {
|
|
61
|
+
/**
|
|
62
|
+
* @description 按钮的操作类型,决定按钮的行为和样式
|
|
63
|
+
* @descriptionEn Action type of the button, determines button behavior and style
|
|
64
|
+
*/
|
|
65
|
+
action: 'onSend' | 'onClear' | 'onCancel' | 'onSpeech';
|
|
66
|
+
onClick?: (e: any) => void;
|
|
67
|
+
className?: string;
|
|
68
|
+
disabled?: boolean;
|
|
69
|
+
}
|
|
70
|
+
export declare function ActionButton(props: ActionButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
71
|
+
declare const _default: React.ForwardRefExoticComponent<ActionButtonProps & React.RefAttributes<unknown>>;
|
|
72
|
+
export default _default;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
var _excluded = ["className", "action", "onClick"];
|
|
3
|
-
function
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
6
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
7
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
8
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
8
9
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
9
|
-
import {
|
|
10
|
+
import { IconButton } from "@agentscope-ai/design";
|
|
10
11
|
import classNames from 'classnames';
|
|
11
12
|
import * as React from 'react';
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
14
|
export var ActionButtonContext = /*#__PURE__*/React.createContext(null);
|
|
13
|
-
export function ActionButton(props
|
|
15
|
+
export function ActionButton(props) {
|
|
14
16
|
var _ref;
|
|
15
17
|
var className = props.className,
|
|
16
18
|
action = props.action,
|
|
@@ -21,8 +23,10 @@ export function ActionButton(props, ref) {
|
|
|
21
23
|
rootDisabled = context.disabled;
|
|
22
24
|
var _onClick = context[action];
|
|
23
25
|
var mergedDisabled = (_ref = rootDisabled !== null && rootDisabled !== void 0 ? rootDisabled : restProps.disabled) !== null && _ref !== void 0 ? _ref : context["".concat(action, "Disabled")];
|
|
24
|
-
return /*#__PURE__*/
|
|
25
|
-
|
|
26
|
+
return /*#__PURE__*/_jsx(IconButton, _objectSpread(_objectSpread({
|
|
27
|
+
bordered: false,
|
|
28
|
+
disabled: mergedDisabled
|
|
29
|
+
}, restProps), {}, {
|
|
26
30
|
onClick: function onClick(e) {
|
|
27
31
|
if (!mergedDisabled) {
|
|
28
32
|
if (_onClick) {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import { ClearOutlined } from "@agentscope-ai/icons-override-antd";
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
import ActionButton from "./ActionButton";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
function ClearButton(props, ref) {
|
|
12
|
+
return /*#__PURE__*/_jsx(ActionButton, _objectSpread(_objectSpread({
|
|
13
|
+
icon: /*#__PURE__*/_jsx(ClearOutlined, {})
|
|
14
|
+
}, props), {}, {
|
|
15
|
+
action: "onClear",
|
|
16
|
+
ref: ref
|
|
17
|
+
}));
|
|
18
|
+
}
|
|
19
|
+
export default /*#__PURE__*/React.forwardRef(ClearButton);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import classNames from 'classnames';
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
import StopLoadingIcon from "../StopLoading";
|
|
10
|
+
import ActionButton, { ActionButtonContext } from "./ActionButton";
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
function LoadingButton(props, ref) {
|
|
13
|
+
var _React$useContext = React.useContext(ActionButtonContext),
|
|
14
|
+
prefixCls = _React$useContext.prefixCls;
|
|
15
|
+
var className = props.className;
|
|
16
|
+
return /*#__PURE__*/_jsx(ActionButton, _objectSpread(_objectSpread({
|
|
17
|
+
icon: /*#__PURE__*/_jsx(StopLoadingIcon, {
|
|
18
|
+
className: "".concat(prefixCls, "-loading-icon")
|
|
19
|
+
}),
|
|
20
|
+
type: "primary",
|
|
21
|
+
variant: "text"
|
|
22
|
+
}, props), {}, {
|
|
23
|
+
className: classNames(className, "".concat(prefixCls, "-loading-button")),
|
|
24
|
+
action: "onCancel",
|
|
25
|
+
ref: ref
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
export default /*#__PURE__*/React.forwardRef(LoadingButton);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import { ArrowUpOutlined } from "@agentscope-ai/icons-override-antd";
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
import ActionButton from "./ActionButton";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
function SendButton(props, ref) {
|
|
12
|
+
return /*#__PURE__*/_jsx(ActionButton, _objectSpread(_objectSpread({
|
|
13
|
+
icon: /*#__PURE__*/_jsx(ArrowUpOutlined, {}),
|
|
14
|
+
type: "primary"
|
|
15
|
+
}, props), {}, {
|
|
16
|
+
action: "onSend",
|
|
17
|
+
ref: ref
|
|
18
|
+
}));
|
|
19
|
+
}
|
|
20
|
+
export default /*#__PURE__*/React.forwardRef(SendButton);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface RecordingIconProps {
|
|
2
|
+
/**
|
|
3
|
+
* @description 录音图标的CSS类名,用于自定义样式
|
|
4
|
+
* @descriptionEn CSS class name for the recording icon for custom styling
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export default function RecordingIcon({ className }: RecordingIconProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
var SIZE = 1000;
|
|
5
|
+
var COUNT = 4;
|
|
6
|
+
var RECT_WIDTH = 140;
|
|
7
|
+
var RECT_RADIUS = RECT_WIDTH / 2;
|
|
8
|
+
var RECT_HEIGHT_MIN = 250;
|
|
9
|
+
var RECT_HEIGHT_MAX = 500;
|
|
10
|
+
var DURATION = 0.8;
|
|
11
|
+
export default function RecordingIcon(_ref) {
|
|
12
|
+
var className = _ref.className;
|
|
13
|
+
return /*#__PURE__*/_jsxs("svg", {
|
|
14
|
+
color: "currentColor",
|
|
15
|
+
viewBox: "0 0 ".concat(SIZE, " ").concat(SIZE),
|
|
16
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
18
|
+
className: className,
|
|
19
|
+
children: [/*#__PURE__*/_jsx("title", {
|
|
20
|
+
children: "Speech Recording"
|
|
21
|
+
}), Array.from({
|
|
22
|
+
length: COUNT
|
|
23
|
+
}).map(function (_, index) {
|
|
24
|
+
var dest = (SIZE - RECT_WIDTH * COUNT) / (COUNT - 1);
|
|
25
|
+
var x = index * (dest + RECT_WIDTH);
|
|
26
|
+
var yMin = SIZE / 2 - RECT_HEIGHT_MIN / 2;
|
|
27
|
+
var yMax = SIZE / 2 - RECT_HEIGHT_MAX / 2;
|
|
28
|
+
return /*#__PURE__*/_jsxs("rect", {
|
|
29
|
+
fill: "currentColor",
|
|
30
|
+
rx: RECT_RADIUS,
|
|
31
|
+
ry: RECT_RADIUS,
|
|
32
|
+
height: RECT_HEIGHT_MIN,
|
|
33
|
+
width: RECT_WIDTH,
|
|
34
|
+
x: x,
|
|
35
|
+
y: yMin,
|
|
36
|
+
children: [/*#__PURE__*/_jsx("animate", {
|
|
37
|
+
attributeName: "height",
|
|
38
|
+
values: "".concat(RECT_HEIGHT_MIN, "; ").concat(RECT_HEIGHT_MAX, "; ").concat(RECT_HEIGHT_MIN),
|
|
39
|
+
keyTimes: "0; 0.5; 1",
|
|
40
|
+
dur: "".concat(DURATION, "s"),
|
|
41
|
+
begin: "".concat(DURATION / COUNT * index, "s"),
|
|
42
|
+
repeatCount: "indefinite"
|
|
43
|
+
}), /*#__PURE__*/_jsx("animate", {
|
|
44
|
+
attributeName: "y",
|
|
45
|
+
values: "".concat(yMin, "; ").concat(yMax, "; ").concat(yMin),
|
|
46
|
+
keyTimes: "0; 0.5; 1",
|
|
47
|
+
dur: "".concat(DURATION, "s"),
|
|
48
|
+
begin: "".concat(DURATION / COUNT * index, "s"),
|
|
49
|
+
repeatCount: "indefinite"
|
|
50
|
+
})]
|
|
51
|
+
}, index);
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import ActionButton, { ActionButtonContext } from "../ActionButton";
|
|
9
|
+
import { SparkMicLine, SparkMicOffLine } from '@agentscope-ai/icons';
|
|
10
|
+
import RecordingIcon from "./RecordingIcon";
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
function SpeechButton(props, ref) {
|
|
13
|
+
var _React$useContext = React.useContext(ActionButtonContext),
|
|
14
|
+
speechRecording = _React$useContext.speechRecording,
|
|
15
|
+
onSpeechDisabled = _React$useContext.onSpeechDisabled,
|
|
16
|
+
prefixCls = _React$useContext.prefixCls;
|
|
17
|
+
var icon = null;
|
|
18
|
+
if (speechRecording) {
|
|
19
|
+
icon = /*#__PURE__*/_jsx(RecordingIcon, {
|
|
20
|
+
className: "".concat(prefixCls, "-recording-icon")
|
|
21
|
+
});
|
|
22
|
+
} else if (onSpeechDisabled) {
|
|
23
|
+
icon = /*#__PURE__*/_jsx(SparkMicOffLine, {});
|
|
24
|
+
} else {
|
|
25
|
+
icon = /*#__PURE__*/_jsx(SparkMicLine, {});
|
|
26
|
+
}
|
|
27
|
+
return /*#__PURE__*/_jsx(ActionButton, _objectSpread(_objectSpread({
|
|
28
|
+
icon: icon,
|
|
29
|
+
variant: "text"
|
|
30
|
+
}, props), {}, {
|
|
31
|
+
action: "onSpeech",
|
|
32
|
+
ref: ref
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
export default /*#__PURE__*/React.forwardRef(SpeechButton);
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { Input } from 'antd';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import SenderHeader from './SenderHeader';
|
|
4
|
+
import ModeSelect from './ModeSelect';
|
|
5
|
+
import type { InputRef as AntdInputRef, ButtonProps, GetProps } from 'antd';
|
|
6
|
+
export type SubmitType = 'enter' | 'shiftEnter' | false;
|
|
7
|
+
type TextareaProps = GetProps<typeof Input.TextArea>;
|
|
8
|
+
export interface SenderComponents {
|
|
9
|
+
input?: React.ComponentType<TextareaProps>;
|
|
10
|
+
}
|
|
11
|
+
export type ActionsRender = (ori: React.ReactNode, info: {
|
|
12
|
+
components: {
|
|
13
|
+
SendButton: React.ComponentType<ButtonProps>;
|
|
14
|
+
ClearButton: React.ComponentType<ButtonProps>;
|
|
15
|
+
LoadingButton: React.ComponentType<ButtonProps>;
|
|
16
|
+
};
|
|
17
|
+
}) => React.ReactNode;
|
|
18
|
+
export interface SenderProps extends Pick<TextareaProps, 'placeholder' | 'onKeyPress'> {
|
|
19
|
+
/**
|
|
20
|
+
* @description 输入框的默认初始值,仅在非受控模式下生效
|
|
21
|
+
* @descriptionEn Default initial value for the input field, only effective in uncontrolled mode
|
|
22
|
+
*/
|
|
23
|
+
defaultValue?: string;
|
|
24
|
+
/**
|
|
25
|
+
* @description 输入框的当前值,用于受控组件模式
|
|
26
|
+
* @descriptionEn Current value of the input field for controlled component mode
|
|
27
|
+
*/
|
|
28
|
+
value?: string;
|
|
29
|
+
/**
|
|
30
|
+
* @description 是否显示回复中的加载状态,影响按钮和输入框的交互
|
|
31
|
+
* @descriptionEn Whether to display loading state during reply, affects button and input interaction
|
|
32
|
+
*/
|
|
33
|
+
loading?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* @description 是否将输入框设置为只读模式,禁止用户编辑
|
|
36
|
+
* @descriptionEn Whether to set the input field to read-only mode, preventing user editing
|
|
37
|
+
*/
|
|
38
|
+
readOnly?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* @description 消息提交的方式,影响发送按钮的行为和快捷键
|
|
41
|
+
* @descriptionEn Method for message submission, affects send button behavior and keyboard shortcuts
|
|
42
|
+
*/
|
|
43
|
+
submitType?: SubmitType;
|
|
44
|
+
/**
|
|
45
|
+
* @description 是否禁用整个发送器组件,包括输入框和按钮
|
|
46
|
+
* @descriptionEn Whether to disable the entire sender component, including input field and buttons
|
|
47
|
+
*/
|
|
48
|
+
disabled?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* @description 用户提交消息时的回调函数,接收消息内容作为参数
|
|
51
|
+
* @descriptionEn Callback function when user submits a message, receives message content as parameter
|
|
52
|
+
*/
|
|
53
|
+
onSubmit?: (message: string) => void;
|
|
54
|
+
/**
|
|
55
|
+
* @description 输入框值发生变化时的回调函数,用于实时处理用户输入
|
|
56
|
+
* @descriptionEn Callback function when input value changes, for real-time processing of user input
|
|
57
|
+
*/
|
|
58
|
+
onChange?: (value: string, event?: React.FormEvent<HTMLTextAreaElement> | React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
59
|
+
/**
|
|
60
|
+
* @description 用户取消操作时的回调函数,通常用于清空输入或重置状态
|
|
61
|
+
* @descriptionEn Callback function when user cancels operation, usually for clearing input or resetting state
|
|
62
|
+
*/
|
|
63
|
+
onCancel?: VoidFunction;
|
|
64
|
+
/**
|
|
65
|
+
* @description 键盘事件处理函数,用于自定义键盘快捷键和特殊按键行为
|
|
66
|
+
* @descriptionEn Keyboard event handler for custom keyboard shortcuts and special key behaviors
|
|
67
|
+
*/
|
|
68
|
+
onKeyDown?: React.KeyboardEventHandler<any>;
|
|
69
|
+
/**
|
|
70
|
+
* @description 语义化样式对象,用于精确控制不同区域的样式
|
|
71
|
+
* @descriptionEn Semantic style object for precise control of different area styles
|
|
72
|
+
*/
|
|
73
|
+
styles?: {
|
|
74
|
+
prefix?: React.CSSProperties;
|
|
75
|
+
input?: React.CSSProperties;
|
|
76
|
+
actions?: React.CSSProperties;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* @description 自定义根容器的CSS类名,用于覆盖默认样式
|
|
80
|
+
* @descriptionEn Custom CSS class name for the root container to override default styles
|
|
81
|
+
*/
|
|
82
|
+
rootClassName?: string;
|
|
83
|
+
/**
|
|
84
|
+
* @description 语义化CSS类名,用于为不同区域添加自定义类名
|
|
85
|
+
* @descriptionEn Semantic CSS class names for adding custom classes to different areas
|
|
86
|
+
*/
|
|
87
|
+
classNames?: {
|
|
88
|
+
prefix?: string;
|
|
89
|
+
input?: string;
|
|
90
|
+
actions?: string;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* @description 样式
|
|
94
|
+
* @descriptionEn Style
|
|
95
|
+
*/
|
|
96
|
+
style?: React.CSSProperties;
|
|
97
|
+
/**
|
|
98
|
+
* @description 类名
|
|
99
|
+
* @descriptionEn Classname
|
|
100
|
+
*/
|
|
101
|
+
className?: string;
|
|
102
|
+
/**
|
|
103
|
+
* @description 前缀 UI
|
|
104
|
+
* @descriptionEn Prefix UI
|
|
105
|
+
*/
|
|
106
|
+
prefix?: React.ReactNode | React.ReactNode[];
|
|
107
|
+
/**
|
|
108
|
+
* @description 头部 UI
|
|
109
|
+
* @descriptionEn Header UI
|
|
110
|
+
*/
|
|
111
|
+
header?: React.ReactNode;
|
|
112
|
+
/**
|
|
113
|
+
* @description 最大文本长度
|
|
114
|
+
* @descriptionEn Max content length
|
|
115
|
+
*/
|
|
116
|
+
maxLength?: number;
|
|
117
|
+
/**
|
|
118
|
+
* @description 是否可缩放
|
|
119
|
+
* @descriptionEn Zoomable
|
|
120
|
+
*/
|
|
121
|
+
zoomable?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* @description 初始行数,默认 2,移动端使用建议设置 1 行
|
|
124
|
+
* @descriptionEn Initial rows, default 2, recommend 1 for mobile
|
|
125
|
+
*/
|
|
126
|
+
initialRows?: number;
|
|
127
|
+
/**
|
|
128
|
+
* @description 是否支持语音输入
|
|
129
|
+
* @descriptionEn Allow speech input
|
|
130
|
+
*/
|
|
131
|
+
allowSpeech?: boolean;
|
|
132
|
+
}
|
|
133
|
+
export type SenderRef = {
|
|
134
|
+
nativeElement: HTMLDivElement;
|
|
135
|
+
} & Pick<AntdInputRef, 'focus' | 'blur'>;
|
|
136
|
+
declare const ForwardSender: React.ForwardRefExoticComponent<SenderProps & React.RefAttributes<SenderRef>>;
|
|
137
|
+
type CompoundedSender = typeof ForwardSender & {
|
|
138
|
+
Header: typeof SenderHeader;
|
|
139
|
+
ModeSelect: typeof ModeSelect;
|
|
140
|
+
};
|
|
141
|
+
declare const Sender: CompoundedSender;
|
|
142
|
+
export default Sender;
|