@agentscope-ai/chat 1.1.4
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/README.md +88 -0
- package/dist/_util/hooks/use-proxy-imperative-handle.d.ts +4 -0
- package/dist/_util/hooks/use-proxy-imperative-handle.js +18 -0
- package/dist/_util/type.d.ts +1 -0
- package/dist/_util/type.js +1 -0
- package/dist/_util/warning.d.ts +30 -0
- package/dist/_util/warning.js +63 -0
- package/dist/accordion/Accordion.d.ts +22 -0
- package/dist/accordion/Accordion.js +93 -0
- package/dist/accordion/BodyContent.d.ts +8 -0
- package/dist/accordion/BodyContent.js +18 -0
- package/dist/accordion/DeepThink.d.ts +7 -0
- package/dist/accordion/DeepThink.js +35 -0
- package/dist/accordion/index.d.ts +2 -0
- package/dist/accordion/index.js +1 -0
- package/dist/accordion/index.less +170 -0
- package/dist/attachments/DropArea.d.ts +8 -0
- package/dist/attachments/DropArea.js +87 -0
- package/dist/attachments/FileList/AudioIcon.d.ts +2 -0
- package/dist/attachments/FileList/AudioIcon.js +19 -0
- package/dist/attachments/FileList/FileListCard.d.ts +12 -0
- package/dist/attachments/FileList/FileListCard.js +229 -0
- package/dist/attachments/FileList/Progress.d.ts +6 -0
- package/dist/attachments/FileList/Progress.js +21 -0
- package/dist/attachments/FileList/VideoIcon.d.ts +2 -0
- package/dist/attachments/FileList/VideoIcon.js +19 -0
- package/dist/attachments/FileList/index.d.ts +16 -0
- package/dist/attachments/FileList/index.js +132 -0
- package/dist/attachments/PlaceholderUploader.d.ts +17 -0
- package/dist/attachments/PlaceholderUploader.js +79 -0
- package/dist/attachments/SilentUploader.d.ts +9 -0
- package/dist/attachments/SilentUploader.js +23 -0
- package/dist/attachments/context.d.ts +5 -0
- package/dist/attachments/context.js +2 -0
- package/dist/attachments/index.d.ts +33 -0
- package/dist/attachments/index.js +166 -0
- package/dist/attachments/style/fileCard.d.ts +4 -0
- package/dist/attachments/style/fileCard.js +124 -0
- package/dist/attachments/style/index.d.ts +10 -0
- package/dist/attachments/style/index.js +211 -0
- package/dist/attachments/util.d.ts +2 -0
- package/dist/attachments/util.js +53 -0
- package/dist/bubble/Avatar.d.ts +10 -0
- package/dist/bubble/Avatar.js +22 -0
- package/dist/bubble/Bubble.d.ts +11 -0
- package/dist/bubble/Bubble.js +102 -0
- package/dist/bubble/BubbleList.d.ts +15 -0
- package/dist/bubble/BubbleList.js +44 -0
- package/dist/bubble/Cards.d.ts +21 -0
- package/dist/bubble/Cards.js +47 -0
- package/dist/bubble/ScrollToBottom.d.ts +7 -0
- package/dist/bubble/ScrollToBottom.js +45 -0
- package/dist/bubble/Spin.d.ts +2 -0
- package/dist/bubble/Spin.js +18 -0
- package/dist/bubble/hooks/useDisplayData.d.ts +0 -0
- package/dist/bubble/hooks/useDisplayData.js +0 -0
- package/dist/bubble/hooks/useListData.d.ts +0 -0
- package/dist/bubble/hooks/useListData.js +0 -0
- package/dist/bubble/index.d.ts +8 -0
- package/dist/bubble/index.js +4 -0
- package/dist/bubble/interface.d.ts +26 -0
- package/dist/bubble/interface.js +1 -0
- package/dist/bubble/loading.d.ts +6 -0
- package/dist/bubble/loading.js +17 -0
- package/dist/bubble/style/avatar.less +40 -0
- package/dist/bubble/style/content.d.ts +4 -0
- package/dist/bubble/style/content.js +43 -0
- package/dist/bubble/style/index.d.ts +9 -0
- package/dist/bubble/style/index.js +53 -0
- package/dist/bubble/style/list.less +15 -0
- package/dist/bubble/style/scrollToBottom.less +174 -0
- package/dist/chat-anywhere/Chat/Ref.d.ts +3 -0
- package/dist/chat-anywhere/Chat/Ref.js +19 -0
- package/dist/chat-anywhere/Chat/index.d.ts +4 -0
- package/dist/chat-anywhere/Chat/index.js +65 -0
- package/dist/chat-anywhere/Chat/index.less +54 -0
- package/dist/chat-anywhere/Header/index.d.ts +3 -0
- package/dist/chat-anywhere/Header/index.js +32 -0
- package/dist/chat-anywhere/Header/index.less +24 -0
- package/dist/chat-anywhere/Input/index.d.ts +3 -0
- package/dist/chat-anywhere/Input/index.js +170 -0
- package/dist/chat-anywhere/Input/index.less +12 -0
- package/dist/chat-anywhere/Layout/index.d.ts +10 -0
- package/dist/chat-anywhere/Layout/index.js +73 -0
- package/dist/chat-anywhere/Layout/index.less +61 -0
- package/dist/chat-anywhere/SessionList/index.d.ts +5 -0
- package/dist/chat-anywhere/SessionList/index.js +115 -0
- package/dist/chat-anywhere/SessionList/index.less +52 -0
- package/dist/chat-anywhere/hooks/ChatAnywhereProvider.d.ts +43 -0
- package/dist/chat-anywhere/hooks/ChatAnywhereProvider.js +90 -0
- package/dist/chat-anywhere/hooks/types.d.ts +57 -0
- package/dist/chat-anywhere/hooks/types.js +1 -0
- package/dist/chat-anywhere/hooks/useInput.d.ts +7 -0
- package/dist/chat-anywhere/hooks/useInput.js +21 -0
- package/dist/chat-anywhere/hooks/useMessages.d.ts +11 -0
- package/dist/chat-anywhere/hooks/useMessages.js +56 -0
- package/dist/chat-anywhere/hooks/useSessionList.d.ts +24 -0
- package/dist/chat-anywhere/hooks/useSessionList.js +120 -0
- package/dist/chat-anywhere/index.d.ts +9 -0
- package/dist/chat-anywhere/index.js +58 -0
- package/dist/conversations/GroupTitle.d.ts +10 -0
- package/dist/conversations/GroupTitle.js +15 -0
- package/dist/conversations/Item.d.ts +14 -0
- package/dist/conversations/Item.js +96 -0
- package/dist/conversations/hooks/useGroupable.d.ts +9 -0
- package/dist/conversations/hooks/useGroupable.js +72 -0
- package/dist/conversations/index.d.ts +62 -0
- package/dist/conversations/index.js +124 -0
- package/dist/conversations/interface.d.ts +60 -0
- package/dist/conversations/interface.js +1 -0
- package/dist/conversations/style/index.d.ts +9 -0
- package/dist/conversations/style/index.js +80 -0
- package/dist/default-cards/Count/index.d.ts +3 -0
- package/dist/default-cards/Count/index.js +16 -0
- package/dist/default-cards/Count/index.less +19 -0
- package/dist/default-cards/DeepThink/index.d.ts +11 -0
- package/dist/default-cards/DeepThink/index.js +11 -0
- package/dist/default-cards/DeepThink/index.less +0 -0
- package/dist/default-cards/Files/index.d.ts +2 -0
- package/dist/default-cards/Files/index.js +18 -0
- package/dist/default-cards/Footer/index.d.ts +19 -0
- package/dist/default-cards/Footer/index.js +50 -0
- package/dist/default-cards/Footer/index.less +41 -0
- package/dist/default-cards/Images/index.d.ts +3 -0
- package/dist/default-cards/Images/index.js +33 -0
- package/dist/default-cards/Images/index.less +17 -0
- package/dist/default-cards/Interrupted/index.d.ts +11 -0
- package/dist/default-cards/Interrupted/index.js +40 -0
- package/dist/default-cards/Interrupted/index.less +57 -0
- package/dist/default-cards/Text/index.d.ts +2 -0
- package/dist/default-cards/Text/index.js +12 -0
- package/dist/default-cards/index.d.ts +6 -0
- package/dist/default-cards/index.js +6 -0
- package/dist/disclaimer/index.d.ts +11 -0
- package/dist/disclaimer/index.js +26 -0
- package/dist/docs/1896.async.js +457 -0
- package/dist/docs/2710.async.js +62 -0
- package/dist/docs/2863.async.js +400 -0
- package/dist/docs/3057.async.js +46 -0
- package/dist/docs/3364.async.js +25 -0
- package/dist/docs/404.html +15 -0
- package/dist/docs/4820.async.js +1381 -0
- package/dist/docs/5623.async.js +60 -0
- package/dist/docs/5757.async.js +1 -0
- package/dist/docs/5804.async.js +271 -0
- package/dist/docs/6198.async.js +18 -0
- package/dist/docs/6671.async.js +137 -0
- package/dist/docs/7195.async.js +1 -0
- package/dist/docs/7485.async.js +29 -0
- package/dist/docs/7931.async.js +19 -0
- package/dist/docs/7997.async.js +5 -0
- package/dist/docs/8156.async.js +110 -0
- package/dist/docs/8368.async.js +2 -0
- package/dist/docs/8480.async.js +1449 -0
- package/dist/docs/8618.async.js +246 -0
- package/dist/docs/9016.async.js +32 -0
- package/dist/docs/9016.chunk.css +1 -0
- package/dist/docs/9335.async.js +11 -0
- package/dist/docs/accordion__demos.async.js +9 -0
- package/dist/docs/attachments__demos.async.js +1 -0
- package/dist/docs/bubble__demos.async.js +50 -0
- package/dist/docs/components/accordion/index.html +15 -0
- package/dist/docs/components/accordion-cn/index.html +15 -0
- package/dist/docs/components/attachments/index.html +15 -0
- package/dist/docs/components/attachments-cn/index.html +15 -0
- package/dist/docs/components/bubble/index.html +15 -0
- package/dist/docs/components/bubble-cn/index.html +15 -0
- package/dist/docs/components/bubble-list/index.html +15 -0
- package/dist/docs/components/bubble-list-cn/index.html +15 -0
- package/dist/docs/components/conversations/index.html +15 -0
- package/dist/docs/components/conversations-cn/index.html +15 -0
- package/dist/docs/components/disclaimer/index.html +15 -0
- package/dist/docs/components/disclaimer-cn/index.html +15 -0
- package/dist/docs/components/footer/index.html +15 -0
- package/dist/docs/components/footer-cn/index.html +15 -0
- package/dist/docs/components/markdown/index.html +15 -0
- package/dist/docs/components/markdown-cn/index.html +15 -0
- package/dist/docs/components/sender/index.html +15 -0
- package/dist/docs/components/sender-cn/index.html +15 -0
- package/dist/docs/components/status/index.html +15 -0
- package/dist/docs/components/status-cn/index.html +15 -0
- package/dist/docs/components/welcome/index.html +15 -0
- package/dist/docs/components/welcome-cn/index.html +15 -0
- package/dist/docs/components__accordion__index.en-US.md.async.js +6 -0
- package/dist/docs/components__accordion__index.en-US.md.chunk.css +1 -0
- package/dist/docs/components__accordion__index.zh-CN.md.async.js +6 -0
- package/dist/docs/components__accordion__index.zh-CN.md.chunk.css +1 -0
- package/dist/docs/components__attachments__index.en-US.md.async.js +1 -0
- package/dist/docs/components__attachments__index.en-US.md.chunk.css +1 -0
- package/dist/docs/components__attachments__index.zh-CN.md.async.js +1 -0
- package/dist/docs/components__attachments__index.zh-CN.md.chunk.css +1 -0
- package/dist/docs/components__bubble-list__index.en-US.md.async.js +2 -0
- package/dist/docs/components__bubble-list__index.en-US.md.chunk.css +1 -0
- package/dist/docs/components__bubble-list__index.zh-CN.md.async.js +2 -0
- package/dist/docs/components__bubble-list__index.zh-CN.md.chunk.css +1 -0
- package/dist/docs/components__bubble__index.en-US.md.async.js +1 -0
- package/dist/docs/components__bubble__index.en-US.md.chunk.css +1 -0
- package/dist/docs/components__bubble__index.zh-CN.md.async.js +1 -0
- package/dist/docs/components__bubble__index.zh-CN.md.chunk.css +1 -0
- package/dist/docs/components__conversations__index.en-US.md.async.js +2 -0
- package/dist/docs/components__conversations__index.en-US.md.chunk.css +1 -0
- package/dist/docs/components__conversations__index.zh-CN.md.async.js +1 -0
- package/dist/docs/components__conversations__index.zh-CN.md.chunk.css +1 -0
- package/dist/docs/components__disclaimer__index.en-US.md.async.js +1 -0
- package/dist/docs/components__disclaimer__index.en-US.md.chunk.css +1 -0
- package/dist/docs/components__disclaimer__index.zh-CN.md.async.js +1 -0
- package/dist/docs/components__disclaimer__index.zh-CN.md.chunk.css +1 -0
- package/dist/docs/components__footer__index.en-US.md.async.js +1 -0
- package/dist/docs/components__footer__index.en-US.md.chunk.css +1 -0
- package/dist/docs/components__footer__index.zh-CN.md.async.js +2 -0
- package/dist/docs/components__footer__index.zh-CN.md.chunk.css +1 -0
- package/dist/docs/components__markdown__index.en-US.md.async.js +1 -0
- package/dist/docs/components__markdown__index.en-US.md.chunk.css +1 -0
- package/dist/docs/components__markdown__index.zh-CN.md.async.js +1 -0
- package/dist/docs/components__markdown__index.zh-CN.md.chunk.css +1 -0
- package/dist/docs/components__sender__index.en-US.md.async.js +1 -0
- package/dist/docs/components__sender__index.en-US.md.chunk.css +1 -0
- package/dist/docs/components__sender__index.zh-CN.md.async.js +1 -0
- package/dist/docs/components__sender__index.zh-CN.md.chunk.css +1 -0
- package/dist/docs/components__status__index.en-US.md.async.js +1 -0
- package/dist/docs/components__status__index.en-US.md.chunk.css +1 -0
- package/dist/docs/components__status__index.zh-CN.md.async.js +2 -0
- package/dist/docs/components__status__index.zh-CN.md.chunk.css +1 -0
- package/dist/docs/components__welcome__index.en-US.md.async.js +2 -0
- package/dist/docs/components__welcome__index.en-US.md.chunk.css +1 -0
- package/dist/docs/components__welcome__index.zh-CN.md.async.js +2 -0
- package/dist/docs/components__welcome__index.zh-CN.md.chunk.css +1 -0
- package/dist/docs/conversations__demos.async.js +1 -0
- package/dist/docs/demos.async.js +47 -0
- package/dist/docs/demos.chunk.css +1 -0
- package/dist/docs/disclaimer__demos.async.js +1 -0
- package/dist/docs/docs/development/ag-ui/index.html +15 -0
- package/dist/docs/docs/development/ag-ui-cn/index.html +15 -0
- package/dist/docs/docs/development/backend/index.html +15 -0
- package/dist/docs/docs/development/backend-cn/index.html +15 -0
- package/dist/docs/docs/development/cards/index.html +15 -0
- package/dist/docs/docs/development/cards-cn/index.html +15 -0
- package/dist/docs/docs/development/chatanywhere/index.html +15 -0
- package/dist/docs/docs/development/chatanywhere-api/index.html +15 -0
- package/dist/docs/docs/development/chatanywhere-api-cn/index.html +15 -0
- package/dist/docs/docs/development/chatanywhere-cn/index.html +15 -0
- package/dist/docs/docs/development/custom/index.html +15 -0
- package/dist/docs/docs/development/custom-cn/index.html +15 -0
- package/dist/docs/docs/development/overview/index.html +15 -0
- package/dist/docs/docs/development/overview-cn/index.html +15 -0
- package/dist/docs/docs/development/qwen/index.html +15 -0
- package/dist/docs/docs/development/qwen-cn/index.html +15 -0
- package/dist/docs/docs/templates/copilot/index.html +15 -0
- package/dist/docs/docs/templates/copilot-cn/index.html +15 -0
- package/dist/docs/docs/templates/native/index.html +15 -0
- package/dist/docs/docs/templates/native-cn/index.html +15 -0
- package/dist/docs/docs/templates/voice/index.html +15 -0
- package/dist/docs/docs/templates/voice-cn/index.html +15 -0
- package/dist/docs/docs__development__ag-ui.en-US.md.async.js +210 -0
- package/dist/docs/docs__development__ag-ui.en-US.md.chunk.css +1 -0
- package/dist/docs/docs__development__ag-ui.zh-CN.md.async.js +210 -0
- package/dist/docs/docs__development__ag-ui.zh-CN.md.chunk.css +1 -0
- package/dist/docs/docs__development__backend.en-US.md.async.js +12 -0
- package/dist/docs/docs__development__backend.en-US.md.chunk.css +1 -0
- package/dist/docs/docs__development__backend.zh-CN.md.async.js +12 -0
- package/dist/docs/docs__development__backend.zh-CN.md.chunk.css +1 -0
- package/dist/docs/docs__development__cards.en-US.md.async.js +27 -0
- package/dist/docs/docs__development__cards.en-US.md.chunk.css +1 -0
- package/dist/docs/docs__development__cards.zh-CN.md.async.js +27 -0
- package/dist/docs/docs__development__cards.zh-CN.md.chunk.css +1 -0
- package/dist/docs/docs__development__chatanywhere-api.en-US.md.async.js +69 -0
- package/dist/docs/docs__development__chatanywhere-api.en-US.md.chunk.css +1 -0
- package/dist/docs/docs__development__chatanywhere-api.zh-CN.md.async.js +69 -0
- package/dist/docs/docs__development__chatanywhere-api.zh-CN.md.chunk.css +1 -0
- package/dist/docs/docs__development__chatanywhere.en-US.md.async.js +77 -0
- package/dist/docs/docs__development__chatanywhere.en-US.md.chunk.css +1 -0
- package/dist/docs/docs__development__chatanywhere.zh-CN.md.async.js +77 -0
- package/dist/docs/docs__development__chatanywhere.zh-CN.md.chunk.css +1 -0
- package/dist/docs/docs__development__custom.en-US.md.async.js +22 -0
- package/dist/docs/docs__development__custom.en-US.md.chunk.css +1 -0
- package/dist/docs/docs__development__custom.zh-CN.md.async.js +22 -0
- package/dist/docs/docs__development__custom.zh-CN.md.chunk.css +1 -0
- package/dist/docs/docs__development__overview.en-US.md.async.js +21 -0
- package/dist/docs/docs__development__overview.en-US.md.chunk.css +1 -0
- package/dist/docs/docs__development__overview.zh-CN.md.async.js +21 -0
- package/dist/docs/docs__development__overview.zh-CN.md.chunk.css +1 -0
- package/dist/docs/docs__development__qwen.en-US.md.async.js +25 -0
- package/dist/docs/docs__development__qwen.en-US.md.chunk.css +1 -0
- package/dist/docs/docs__development__qwen.zh-CN.md.async.js +25 -0
- package/dist/docs/docs__development__qwen.zh-CN.md.chunk.css +1 -0
- package/dist/docs/docs__templates__copilot.en-US.md.async.js +1 -0
- package/dist/docs/docs__templates__copilot.en-US.md.chunk.css +1 -0
- package/dist/docs/docs__templates__copilot.zh-CN.md.async.js +1 -0
- package/dist/docs/docs__templates__copilot.zh-CN.md.chunk.css +1 -0
- package/dist/docs/docs__templates__native.en-US.md.async.js +1 -0
- package/dist/docs/docs__templates__native.en-US.md.chunk.css +1 -0
- package/dist/docs/docs__templates__native.zh-CN.md.async.js +1 -0
- package/dist/docs/docs__templates__native.zh-CN.md.chunk.css +1 -0
- package/dist/docs/docs__templates__voice.en-US.md.async.js +20 -0
- package/dist/docs/docs__templates__voice.en-US.md.chunk.css +1 -0
- package/dist/docs/docs__templates__voice.zh-CN.md.async.js +1 -0
- package/dist/docs/docs__templates__voice.zh-CN.md.chunk.css +1 -0
- package/dist/docs/dumi__pages__index__index.en-US.async.js +1 -0
- package/dist/docs/dumi__pages__index__index.en-US.chunk.css +1 -0
- package/dist/docs/dumi__pages__index__index.zh-CN.async.js +1 -0
- package/dist/docs/dumi__pages__index__index.zh-CN.chunk.css +1 -0
- package/dist/docs/dumi__theme__layouts__DocLayout__index.async.js +1 -0
- package/dist/docs/dumi__theme__layouts__DocLayout__index.chunk.css +1 -0
- package/dist/docs/dumi__theme__layouts__GlobalLayout__index.async.js +18 -0
- package/dist/docs/dumi__theme__layouts__GlobalLayout__index.chunk.css +1 -0
- package/dist/docs/dumi__tmp-production__dumi__theme__ContextWrapper.async.js +1 -0
- package/dist/docs/index/index.html +15 -0
- package/dist/docs/index-cn/index.html +15 -0
- package/dist/docs/markdown__demos.async.js +164 -0
- package/dist/docs/meta__components__en-US.async.js +9 -0
- package/dist/docs/meta__components__zh-CN.async.js +10 -0
- package/dist/docs/meta__docs__en-US.async.js +475 -0
- package/dist/docs/meta__docs__en-US.chunk.css +1 -0
- package/dist/docs/meta__docs__zh-CN.async.js +456 -0
- package/dist/docs/meta__docs__zh-CN.chunk.css +1 -0
- package/dist/docs/nm__dumi__dist__client__pages__404.async.js +1 -0
- package/dist/docs/nm__dumi__dist__client__pages__Demo__index.async.js +1 -0
- package/dist/docs/nm__dumi__dist__client__pages__Demo__index.chunk.css +1 -0
- package/dist/docs/preload_helper.js +1 -0
- package/dist/docs/sender__demos.async.js +1 -0
- package/dist/docs/umi.css +1 -0
- package/dist/docs/umi.js +107 -0
- package/dist/docs/welcome__demos.async.js +1 -0
- package/dist/docs/~demos/:id/index.html +15 -0
- package/dist/docs/~demos/accordion-demo-inline/index.html +15 -0
- package/dist/docs/~demos/accordion-demo-mutisteps/index.html +15 -0
- package/dist/docs/~demos/accordion-demo-thinking/index.html +15 -0
- package/dist/docs/~demos/attachments-demo-files/index.html +15 -0
- package/dist/docs/~demos/bubble-demo-basic/index.html +15 -0
- package/dist/docs/~demos/bubble-demo-havestopped/index.html +15 -0
- package/dist/docs/~demos/bubble-demo-userwithfile/index.html +15 -0
- package/dist/docs/~demos/bubble-demo-userwithimage/index.html +15 -0
- package/dist/docs/~demos/bubble-demo-userwithnormal/index.html +15 -0
- package/dist/docs/~demos/bubble-demo-withavatar/index.html +15 -0
- package/dist/docs/~demos/bubble-demo-withcode/index.html +15 -0
- package/dist/docs/~demos/bubble-demo-witherror/index.html +15 -0
- package/dist/docs/~demos/bubble-demo-witherrordetail/index.html +15 -0
- package/dist/docs/~demos/bubble-demo-withimage/index.html +15 -0
- package/dist/docs/~demos/bubble-demo-withusage/index.html +15 -0
- package/dist/docs/~demos/bubble-demo-withwaitingmessage/index.html +15 -0
- package/dist/docs/~demos/components-bubble-list-demo-basic/index.html +15 -0
- package/dist/docs/~demos/components-footer-demo-basic/index.html +15 -0
- package/dist/docs/~demos/components-footer-demo-withusage/index.html +15 -0
- package/dist/docs/~demos/components-status-demo-basic/index.html +15 -0
- package/dist/docs/~demos/conversations-demo-basic/index.html +15 -0
- package/dist/docs/~demos/disclaimer-demo-demo/index.html +15 -0
- package/dist/docs/~demos/disclaimer-demo-withlink/index.html +15 -0
- package/dist/docs/~demos/docs-development-ag-ui-demo-with-copilotkit/index.html +15 -0
- package/dist/docs/~demos/docs-development-cards-demo-file/index.html +15 -0
- package/dist/docs/~demos/docs-development-cards-demo-footer/index.html +15 -0
- package/dist/docs/~demos/docs-development-cards-demo-image/index.html +15 -0
- package/dist/docs/~demos/docs-development-cards-demo-text/index.html +15 -0
- package/dist/docs/~demos/docs-development-custom-demo-custom/index.html +15 -0
- package/dist/docs/~demos/docs-templates-copilot-demo-copilot/index.html +15 -0
- package/dist/docs/~demos/docs-templates-native-demo-basic/index.html +15 -0
- package/dist/docs/~demos/docs-templates-voice-demo-demo/index.html +15 -0
- package/dist/docs/~demos/markdown-demo-citations/index.html +15 -0
- package/dist/docs/~demos/markdown-demo-cursor/index.html +15 -0
- package/dist/docs/~demos/markdown-demo-mathjax/index.html +15 -0
- package/dist/docs/~demos/markdown-demo-md/index.html +15 -0
- package/dist/docs/~demos/sender-demo-basic/index.html +15 -0
- package/dist/docs/~demos/sender-demo-disabled/index.html +15 -0
- package/dist/docs/~demos/sender-demo-loading/index.html +15 -0
- package/dist/docs/~demos/sender-demo-moreprefixaction/index.html +15 -0
- package/dist/docs/~demos/sender-demo-withfile/index.html +15 -0
- package/dist/docs/~demos/welcome-demo-demo0/index.html +15 -0
- package/dist/docs/~demos/welcome-demo-demo1/index.html +15 -0
- package/dist/docs/~demos/welcome-demo-demo2/index.html +15 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +20 -0
- package/dist/index.less +1 -0
- package/dist/markdown/Citation.d.ts +16 -0
- package/dist/markdown/Citation.js +55 -0
- package/dist/markdown/CodeBlock.d.ts +6 -0
- package/dist/markdown/CodeBlock.js +88 -0
- package/dist/markdown/ImageOrVideo.d.ts +2 -0
- package/dist/markdown/ImageOrVideo.js +81 -0
- package/dist/markdown/Link.d.ts +3 -0
- package/dist/markdown/Link.js +28 -0
- package/dist/markdown/Markdown.d.ts +4 -0
- package/dist/markdown/Markdown.js +121 -0
- package/dist/markdown/cursor/Blur.d.ts +3 -0
- package/dist/markdown/cursor/Blur.js +7 -0
- package/dist/markdown/cursor/Dot.d.ts +3 -0
- package/dist/markdown/cursor/Dot.js +16 -0
- package/dist/markdown/cursor/Underline.d.ts +3 -0
- package/dist/markdown/cursor/Underline.js +7 -0
- package/dist/markdown/cursor/index.less +124 -0
- package/dist/markdown/hooks/index.d.ts +1 -0
- package/dist/markdown/hooks/index.js +49 -0
- package/dist/markdown/hooks/useTypedEffect.d.ts +6 -0
- package/dist/markdown/hooks/useTypedEffect.js +56 -0
- package/dist/markdown/index.d.ts +16 -0
- package/dist/markdown/index.js +37 -0
- package/dist/markdown/index.less +204 -0
- package/dist/markdown/plugins/footnote.d.ts +2 -0
- package/dist/markdown/plugins/footnote.js +89 -0
- package/dist/markdown/plugins/katexDir.d.ts +1 -0
- package/dist/markdown/plugins/katexDir.js +15 -0
- package/dist/markdown/rehype/fadeIn.d.ts +2 -0
- package/dist/markdown/rehype/fadeIn.js +43 -0
- package/dist/markdown/type.d.ts +46 -0
- package/dist/markdown/type.js +1 -0
- package/dist/markdown/utils.d.ts +22 -0
- package/dist/markdown/utils.js +125 -0
- package/dist/provider/CustomCardsProvider.d.ts +15 -0
- package/dist/provider/CustomCardsProvider.js +18 -0
- package/dist/provider/GlobalProvider.d.ts +5 -0
- package/dist/provider/GlobalProvider.js +11 -0
- package/dist/provider/index.d.ts +8 -0
- package/dist/provider/index.js +20 -0
- package/dist/provider/types.d.ts +8 -0
- package/dist/provider/types.js +1 -0
- package/dist/sender/SenderHeader.d.ts +19 -0
- package/dist/sender/SenderHeader.js +79 -0
- package/dist/sender/StopLoading.d.ts +5 -0
- package/dist/sender/StopLoading.js +20 -0
- package/dist/sender/components/ActionButton.d.ts +22 -0
- package/dist/sender/components/ActionButton.js +39 -0
- package/dist/sender/components/ClearButton.d.ts +4 -0
- package/dist/sender/components/ClearButton.js +13 -0
- package/dist/sender/components/LoadingButton.d.ts +4 -0
- package/dist/sender/components/LoadingButton.js +22 -0
- package/dist/sender/components/SendButton.d.ts +4 -0
- package/dist/sender/components/SendButton.js +14 -0
- package/dist/sender/components/SpeechButton/RecordingIcon.d.ts +5 -0
- package/dist/sender/components/SpeechButton/RecordingIcon.js +49 -0
- package/dist/sender/components/SpeechButton/index.d.ts +4 -0
- package/dist/sender/components/SpeechButton/index.js +30 -0
- package/dist/sender/index.d.ts +61 -0
- package/dist/sender/index.js +307 -0
- package/dist/sender/style/header.d.ts +4 -0
- package/dist/sender/style/header.js +46 -0
- package/dist/sender/style/index.d.ts +10 -0
- package/dist/sender/style/index.js +123 -0
- package/dist/sender/useSpeech.d.ts +6 -0
- package/dist/sender/useSpeech.js +114 -0
- package/dist/stream/index.d.ts +34 -0
- package/dist/stream/index.en-US.md.bk +50 -0
- package/dist/stream/index.js +197 -0
- package/dist/stream/index.zh-CN.md.bk +51 -0
- package/dist/theme/components.d.ts +10 -0
- package/dist/theme/components.js +1 -0
- package/dist/theme/cssinjs-utils.d.ts +14 -0
- package/dist/theme/cssinjs-utils.js +1 -0
- package/dist/theme/genStyleUtils.d.ts +28 -0
- package/dist/theme/genStyleUtils.js +49 -0
- package/dist/theme/useToken.d.ts +18 -0
- package/dist/theme/useToken.js +110 -0
- package/dist/version/index.d.ts +2 -0
- package/dist/version/index.js +2 -0
- package/dist/voice-chat/Recorder/index.d.ts +26 -0
- package/dist/voice-chat/Recorder/index.js +168 -0
- package/dist/voice-chat/VoiceChatProvider/context.d.ts +22 -0
- package/dist/voice-chat/VoiceChatProvider/context.js +3 -0
- package/dist/voice-chat/VoiceChatProvider/hooks/useChatState.d.ts +1 -0
- package/dist/voice-chat/VoiceChatProvider/hooks/useChatState.js +5 -0
- package/dist/voice-chat/VoiceChatProvider/hooks/useMessages.d.ts +8 -0
- package/dist/voice-chat/VoiceChatProvider/hooks/useMessages.js +31 -0
- package/dist/voice-chat/VoiceChatProvider/hooks/useRecorder.d.ts +5 -0
- package/dist/voice-chat/VoiceChatProvider/hooks/useRecorder.js +48 -0
- package/dist/voice-chat/VoiceChatProvider/hooks/useVoiceChat.d.ts +4 -0
- package/dist/voice-chat/VoiceChatProvider/hooks/useVoiceChat.js +10 -0
- package/dist/voice-chat/VoiceChatProvider/index.d.ts +9 -0
- package/dist/voice-chat/VoiceChatProvider/index.js +55 -0
- package/dist/voice-chat/VoiceChatService/index.d.ts +34 -0
- package/dist/voice-chat/VoiceChatService/index.js +209 -0
- package/dist/voice-chat/index.d.ts +2 -0
- package/dist/voice-chat/index.js +2 -0
- package/dist/voice-chat/types/index.d.ts +12 -0
- package/dist/voice-chat/types/index.js +4 -0
- package/dist/welcome/icon.d.ts +2 -0
- package/dist/welcome/icon.js +38 -0
- package/dist/welcome/index.d.ts +9 -0
- package/dist/welcome/index.js +57 -0
- package/package.json +117 -0
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_agentscope_ai_chat=self.webpackChunk_agentscope_ai_chat||[]).push([[2579],{26575:function(l,t,n){var e;n.r(t),n.d(t,{demos:function(){return O}});var o=n(7557),d=n.n(o),P=n(41498),v=n.n(P),s=n(21739),I=n(88986),E=n(72093),_=n(38511),M=n(63435),i=n(38303),p=n(6699),u=n(92754),r=n(27276),m=n(13739),c=n(7444),a=n(5465),h=n.n(a),g=n(27801),O={"docs-development-ag-ui-demo-with-copilotkit":{component:s.memo(s.lazy(function(){return Promise.all([n.e(5804),n.e(7195),n.e(2433)]).then(n.bind(n,32828))})),asset:{type:"BLOCK",id:"docs-development-ag-ui-demo-with-copilotkit",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:n(30513).Z},react:{type:"NPM",value:"18.3.1"},"@copilotkit/react-core":{type:"NPM",value:"1.8.12-next.4"},"antd-style":{type:"NPM",value:"3.7.1"},"./Chat.tsx":{type:"FILE",value:n(97318).Z},"./TasksList.tsx":{type:"FILE",value:n(36323).Z},"./hook.tsx":{type:"FILE",value:n(60793).Z},"@agentscope-ai/chat":{type:"NPM",value:"1.1.4"},"@spark-ai/design":{type:"NPM",value:"1.0.3"},antd:{type:"NPM",value:"5.26.0"},"./Task.tsx":{type:"FILE",value:n(71235).Z},"./Input.tsx":{type:"FILE",value:n(58658).Z},"@ant-design/icons":{type:"NPM",value:"5.6.1"},"@copilotkit/runtime-client-gql":{type:"NPM",value:"1.8.12-next.4"}},entry:"index.tsx"},context:{"./Chat.tsx":_,"./TasksList.tsx":M,"./hook.tsx":i,"./Task.tsx":m,"./Input.tsx":c,react:e||(e=n.t(s,2)),"@copilotkit/react-core":I,"antd-style":E,"/Users/ls/IIC/spark-chat/components/chat-anywhere/demo/with-copilotkit/Chat.tsx":_,"/Users/ls/IIC/spark-chat/components/chat-anywhere/demo/with-copilotkit/TasksList.tsx":M,"/Users/ls/IIC/spark-chat/components/chat-anywhere/demo/with-copilotkit/hook.tsx":i,"@ali/spark-chat":p,"@spark-ai/design":u,antd:r,"/Users/ls/IIC/spark-chat/components/chat-anywhere/demo/with-copilotkit/Task.tsx":m,"/Users/ls/IIC/spark-chat/components/chat-anywhere/demo/with-copilotkit/Input.tsx":c,"@ant-design/icons":a,"@copilotkit/runtime-client-gql":g},renderOpts:{compile:function(){var x=v()(d()().mark(function D(){var f,U=arguments;return d()().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,n.e(6671).then(n.bind(n,46671));case 2:return y.abrupt("return",(f=y.sent).default.apply(f,U));case 3:case"end":return y.stop()}},D)}));function T(){return x.apply(this,arguments)}return T}()}}}},62145:function(l,t,n){n.r(t),n.d(t,{demos:function(){return o}});var e=n(21739),o={}},76736:function(l,t,n){var e;n.r(t),n.d(t,{demos:function(){return M}});var o=n(7557),d=n.n(o),P=n(41498),v=n.n(P),s=n(21739),I=n(6699),E=n(5465),_=n.n(E),M={"docs-development-cards-demo-text":{component:s.memo(s.lazy(function(){return Promise.all([n.e(5804),n.e(7195),n.e(2433)]).then(n.bind(n,67689))})),asset:{type:"BLOCK",id:"docs-development-cards-demo-text",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:n(48481).Z},react:{type:"NPM",value:"18.3.1"},"@agentscope-ai/chat":{type:"NPM",value:"1.1.4"}},entry:"index.tsx",title:"text"},context:{react:e||(e=n.t(s,2)),"@ali/spark-chat":I},renderOpts:{compile:function(){var i=v()(d()().mark(function u(){var r,m=arguments;return d()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,n.e(6671).then(n.bind(n,46671));case 2:return a.abrupt("return",(r=a.sent).default.apply(r,m));case 3:case"end":return a.stop()}},u)}));function p(){return i.apply(this,arguments)}return p}()}},"docs-development-cards-demo-image":{component:s.memo(s.lazy(function(){return Promise.all([n.e(5804),n.e(7195),n.e(2433)]).then(n.bind(n,4850))})),asset:{type:"BLOCK",id:"docs-development-cards-demo-image",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:n(56391).Z},react:{type:"NPM",value:"18.3.1"},"@agentscope-ai/chat":{type:"NPM",value:"1.1.4"}},entry:"index.tsx",title:"image"},context:{react:e||(e=n.t(s,2)),"@ali/spark-chat":I},renderOpts:{compile:function(){var i=v()(d()().mark(function u(){var r,m=arguments;return d()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,n.e(6671).then(n.bind(n,46671));case 2:return a.abrupt("return",(r=a.sent).default.apply(r,m));case 3:case"end":return a.stop()}},u)}));function p(){return i.apply(this,arguments)}return p}()}},"docs-development-cards-demo-file":{component:s.memo(s.lazy(function(){return Promise.all([n.e(5804),n.e(7195),n.e(2433)]).then(n.bind(n,15241))})),asset:{type:"BLOCK",id:"docs-development-cards-demo-file",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:n(63399).Z},"@agentscope-ai/chat":{type:"NPM",value:"1.1.4"},react:{type:"NPM",value:"18.3.1"}},entry:"index.tsx",title:"file"},context:{"@ali/spark-chat":I,react:e||(e=n.t(s,2))},renderOpts:{compile:function(){var i=v()(d()().mark(function u(){var r,m=arguments;return d()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,n.e(6671).then(n.bind(n,46671));case 2:return a.abrupt("return",(r=a.sent).default.apply(r,m));case 3:case"end":return a.stop()}},u)}));function p(){return i.apply(this,arguments)}return p}()}},"docs-development-cards-demo-footer":{component:s.memo(s.lazy(function(){return Promise.all([n.e(5804),n.e(7195),n.e(2433)]).then(n.bind(n,37313))})),asset:{type:"BLOCK",id:"docs-development-cards-demo-footer",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:n(53679).Z},"@agentscope-ai/chat":{type:"NPM",value:"1.1.4"},"@ant-design/icons":{type:"NPM",value:"5.6.1"},react:{type:"NPM",value:"18.3.1"}},entry:"index.tsx",title:"footer"},context:{"@ali/spark-chat":I,"@ant-design/icons":E,react:e||(e=n.t(s,2))},renderOpts:{compile:function(){var i=v()(d()().mark(function u(){var r,m=arguments;return d()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,n.e(6671).then(n.bind(n,46671));case 2:return a.abrupt("return",(r=a.sent).default.apply(r,m));case 3:case"end":return a.stop()}},u)}));function p(){return i.apply(this,arguments)}return p}()}}}},83651:function(l,t,n){n.r(t),n.d(t,{demos:function(){return o}});var e=n(21739),o={}},16437:function(l,t,n){n.r(t),n.d(t,{demos:function(){return o}});var e=n(21739),o={}},82585:function(l,t,n){var e;n.r(t),n.d(t,{demos:function(){return _}});var o=n(7557),d=n.n(o),P=n(41498),v=n.n(P),s=n(21739),I=n(6699),E=n(27276),_={"docs-development-custom-demo-custom":{component:s.memo(s.lazy(function(){return Promise.all([n.e(5804),n.e(7195),n.e(2433)]).then(n.bind(n,96810))})),asset:{type:"BLOCK",id:"docs-development-custom-demo-custom",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:n(57373).Z},react:{type:"NPM",value:"18.3.1"},"@agentscope-ai/chat":{type:"NPM",value:"1.1.4"},antd:{type:"NPM",value:"5.26.0"}},entry:"index.tsx",title:"text"},context:{react:e||(e=n.t(s,2)),"@ali/spark-chat":I,antd:E},renderOpts:{compile:function(){var M=v()(d()().mark(function p(){var u,r=arguments;return d()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,n.e(6671).then(n.bind(n,46671));case 2:return c.abrupt("return",(u=c.sent).default.apply(u,r));case 3:case"end":return c.stop()}},p)}));function i(){return M.apply(this,arguments)}return i}()}}}},57569:function(l,t,n){n.r(t),n.d(t,{demos:function(){return o}});var e=n(21739),o={}},43229:function(l,t,n){n.r(t),n.d(t,{demos:function(){return o}});var e=n(21739),o={}},64644:function(l,t,n){var e;n.r(t),n.d(t,{demos:function(){return i}});var o=n(7557),d=n.n(o),P=n(41498),v=n.n(P),s=n(21739),I=n(72093),E=n(22551),_=n(6699),M=n(27276),i={"docs-templates-copilot-demo-copilot":{component:s.memo(s.lazy(function(){return Promise.all([n.e(5804),n.e(7195),n.e(2433)]).then(n.bind(n,20356))})),asset:{type:"BLOCK",id:"docs-templates-copilot-demo-copilot",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:n(70822).Z},react:{type:"NPM",value:"18.3.1"},"antd-style":{type:"NPM",value:"3.7.1"},"./Chat.tsx":{type:"FILE",value:n(93006).Z},"@agentscope-ai/chat":{type:"NPM",value:"1.1.4"},antd:{type:"NPM",value:"5.26.0"}},entry:"index.tsx"},context:{"./Chat.tsx":E,react:e||(e=n.t(s,2)),"antd-style":I,"/Users/ls/IIC/spark-chat/components/chat-anywhere/demo/copilot/Chat/index.tsx":E,"@ali/spark-chat":_,antd:M},renderOpts:{compile:function(){var p=v()(d()().mark(function r(){var m,c=arguments;return d()().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,n.e(6671).then(n.bind(n,46671));case 2:return h.abrupt("return",(m=h.sent).default.apply(m,c));case 3:case"end":return h.stop()}},r)}));function u(){return p.apply(this,arguments)}return u}()}}}},33550:function(l,t,n){var e,o;n.r(t),n.d(t,{demos:function(){return L}});var d=n(7557),P=n.n(d),v=n(41498),s=n.n(v),I=n(21739),E=n(56918),_=n(69821),M=n(11794),i=n(57387),p=n(6699),u=n(27276),r=n(5465),m=n.n(r),c=n(10867),a=n.n(c),h=n(92754),g=n(67820),O=n(76271),x=n(19579),T=n(18921),D=n(38861),f=n(51219),U=n(46530),L={"docs-templates-native-demo-basic":{component:I.memo(I.lazy(function(){return Promise.all([n.e(5804),n.e(7195),n.e(2433)]).then(n.bind(n,79255))})),asset:{type:"BLOCK",id:"docs-templates-native-demo-basic",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:n(90013).Z},react:{type:"NPM",value:"18.3.1"},"./index.less":{type:"FILE",value:n(4752).Z},"./DemoContext.tsx":{type:"FILE",value:n(97763).Z},"./Chat.tsx":{type:"FILE",value:n(18135).Z},ahooks:{type:"NPM",value:"3.8.5"},"@agentscope-ai/chat":{type:"NPM",value:"1.1.4"},antd:{type:"NPM",value:"5.26.0"},"@ant-design/icons":{type:"NPM",value:"5.6.1"},lodash:{type:"NPM",value:"4.17.21"},"@spark-ai/design":{type:"NPM",value:"1.0.3"},"react-dom":{type:"NPM",value:"18.3.1"},"../sessionLocalStorage.ts":{type:"FILE",value:n(80142).Z},"../Header.tsx":{type:"FILE",value:n(97626).Z},"./index.module.less":{type:"FILE",value:n(36416).Z},"./Setting.tsx":{type:"FILE",value:n(73381).Z},"./ModelSelect.tsx":{type:"FILE",value:n(60097).Z}},entry:"index.tsx"},context:{"./index.less":E,"./DemoContext.tsx":_,"./Chat.tsx":M,"../sessionLocalStorage.ts":O,"../Header.tsx":x,"./index.module.less":T,"./Setting.tsx":D,"./ModelSelect.tsx":f,react:e||(e=n.t(I,2)),"/Users/ls/IIC/spark-chat/components/chat-anywhere/demo/native/index.less":E,"/Users/ls/IIC/spark-chat/components/chat-anywhere/demo/native/DemoContext/index.tsx":_,"/Users/ls/IIC/spark-chat/components/chat-anywhere/demo/native/Chat/index.tsx":M,ahooks:i,"@ali/spark-chat":p,antd:u,"@ant-design/icons":r,"lodash/compact":c,"@spark-ai/design":h,"react-dom":o||(o=n.t(g,2)),"/Users/ls/IIC/spark-chat/components/chat-anywhere/demo/native/sessionLocalStorage.ts":O,"/Users/ls/IIC/spark-chat/components/chat-anywhere/demo/native/Header/index.tsx":x,"/Users/ls/IIC/spark-chat/components/chat-anywhere/demo/native/Header/index.module.less":T,"/Users/ls/IIC/spark-chat/components/chat-anywhere/demo/native/Header/Setting.tsx":D,"/Users/ls/IIC/spark-chat/components/chat-anywhere/demo/native/Header/ModelSelect.tsx":f,dumi:U},renderOpts:{compile:function(){var y=s()(P()().mark(function B(){var A,K=arguments;return P()().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return C.next=2,n.e(6671).then(n.bind(n,46671));case 2:return C.abrupt("return",(A=C.sent).default.apply(A,K));case 3:case"end":return C.stop()}},B)}));function R(){return y.apply(this,arguments)}return R}()}}}},80506:function(l,t,n){var e;n.r(t),n.d(t,{demos:function(){return i}});var o=n(7557),d=n.n(o),P=n(41498),v=n.n(P),s=n(21739),I=n(6699),E=n(92754),_=n(5465),M=n.n(_),i={"docs-templates-voice-demo-demo":{component:s.memo(s.lazy(function(){return Promise.all([n.e(5804),n.e(7195),n.e(2433)]).then(n.bind(n,54980))})),asset:{type:"BLOCK",id:"docs-templates-voice-demo-demo",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:n(26873).Z},react:{type:"NPM",value:"18.3.1"},"@agentscope-ai/chat":{type:"NPM",value:"1.1.4"},"@spark-ai/design":{type:"NPM",value:"1.0.3"},"@ant-design/icons":{type:"NPM",value:"5.6.1"}},entry:"index.tsx"},context:{react:e||(e=n.t(s,2)),"@ali/spark-chat":I,"@spark-ai/design":E,"@ant-design/icons":_},renderOpts:{compile:function(){var p=v()(d()().mark(function r(){var m,c=arguments;return d()().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,n.e(6671).then(n.bind(n,46671));case 2:return h.abrupt("return",(m=h.sent).default.apply(m,c));case 3:case"end":return h.stop()}},r)}));function u(){return p.apply(this,arguments)}return u}()}}}},1034:function(l,t,n){n.r(t),n.d(t,{texts:function(){return e}});const e=[{value:"AG-UI\u662F\u4E00\u4E2A\u5F00\u653E\u3001\u8F7B\u91CF\u7EA7\u7684\u534F\u8BAE\uFF0C\u901A\u8FC7\u6807\u51C6HTTP\u6216\u53EF\u9009\u7684\u4E8C\u8FDB\u5236\u901A\u9053\u4F20\u8F93\u5355\u4E2AJSON\u4E8B\u4EF6\u5E8F\u5217\u3002\u8FD9\u4E9B\u4E8B\u4EF6\u2014\u2014\u6D88\u606F\u3001\u5DE5\u5177\u8C03\u7528\u3001\u72B6\u6001\u8865\u4E01\u3001\u751F\u547D\u5468\u671F\u4FE1\u53F7\u2014\u2014\u5728\u60A8\u7684\u4EE3\u7406\u540E\u7AEF\u548C\u524D\u7AEF\u754C\u9762\u4E4B\u95F4\u65E0\u7F1D\u6D41\u52A8\uFF0C\u4FDD\u6301\u5B8C\u7F8E\u7684\u5B9E\u65F6\u540C\u6B65\u3002",paraId:0,tocIndex:1},{value:"\u4F7F\u7528\u6211\u4EEC\u7684TypeScript\u6216Python SDK\u4EE5\u53CA\u4EFB\u4F55\u4EE3\u7406\u540E\u7AEF\uFF08OpenAI\u3001Ollama\u3001LangGraph\u6216\u81EA\u5B9A\u4E49\u4EE3\u7801\uFF09\uFF0C\u60A8\u53EF\u4EE5\u5728\u51E0\u5206\u949F\u5185\u5F00\u59CB\u4F7F\u7528\u3002\u8BBF\u95EEdocs.ag-ui.com\u83B7\u53D6\u89C4\u8303\u3001\u5FEB\u901F\u5165\u95E8\u6307\u5357\u548C\u4EA4\u4E92\u5F0F\u6E38\u4E50\u573A\u3002",paraId:1,tocIndex:1},{value:"\u60A8\u53EF\u4EE5\u7406\u89E3\u4E3AAG-UI\u4F7F\u7528\u6807\u51C6\u534F\u8BAE\u5141\u8BB8LLM\u64CD\u4F5C\u60A8\u7684UI\u6570\u636E\uFF0C\u7136\u540E\u6570\u636E\u9A71\u52A8UI\u7684\u53D8\u5316\u3002",paraId:2,tocIndex:1},{value:`import {
|
|
2
|
+
CopilotRuntime,
|
|
3
|
+
OpenAIAdapter,
|
|
4
|
+
copilotRuntimeNodeHttpEndpoint,
|
|
5
|
+
} from '@copilotkit/runtime';
|
|
6
|
+
import { createServer } from 'node:http';
|
|
7
|
+
import OpenAI from 'openai';
|
|
8
|
+
|
|
9
|
+
const serviceAdapter = new OpenAIAdapter({
|
|
10
|
+
keepSystemRole: true,
|
|
11
|
+
model: 'qwen-plus',
|
|
12
|
+
openai: new OpenAI({
|
|
13
|
+
apiKey: '???',
|
|
14
|
+
baseURL: 'https://dashscope.aliyuncs.com/compatible-mode/v1',
|
|
15
|
+
}),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const server = createServer((req, res) => {
|
|
19
|
+
const runtime = new CopilotRuntime();
|
|
20
|
+
const handler = copilotRuntimeNodeHttpEndpoint({
|
|
21
|
+
endpoint: '/copilotkit',
|
|
22
|
+
runtime,
|
|
23
|
+
serviceAdapter,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
return handler(req, res);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
server.listen(4000, () => {
|
|
30
|
+
console.log('Listening at http://localhost:4000/copilotkit');
|
|
31
|
+
});
|
|
32
|
+
`,paraId:3,tocIndex:3},{value:`import React from 'react';
|
|
33
|
+
import { Task } from './Task';
|
|
34
|
+
import { useTasks } from './hook';
|
|
35
|
+
import { List } from 'antd';
|
|
36
|
+
|
|
37
|
+
export function TasksList() {
|
|
38
|
+
const { tasks } = useTasks();
|
|
39
|
+
return (
|
|
40
|
+
<List
|
|
41
|
+
style={{ margin: 16 }}
|
|
42
|
+
rowKey="id"
|
|
43
|
+
header={<div>AI TODO MVC</div>}
|
|
44
|
+
bordered
|
|
45
|
+
dataSource={tasks}
|
|
46
|
+
renderItem={(item) => {
|
|
47
|
+
return (
|
|
48
|
+
<List.Item>
|
|
49
|
+
<Task task={item} />
|
|
50
|
+
</List.Item>
|
|
51
|
+
);
|
|
52
|
+
}}
|
|
53
|
+
/>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
`,paraId:4,tocIndex:5},{value:`import { Button, Checkbox } from 'antd';
|
|
57
|
+
import { useTasks } from './hook';
|
|
58
|
+
import { TaskStatus, type Task } from './hook';
|
|
59
|
+
import React from 'react';
|
|
60
|
+
import { DeleteOutlined } from '@ant-design/icons';
|
|
61
|
+
|
|
62
|
+
export function Task({ task: { id, title, status } }: { task: Task }) {
|
|
63
|
+
const { setTaskStatus, deleteTask } = useTasks();
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<div
|
|
67
|
+
style={{
|
|
68
|
+
display: 'flex',
|
|
69
|
+
alignItems: 'center',
|
|
70
|
+
justifyContent: 'space-between',
|
|
71
|
+
flex: 1,
|
|
72
|
+
}}
|
|
73
|
+
>
|
|
74
|
+
<Checkbox
|
|
75
|
+
checked={status === TaskStatus.done}
|
|
76
|
+
onChange={() => {
|
|
77
|
+
setTaskStatus(
|
|
78
|
+
id,
|
|
79
|
+
status === TaskStatus.done ? TaskStatus.todo : TaskStatus.done,
|
|
80
|
+
);
|
|
81
|
+
}}
|
|
82
|
+
>
|
|
83
|
+
<label>{title}</label>
|
|
84
|
+
</Checkbox>
|
|
85
|
+
<Button onClick={() => deleteTask(id)} icon={<DeleteOutlined />}></Button>
|
|
86
|
+
</div>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
`,paraId:5,tocIndex:6},{value:`import { useCopilotAction, useCopilotReadable } from '@copilotkit/react-core';
|
|
90
|
+
import { createContext, useContext, useState, ReactNode } from 'react';
|
|
91
|
+
import React from 'react';
|
|
92
|
+
|
|
93
|
+
export type Task = {
|
|
94
|
+
id: number;
|
|
95
|
+
title: string;
|
|
96
|
+
status: TaskStatus;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export enum TaskStatus {
|
|
100
|
+
todo = 'todo',
|
|
101
|
+
done = 'done',
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const defaultTasks: Task[] = [];
|
|
105
|
+
|
|
106
|
+
let nextId = defaultTasks.length + 1;
|
|
107
|
+
|
|
108
|
+
type TasksContextType = {
|
|
109
|
+
tasks: Task[];
|
|
110
|
+
addTask: (title: string) => void;
|
|
111
|
+
setTaskStatus: (id: number, status: TaskStatus) => void;
|
|
112
|
+
deleteTask: (id: number) => void;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
const TasksContext = createContext<TasksContextType | undefined>(undefined);
|
|
116
|
+
|
|
117
|
+
export const TasksProvider = ({ children }: { children: ReactNode }) => {
|
|
118
|
+
const [tasks, setTasks] = useState<Task[]>(defaultTasks);
|
|
119
|
+
|
|
120
|
+
useCopilotReadable({
|
|
121
|
+
description: 'The state of the todo list',
|
|
122
|
+
value: JSON.stringify(tasks),
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
useCopilotAction({
|
|
126
|
+
name: 'addTask',
|
|
127
|
+
description: 'Adds a task to the todo list',
|
|
128
|
+
parameters: [
|
|
129
|
+
{
|
|
130
|
+
name: 'title',
|
|
131
|
+
type: 'string',
|
|
132
|
+
description: 'The title of the task',
|
|
133
|
+
required: true,
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
handler: ({ title }) => {
|
|
137
|
+
addTask(title);
|
|
138
|
+
},
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
useCopilotAction({
|
|
142
|
+
name: 'deleteTask',
|
|
143
|
+
description: 'Deletes a task from the todo list',
|
|
144
|
+
parameters: [
|
|
145
|
+
{
|
|
146
|
+
name: 'id',
|
|
147
|
+
type: 'number',
|
|
148
|
+
description: 'The id of the task',
|
|
149
|
+
required: true,
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
handler: ({ id }) => {
|
|
153
|
+
deleteTask(id);
|
|
154
|
+
},
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
useCopilotAction({
|
|
158
|
+
name: 'setTaskStatus',
|
|
159
|
+
description: 'Sets the status of a task',
|
|
160
|
+
parameters: [
|
|
161
|
+
{
|
|
162
|
+
name: 'id',
|
|
163
|
+
type: 'number',
|
|
164
|
+
description: 'The id of the task',
|
|
165
|
+
required: true,
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
name: 'status',
|
|
169
|
+
type: 'string',
|
|
170
|
+
description: 'The status of the task',
|
|
171
|
+
enum: Object.values(TaskStatus),
|
|
172
|
+
required: true,
|
|
173
|
+
},
|
|
174
|
+
],
|
|
175
|
+
handler: ({ id, status }) => {
|
|
176
|
+
setTaskStatus(id, status);
|
|
177
|
+
},
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
const addTask = (title: string) => {
|
|
181
|
+
setTasks([...tasks, { id: nextId++, title, status: TaskStatus.todo }]);
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
const setTaskStatus = (id: number, status: TaskStatus) => {
|
|
185
|
+
setTasks(
|
|
186
|
+
tasks.map((task) => (task.id === id ? { ...task, status } : task)),
|
|
187
|
+
);
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
const deleteTask = (id: number) => {
|
|
191
|
+
setTasks(tasks.filter((task) => task.id !== id));
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
return (
|
|
195
|
+
<TasksContext.Provider
|
|
196
|
+
value={{ tasks, addTask, setTaskStatus, deleteTask }}
|
|
197
|
+
>
|
|
198
|
+
{children}
|
|
199
|
+
</TasksContext.Provider>
|
|
200
|
+
);
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
export const useTasks = () => {
|
|
204
|
+
const context = useContext(TasksContext);
|
|
205
|
+
if (context === undefined) {
|
|
206
|
+
throw new Error('useTasks must be used within a TasksProvider');
|
|
207
|
+
}
|
|
208
|
+
return context;
|
|
209
|
+
};
|
|
210
|
+
`,paraId:6,tocIndex:7},{value:"\u60A8\u53EF\u4EE5\u67E5\u8BE2\u4EE5\u4E0B\u95EE\u9898\uFF0C\u4EE5\u67E5\u770B Copilot \u7684\u54CD\u5E94\u3002",paraId:7,tocIndex:8},{value:"\u5F53\u524D\u6709\u591A\u5C11\u4EFB\u52A1",paraId:8,tocIndex:8},{value:"\u65B0\u589E\u4E00\u4E2A\u770B\u4E66\u4EFB\u52A1",paraId:8,tocIndex:8},{value:"\u5220\u9664\u6240\u6709\u5B8C\u6210\u7684\u4EFB\u52A1",paraId:8,tocIndex:8},{value:"\u5C06\u6240\u6709\u7684\u4EFB\u52A1\u5B8C\u6210",paraId:8,tocIndex:8}]},7442:function(l,t,n){n.r(t),n.d(t,{texts:function(){return e}});const e=[{value:"\u6211\u4EEC\u5B9E\u9645\u5F00\u53D1\u8FC7\u7A0B\u4E2D\u53D1\u73B0\uFF0C\u540E\u7AEF\u63A5\u5165 LLM \u4EE5\u540E\uFF0C\u6839\u636E\u5B9E\u9645\u7684\u4E1A\u52A1\u573A\u666F\uFF0C\u80FD\u96BE\u7EE7\u7EED\u4FDD\u6301 \u300C\u517C\u5BB9 OpenAI \u6A21\u5F0F\u300D\u3002",paraId:0,tocIndex:0},{value:"\u4E3A\u6B64\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528\u6700\u57FA\u7840\u7684 SSE(FetchEventSource)\uFF0C\u5BF9\u63A5\u540E\u7AEF\u63D0\u4F9B\u7684\u670D\u52A1\u3002",paraId:1,tocIndex:0},{value:`import { Stream } from '@spark-ai/chat';
|
|
211
|
+
|
|
212
|
+
async function request() {
|
|
213
|
+
const response = await fetch();
|
|
214
|
+
|
|
215
|
+
for await (const chunk of XStream({
|
|
216
|
+
readableStream: response.body,
|
|
217
|
+
})) {
|
|
218
|
+
console.log(chunk);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
`,paraId:2,tocIndex:0}]},58083:function(l,t,n){n.r(t),n.d(t,{texts:function(){return e}});const e=[{value:"Spark Chat \u4E2D\u6240\u6709\u5BF9\u8BDD\u6C14\u6CE1\u7684\u6E32\u67D3\u90FD\u662F\u7531\u5361\u7247\u7EC4\u6210\u7684\uFF08\u65E0\u8BBA\u662F\u7528\u6237\u6C14\u6CE1\u8FD8\u662F\u6A21\u578B\u6C14\u6CE1\uFF09\uFF0C\u4F8B\u5982\uFF1A",paraId:0,tocIndex:1},{value:`<Bubble
|
|
222
|
+
cards={[
|
|
223
|
+
{
|
|
224
|
+
code: 'Text',
|
|
225
|
+
data: {
|
|
226
|
+
content: 'Hello World',
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
]}
|
|
230
|
+
/>
|
|
231
|
+
`,paraId:1,tocIndex:1},{value:"cards",paraId:2,tocIndex:1},{value:"\u53EF\u4EE5\u63A5\u53D7\u4E00\u7EC4\u5361\u7247\u5E76\u6E32\u67D3\uFF0C\u6211\u4EEC\u4E3B\u8981\u6839\u636E\u9700\u8981\u6784\u5EFA\u5361\u7247\u5E76\u663E\u793A\u5B83\u4EEC\uFF0C\u4F8B\u5982\uFF1A",paraId:2,tocIndex:1},{value:`<Bubble
|
|
232
|
+
cards={[
|
|
233
|
+
{
|
|
234
|
+
code: 'Text',
|
|
235
|
+
data: {
|
|
236
|
+
content: 'Hello World',
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
code: 'Text',
|
|
241
|
+
data: {
|
|
242
|
+
content: '\u4F60\u597D\u4E16\u754C',
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
]}
|
|
246
|
+
/>
|
|
247
|
+
`,paraId:3,tocIndex:1}]},49565:function(l,t,n){n.r(t),n.d(t,{texts:function(){return e}});const e=[{value:`export interface ChatAnywhereProps {
|
|
248
|
+
// \u81EA\u5B9A\u4E49\u5361\u7247\u914D\u7F6E
|
|
249
|
+
cardConfig?: {
|
|
250
|
+
[key: string]: React.FC<any>;
|
|
251
|
+
};
|
|
252
|
+
uiConfig?: {
|
|
253
|
+
// \u662F\u5426\u662F\u7A84\u5C4F\u6A21\u5F0F
|
|
254
|
+
narrowScreen?: boolean;
|
|
255
|
+
// \u80CC\u666F\u8272
|
|
256
|
+
background?: string;
|
|
257
|
+
// \u81EA\u5B9A\u4E49\u5934\u90E8\u69FD\u4F4D
|
|
258
|
+
header?: React.ReactElement;
|
|
259
|
+
// \u5FEB\u901F\u8F93\u5165\u69FD\u4F4D
|
|
260
|
+
quickInput?: React.ReactElement | React.ReactElement[];
|
|
261
|
+
// logo \u69FD\u4F4D
|
|
262
|
+
logo?: React.ReactElement;
|
|
263
|
+
// welcome \u69FD\u4F4D
|
|
264
|
+
welcome?: React.ReactElement;
|
|
265
|
+
// \u514D\u8D23\u58F0\u660E\u69FD\u4F4D
|
|
266
|
+
disclaimer?: React.ReactElement | string;
|
|
267
|
+
};
|
|
268
|
+
onInput:
|
|
269
|
+
| {
|
|
270
|
+
// \u662F\u5426\u9690\u85CF\u8F93\u5165\u6846\u533A\u57DF
|
|
271
|
+
hide?: boolean;
|
|
272
|
+
// \u8F93\u5165\u6846\u63D0\u4EA4\u4E8B\u4EF6
|
|
273
|
+
onSubmit(data: { query: string; fileList?: UploadFile<any>[] }): void;
|
|
274
|
+
// \u652F\u6301\u8F93\u5165\u7684\u6700\u5927\u957F\u5EA6
|
|
275
|
+
maxLength?: number;
|
|
276
|
+
// \u662F\u5426\u652F\u6301\u8F93\u5165\u6846\u7F29\u653E
|
|
277
|
+
zoomable?: boolean;
|
|
278
|
+
}
|
|
279
|
+
| ((data: { query: string; fileList?: UploadFile<any>[] }) => void);
|
|
280
|
+
// \u505C\u6B62\u751F\u6210\u56DE\u8C03
|
|
281
|
+
onStop(msg: Partial<TMessage>): void;
|
|
282
|
+
// \u91CD\u65B0\u751F\u6210\u56DE\u8C03
|
|
283
|
+
onRegenerate?(msg: Partial<TMessage>): void;
|
|
284
|
+
// \u4E0A\u4F20\u6587\u4EF6\u914D\u7F6E
|
|
285
|
+
onUpload?: {
|
|
286
|
+
maxCount?: GetProp<typeof Upload, 'maxCount'>;
|
|
287
|
+
beforeUpload?: GetProp<typeof Upload, 'beforeUpload'>;
|
|
288
|
+
customRequest: GetProp<typeof Upload, 'customRequest'>;
|
|
289
|
+
multiple?: boolean;
|
|
290
|
+
accept?: string;
|
|
291
|
+
icon?: string | React.ReactElement;
|
|
292
|
+
}[];
|
|
293
|
+
}
|
|
294
|
+
`,paraId:0,tocIndex:1},{value:`export interface ChatAnywhereRef {
|
|
295
|
+
// \u6EDA\u52A8\u5230\u5E95\u90E8
|
|
296
|
+
scrollToBottom(): void;
|
|
297
|
+
// \u8BBE\u7F6E\u52A0\u8F7D\u4E2D\u72B6\u6001
|
|
298
|
+
setLoading: (v: boolean) => void;
|
|
299
|
+
// \u8BBE\u7F6E\u7981\u7528\u72B6\u6001
|
|
300
|
+
setDisabled: (v: boolean) => void;
|
|
301
|
+
// \u2B50\uFE0F\u2B50\uFE0F\u2B50\uFE0F \u6838\u5FC3 API \u66F4\u65B0\u6D88\u606F
|
|
302
|
+
updateMessage: (message: TMessage) => TMessage[];
|
|
303
|
+
// \u5220\u9664\u6D88\u606F
|
|
304
|
+
removeMessage: (message: Partial<TMessage>) => {
|
|
305
|
+
index: number;
|
|
306
|
+
msg: TMessage;
|
|
307
|
+
};
|
|
308
|
+
// \u6E05\u7A7A\u6240\u6709\u6D88\u606F
|
|
309
|
+
removeAllMessages: () => void;
|
|
310
|
+
// \u83B7\u53D6\u6240\u6709\u6D88\u606F
|
|
311
|
+
getMessages: () => TMessage[];
|
|
312
|
+
// \u83B7\u53D6\u5355\u4E2A\u6D88\u606F
|
|
313
|
+
getMessage: (id: string) => TMessage | void;
|
|
314
|
+
}
|
|
315
|
+
`,paraId:1,tocIndex:2}]},54409:function(l,t,n){n.r(t),n.d(t,{texts:function(){return e}});const e=[{value:"ChatAnywhere \u662F\u4E00\u4E2A\u57FA\u4E8E ",paraId:0,tocIndex:1},{value:"@spark-ai/chat",paraId:0,tocIndex:1},{value:" \u8FDB\u4E00\u6B65\u5C01\u88C5\u7684\u5F00\u7BB1\u5373\u7528\u7684 LLM \u5BF9\u8BDD\u5BB9\u5668\uFF0C\u540C\u65F6\u7ED3\u5408 ",paraId:0,tocIndex:1},{value:"cards",paraId:0,tocIndex:1},{value:"\u7684\u9AD8\u62D3\u5C55\u6027\uFF0C\u53EF\u4EE5\u5B9E\u73B0\u4E30\u5BCC\u7684\u5BF9\u8BDD\u6548\u679C\u3002",paraId:0,tocIndex:1},{value:`npm create vite chatanywhere-demo
|
|
316
|
+
cd chatanywhere-demo
|
|
317
|
+
`,paraId:1,tocIndex:3},{value:`\u251C\u2500\u2500 public
|
|
318
|
+
\u2502 \u2514\u2500\u2500 vite.svg
|
|
319
|
+
\u251C\u2500\u2500 src
|
|
320
|
+
\u2502 \u2514\u2500\u2500 assets
|
|
321
|
+
\u2502 \u2514\u2500\u2500 react.svg
|
|
322
|
+
\u2502 \u251C\u2500\u2500 App.css
|
|
323
|
+
\u2502 \u251C\u2500\u2500 App.js
|
|
324
|
+
\u2502 \u251C\u2500\u2500 index.css
|
|
325
|
+
\u2502 \u251C\u2500\u2500 main.js
|
|
326
|
+
\u2502 \u2514\u2500\u2500 logo.svg
|
|
327
|
+
\u251C\u2500\u2500 index.html
|
|
328
|
+
\u251C\u2500\u2500 package.json
|
|
329
|
+
\u2514\u2500\u2500 vite.config.js
|
|
330
|
+
`,paraId:2,tocIndex:4},{value:"@spark-ai/chat",paraId:3},{value:`npm install @spark-ai/chat --save
|
|
331
|
+
`,paraId:4,tocIndex:5},{value:`npm install
|
|
332
|
+
npm run dev
|
|
333
|
+
`,paraId:5,tocIndex:6},{value:`import { ChatAnywhere, ChatAnywhereRef, uuid, TMessage, createCard } from '@spark-ai/chat';
|
|
334
|
+
import { Button } from 'antd';
|
|
335
|
+
import React, { useCallback, useRef } from 'react';
|
|
336
|
+
|
|
337
|
+
export default function Demo() {
|
|
338
|
+
const ref = useRef<ChatAnywhereRef>();
|
|
339
|
+
|
|
340
|
+
const onInput = useCallback(async (data) => {
|
|
341
|
+
const query = data.query;
|
|
342
|
+
|
|
343
|
+
ref.current.updateMessage({
|
|
344
|
+
id: uuid(),
|
|
345
|
+
cards: [{
|
|
346
|
+
code: 'Text',
|
|
347
|
+
data: {
|
|
348
|
+
content: query
|
|
349
|
+
}
|
|
350
|
+
}],
|
|
351
|
+
role: 'user',
|
|
352
|
+
msgStatus: 'finished',
|
|
353
|
+
});
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
setTimeout(() => {
|
|
357
|
+
ref.current.updateMessage({
|
|
358
|
+
id: uuid(),
|
|
359
|
+
cards: [{
|
|
360
|
+
code: 'Text',
|
|
361
|
+
data: {
|
|
362
|
+
content: \`answer for: \${query}\`,
|
|
363
|
+
}
|
|
364
|
+
}],
|
|
365
|
+
role: 'assistant',
|
|
366
|
+
msgStatus: 'finished',
|
|
367
|
+
});
|
|
368
|
+
|
|
369
|
+
}, 1000);
|
|
370
|
+
|
|
371
|
+
}, []);
|
|
372
|
+
|
|
373
|
+
const onStop = useCallback(async () => {
|
|
374
|
+
}, []);
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
return <ChatAnywhere
|
|
379
|
+
ref={ref}
|
|
380
|
+
uiConfig={{
|
|
381
|
+
disclaimer: 'AI can also make mistakes, so please check carefully and use it with caution',
|
|
382
|
+
narrowScreen: true,
|
|
383
|
+
}}
|
|
384
|
+
onInput={{
|
|
385
|
+
onSubmit: onInput,
|
|
386
|
+
}}
|
|
387
|
+
onStop={onStop}
|
|
388
|
+
></ChatAnywhere>;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
`,paraId:6,tocIndex:7}]},66043:function(l,t,n){n.r(t),n.d(t,{texts:function(){return e}});const e=[{value:"\u6211\u4EEC\u5185\u7F6E\u4E86\u4E00\u4E9B\u5361\u7247\uFF0C\u663E\u7136\u4E0D\u80FD\u6EE1\u8DB3\u6240\u6709\u4E1A\u52A1\u9700\u6C42\uFF0C\u4F46\u60A8\u53EF\u4EE5\u5C1D\u8BD5\u4F7F\u7528\u81EA\u5B9A\u4E49\u5361\u7247",paraId:0,tocIndex:1},{value:"\u81EA\u5B9A\u4E49\u5361\u7247\u662F\u7B80\u5355\u7684React\u7EC4\u4EF6\uFF0C\u60A8\u53EF\u4EE5\u81EA\u5DF1\u521B\u5EFA\u4E00\u4E2A\u5361\u7247\uFF0C\u4F8B\u5982\uFF1A",paraId:1,tocIndex:3},{value:`function MyCard(props) {
|
|
392
|
+
return <div>MyCard</div>;
|
|
393
|
+
}
|
|
394
|
+
`,paraId:2,tocIndex:3},{value:`<CustomCardsProvider cardConfig={{ MyCard }}>...</CustomCardsProvider>
|
|
395
|
+
`,paraId:3,tocIndex:4},{value:`<Bubble
|
|
396
|
+
cards={[
|
|
397
|
+
{
|
|
398
|
+
code: 'Text',
|
|
399
|
+
data: {
|
|
400
|
+
content: 'Hello World',
|
|
401
|
+
},
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
code: 'MyCard',
|
|
405
|
+
data: [
|
|
406
|
+
['Active Users', 112893],
|
|
407
|
+
['Account Balance (CNY)', 112893],
|
|
408
|
+
],
|
|
409
|
+
},
|
|
410
|
+
]}
|
|
411
|
+
/>
|
|
412
|
+
`,paraId:4,tocIndex:5}]},45752:function(l,t,n){n.r(t),n.d(t,{texts:function(){return e}});const e=[{value:"SPARK CHAT \u662F\u4E00\u4E2A\u514D\u8D39\u3001\u5F00\u6E90\u7684\u5BF9\u8BDD\u6846\u67B6\uFF0C\u7528\u4E8E\u6784\u5EFA\u4F18\u79C0\u7684 LLM \u5BF9\u8BDD\u4F53\u9A8C\u3002",paraId:0,tocIndex:0},{value:"\u{1F308} ",paraId:1,tocIndex:1},{value:"\u6E90\u81EA\u963F\u91CC\u4E91\u767E\u70BC\u4E0E AgentScope \u7684\u6700\u4F73\u5B9E\u8DF5",paraId:1,tocIndex:1},{value:"\uFF1A\u5305\u542B\u4E86\u4F17\u591A\u6211\u4EEC\u7684\u60F3\u6CD5\u4E0E\u771F\u5B9E\u4E1A\u52A1\u5B9E\u8DF5\uFF0C\u5E2E\u52A9\u4E1A\u52A1\u5FEB\u901F\u6784\u5EFA\u5BF9\u8BDD\u5F0F\u4EBA\u5DE5\u667A\u80FD\u5E94\u7528\u3002",paraId:1,tocIndex:1},{value:"\u26A1 ",paraId:1,tocIndex:1},{value:"\u5F00\u7BB1\u5373\u7528\u7684\u6A21\u578B\u5BF9\u63A5\u80FD\u529B",paraId:1,tocIndex:1},{value:"\uFF1A\u8F7B\u677E\u5BF9\u63A5\u7B26\u5408 OpenAI \u6807\u51C6\u7684\u6A21\u578B\u63A8\u7406\u670D\u52A1",paraId:1,tocIndex:1},{value:"\u26A1 ",paraId:1,tocIndex:1},{value:"\u6781\u81F4\u7684\u62D3\u5C55\u80FD\u529B",paraId:1,tocIndex:1},{value:"\uFF1A\u901A\u8FC7\u5361\u7247\u5F62\u5F0F\uFF08\u81EA\u5B9A\u4E49\u5361\u7247\uFF09\u5C55\u793A\u6A21\u578B\u8F93\u51FA\uFF0C\u652F\u6301\u591A\u79CD\u683C\u5F0F\u7684\u8F93\u51FA\u5C55\u793A",paraId:1,tocIndex:1},{value:"\u{1F6E1} ",paraId:1,tocIndex:1},{value:"TypeScript \u5168\u8986\u76D6",paraId:1,tocIndex:1},{value:"\uFF1A\u91C7\u7528 TypeScript \u5F00\u53D1\uFF0C\u63D0\u4F9B\u5B8C\u6574\u7C7B\u578B\u652F\u6301\uFF0C\u63D0\u5347\u5F00\u53D1\u4F53\u9A8C\u4E0E\u53EF\u9760\u6027",paraId:1,tocIndex:1},{value:`npm install @spark-ai/design
|
|
413
|
+
npm install @spark-ai/chat
|
|
414
|
+
`,paraId:2,tocIndex:3},{value:"\u66F4\u591A Node \u5305\u7BA1\u7406\u5668\u5B89\u88C5\u65B9\u5F0F\u4E0D\u518D\u7F57\u5217\uFF1B\u5982\u679C\u4F60\u7684\u7F51\u7EDC\u73AF\u5883\u4E0D\u4F73\uFF0C\u63A8\u8350\u4F7F\u7528 ",paraId:3,tocIndex:3},{value:"cnpm",paraId:3,tocIndex:3},{value:"\u3002",paraId:3,tocIndex:3},{value:`const response = await fetch(
|
|
415
|
+
'https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions',
|
|
416
|
+
{
|
|
417
|
+
method: 'POST',
|
|
418
|
+
headers: {
|
|
419
|
+
'Content-Type': 'application/json',
|
|
420
|
+
Authorization: \`Bearer xxxx\`,
|
|
421
|
+
},
|
|
422
|
+
body: JSON.stringify({
|
|
423
|
+
model: 'qwex-max',
|
|
424
|
+
messages: [...],
|
|
425
|
+
stream: true,
|
|
426
|
+
stream_options: {
|
|
427
|
+
include_usage: true,
|
|
428
|
+
},
|
|
429
|
+
}),
|
|
430
|
+
},
|
|
431
|
+
);
|
|
432
|
+
`,paraId:4,tocIndex:4},{value:"@spark-ai/chat",paraId:5,tocIndex:5},{value:" \u9ED8\u8BA4\u652F\u6301\u57FA\u4E8E ES modules \u7684 tree shaking\u3002",paraId:5,tocIndex:5},{value:"@spark-ai/chat",paraId:6,tocIndex:6},{value:" \u4F7F\u7528 TypeScript \u8FDB\u884C\u4E66\u5199\u5E76\u63D0\u4F9B\u4E86\u5B8C\u6574\u7684\u5B9A\u4E49\u6587\u4EF6\u3002",paraId:6,tocIndex:6}]},87690:function(l,t,n){n.r(t),n.d(t,{texts:function(){return e}});const e=[{value:"Qwen \u7684\u6A21\u578B\u63A8\u7406\u670D\u52A1\u652F\u6301\u300C\u517C\u5BB9 OpenAI \u6A21\u5F0F\u300D\u3002\u8BE6\u89C1\u5B98\u65B9\u6587\u6863: ",paraId:0,tocIndex:0},{value:"\u963F\u91CC\u4E91 - \u901A\u4E49\u5343\u95EE",paraId:0,tocIndex:0},{value:"\u5982\u4F55\u83B7\u53D6 baseURL - ",paraId:1,tocIndex:1},{value:"https://help.aliyun.com/zh/model-studio/getting-started/what-is-model-studio",paraId:1,tocIndex:1},{value:"\u5982\u4F55\u83B7\u53D6 API Key - ",paraId:1,tocIndex:1},{value:"https://help.aliyun.com/zh/model-studio/developer-reference/get-api-key",paraId:1,tocIndex:1},{value:"\u6A21\u578B\u5217\u8868 - ",paraId:1,tocIndex:1},{value:"https://help.aliyun.com/zh/model-studio/getting-started/models",paraId:1,tocIndex:1},{value:"\u662F\u6307\u5728\u63A5\u53E3\u8BBE\u8BA1\u548C\u4F7F\u7528\u65B9\u5F0F\u4E0A\u4E0E OpenAI \u7684 API \u4FDD\u6301\u4E00\u81F4\u7684\u6A21\u578B\u63A8\u7406\u670D\u52A1\u3002",paraId:2,tocIndex:2},{value:"\u8FD9\u610F\u5473\u7740\u5F00\u53D1\u8005\u53EF\u4EE5\u4F7F\u7528\u4E0E\u8C03\u7528 OpenAI \u6A21\u578B\u76F8\u540C\u7684\u4EE3\u7801\u548C\u65B9\u6CD5\uFF0C\u6765\u8C03\u7528\u8FD9\u4E9B\u517C\u5BB9\u670D\u52A1\uFF0C\u4ECE\u800C\u51CF\u5C11\u5F00\u53D1\u63A5\u5165\u6210\u672C\u3002",paraId:3,tocIndex:2},{value:"\u6CE8\u610F: \u{1F525} ",paraId:4,tocIndex:3},{value:"dangerouslyAllowBrowser",paraId:4,tocIndex:3},{value:" \u5B58\u5728\u5B89\u5168\u98CE\u9669\uFF0C\u5BF9\u6B64 openai-node \u7684\u5B98\u65B9\u6587\u6863\u6709\u8BE6\u7EC6\u7684 ",paraId:4,tocIndex:3},{value:"\u8BF4\u660E",paraId:4,tocIndex:3},{value:"\u3002",paraId:4,tocIndex:3},{value:`import OpenAI from 'openai';
|
|
433
|
+
|
|
434
|
+
const client = new OpenAI({
|
|
435
|
+
baseURL: 'https://dashscope.aliyuncs.com/compatible-mode/v1',
|
|
436
|
+
apiKey: process.env['DASHSCOPE_API_KEY'],
|
|
437
|
+
dangerouslyAllowBrowser: true,
|
|
438
|
+
});
|
|
439
|
+
|
|
440
|
+
try {
|
|
441
|
+
const stream = await client.chat.completions.create({
|
|
442
|
+
model: 'qwen-plus',
|
|
443
|
+
// if chat context is needed, modify the array
|
|
444
|
+
messages: [{ role: 'user', content: message }],
|
|
445
|
+
// stream mode
|
|
446
|
+
stream: true,
|
|
447
|
+
});
|
|
448
|
+
|
|
449
|
+
for await (const chunk of stream) {
|
|
450
|
+
console.log(chunk);
|
|
451
|
+
content += chunk.choices[0]?.delta?.content || '';
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
console.log(content);
|
|
455
|
+
} catch (error) {}
|
|
456
|
+
`,paraId:5,tocIndex:3}]},1468:function(l,t,n){n.r(t),n.d(t,{texts:function(){return e}});const e=[]},91163:function(l,t,n){n.r(t),n.d(t,{texts:function(){return e}});const e=[]},9336:function(l,t,n){n.r(t),n.d(t,{texts:function(){return e}});const e=[]}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.spark-editor-var-tag{padding:0 6px;line-height:24px;font-size:12px;margin:0 2px;background:#cdd0dc33;border-radius:6px;height:24px;display:inline-block}.chat-anywhere-demo .spc-chat-anywhere-chat-welcome{height:auto}.aLF5mJxsoIbtqiVS9Q_k{height:100%;display:flex;align-items:center;justify-content:space-between;padding:0 12px;width:100%}.zCK_C0UUk2Y7IxwN9deh{height:20px;display:flex;align-items:center;gap:8px}.zCK_C0UUk2Y7IxwN9deh .anticon-down{transform:scaleY(.75)}.zCK_C0UUk2Y7IxwN9deh .uJ4iWrS0Dc3IuainD3fE{width:20px;height:20px;background-color:var(--spc-color-bg-base);border-radius:6px}.zCK_C0UUk2Y7IxwN9deh .bq7Y889as5EGAGeW1CW8{font-weight:500;line-height:20px;color:var(--spc-color-text)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_agentscope_ai_chat=self.webpackChunk_agentscope_ai_chat||[]).push([[3065],{94348:function(e,n,u){u.r(n),u.d(n,{default:function(){return t}});function t(){return null}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_agentscope_ai_chat=self.webpackChunk_agentscope_ai_chat||[]).push([[1009],{45955:function(O,i,e){e.r(i),e.d(i,{default:function(){return h}});var a=e(46530),n=e(21739),D=e(44903),g=function(){var E=(0,a.useParams)(),o=E.id,t=(0,a.useDemo)(o),R=(0,D.m)({id:o,component:t.component,renderOpts:t.renderOpts}),w=R.canvasRef,m=t||{},v=m.component,d=m.renderOpts,r=(0,a.useLiveDemo)(o),s=r.node,c=r.setSource,u=r.error,f=r.loading,L=s||(d!=null&&d.renderer?(0,n.createElement)("div",{ref:w}):v&&(0,n.createElement)(v));return(0,n.useEffect)(function(){var l=function(p){p.data.type==="dumi.liveDemo.setSource"&&c(p.data.value)};return window.addEventListener("message",l),function(){return window.removeEventListener("message",l)}},[c]),(0,n.useEffect)(function(){!f&&(u||s)&&window.postMessage({type:"dumi.liveDemo.compileDone",value:{err:u}})},[u,s,f]),L},h=g}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
body{margin:0;padding:0}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(){"use strict";var t="/".replace(/([^/])$/,"$1/"),e=location.pathname,n=e.startsWith(t)&&decodeURI("/".concat(e.slice(t.length)));if(n){var a=document,c=a.head,r=a.createElement.bind(a),i=function(t,e,n){var a,c=e.r[t]||(null===(a=Object.entries(e.r).find((function(e){var n=e[0];return new RegExp("^".concat(n.replace(/\/:[^/]+/g,"/[^/]+").replace("/*","/.+"),"$")).test(t)})))||void 0===a?void 0:a[1]);return null==c?void 0:c.map((function(t){var a=e.f[t][1],c=e.f[t][0];return{type:c.split(".").pop(),url:"".concat(n.publicPath).concat(c),attrs:[["data-".concat(e.b),"".concat(e.p,":").concat(a)]]}}))}(n,{"p":"@agentscope-ai/chat","b":"webpack","f":[["docs__templates__native.en-US.md.chunk.css",111],["docs__templates__native.en-US.md.async.js",111],["dumi__theme__layouts__DocLayout__index.chunk.css",367],["dumi__theme__layouts__DocLayout__index.async.js",367],["docs__templates__voice.en-US.md.chunk.css",500],["docs__templates__voice.en-US.md.async.js",500],["components__accordion__index.zh-CN.md.chunk.css",902],["components__accordion__index.zh-CN.md.async.js",902],["nm__dumi__dist__client__pages__Demo__index.chunk.css",1009],["nm__dumi__dist__client__pages__Demo__index.async.js",1009],["components__footer__index.en-US.md.chunk.css",1481],["components__footer__index.en-US.md.async.js",1481],["docs__development__custom.en-US.md.chunk.css",1634],["docs__development__custom.en-US.md.async.js",1634],["components__attachments__index.en-US.md.chunk.css",1656],["components__attachments__index.en-US.md.async.js",1656],["docs__development__backend.en-US.md.chunk.css",1734],["docs__development__backend.en-US.md.async.js",1734],["components__disclaimer__index.en-US.md.chunk.css",1838],["components__disclaimer__index.en-US.md.async.js",1838],["1896.async.js",1896],["dumi__tmp-production__dumi__theme__ContextWrapper.async.js",1923],["components__status__index.en-US.md.chunk.css",1943],["components__status__index.en-US.md.async.js",1943],["components__conversations__index.zh-CN.md.chunk.css",1969],["components__conversations__index.zh-CN.md.async.js",1969],["components__sender__index.en-US.md.chunk.css",2106],["components__sender__index.en-US.md.async.js",2106],["components__bubble-list__index.en-US.md.chunk.css",2492],["components__bubble-list__index.en-US.md.async.js",2492],["components__bubble__index.en-US.md.chunk.css",2583],["components__bubble__index.en-US.md.async.js",2583],["dumi__pages__index__index.en-US.chunk.css",2609],["dumi__pages__index__index.en-US.async.js",2609],["2863.async.js",2863],["3057.async.js",3057],["nm__dumi__dist__client__pages__404.async.js",3065],["docs__development__chatanywhere.zh-CN.md.chunk.css",3141],["docs__development__chatanywhere.zh-CN.md.async.js",3141],["docs__development__overview.en-US.md.chunk.css",3199],["docs__development__overview.en-US.md.async.js",3199],["3364.async.js",3364],["docs__development__chatanywhere.en-US.md.chunk.css",3565],["docs__development__chatanywhere.en-US.md.async.js",3565],["docs__templates__copilot.en-US.md.chunk.css",3654],["docs__templates__copilot.en-US.md.async.js",3654],["docs__development__backend.zh-CN.md.chunk.css",3740],["docs__development__backend.zh-CN.md.async.js",3740],["components__markdown__index.zh-CN.md.chunk.css",3810],["components__markdown__index.zh-CN.md.async.js",3810],["docs__development__qwen.zh-CN.md.chunk.css",4155],["docs__development__qwen.zh-CN.md.async.js",4155],["docs__development__overview.zh-CN.md.chunk.css",4291],["docs__development__overview.zh-CN.md.async.js",4291],["dumi__theme__layouts__GlobalLayout__index.chunk.css",5113],["dumi__theme__layouts__GlobalLayout__index.async.js",5113],["components__bubble__index.zh-CN.md.chunk.css",5191],["components__bubble__index.zh-CN.md.async.js",5191],["docs__development__cards.en-US.md.chunk.css",5338],["docs__development__cards.en-US.md.async.js",5338],["docs__development__custom.zh-CN.md.chunk.css",5470],["docs__development__custom.zh-CN.md.async.js",5470],["components__welcome__index.zh-CN.md.chunk.css",5509],["components__welcome__index.zh-CN.md.async.js",5509],["5623.async.js",5623],["components__accordion__index.en-US.md.chunk.css",5660],["components__accordion__index.en-US.md.async.js",5660],["5757.async.js",5757],["docs__development__ag-ui.en-US.md.chunk.css",5803],["docs__development__ag-ui.en-US.md.async.js",5803],["docs__templates__voice.zh-CN.md.chunk.css",6117],["docs__templates__voice.zh-CN.md.async.js",6117],["components__disclaimer__index.zh-CN.md.chunk.css",6122],["components__disclaimer__index.zh-CN.md.async.js",6122],["6198.async.js",6198],["docs__development__qwen.en-US.md.chunk.css",6395],["docs__development__qwen.en-US.md.async.js",6395],["components__markdown__index.en-US.md.chunk.css",6470],["components__markdown__index.en-US.md.async.js",6470],["docs__templates__copilot.zh-CN.md.chunk.css",6578],["docs__templates__copilot.zh-CN.md.async.js",6578],["components__status__index.zh-CN.md.chunk.css",6801],["components__status__index.zh-CN.md.async.js",6801],["components__attachments__index.zh-CN.md.chunk.css",6913],["components__attachments__index.zh-CN.md.async.js",6913],["docs__templates__native.zh-CN.md.chunk.css",6940],["docs__templates__native.zh-CN.md.async.js",6940],["dumi__pages__index__index.zh-CN.chunk.css",7164],["dumi__pages__index__index.zh-CN.async.js",7164],["docs__development__ag-ui.zh-CN.md.chunk.css",7479],["docs__development__ag-ui.zh-CN.md.async.js",7479],["7485.async.js",7485],["components__sender__index.zh-CN.md.chunk.css",7808],["components__sender__index.zh-CN.md.async.js",7808],["7931.async.js",7931],["7997.async.js",7997],["components__conversations__index.en-US.md.chunk.css",8143],["components__conversations__index.en-US.md.async.js",8143],["8156.async.js",8156],["components__footer__index.zh-CN.md.chunk.css",8306],["components__footer__index.zh-CN.md.async.js",8306],["8368.async.js",8368],["docs__development__chatanywhere-api.zh-CN.md.chunk.css",8376],["docs__development__chatanywhere-api.zh-CN.md.async.js",8376],["docs__development__cards.zh-CN.md.chunk.css",8439],["docs__development__cards.zh-CN.md.async.js",8439],["docs__development__chatanywhere-api.en-US.md.chunk.css",8584],["docs__development__chatanywhere-api.en-US.md.async.js",8584],["components__bubble-list__index.zh-CN.md.chunk.css",8622],["components__bubble-list__index.zh-CN.md.async.js",8622],["components__welcome__index.en-US.md.chunk.css",9812],["components__welcome__index.en-US.md.async.js",9812]],"r":{"/*":[36,2,3,41,64,67,98,54,55,91,101,21],"/":[2,3,41,64,67,98,54,55,91,101,21],"/index":[20,32,33,34,35,64,91,94,98,2,3,41,67,54,55,101,21],"/index-cn":[20,34,35,64,87,88,91,94,98,2,3,41,67,54,55,101,21],"/~demos/:id":[8,9,54,55,91,98,101,21],"/components/accordion":[65,66,74,95,2,3,41,64,67,98,54,55,91,101,21],"/components/accordion-cn":[6,7,74,95,2,3,41,64,67,98,54,55,91,101,21],"/components/attachments":[14,15,74,95,2,3,41,64,67,98,54,55,91,101,21],"/components/attachments-cn":[74,83,84,95,2,3,41,64,67,98,54,55,91,101,21],"/components/bubble-list":[28,29,74,95,2,3,41,64,67,98,54,55,91,101,21],"/components/bubble-list-cn":[74,95,108,109,2,3,41,64,67,98,54,55,91,101,21],"/components/bubble":[30,31,74,95,2,3,41,64,67,98,54,55,91,101,21],"/components/bubble-cn":[56,57,74,95,2,3,41,64,67,98,54,55,91,101,21],"/components/conversations":[74,95,96,97,2,3,41,64,67,98,54,55,91,101,21],"/components/conversations-cn":[24,25,74,95,2,3,41,64,67,98,54,55,91,101,21],"/components/disclaimer":[18,19,74,95,2,3,41,64,67,98,54,55,91,101,21],"/components/disclaimer-cn":[72,73,74,95,2,3,41,64,67,98,54,55,91,101,21],"/components/footer":[10,11,74,95,2,3,41,64,67,98,54,55,91,101,21],"/components/footer-cn":[74,95,99,100,2,3,41,64,67,98,54,55,91,101,21],"/components/markdown":[74,77,78,95,2,3,41,64,67,98,54,55,91,101,21],"/components/markdown-cn":[48,49,74,95,2,3,41,64,67,98,54,55,91,101,21],"/components/sender":[26,27,74,95,2,3,41,64,67,98,54,55,91,101,21],"/components/sender-cn":[74,92,93,95,2,3,41,64,67,98,54,55,91,101,21],"/components/status":[22,23,74,95,2,3,41,64,67,98,54,55,91,101,21],"/components/status-cn":[74,81,82,95,2,3,41,64,67,98,54,55,91,101,21],"/components/welcome":[74,95,110,111,2,3,41,64,67,98,54,55,91,101,21],"/components/welcome-cn":[62,63,74,95,2,3,41,64,67,98,54,55,91,101,21],"/docs/development/chatanywhere-api":[74,95,106,107,2,3,41,64,67,98,54,55,91,101,21],"/docs/development/chatanywhere-api-cn":[74,95,102,103,2,3,41,64,67,98,54,55,91,101,21],"/docs/development/chatanywhere":[42,43,74,95,2,3,41,64,67,98,54,55,91,101,21],"/docs/development/chatanywhere-cn":[37,38,74,95,2,3,41,64,67,98,54,55,91,101,21],"/docs/development/overview":[39,40,74,95,2,3,41,64,67,98,54,55,91,101,21],"/docs/development/overview-cn":[52,53,74,95,2,3,41,64,67,98,54,55,91,101,21],"/docs/development/backend":[16,17,74,95,2,3,41,64,67,98,54,55,91,101,21],"/docs/development/backend-cn":[46,47,74,95,2,3,41,64,67,98,54,55,91,101,21],"/docs/development/custom":[12,13,74,95,2,3,41,64,67,98,54,55,91,101,21],"/docs/development/custom-cn":[60,61,74,95,2,3,41,64,67,98,54,55,91,101,21],"/docs/development/ag-ui":[68,69,74,95,2,3,41,64,67,98,54,55,91,101,21],"/docs/development/ag-ui-cn":[74,89,90,95,2,3,41,64,67,98,54,55,91,101,21],"/docs/development/cards":[58,59,74,95,2,3,41,64,67,98,54,55,91,101,21],"/docs/development/cards-cn":[74,95,104,105,2,3,41,64,67,98,54,55,91,101,21],"/docs/templates/copilot":[44,45,74,95,2,3,41,64,67,98,54,55,91,101,21],"/docs/templates/copilot-cn":[74,79,80,95,2,3,41,64,67,98,54,55,91,101,21],"/docs/development/qwen":[74,75,76,95,2,3,41,64,67,98,54,55,91,101,21],"/docs/development/qwen-cn":[50,51,74,95,2,3,41,64,67,98,54,55,91,101,21],"/docs/templates/native":[0,1,74,95,2,3,41,64,67,98,54,55,91,101,21],"/docs/templates/native-cn":[74,85,86,95,2,3,41,64,67,98,54,55,91,101,21],"/docs/templates/voice":[4,5,74,95,2,3,41,64,67,98,54,55,91,101,21],"/docs/templates/voice-cn":[70,71,74,95,2,3,41,64,67,98,54,55,91,101,21]}},{publicPath:"/"});null==i||i.forEach((function(t){var e,n=t.type,a=t.url;if("js"===n)(e=r("script")).src=a,e.async=!0;else{if("css"!==n)return;(e=r("link")).href=a,e.rel="preload",e.as="style"}t.attrs.forEach((function(t){e.setAttribute(t[0],t[1]||"")})),c.appendChild(e)}))}}();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_agentscope_ai_chat=self.webpackChunk_agentscope_ai_chat||[]).push([[9375],{26642:function(D,a,_){_.r(a),_.d(a,{default:function(){return s}});var d=_(21739),t=_(129),n=_(27174);function s(){return(0,n.jsx)(t.Z,{})}},56812:function(D,a,_){_.r(a),_.d(a,{default:function(){return s}});var d=_(21739),t=_(129),n=_(27174);function s(){return(0,n.jsx)(t.Z,{disabled:!0})}},59483:function(D,a,_){_.r(a),_.d(a,{default:function(){return s}});var d=_(21739),t=_(129),n=_(27174);function s(){return(0,n.jsx)(t.Z,{loading:!0})}},74129:function(D,a,_){_.r(a),_.d(a,{default:function(){return T}});var d=_(7557),t=_.n(d),n=_(41498),s=_.n(n),v=_(79800),M=_.n(v),h=_(21739),i=_(129),f=_(16940),U=_(13116),u=_(68768),r=_(5465),x=_.n(r),e=_(27174);function T(){var A=h.useState(!1),P=M()(A,2),l=P[0],R=P[1],C=h.useState([]),c=M()(C,2),E=c[0],L=c[1],O=function(){var B=s()(t()().mark(function o(W){var j;return t()().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:j=W.fileList,L(j);case 2:case"end":return K.stop()}},o)}));return function(W){return B.apply(this,arguments)}}(),I=(0,e.jsx)(i.Z.Header,{closable:!1,open:(E==null?void 0:E.length)>0,children:(0,e.jsx)(f.Z,{items:E,onChange:O})}),m=(0,e.jsx)(U.Z,{onChange:O,fileList:E,showUploadList:!1,children:(0,e.jsx)(u.ZP,{type:"text",icon:(0,e.jsx)(r.PaperClipOutlined,{})})},"upload");return(0,e.jsx)(i.Z,{zoomable:!0,header:I,prefix:[m,(0,e.jsx)(u.ZP,{type:"text",icon:(0,e.jsx)(r.BugOutlined,{})}),(0,e.jsx)(u.ZP,{type:"text",icon:(0,e.jsx)(r.BookOutlined,{})}),(0,e.jsx)(u.ZP,{type:"text",color:l?"primary":"default",variant:l?"filled":"text",icon:(0,e.jsx)(r.GlobalOutlined,{}),style:{padding:"0 6px",gap:6},onClick:function(){return R(!l)},children:"\u8054\u7F51\u641C\u7D22"})]})}},84492:function(D,a,_){_.r(a),_.d(a,{default:function(){return T}});var d=_(7557),t=_.n(d),n=_(41498),s=_.n(n),v=_(79800),M=_.n(v),h=_(21739),i=_(129),f=_(16940),U=_(13116),u=_(68768),r=_(5465),x=_.n(r),e=_(27174);function T(){var A=h.useState([]),P=M()(A,2),l=P[0],R=P[1],C=function(){var L=s()(t()().mark(function O(I){var m;return t()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:m=I.fileList,R(m);case 2:case"end":return o.stop()}},O)}));return function(I){return L.apply(this,arguments)}}(),c=(0,e.jsx)(i.Z.Header,{closable:!1,open:(l==null?void 0:l.length)>0,children:(0,e.jsx)(f.Z,{items:l,onChange:C})}),E=(0,e.jsx)(U.Z,{onChange:C,fileList:l,showUploadList:!1,children:(0,e.jsx)(u.ZP,{type:"text",icon:(0,e.jsx)(r.PaperClipOutlined,{})})},"upload");return(0,e.jsx)(i.Z,{header:c,prefix:E})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.dumi-default-tabs-nav{position:relative;display:flex;padding:0 12px}.dumi-default-tabs-nav:after{content:"";position:absolute;left:0;bottom:0;width:100%;height:0;border-bottom:1px dashed #e4e9ec}[data-prefers-color=dark] .dumi-default-tabs-nav:after{border-bottom-color:#2a353c}.dumi-default-tabs-nav-wrap{display:flex;white-space:nowrap;overflow:hidden}.dumi-default-tabs-nav-wrap.dumi-default-tabs-nav-wrap-ping-left{box-shadow:5px 0 5px -5px #0000001a inset}.dumi-default-tabs-nav-wrap.dumi-default-tabs-nav-wrap-ping-right~*>.dumi-default-tabs-nav-more{box-shadow:0 0 5px #0000001a}.dumi-default-tabs-nav-list{position:relative;z-index:1;display:flex;transition:transform .2s}.dumi-default-tabs-nav-more{height:100%;cursor:pointer;background:none;border:0;transition:box-shadow .2s}.dumi-default-tabs-tab{display:flex;margin:0 12px}.dumi-default-tabs-tab-btn{padding:0;color:#4f5866;font-size:14px;line-height:36px;border:0;outline:none;background:transparent;box-sizing:border-box;cursor:pointer;transition:all .2s}[data-prefers-color=dark] .dumi-default-tabs-tab-btn{color:#8590a0}.dumi-default-tabs-tab-btn:hover{color:#30363f}[data-prefers-color=dark] .dumi-default-tabs-tab-btn:hover{color:#c6c9cd}.dumi-default-tabs-tab-active .dumi-default-tabs-tab-btn{color:#30363f}[data-prefers-color=dark] .dumi-default-tabs-tab-active .dumi-default-tabs-tab-btn{color:#c6c9cd}.dumi-default-tabs-ink-bar{position:absolute;height:1px;background:#1677ff;transition:left .2s,width .2s;pointer-events:none;bottom:0}[data-prefers-color=dark] .dumi-default-tabs-ink-bar{background:#0053c8}.dumi-default-tabs-dropdown{position:absolute;background:inherit;border:1px solid #d0d5d8;max-height:200px;overflow:auto}[data-prefers-color=dark] .dumi-default-tabs-dropdown{border-color:#1c2022}.dumi-default-tabs-dropdown>ul{list-style:none;margin:0;padding:0}.dumi-default-tabs-dropdown>ul>li{padding:4px 12px;font-size:14px;cursor:pointer}.dumi-default-tabs-dropdown>ul>li:hover{color:#1677ff}[data-prefers-color=dark] .dumi-default-tabs-dropdown>ul>li:hover{color:#0053c8}.dumi-default-tabs-dropdown>ul>li:not(:last-child){border-bottom:1px dashed #d0d5d8}[data-prefers-color=dark] .dumi-default-tabs-dropdown>ul>li:not(:last-child){border-bottom-color:#1c2022}.dumi-default-tabs-dropdown-hidden,.dumi-default-tabs-tabpane-hidden{display:none}code[class*=language-],pre[class*=language-]{background:#fafafa;color:#383a42;font-family:Fira Code,Fira Mono,Menlo,Consolas,DejaVu Sans Mono,monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;tab-size:2;hyphens:none}code[class*=language-]::selection,code[class*=language-] *::selection,pre[class*=language-] *::selection{background:#e5e5e6;color:inherit}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-]{padding:.2em .3em;border-radius:.3em;white-space:normal}.token.comment,.token.prolog,.token.cdata{color:#a0a1a7}.token.doctype,.token.punctuation,.token.entity{color:#383a42}.token.attr-name,.token.class-name,.token.boolean,.token.constant,.token.number,.token.atrule{color:#b76b01}.token.keyword{color:#a626a4}.token.property,.token.tag,.token.symbol,.token.deleted,.token.important{color:#e45649}.token.selector,.token.string,.token.char,.token.builtin,.token.inserted,.token.regex,.token.attr-value,.token.attr-value>.token.punctuation{color:#50a14f}.token.variable,.token.operator,.token.function{color:#4078f2}.token.url{color:#0184bc}.token.attr-value>.token.punctuation.attr-equals,.token.special-attr>.token.attr-value>.token.value.css{color:#383a42}.language-css .token.selector{color:#e45649}.language-css .token.property{color:#383a42}.language-css .token.function,.language-css .token.url>.token.function{color:#0184bc}.language-css .token.url>.token.string.url{color:#50a14f}.language-css .token.important,.language-css .token.atrule .token.rule,.language-javascript .token.operator{color:#a626a4}.language-javascript .token.template-string>.token.interpolation>.token.interpolation-punctuation.punctuation{color:#ca1243}.language-json .token.operator{color:#383a42}.language-json .token.null.keyword{color:#b76b01}.language-markdown .token.url,.language-markdown .token.url>.token.operator,.language-markdown .token.url-reference.url>.token.string{color:#383a42}.language-markdown .token.url>.token.content{color:#4078f2}.language-markdown .token.url>.token.url,.language-markdown .token.url-reference.url{color:#0184bc}.language-markdown .token.blockquote.punctuation,.language-markdown .token.hr.punctuation{color:#a0a1a7;font-style:italic}.language-markdown .token.code-snippet{color:#50a14f}.language-markdown .token.bold .token.content{color:#b76b01}.language-markdown .token.italic .token.content{color:#a626a4}.language-markdown .token.strike .token.content,.language-markdown .token.strike .token.punctuation,.language-markdown .token.list.punctuation,.language-markdown .token.title.important>.token.punctuation{color:#e45649}.token.bold{font-weight:700}.token.comment,.token.italic{font-style:italic}.token.entity{cursor:help}.token.namespace{opacity:.8}.token.token.tab:not(:empty):before,.token.token.cr:before,.token.token.lf:before,.token.token.space:before{color:#383a4233}div.code-toolbar>.toolbar.toolbar>.toolbar-item{margin-right:.4em}div.code-toolbar>.toolbar.toolbar>.toolbar-item>button,div.code-toolbar>.toolbar.toolbar>.toolbar-item>a,div.code-toolbar>.toolbar.toolbar>.toolbar-item>span{background:#e5e5e6;color:#696c77;padding:.1em .4em;border-radius:.3em}div.code-toolbar>.toolbar.toolbar>.toolbar-item>button:hover,div.code-toolbar>.toolbar.toolbar>.toolbar-item>button:focus,div.code-toolbar>.toolbar.toolbar>.toolbar-item>a:hover,div.code-toolbar>.toolbar.toolbar>.toolbar-item>a:focus,div.code-toolbar>.toolbar.toolbar>.toolbar-item>span:hover,div.code-toolbar>.toolbar.toolbar>.toolbar-item>span:focus{background:#c6c7c7;color:#383a42}.line-highlight.line-highlight{background:#383a420d}.line-highlight.line-highlight:before,.line-highlight.line-highlight[data-end]:after{background:#e5e5e6;color:#383a42;padding:.1em .6em;border-radius:.3em;box-shadow:0 2px #0003}pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows>span:hover:before{background-color:#383a420d}.line-numbers.line-numbers .line-numbers-rows,.command-line .command-line-prompt{border-right-color:#383a4233}.line-numbers .line-numbers-rows>span:before,.command-line .command-line-prompt>span:before{color:#9d9d9f}.rainbow-braces .token.token.punctuation.brace-level-1,.rainbow-braces .token.token.punctuation.brace-level-5,.rainbow-braces .token.token.punctuation.brace-level-9{color:#e45649}.rainbow-braces .token.token.punctuation.brace-level-2,.rainbow-braces .token.token.punctuation.brace-level-6,.rainbow-braces .token.token.punctuation.brace-level-10{color:#50a14f}.rainbow-braces .token.token.punctuation.brace-level-3,.rainbow-braces .token.token.punctuation.brace-level-7,.rainbow-braces .token.token.punctuation.brace-level-11{color:#4078f2}.rainbow-braces .token.token.punctuation.brace-level-4,.rainbow-braces .token.token.punctuation.brace-level-8,.rainbow-braces .token.token.punctuation.brace-level-12{color:#a626a4}pre.diff-highlight>code .token.token.deleted:not(.prefix),pre>code.diff-highlight .token.token.deleted:not(.prefix){background-color:#ff526626}pre.diff-highlight>code .token.token.deleted:not(.prefix)::selection,pre.diff-highlight>code .token.token.deleted:not(.prefix) *::selection,pre>code.diff-highlight .token.token.deleted:not(.prefix)::selection,pre>code.diff-highlight .token.token.deleted:not(.prefix) *::selection{background-color:#fb566940}pre.diff-highlight>code .token.token.inserted:not(.prefix),pre>code.diff-highlight .token.token.inserted:not(.prefix){background-color:#1aff5b26}pre.diff-highlight>code .token.token.inserted:not(.prefix)::selection,pre.diff-highlight>code .token.token.inserted:not(.prefix) *::selection,pre>code.diff-highlight .token.token.inserted:not(.prefix)::selection,pre>code.diff-highlight .token.token.inserted:not(.prefix) *::selection{background-color:#38e06240}.prism-previewer.prism-previewer:before,.prism-previewer-gradient.prism-previewer-gradient div{border-color:hsl(0,0,95%)}.prism-previewer-color.prism-previewer-color:before,.prism-previewer-gradient.prism-previewer-gradient div,.prism-previewer-easing.prism-previewer-easing:before{border-radius:.3em}.prism-previewer.prism-previewer:after{border-top-color:hsl(0,0,95%)}.prism-previewer-flipped.prism-previewer-flipped.after{border-bottom-color:hsl(0,0,95%)}.prism-previewer-angle.prism-previewer-angle:before,.prism-previewer-time.prism-previewer-time:before,.prism-previewer-easing.prism-previewer-easing{background:#fff}.prism-previewer-angle.prism-previewer-angle circle,.prism-previewer-time.prism-previewer-time circle{stroke:#383a42;stroke-opacity:1}.prism-previewer-easing.prism-previewer-easing circle,.prism-previewer-easing.prism-previewer-easing path,.prism-previewer-easing.prism-previewer-easing line{stroke:#383a42}.prism-previewer-easing.prism-previewer-easing circle{fill:transparent}[data-prefers-color=dark] .token.doctype,[data-prefers-color=dark] .token.punctuation,[data-prefers-color=dark] .token.entity,[data-prefers-color=dark] code[class*=language-],[data-prefers-color=dark] pre[class*=language-]{color:#8590a0}[data-prefers-color=dark] .token.comment,[data-prefers-color=dark] .token.prolog,[data-prefers-color=dark] .token.cdata{color:#616d7f}.dumi-default-source-code{position:relative;background-color:#fbfcfd;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.dumi-default-source-code-scroll-container{overflow:auto;width:100%;height:100%}.dumi-default-source-code-scroll-content{position:relative;width:max-content;height:max-content;min-width:100%;min-height:100%}.dumi-default-source-code-scroll-content>pre.prism-code{width:max-content;position:relative;overflow:visible}.dumi-default-source-code>pre.prism-code{overflow:auto}.dumi-default-source-code>pre.prism-code,.dumi-default-source-code-scroll-content>pre.prism-code{margin:0;padding:18px 24px;font-size:14px;line-height:1.58;direction:ltr;background:transparent}.dumi-default-source-code>pre.prism-code:before,.dumi-default-source-code-scroll-content>pre.prism-code:before,.dumi-default-source-code>pre.prism-code:after,.dumi-default-source-code-scroll-content>pre.prism-code:after{content:none}.dumi-default-source-code>pre.prism-code>.highlighted,.dumi-default-source-code-scroll-content>pre.prism-code>.highlighted{position:relative;width:calc(100% + 24px);background-color:#eeeff0}.dumi-default-source-code>pre.prism-code>.highlighted .line-cell,.dumi-default-source-code-scroll-content>pre.prism-code>.highlighted .line-cell{position:relative}.dumi-default-source-code>pre.prism-code>.highlighted .line-cell:after,.dumi-default-source-code-scroll-content>pre.prism-code>.highlighted .line-cell:after{content:"";position:absolute;top:0;right:-24px;bottom:0;width:24px;background-color:#eeeff0}.dumi-default-source-code>pre.prism-code>.highlighted:after,.dumi-default-source-code-scroll-content>pre.prism-code>.highlighted:after{content:"";position:absolute;top:0;left:-24px;bottom:0;width:24px;background-color:#eeeff0}.dumi-default-source-code>pre.prism-code>.wrap,.dumi-default-source-code-scroll-content>pre.prism-code>.wrap{display:table-row}.dumi-default-source-code>pre.prism-code>.wrap>.token-line-num,.dumi-default-source-code-scroll-content>pre.prism-code>.wrap>.token-line-num{display:table-cell;text-align:right;padding-right:1em;user-select:none;opacity:.5}.dumi-default-source-code>pre.prism-code>.wrap>.line-cell,.dumi-default-source-code-scroll-content>pre.prism-code>.wrap>.line-cell{display:table-cell;width:100%}.dumi-default-source-code-copy{position:absolute;z-index:2;top:9px;right:12px;display:inline-block;padding:8px 12px;background-color:#fbfcfdcc;border:0;border-radius:2px;cursor:pointer;transition:all .2s}.dumi-default-source-code-copy>svg{width:16px;fill:#98a3aa;transition:fill .2s}[data-prefers-color=dark] .dumi-default-source-code-copy>svg{fill:#4a545a}.dumi-default-source-code-copy:hover>svg{fill:#7c8a93}[data-prefers-color=dark] .dumi-default-source-code-copy:hover>svg{fill:#616e75}.dumi-default-source-code-copy[data-copied]>svg{fill:#208a41}[data-prefers-color=dark] .dumi-default-source-code-copy[data-copied]>svg{fill:#124c24}.dumi-default-source-code:not(:hover) .dumi-default-source-code-copy{opacity:0;visibility:hidden}.dumi-default-source-code-language{position:absolute;top:2px;right:8px;z-index:2;font-size:12px;font-weight:500;user-select:none;color:#8a9099;transition:color .4s,opacity .4s}.dumi-default-source-code:hover .dumi-default-source-code-language{opacity:0;visibility:hidden}[data-prefers-color=dark] .dumi-default-source-code{background-color:#020305}[data-prefers-color=dark] .dumi-default-source-code-copy{background-color:#02030533}[data-prefers-color=dark] .dumi-default-source-code>pre.prism-code>.highlighted{background-color:#1c1d1e}[data-prefers-color=dark] .dumi-default-source-code>pre.prism-code>.highlighted:after{background-color:#1c1d1e}[data-prefers-color=dark] .dumi-default-source-code>pre.prism-code>.highlighted .line-cell:after{background-color:#1c1d1e}.dumi-default-source-code-editor{position:relative}.dumi-default-source-code-editor-textarea{position:absolute;z-index:1;display:block;top:0;left:0;width:100%;height:100%;color:transparent;caret-color:#30363f;overflow-wrap:normal;white-space:pre;box-sizing:border-box;background:transparent;opacity:1;border:0;resize:none;outline:none;overflow:hidden;border-bottom-left-radius:3px;border-bottom-right-radius:3px}[data-prefers-color=dark] .dumi-default-source-code-editor-textarea{caret-color:#c6c9cd}[data-prefers-color=dark] .dumi-default-source-code-editor-textarea:focus::selection{background-color:#0053c84d}.dumi-default-source-code-editor:after{content:"";position:absolute;z-index:0;top:0;left:0;width:100%;height:100%;border-bottom-left-radius:3px;border-bottom-right-radius:3px;pointer-events:none}.dumi-default-source-code-editor:focus-within:after{box-shadow:0 0 0 1px #1677ff inset}[data-prefers-color=dark] .dumi-default-source-code-editor:focus-within:after{box-shadow:0 0 0 1px #0053c8 inset}[data-dumi-tooltip]{position:relative}[data-dumi-tooltip]:before,[data-dumi-tooltip]:after{position:absolute;bottom:100%;left:50%;transform:translate(-50%);display:inline-block;opacity:.7;pointer-events:none;transition:all .2s}[data-dumi-tooltip]:before{content:attr(data-dumi-tooltip);min-width:30px;margin-bottom:8px;padding:5px 8px;color:#fff;font-size:13px;line-height:1.1;white-space:nowrap;background-color:#000;border-radius:2px;box-shadow:0 4px 10px #0000001a;box-sizing:border-box}[data-prefers-color=dark] [data-dumi-tooltip]:before{background-color:#222}[data-dumi-tooltip]:after{content:"";width:0;height:0;border:4px solid transparent;border-top-color:#000}[data-prefers-color=dark] [data-dumi-tooltip]:after{border-top-color:#222}[data-dumi-tooltip]:not(:hover):before,[data-dumi-tooltip]:not(:hover):after{visibility:hidden;opacity:0}[data-dumi-tooltip][data-dumi-tooltip-bottom]:before,[data-dumi-tooltip][data-dumi-tooltip-bottom]:after{bottom:auto;top:100%}[data-dumi-tooltip][data-dumi-tooltip-bottom]:before{margin-top:8px;margin-bottom:0}[data-dumi-tooltip][data-dumi-tooltip-bottom]:after{border-top-color:transparent;border-bottom-color:#000}[data-prefers-color=dark] [data-dumi-tooltip][data-dumi-tooltip-bottom]:after{border-bottom-color:#222}.dumi-default-previewer-actions{display:flex;height:32px;align-items:center;justify-content:center}.dumi-default-previewer-actions:not(:last-child){border-bottom:1px dashed #e4e9ec}[data-prefers-color=dark] .dumi-default-previewer-actions:not(:last-child){border-bottom-color:#2a353c}.dumi-default-previewer-action-btn{display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;background:transparent;cursor:pointer}.dumi-default-previewer-action-btn>svg{width:16px;fill:#98a3aa;transition:fill .2s}[data-prefers-color=dark] .dumi-default-previewer-action-btn>svg{fill:#4a545a}.dumi-default-previewer-action-btn:hover>svg{fill:#7c8a93}[data-prefers-color=dark] .dumi-default-previewer-action-btn:hover>svg{fill:#616e75}.dumi-default-previewer-action-btn:not(:last-child){margin-inline-end:4px}.dumi-default-previewer-action-sketch>select{position:absolute;-webkit-appearance:none;appearance:none;width:100%;height:100%;opacity:0;cursor:pointer}.dumi-default-previewer-action-sketch[data-copied]>svg{fill:#208a41}.dumi-default-previewer-tabs-single .dumi-default-tabs-nav{display:none}.dumi-default-previewer-editor-tip-btn{position:absolute;-webkit-appearance:none;appearance:none;z-index:2;right:42px;top:9px;padding:8px 12px;cursor:help;background:transparent;border:0;transition:all .2s}.dumi-default-previewer-editor-tip-btn>svg{width:16px;fill:#98a3aa}[data-prefers-color=dark] .dumi-default-previewer-editor-tip-btn>svg{fill:#4a545a}.dumi-default-previewer-editor-tip-btn[data-readonly]>span{position:absolute;top:50%;left:50%;display:block;width:16px;height:2px;background:#98a3aa;transform:rotate(45deg) translate(-50%,120%)}.dumi-default-tabs-tabpane:not(:hover) .dumi-default-previewer-editor-tip-btn{opacity:0;visibility:hidden}.dumi-theme-default-tooltip{position:fixed;min-width:30px;margin-bottom:8px;box-sizing:border-box}.dumi-theme-default-tooltip-hidden{display:none}.dumi-theme-default-tooltip-arrow{border:4px solid transparent;opacity:.7}.dumi-theme-default-tooltip-placement-top .dumi-theme-default-tooltip-arrow{border-top-color:#000;transform:translate(-50%,100%)}.dumi-theme-default-tooltip-bottom .dumi-theme-default-tooltip-arrow{border-bottom-color:#000;transform:translateY(-50%,-100%)}.dumi-theme-default-tooltip-content{padding:5px 8px;color:#fff;font-size:13px;line-height:1.1;white-space:nowrap;background-color:#000;opacity:.7;border-radius:2px;box-shadow:0 4px 10px #0000001a;box-sizing:border-box}[data-prefers-color=dark] .dumi-theme-default-tooltip-content{background-color:#222}.dumi-default-previewer{margin:24px 0 32px;border:1px solid #e4e9ec;border-radius:4px;background-color:inherit}[data-prefers-color=dark] .dumi-default-previewer{border-color:#2a353c}[data-dumi-demo-grid] .dumi-default-previewer{margin:0 0 16px}[data-dumi-demo-grid] .dumi-default-previewer:first-child{margin-top:24px}[data-dumi-demo-grid] .dumi-default-previewer:last-child{margin-bottom:32px}.dumi-default-previewer-demo{border-top-left-radius:2px;border-top-right-radius:2px;padding:40px 24px}.dumi-default-previewer-demo>iframe{display:block;width:100%;height:300px;border:0}.dumi-default-previewer-demo[data-iframe]{position:relative;padding:0;border-top:24px solid #e4e9ec;box-sizing:border-box}[data-prefers-color=dark] .dumi-default-previewer-demo[data-iframe]{border-top-color:#2a353c}.dumi-default-previewer-demo[data-iframe]:after{content:"";position:absolute;top:-19px;left:8px;display:inline-block;width:12px;height:12px;border-radius:50%;background-color:#fd6458;box-shadow:20px 0 #ffbf2b,40px 0 #24cc3d}.dumi-default-previewer-demo[data-transform]{transform:translate(0)}.dumi-default-previewer-demo[data-compact]{padding:0}.dumi-default-previewer-demo[data-error][data-compact]{min-height:30px}.dumi-default-previewer-demo[data-error][data-compact]+.dumi-default-previewer-demo-error{border-top-left-radius:3px;border-top-right-radius:3px}.dumi-default-previewer-demo[data-loading]{position:relative}.dumi-default-previewer-demo[data-loading]:before{position:absolute;top:50%;left:50%;content:"";display:block;height:28px;max-height:90%;aspect-ratio:1;border-radius:50%;border:2.8px solid;border-color:#1677ff transparent;box-sizing:border-box;animation:dumi-previewer-loading 1s infinite;transform:translate(-50%,-50%)}[data-prefers-color=dark] .dumi-default-previewer-demo[data-loading]:before{border-color:#0053c8 transparent}@keyframes dumi-previewer-loading{to{transform:translate(-50%,-50%) rotate(.5turn)}}.dumi-default-previewer-demo[data-loading]>*{opacity:.3!important}.dumi-default-previewer-demo-error{position:relative;margin-top:-30px;height:30px;padding:0 24px;line-height:30px;color:#b23642;font-size:13px;white-space:nowrap;text-overflow:ellipsis;background:#fdf4f5;box-sizing:border-box;overflow:hidden}[data-prefers-color=dark] .dumi-default-previewer-demo-error{color:#c6414e;background:#2a060a}[data-prefers-color=dark] .dumi-default-previewer-demo-error>svg{fill:#c6414e}.dumi-default-previewer-demo-error>svg{width:14px;padding-right:4px;fill:#ce1f31;vertical-align:-.14em}.dumi-default-previewer-meta{border-top:1px solid #e4e9ec}[data-prefers-color=dark] .dumi-default-previewer-meta{border-top-color:#2a353c}.dumi-default-previewer-desc{position:relative}.dumi-default-previewer-desc>.markdown{padding:14px 24px;border-bottom:1px dashed #e4e9ec}[data-prefers-color=dark] .dumi-default-previewer-desc>.markdown{border-bottom-color:#2a353c}.dumi-default-previewer-desc>h5{position:absolute;top:-7px;left:20px;margin:0;padding:0 4px;display:inline-block;font-size:14px;line-height:1;font-weight:700;background:linear-gradient(to top,#fff,#fff 50%,#fff0) 100%}[data-prefers-color=dark] .dumi-default-previewer-desc>h5{background:linear-gradient(to top,#000000f2,#000000f2 50%,#0000) 100%}.dumi-default-previewer-desc>h5>a{color:#30363f}[data-prefers-color=dark] .dumi-default-previewer-desc>h5>a{color:#c6c9cd}.dumi-default-previewer-desc>h5>a:not(:hover){text-decoration:none}.dumi-default-previewer-desc>h5>a>strong{float:inline-start;padding-inline-end:8px;color:#d59200;font-size:12px;line-height:15px}[data-prefers-color=dark] .dumi-default-previewer-desc>h5>a>strong{color:#895e00}.dumi-default-previewer[data-active]{box-shadow:0 0 0 4px #1677ff1a;border-color:#7cb3ff}[data-prefers-color=dark] .dumi-default-previewer[data-active]{box-shadow:0 0 0 4px #0053c81a;border-color:#002962}.dumi-default-previewer[data-debug]{border-color:#ffc23c}[data-prefers-color=dark] .dumi-default-previewer[data-debug]{border-color:#231800}.dumi-default-previewer[data-debug][data-active]{box-shadow:0 0 0 4px #d592001a}[data-prefers-color=dark] .dumi-default-previewer[data-debug][data-active]{box-shadow:0 0 0 4px #895e001a}.dumi-default-container.markdown{padding:18px 0;padding-inline-start:44px;padding-inline-end:16px;border-radius:4px}.dumi-default-container.markdown:not(:first-child){margin-bottom:24px}.dumi-default-container.markdown:not(:last-child){margin-top:32px}.dumi-default-container.markdown>svg{float:left;fill:currentcolor;margin-inline-start:-26px;width:18px}[data-direction=rtl] .dumi-default-container.markdown>svg{float:right}.dumi-default-container.markdown>h4{clear:none;margin:0 0 12px;font-size:15px;line-height:17px}.dumi-default-container.markdown>section{font-size:15px}.dumi-default-container.markdown[data-type=info]{background:#ecf4ff}.dumi-default-container.markdown[data-type=info]>h4,.dumi-default-container.markdown[data-type=info]>svg{color:#3367af}.dumi-default-container.markdown[data-type=info]>section{color:#496a99}[data-prefers-color=dark] .dumi-default-container.markdown[data-type=info]{background:#001c44}[data-prefers-color=dark] .dumi-default-container.markdown[data-type=info]>h4,[data-prefers-color=dark] .dumi-default-container.markdown[data-type=info]>svg{color:#5e8ed0}[data-prefers-color=dark] .dumi-default-container.markdown[data-type=info]>section{color:#7391bc}.dumi-default-container.markdown[data-type=warning]{background:#fff3da}.dumi-default-container.markdown[data-type=warning]>h4,.dumi-default-container.markdown[data-type=warning]>svg{color:#b78314}.dumi-default-container.markdown[data-type=warning]>section{color:#9e7a2d}[data-prefers-color=dark] .dumi-default-container.markdown[data-type=warning]{background:#2d1f00}[data-prefers-color=dark] .dumi-default-container.markdown[data-type=warning]>h4,[data-prefers-color=dark] .dumi-default-container.markdown[data-type=warning]>svg{color:#cd9417}[data-prefers-color=dark] .dumi-default-container.markdown[data-type=warning]>section{color:#b78c2e}.dumi-default-container.markdown[data-type=success]{background:#dff8e7}.dumi-default-container.markdown[data-type=success]>h4,.dumi-default-container.markdown[data-type=success]>svg{color:#238241}.dumi-default-container.markdown[data-type=success]>section{color:#357047}[data-prefers-color=dark] .dumi-default-container.markdown[data-type=success]{background:#082210}[data-prefers-color=dark] .dumi-default-container.markdown[data-type=success]>h4,[data-prefers-color=dark] .dumi-default-container.markdown[data-type=success]>svg{color:#2a9a4d}[data-prefers-color=dark] .dumi-default-container.markdown[data-type=success]>section{color:#3d8654}.dumi-default-container.markdown[data-type=error]{background:#fdf4f5}.dumi-default-container.markdown[data-type=error]>h4,.dumi-default-container.markdown[data-type=error]>svg{color:#b23642}.dumi-default-container.markdown[data-type=error]>section{color:#955359}[data-prefers-color=dark] .dumi-default-container.markdown[data-type=error]{background:#2a060a}[data-prefers-color=dark] .dumi-default-container.markdown[data-type=error]>h4,[data-prefers-color=dark] .dumi-default-container.markdown[data-type=error]>svg{color:#c6414e}[data-prefers-color=dark] .dumi-default-container.markdown[data-type=error]>section{color:#ad5962}.dumi-default-content-tabs{list-style-type:none;display:flex;align-items:center;height:60px;margin:-48px -48px 48px;padding:0 48px;border-bottom:1px solid #e4e9ec}[data-prefers-color=dark] .dumi-default-content-tabs{border-bottom-color:#2a353c}@media only screen and (max-width: 767px){.dumi-default-content-tabs{margin:-24px -24px 24px;padding:0 24px;height:42px}}[data-no-sidebar] .dumi-default-content-tabs{margin:0 0 48px;padding:0}@media only screen and (max-width: 767px){[data-no-sidebar] .dumi-default-content-tabs{margin-bottom:24px}}.dumi-default-content-tabs>li{height:inherit}.dumi-default-content-tabs>li>button{padding:0;height:inherit;color:#4f5866;font-size:17px;border:0;background:transparent;cursor:pointer;transition:all .2s}[data-prefers-color=dark] .dumi-default-content-tabs>li>button{color:#8590a0}.dumi-default-content-tabs>li>button:hover{color:#1677ff}[data-prefers-color=dark] .dumi-default-content-tabs>li>button:hover{color:#0053c8}.dumi-default-content-tabs>li:not(last-child){margin-inline-end:42px}@media only screen and (max-width: 767px){.dumi-default-content-tabs>li:not(last-child){margin-inline-end:20px}}.dumi-default-content-tabs>li[data-active]{position:relative}.dumi-default-content-tabs>li[data-active]>button{color:#30363f}[data-prefers-color=dark] .dumi-default-content-tabs>li[data-active]>button{color:#c6c9cd}.dumi-default-content-tabs>li[data-active]:after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;background-color:#1677ff}[data-prefers-color=dark] .dumi-default-content-tabs>li[data-active]:after{background-color:#0053c8}#nprogress{pointer-events:none}#nprogress .bar{background:var;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px undefined,0 0 5px undefined;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:solid 2px transparent;border-top-color:undefined;border-left-color:undefined;border-radius:50%;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .spinner,.nprogress-custom-parent #nprogress .bar{position:absolute}@keyframes nprogress-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRxC7m0dR9pBOi.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRzS7m0dR9pBOi.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRxi7m0dR9pBOi.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRxy7m0dR9pBOi.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRyS7m0dR9pA.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459WRhyyTh89ZNpQ.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459W1hyyTh89ZNpQ.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459WZhyyTh89ZNpQ.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459WdhyyTh89ZNpQ.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459WlhyyTh89Y.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}body .dumi-default-search-bar-input{height:32px}body .dumi-default-search-popover{margin-top:6px;z-index:1}body .dumi-default-search-bar .dumi-default-search-popover:before{border:none}body .dumi-default-previewer-desc>h5{height:32px;line-height:32px;top:0;left:12px;background:transparent!important;pointer-events:none}body .dumi-default-previewer{display:flex;flex-direction:column-reverse;margin:0 0 16px!important;border-radius:8px}body .dumi-default-previewer-demo{padding:24px}body .dumi-default-previewer-meta{border-top:0;border-bottom:1px solid var(--spc-color-border-secondary)}body .dumi-default-previewer-actions{justify-content:flex-end;padding:0 12px;box-sizing:content-box;background-color:var(--spc-color-fill-tertiary)}body .dumi-default-previewer-actions button:nth-child(1){display:none}body .dumi-default-previewer-actions button:nth-child(2){display:none}body .dumi-default-search-bar .dumi-default-search-shortcut{display:none}body .dumi-default-search-bar-input{background-color:var(--spc-color-bg-base);border-color:var(--spc-color-border-secondary)}body .dumi-default-previewer{border-color:var(--spc-color-border-secondary)}body [data-dumi-tooltip]:before,body [data-dumi-tooltip]:after{display:none}body .dumi-default-previewer-demo[data-iframe]:after{display:none}body .dumi-default-previewer-demo[data-iframe]{border:0}body .dumi-default-color-switch:hover svg{fill:var(--spc-color-text-secondary)!important}body .dumi-default-color-switch svg{fill:var(--spc-color-text-secondary)!important}body .dumi-default-table-content table{margin:0;overflow-x:auto;overflow-y:hidden;font-size:14px;border:1px solid var(--spc-color-border-secondary);border-width:0 1px;empty-cells:show;border-collapse:collapse;border-spacing:0}body .dumi-default-table-content th{border-width:1px 0 2px}body .dumi-default-table-content th:first-child,body .dumi-default-table-content td:first-child{border-left:1px solid var(--spc-color-border-secondary)}body .dumi-default-table-content th{color:var(--spc-font-color-secondary);font-weight:500;white-space:nowrap;background:var(--spc-color-fill-quaternary);border-width:1px 1px 2px}body .dumi-default-table-content th,body .dumi-default-table-content td{padding:12px 24px;text-align:left;border:1px solid var(--spc-color-border-secondary)}body .markdown li{padding:4px 0}body code{border:1px solid var(--spc-color-border);padding:0 4px;border-radius:4px}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.fixed{position:fixed}.mx-4{margin-left:1rem;margin-right:1rem}.mb-2{margin-bottom:.5rem}.mb-8{margin-bottom:2rem}.mt-12{margin-top:3rem}.block{display:block}.flex{display:flex}.hidden{display:none}.h-4{height:1rem}.h-6{height:1.5rem}.h-px{height:1px}.w-4{width:1rem}.w-6{width:1.5rem}.w-\[100\%\]{width:100%}.shrink{flex-shrink:1}.flex-grow{flex-grow:1}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.py-12{padding-top:3rem;padding-bottom:3rem}.text-center{text-align:center}.text-sm{font-size:.875rem;line-height:1.25rem}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.tracking-wider{letter-spacing:.05em}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}
|