@zero-library/chat-agent 2.1.18 → 2.1.19
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/dist/index.cjs.js +26 -87
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +0 -24
- package/dist/index.css.map +1 -1
- package/dist/index.esm.js +26 -87
- package/dist/index.esm.js.map +1 -1
- package/package.json +3 -3
package/dist/index.css
CHANGED
|
@@ -226,30 +226,6 @@
|
|
|
226
226
|
.styles_module_nsAvatarListContainer .styles_module_nsAvatarList .styles_module_nsAvatarListItem .styles_module_nsAvatarListItemName {
|
|
227
227
|
font-size: 12px;
|
|
228
228
|
}
|
|
229
|
-
.styles_module_think2.ant-collapse {
|
|
230
|
-
margin-bottom: 16px;
|
|
231
|
-
}
|
|
232
|
-
.styles_module_think2.ant-collapse .ant-collapse-header {
|
|
233
|
-
color: #8f91a8;
|
|
234
|
-
}
|
|
235
|
-
.styles_module_think2.ant-collapse .ant-collapse-content {
|
|
236
|
-
color: #8f91a8;
|
|
237
|
-
}
|
|
238
|
-
.styles_module_think2.ant-collapse .ant-collapse-content .ant-collapse-content-box {
|
|
239
|
-
padding: 0 10px 0 24px;
|
|
240
|
-
}
|
|
241
|
-
.styles_module_loadingMessage2 {
|
|
242
|
-
background-image:
|
|
243
|
-
linear-gradient(
|
|
244
|
-
90deg,
|
|
245
|
-
#ff6b23 0%,
|
|
246
|
-
#af3cb8 31%,
|
|
247
|
-
#53b6ff 89%);
|
|
248
|
-
background-size: 100% 2px;
|
|
249
|
-
background-repeat: no-repeat;
|
|
250
|
-
background-position: bottom;
|
|
251
|
-
padding-bottom: 2px;
|
|
252
|
-
}
|
|
253
229
|
|
|
254
230
|
/* src/ui/layouts/styles.module.less */
|
|
255
231
|
.styles_module_nsPreviewHeader {
|
package/dist/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ui/common/markdownAlert/styles.module.less","../src/components/styles.module.less","../src/ui/common/styles.module.less","../src/ui/layouts/styles.module.less"],"sourcesContent":[".appCard {\n width: 180px;\n border-radius: 10px;\n border: 1px solid #d7d7d7;\n background-color: #fafafa;\n font-size: 16px;\n cursor: pointer;\n margin: 8px;\n padding: 12px 8px;\n}\n.appCard > div {\n max-width: 100%;\n}\n.appCard > img {\n height: 30px;\n}\n.fileView {\n width: 200px;\n padding: 4px 8px;\n cursor: pointer;\n background-color: #f5f3f3;\n border-radius: 6px;\n}\n.fileEdit {\n margin: 12px 0;\n border-radius: 6px;\n border: 1px solid #f2f2f2;\n}\n.fileEdit .fileEditHeader {\n padding: 2px 8px;\n background-color: #f2f2f2;\n}\n.fileEdit .fileEditContent {\n padding: 8px;\n background-color: #fafafa;\n}\n.quoteList {\n min-width: 300px;\n}\n.quoteList:global.ant-collapse .ant-collapse-item .ant-collapse-header {\n padding: 12px 0;\n color: #8f91a8;\n}\n.quoteList:global.ant-collapse .ant-collapse-item .ant-collapse-content {\n color: #8f91a8;\n background-color: #f2f2f2;\n}\n.mdEdit {\n margin: 10px 0;\n background-color: rgba(242, 242, 242, 0.2);\n border: 1px solid #f2f2f2;\n padding: 10px;\n border-radius: 4px;\n}\n.think:global.ant-collapse {\n margin-bottom: 16px;\n}\n.think:global.ant-collapse .ant-collapse-header {\n color: #8f91a8;\n}\n.think:global.ant-collapse .ant-collapse-content {\n color: #8f91a8;\n}\n.think:global.ant-collapse .ant-collapse-content .ant-collapse-content-box {\n padding: 0 10px 0 24px;\n}\n",".loadingMessage {\n background-image: linear-gradient(90deg, #ff6b23 0%, #af3cb8 31%, #53b6ff 89%);\n background-size: 100% 2px;\n background-repeat: no-repeat;\n background-position: bottom;\n padding-bottom: 2px;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n.chatAttachments:global > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-progress .ant-progress-text {\n display: none;\n}\n.chatAttachments:global > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-progress .ant-progress-circle {\n animation: spin 2s linear infinite;\n}\n.chatAttachments:global > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-attachment-list-card-content {\n gap: 4px;\n}\n.chatAttachments:global > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-attachment-list-card-content .ant-attachment-list-card-desc {\n width: 15px;\n height: 15px;\n border: 2px solid transparent;\n border-color: #1890ff;\n border-radius: 50%;\n animation: spin 1s linear infinite;\n box-sizing: border-box;\n position: relative;\n clip-path: inset(0 0 30% 0);\n}\n.chatAttachments:global > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-attachment-list-card-content .ant-attachment-list-card-desc .ant-attachment-list-card-ellipsis-prefix {\n display: none;\n}\n.chatSender:global.ant-sender:focus-within {\n box-shadow: none;\n}\n.chatQuoteMsg {\n margin-top: 4px;\n}\n.chatQuoteMsg:global.ant-bubble > .ant-bubble-content {\n min-height: auto;\n background-color: var(--ant-color-fill-tertiary) !important;\n color: var(--ant-color-text-tertiary);\n}\n",".nsConversationListPanel {\n width: 360px;\n}\n.nsConversations {\n padding: 0 24px;\n}\n.nsConversations :global .ant-conversations-group-title {\n padding: 0;\n}\n.nsConversations :global .ant-conversations-group-title .ant-typography {\n color: #878aab;\n}\n.nsConversations :global .ant-conversations-list .ant-conversations-item {\n padding-left: 16px;\n}\n.nsConversations :global .ant-conversations-list .ant-conversations-item .ant-conversations-label {\n color: rgba(0, 0, 0, 0.88);\n}\n.nsConversations :global .ant-conversations-list .ant-conversations-item.ant-conversations-item-active .ant-conversations-label {\n color: var(--ant-color-primary);\n}\n.nsBubbleList:global.ant-bubble-list .ant-bubble.ant-bubble-start .ant-bubble-content-filled {\n background-color: transparent;\n}\n.nsBubbleList:global.ant-bubble-list .ant-bubble.ant-bubble-end .ant-bubble-content-filled {\n background-color: var(--ant-color-primary-bg);\n}\n.nsChatHeader {\n padding: 8px 16px;\n border-bottom: 1px solid #eee;\n}\n.nsChatHeader .nsChatTitle {\n font-size: 16px;\n font-weight: bold;\n}\n.nsChatHeader .nsChatHeaderPopover {\n max-height: 500px;\n width: 300px;\n display: flex;\n flex-direction: column;\n}\n.nsChatHeader .nsChatHeaderPopover :global .ant-popover-inner-content {\n min-height: 0;\n display: flex;\n flex-direction: column;\n}\n.chatWelcomeWrap :global .ant-prompts .ant-prompts-list {\n overflow: auto;\n}\n.chatWelcomeWrap .chatWelcome :global .ant-welcome-icon > img {\n border-radius: 10px;\n max-width: initial;\n}\n.chatWelcomeWrap .chatWelcomePrompts {\n width: 300px;\n}\n.nsSenderListTitle {\n width: 300px;\n}\n.nsSenderList :global .ant-list-items {\n max-height: 350px;\n overflow-y: auto;\n margin-right: -12px;\n padding-right: 12px;\n}\n.nsSenderList.historyList :global .ant-list-items {\n max-height: initial;\n}\n.nsSenderList .nsSenderListItem {\n background-color: #f6f6f6;\n color: #6b6b6b !important;\n border-radius: 5px;\n width: 300px;\n padding: 6px 12px !important;\n margin-top: 12px;\n font-size: 14px;\n cursor: pointer;\n}\n.nsSenderList .nsSenderListFooter {\n font-size: 12px;\n}\n.nsChatUserName {\n font-size: 16px;\n font-weight: bold;\n}\n.nsSenderReferenceHeaderTitle:global > .ant-sender-header-title {\n overflow: hidden;\n}\n.nsSenderReferenceHeaderContent {\n padding: 0 !important;\n}\n.nsAvatarListContainer {\n height: 300px;\n padding: 30px 48px 30px 24px;\n overflow-y: auto;\n margin-right: -24px;\n}\n.nsAvatarListContainer .nsAvatarList .nsAvatarListItem:hover {\n opacity: 90%;\n}\n.nsAvatarListContainer .nsAvatarList .nsAvatarListItem .nsAvatarListItemIcon.nsAvatarListItemIconActive {\n outline: 2px solid var(--ant-color-primary);\n}\n.nsAvatarListContainer .nsAvatarList .nsAvatarListItem .nsAvatarListItemName {\n font-size: 12px;\n}\n.think:global.ant-collapse {\n margin-bottom: 16px;\n}\n.think:global.ant-collapse .ant-collapse-header {\n color: #8f91a8;\n}\n.think:global.ant-collapse .ant-collapse-content {\n color: #8f91a8;\n}\n.think:global.ant-collapse .ant-collapse-content .ant-collapse-content-box {\n padding: 0 10px 0 24px;\n}\n.loadingMessage {\n background-image: linear-gradient(90deg, #ff6b23 0%, #af3cb8 31%, #53b6ff 89%);\n background-size: 100% 2px;\n background-repeat: no-repeat;\n background-position: bottom;\n padding-bottom: 2px;\n}\n",".nsPreviewHeader {\n padding: 16px 24px;\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);\n}\n.nsPreviewHeader .nsPreviewHeaderTitle {\n font-size: 16px;\n font-weight: bold;\n}\n.nsChatSenderHeader {\n margin-bottom: 16px;\n padding: 24px;\n font-size: 24px;\n text-align: center;\n}\n.nsDisclaimerNotice {\n font-size: 12px;\n text-align: center;\n color: #bfbfbf;\n}\n.nsChatLayout {\n background-color: #fff;\n}\n.nsChatLayout .nsChatBody {\n padding: 8px 0;\n}\n.nsBodyWidth {\n margin: 0 auto;\n max-width: 896px;\n min-width: 320px;\n width: calc(100% - 24px);\n}\n"],"mappings":";AAAA,CAACA;AACC,SAAO;AACP,iBAAe;AACf,UAAQ,IAAI,MAAM;AAClB,oBAAkB;AAClB,aAAW;AACX,UAAQ;AACR,UAAQ;AACR,WAAS,KAAK;AAChB;AACA,CAVCA,sBAUQ,EAAE;AACT,aAAW;AACb;AACA,CAbCA,sBAaQ,EAAE;AACT,UAAQ;AACV;AACA,CAACC;AACC,SAAO;AACP,WAAS,IAAI;AACb,UAAQ;AACR,oBAAkB;AAClB,iBAAe;AACjB;AACA,CAACC;AACC,UAAQ,KAAK;AACb,iBAAe;AACf,UAAQ,IAAI,MAAM;AACpB;AACA,CALCA,uBAKS,CAACC;AACT,WAAS,IAAI;AACb,oBAAkB;AACpB;AACA,CATCD,uBASS,CAACE;AACT,WAAS;AACT,oBAAkB;AACpB;AACA,CAACC;AACC,aAAW;AACb;AACA,CAHCA,uBAGgB,CAAC,aAAa,CAAC,kBAAkB,CAAC;AACjD,WAAS,KAAK;AACd,SAAO;AACT;AACA,CAPCA,uBAOgB,CAJC,aAIa,CAJC,kBAIkB,CAA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BAAmB;AACnB,uBAAqB;AACrB,kBAAgB;AAClB;;;AC5HA,CAACC;AACC,WAAS,KAAK;AACd,cAAY,EAAE,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;AACtC;AACA,CAJCA,8BAIgB,CAACC;AAChB,aAAW;AACX,eAAa;AACf;AACA,CAACC;AACC,iBAAe;AACf,WAAS;AACT,aAAW;AACX,cAAY;AACd;AACA,CAACC;AACC,aAAW;AACX,cAAY;AACZ,SAAO;AACT;AACA,CAACC;AACC,oBAAkB;AACpB;AACA,CAHCA,2BAGa,CAACC;AACb,WAAS,IAAI;AACf;AACA,CAACC;AACC,UAAQ,EAAE;AACV,aAAW;AACX,aAAW;AACX,SAAO,KAAK,KAAK,EAAE;AACrB;","names":["appCard","fileView","fileEdit","fileEditHeader","fileEditContent","quoteList","mdEdit","think","loadingMessage","spin","chatAttachments","chatSender","chatQuoteMsg","nsConversationListPanel","nsConversations","nsBubbleList","nsChatHeader","nsChatTitle","nsChatHeaderPopover","chatWelcomeWrap","chatWelcome","chatWelcomePrompts","nsSenderListTitle","nsSenderList","historyList","nsSenderListItem","nsSenderListFooter","nsChatUserName","nsSenderReferenceHeaderTitle","nsSenderReferenceHeaderContent","nsAvatarListContainer","nsAvatarList","nsAvatarListItem","nsAvatarListItemIcon","nsAvatarListItemIconActive","nsAvatarListItemName","think","loadingMessage","nsPreviewHeader","nsPreviewHeaderTitle","nsChatSenderHeader","nsDisclaimerNotice","nsChatLayout","nsChatBody","nsBodyWidth"]}
|
|
1
|
+
{"version":3,"sources":["../src/ui/common/markdownAlert/styles.module.less","../src/components/styles.module.less","../src/ui/common/styles.module.less","../src/ui/layouts/styles.module.less"],"sourcesContent":[".appCard {\n width: 180px;\n border-radius: 10px;\n border: 1px solid #d7d7d7;\n background-color: #fafafa;\n font-size: 16px;\n cursor: pointer;\n margin: 8px;\n padding: 12px 8px;\n}\n.appCard > div {\n max-width: 100%;\n}\n.appCard > img {\n height: 30px;\n}\n.fileView {\n width: 200px;\n padding: 4px 8px;\n cursor: pointer;\n background-color: #f5f3f3;\n border-radius: 6px;\n}\n.fileEdit {\n margin: 12px 0;\n border-radius: 6px;\n border: 1px solid #f2f2f2;\n}\n.fileEdit .fileEditHeader {\n padding: 2px 8px;\n background-color: #f2f2f2;\n}\n.fileEdit .fileEditContent {\n padding: 8px;\n background-color: #fafafa;\n}\n.quoteList {\n min-width: 300px;\n}\n.quoteList:global.ant-collapse .ant-collapse-item .ant-collapse-header {\n padding: 12px 0;\n color: #8f91a8;\n}\n.quoteList:global.ant-collapse .ant-collapse-item .ant-collapse-content {\n color: #8f91a8;\n background-color: #f2f2f2;\n}\n.mdEdit {\n margin: 10px 0;\n background-color: rgba(242, 242, 242, 0.2);\n border: 1px solid #f2f2f2;\n padding: 10px;\n border-radius: 4px;\n}\n.think:global.ant-collapse {\n margin-bottom: 16px;\n}\n.think:global.ant-collapse .ant-collapse-header {\n color: #8f91a8;\n}\n.think:global.ant-collapse .ant-collapse-content {\n color: #8f91a8;\n}\n.think:global.ant-collapse .ant-collapse-content .ant-collapse-content-box {\n padding: 0 10px 0 24px;\n}\n",".loadingMessage {\n background-image: linear-gradient(90deg, #ff6b23 0%, #af3cb8 31%, #53b6ff 89%);\n background-size: 100% 2px;\n background-repeat: no-repeat;\n background-position: bottom;\n padding-bottom: 2px;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n.chatAttachments:global > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-progress .ant-progress-text {\n display: none;\n}\n.chatAttachments:global > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-progress .ant-progress-circle {\n animation: spin 2s linear infinite;\n}\n.chatAttachments:global > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-attachment-list-card-content {\n gap: 4px;\n}\n.chatAttachments:global > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-attachment-list-card-content .ant-attachment-list-card-desc {\n width: 15px;\n height: 15px;\n border: 2px solid transparent;\n border-color: #1890ff;\n border-radius: 50%;\n animation: spin 1s linear infinite;\n box-sizing: border-box;\n position: relative;\n clip-path: inset(0 0 30% 0);\n}\n.chatAttachments:global > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-attachment-list-card-content .ant-attachment-list-card-desc .ant-attachment-list-card-ellipsis-prefix {\n display: none;\n}\n.chatSender:global.ant-sender:focus-within {\n box-shadow: none;\n}\n.chatQuoteMsg {\n margin-top: 4px;\n}\n.chatQuoteMsg:global.ant-bubble > .ant-bubble-content {\n min-height: auto;\n background-color: var(--ant-color-fill-tertiary) !important;\n color: var(--ant-color-text-tertiary);\n}\n",".nsConversationListPanel {\n width: 360px;\n}\n.nsConversations {\n padding: 0 24px;\n}\n.nsConversations :global .ant-conversations-group-title {\n padding: 0;\n}\n.nsConversations :global .ant-conversations-group-title .ant-typography {\n color: #878aab;\n}\n.nsConversations :global .ant-conversations-list .ant-conversations-item {\n padding-left: 16px;\n}\n.nsConversations :global .ant-conversations-list .ant-conversations-item .ant-conversations-label {\n color: rgba(0, 0, 0, 0.88);\n}\n.nsConversations :global .ant-conversations-list .ant-conversations-item.ant-conversations-item-active .ant-conversations-label {\n color: var(--ant-color-primary);\n}\n.nsBubbleList:global.ant-bubble-list .ant-bubble.ant-bubble-start .ant-bubble-content-filled {\n background-color: transparent;\n}\n.nsBubbleList:global.ant-bubble-list .ant-bubble.ant-bubble-end .ant-bubble-content-filled {\n background-color: var(--ant-color-primary-bg);\n}\n.nsChatHeader {\n padding: 8px 16px;\n border-bottom: 1px solid #eee;\n}\n.nsChatHeader .nsChatTitle {\n font-size: 16px;\n font-weight: bold;\n}\n.nsChatHeader .nsChatHeaderPopover {\n max-height: 500px;\n width: 300px;\n display: flex;\n flex-direction: column;\n}\n.nsChatHeader .nsChatHeaderPopover :global .ant-popover-inner-content {\n min-height: 0;\n display: flex;\n flex-direction: column;\n}\n.chatWelcomeWrap :global .ant-prompts .ant-prompts-list {\n overflow: auto;\n}\n.chatWelcomeWrap .chatWelcome :global .ant-welcome-icon > img {\n border-radius: 10px;\n max-width: initial;\n}\n.chatWelcomeWrap .chatWelcomePrompts {\n width: 300px;\n}\n.nsSenderListTitle {\n width: 300px;\n}\n.nsSenderList :global .ant-list-items {\n max-height: 350px;\n overflow-y: auto;\n margin-right: -12px;\n padding-right: 12px;\n}\n.nsSenderList.historyList :global .ant-list-items {\n max-height: initial;\n}\n.nsSenderList .nsSenderListItem {\n background-color: #f6f6f6;\n color: #6b6b6b !important;\n border-radius: 5px;\n width: 300px;\n padding: 6px 12px !important;\n margin-top: 12px;\n font-size: 14px;\n cursor: pointer;\n}\n.nsSenderList .nsSenderListFooter {\n font-size: 12px;\n}\n.nsChatUserName {\n font-size: 16px;\n font-weight: bold;\n}\n.nsSenderReferenceHeaderTitle:global > .ant-sender-header-title {\n overflow: hidden;\n}\n.nsSenderReferenceHeaderContent {\n padding: 0 !important;\n}\n.nsAvatarListContainer {\n height: 300px;\n padding: 30px 48px 30px 24px;\n overflow-y: auto;\n margin-right: -24px;\n}\n.nsAvatarListContainer .nsAvatarList .nsAvatarListItem:hover {\n opacity: 90%;\n}\n.nsAvatarListContainer .nsAvatarList .nsAvatarListItem .nsAvatarListItemIcon.nsAvatarListItemIconActive {\n outline: 2px solid var(--ant-color-primary);\n}\n.nsAvatarListContainer .nsAvatarList .nsAvatarListItem .nsAvatarListItemName {\n font-size: 12px;\n}\n",".nsPreviewHeader {\n padding: 16px 24px;\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);\n}\n.nsPreviewHeader .nsPreviewHeaderTitle {\n font-size: 16px;\n font-weight: bold;\n}\n.nsChatSenderHeader {\n margin-bottom: 16px;\n padding: 24px;\n font-size: 24px;\n text-align: center;\n}\n.nsDisclaimerNotice {\n font-size: 12px;\n text-align: center;\n color: #bfbfbf;\n}\n.nsChatLayout {\n background-color: #fff;\n}\n.nsChatLayout .nsChatBody {\n padding: 8px 0;\n}\n.nsBodyWidth {\n margin: 0 auto;\n max-width: 896px;\n min-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R,WAAS,KAAK,KAAK,KAAK;AACxB,cAAY;AACZ,gBAAc;AAChB;AACA,CANCA,oCAMsB,CAACC,2BAAa,CAACC,8BAAgB;AACpD,WAAS;AACX;AACA,CATCF,oCASsB,CAHCC,2BAGa,CAHCC,+BAGiB,CAACC,kCAAoB,CAACC;AAC3E,WAAS,IAAI,MAAM,IAAI;AACzB;AACA,CAZCJ,oCAYsB,CANCC,2BAMa,CANCC,+BAMiB,CAACG;AACtD,aAAW;AACb;;;ACzGA,CAACC;AACC,WAAS,KAAK;AACd,cAAY,EAAE,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;AACtC;AACA,CAJCA,8BAIgB,CAACC;AAChB,aAAW;AACX,eAAa;AACf;AACA,CAACC;AACC,iBAAe;AACf,WAAS;AACT,aAAW;AACX,cAAY;AACd;AACA,CAACC;AACC,aAAW;AACX,cAAY;AACZ,SAAO;AACT;AACA,CAACC;AACC,oBAAkB;AACpB;AACA,CAHCA,2BAGa,CAACC;AACb,WAAS,IAAI;AACf;AACA,CAACC;AACC,UAAQ,EAAE;AACV,aAAW;AACX,aAAW;AACX,SAAO,KAAK,KAAK,EAAE;AACrB;","names":["appCard","fileView","fileEdit","fileEditHeader","fileEditContent","quoteList","mdEdit","think","loadingMessage","spin","chatAttachments","chatSender","chatQuoteMsg","nsConversationListPanel","nsConversations","nsBubbleList","nsChatHeader","nsChatTitle","nsChatHeaderPopover","chatWelcomeWrap","chatWelcome","chatWelcomePrompts","nsSenderListTitle","nsSenderList","historyList","nsSenderListItem","nsSenderListFooter","nsChatUserName","nsSenderReferenceHeaderTitle","nsSenderReferenceHeaderContent","nsAvatarListContainer","nsAvatarList","nsAvatarListItem","nsAvatarListItemIcon","nsAvatarListItemIconActive","nsAvatarListItemName","nsPreviewHeader","nsPreviewHeaderTitle","nsChatSenderHeader","nsDisclaimerNotice","nsChatLayout","nsChatBody","nsBodyWidth"]}
|
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRefState, useDebounce, useSyncInput, RenderWrapper, shouldRender, isFunction, useDeepEffect, useWebSocket, getWebSocketUrl, getToken, isLocalhost, downloadFile, FilePreview, MarkdownEditor, useCreateValtioContext, isNumber, getFileSuffixName, isObject, isNullOrUnDef, isBoolean, UserAvatar, deepCopy, transforms, transform, getCurrentUser, deepMerge, createRequest, RenderMarkdown, copyText, FileIcon, isExternal } from '@zero-library/common';
|
|
2
|
-
import { App, Badge, Button, Flex, Typography, Spin, Splitter, Tag, Popover, List, Avatar, Space, message, Empty,
|
|
2
|
+
import { App, Badge, Button, Flex, Typography, Spin, Splitter, Tag, Popover, List, Avatar, Space, message, Empty, Modal, Row, Col, Collapse, Drawer } from 'antd';
|
|
3
3
|
import dayjs from 'dayjs';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import { forwardRef, useRef, useEffect, useImperativeHandle, useMemo, useState } from 'react';
|
|
@@ -7,7 +7,7 @@ import { useSnapshot, proxy } from 'valtio';
|
|
|
7
7
|
import { CloudUploadOutlined, PaperClipOutlined, EnterOutlined, UserSwitchOutlined, CloseOutlined, PlusOutlined, CommentOutlined, OpenAIOutlined, CopyOutlined, LikeOutlined, DislikeOutlined, DeleteOutlined, RedoOutlined, PlayCircleOutlined, CaretRightOutlined } from '@ant-design/icons';
|
|
8
8
|
import { Attachments, Sender, Suggestion, XProvider, Welcome, Prompts, Bubble, Conversations } from '@ant-design/x';
|
|
9
9
|
export * from '@ant-design/x';
|
|
10
|
-
import
|
|
10
|
+
import classNames8 from 'classnames';
|
|
11
11
|
import InfiniteScroll from 'react-infinite-scroll-component';
|
|
12
12
|
|
|
13
13
|
var __defProp = Object.defineProperty;
|
|
@@ -19,7 +19,7 @@ var __export = (target, all) => {
|
|
|
19
19
|
for (var name in all)
|
|
20
20
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
21
21
|
};
|
|
22
|
-
var classifyTime, copy;
|
|
22
|
+
var classifyTime, replaceThinkTags, copy;
|
|
23
23
|
var init_utils = __esm({
|
|
24
24
|
"src/core/utils.ts"() {
|
|
25
25
|
classifyTime = (timestamp) => {
|
|
@@ -39,6 +39,9 @@ var init_utils = __esm({
|
|
|
39
39
|
return "\u66F4\u65E9";
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
+
replaceThinkTags = (str) => {
|
|
43
|
+
return str.replace(/<think>/g, ":::alert type=think data={content:'").replace(/<\/think>/g, "'} ::: ");
|
|
44
|
+
};
|
|
42
45
|
copy = (value) => {
|
|
43
46
|
copyText(value).then(() => {
|
|
44
47
|
message.success("\u590D\u5236\u6210\u529F");
|
|
@@ -982,6 +985,9 @@ function createChatStore() {
|
|
|
982
985
|
// src/ui/layouts/index.tsx
|
|
983
986
|
init_Context();
|
|
984
987
|
|
|
988
|
+
// src/components/MessageRender.tsx
|
|
989
|
+
init_utils();
|
|
990
|
+
|
|
985
991
|
// src/ui/common/markdownAlert/index.ts
|
|
986
992
|
var customComponents = {
|
|
987
993
|
appCard: () => Promise.resolve().then(() => (init_AppCard(), AppCard_exports)),
|
|
@@ -1006,8 +1012,8 @@ var MessageRender_default = ({ message: message3, placement }) => {
|
|
|
1006
1012
|
Bubble,
|
|
1007
1013
|
{
|
|
1008
1014
|
placement,
|
|
1009
|
-
className:
|
|
1010
|
-
content: /* @__PURE__ */ jsx(RenderMarkdown, { content: message3.msgContent, customComponents })
|
|
1015
|
+
className: classNames8({ [styles_module_default2.loadingMessage]: message3.type }),
|
|
1016
|
+
content: /* @__PURE__ */ jsx(RenderMarkdown, { content: replaceThinkTags(message3.msgContent), customComponents })
|
|
1011
1017
|
}
|
|
1012
1018
|
),
|
|
1013
1019
|
message3.msgFiles?.map((file) => /* @__PURE__ */ jsx(
|
|
@@ -1033,7 +1039,7 @@ var MessageRender_default = ({ message: message3, placement }) => {
|
|
|
1033
1039
|
message3.quoteMsg?.id && /* @__PURE__ */ jsx(
|
|
1034
1040
|
Bubble,
|
|
1035
1041
|
{
|
|
1036
|
-
className:
|
|
1042
|
+
className: classNames8(styles_module_default2.chatQuoteMsg),
|
|
1037
1043
|
placement,
|
|
1038
1044
|
content: /* @__PURE__ */ jsxs(Flex, { vertical: true, gap: 8, children: [
|
|
1039
1045
|
message3.quoteMsg.msgContent && /* @__PURE__ */ jsxs(Flex, { children: [
|
|
@@ -1094,73 +1100,7 @@ var styles_module_default3 = {
|
|
|
1094
1100
|
nsAvatarListItem: "styles_module_nsAvatarListItem",
|
|
1095
1101
|
nsAvatarListItemIcon: "styles_module_nsAvatarListItemIcon",
|
|
1096
1102
|
nsAvatarListItemIconActive: "styles_module_nsAvatarListItemIconActive",
|
|
1097
|
-
nsAvatarListItemName: "styles_module_nsAvatarListItemName"
|
|
1098
|
-
think: "styles_module_think2",
|
|
1099
|
-
loadingMessage: "styles_module_loadingMessage2"
|
|
1100
|
-
};
|
|
1101
|
-
function extractThinkContent(content) {
|
|
1102
|
-
let main = content;
|
|
1103
|
-
const thinkContents = [];
|
|
1104
|
-
let buffer = "";
|
|
1105
|
-
const regex = /<think>(.*?)<\/think>/gs;
|
|
1106
|
-
for (const match of content.matchAll(regex)) {
|
|
1107
|
-
const thinkText = match[1].trim();
|
|
1108
|
-
thinkContents.push(thinkText);
|
|
1109
|
-
main = main.replace(match[0], "");
|
|
1110
|
-
}
|
|
1111
|
-
const lastStart = content.lastIndexOf("<think>");
|
|
1112
|
-
const lastEnd = content.lastIndexOf("</think>");
|
|
1113
|
-
if (lastStart > lastEnd) {
|
|
1114
|
-
buffer = content.slice(lastStart).replace("<think>", "");
|
|
1115
|
-
main = main.slice(0, lastStart);
|
|
1116
|
-
}
|
|
1117
|
-
return { mainContent: main, thinkContents, thinkBuffer: buffer };
|
|
1118
|
-
}
|
|
1119
|
-
function renderMarkdownPanel(content, label, key) {
|
|
1120
|
-
return {
|
|
1121
|
-
key,
|
|
1122
|
-
label,
|
|
1123
|
-
children: /* @__PURE__ */ jsx(RenderMarkdown, { content, customComponents })
|
|
1124
|
-
};
|
|
1125
|
-
}
|
|
1126
|
-
var MessageAIRender_default = ({ message: message3, placement }) => {
|
|
1127
|
-
const { mainContent, thinkContents, thinkBuffer } = useMemo(() => {
|
|
1128
|
-
if (!message3?.msgContent) return { mainContent: "", thinkContents: [], thinkBuffer: "" };
|
|
1129
|
-
return extractThinkContent(message3.msgContent);
|
|
1130
|
-
}, [message3?.msgContent]);
|
|
1131
|
-
if (!message3.msgContent) {
|
|
1132
|
-
return /* @__PURE__ */ jsx(Typography, { children: /* @__PURE__ */ jsx(Spin, { size: "small" }) });
|
|
1133
|
-
}
|
|
1134
|
-
return /* @__PURE__ */ jsx(Flex, { vertical: true, children: /* @__PURE__ */ jsx(
|
|
1135
|
-
Bubble,
|
|
1136
|
-
{
|
|
1137
|
-
placement,
|
|
1138
|
-
className: classNames9({ [styles_module_default3.loadingMessage]: message3.type && message3.type !== "TEXT_MESSAGE_END" }),
|
|
1139
|
-
content: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1140
|
-
thinkContents.length > 0 && /* @__PURE__ */ jsx(
|
|
1141
|
-
Collapse,
|
|
1142
|
-
{
|
|
1143
|
-
ghost: true,
|
|
1144
|
-
size: "small",
|
|
1145
|
-
className: styles_module_default3.think,
|
|
1146
|
-
defaultActiveKey: thinkContents.map((_, i) => `think-${i}`),
|
|
1147
|
-
items: thinkContents.map((content, index) => renderMarkdownPanel(content, `\u601D\u8003\u8FC7\u7A0B`, `think-${index}`))
|
|
1148
|
-
}
|
|
1149
|
-
),
|
|
1150
|
-
thinkBuffer && /* @__PURE__ */ jsx(
|
|
1151
|
-
Collapse,
|
|
1152
|
-
{
|
|
1153
|
-
ghost: true,
|
|
1154
|
-
size: "small",
|
|
1155
|
-
className: styles_module_default3.think,
|
|
1156
|
-
defaultActiveKey: ["buffer-think"],
|
|
1157
|
-
items: [renderMarkdownPanel(thinkBuffer, "\u4ED4\u7EC6\u601D\u8003\u4E2D...", "buffer-think")]
|
|
1158
|
-
}
|
|
1159
|
-
),
|
|
1160
|
-
/* @__PURE__ */ jsx(RenderMarkdown, { content: mainContent, customComponents })
|
|
1161
|
-
] })
|
|
1162
|
-
}
|
|
1163
|
-
) });
|
|
1103
|
+
nsAvatarListItemName: "styles_module_nsAvatarListItemName"
|
|
1164
1104
|
};
|
|
1165
1105
|
var BubbleListItems_default = ({ firstMessage = false, avatar = { user: false, agent: true, other: true } }) => {
|
|
1166
1106
|
const chatStore = useChatStore();
|
|
@@ -1210,7 +1150,7 @@ var BubbleListItems_default = ({ firstMessage = false, avatar = { user: false, a
|
|
|
1210
1150
|
/* @__PURE__ */ jsx(
|
|
1211
1151
|
Welcome,
|
|
1212
1152
|
{
|
|
1213
|
-
className:
|
|
1153
|
+
className: classNames8(styles_module_default3.chatWelcome, "p-t-32"),
|
|
1214
1154
|
variant: "borderless",
|
|
1215
1155
|
icon: /* @__PURE__ */ jsx(Avatar, { shape: "square", size: 58, src: receiverState.active.logo }),
|
|
1216
1156
|
title: `\u4F60\u597D\uFF0C\u6211\u662F${receiverState.active.name || ""}`,
|
|
@@ -1228,7 +1168,7 @@ var BubbleListItems_default = ({ firstMessage = false, avatar = { user: false, a
|
|
|
1228
1168
|
label: "\u{1F914} \u63A8\u8350\u95EE\u9898:",
|
|
1229
1169
|
children: receiverState.active.config.recommendQuestions.map(({ question }) => ({
|
|
1230
1170
|
key: question,
|
|
1231
|
-
description: /* @__PURE__ */ jsx("span", { onClick: () => chatStore.sendMessage(question), className:
|
|
1171
|
+
description: /* @__PURE__ */ jsx("span", { onClick: () => chatStore.sendMessage(question), className: classNames8(styles_module_default3.chatWelcomePrompts, "text-ellipsis"), children: question })
|
|
1232
1172
|
}))
|
|
1233
1173
|
}
|
|
1234
1174
|
]
|
|
@@ -1274,8 +1214,7 @@ var BubbleListItems_default = ({ firstMessage = false, avatar = { user: false, a
|
|
|
1274
1214
|
placement: role.placement,
|
|
1275
1215
|
variant: "borderless",
|
|
1276
1216
|
avatar: role.avatar,
|
|
1277
|
-
|
|
1278
|
-
content: role.user === "agent" ? /* @__PURE__ */ jsx(MessageAIRender_default, { message: message3, placement: role.placement }) : /* @__PURE__ */ jsx(MessageRender_default, { message: message3, placement: role.placement }),
|
|
1217
|
+
content: /* @__PURE__ */ jsx(MessageRender_default, { message: message3, placement: role.placement }),
|
|
1279
1218
|
footer: role.user === "agent" && /* @__PURE__ */ jsxs(Flex, { children: [
|
|
1280
1219
|
/* @__PURE__ */ jsx(Button, { onClick: () => copy(message3.msgContent), color: "default", variant: "text", size: "small", icon: /* @__PURE__ */ jsx(CopyOutlined, {}) }),
|
|
1281
1220
|
/* @__PURE__ */ jsx(
|
|
@@ -1361,7 +1300,7 @@ var BubbleListItems_default = ({ firstMessage = false, avatar = { user: false, a
|
|
|
1361
1300
|
autoScroll: false,
|
|
1362
1301
|
ref: listRef,
|
|
1363
1302
|
items: bubbleListItems,
|
|
1364
|
-
className:
|
|
1303
|
+
className: classNames8(styles_module_default3.nsBubbleList, "height-full", "scroll-fade-in", "zero-chat-bubbles"),
|
|
1365
1304
|
onScroll: handleScroll
|
|
1366
1305
|
},
|
|
1367
1306
|
conversationState.active.id
|
|
@@ -1396,7 +1335,7 @@ var CharacterList_default = () => {
|
|
|
1396
1335
|
/* @__PURE__ */ jsx(
|
|
1397
1336
|
Avatar,
|
|
1398
1337
|
{
|
|
1399
|
-
className:
|
|
1338
|
+
className: classNames8(styles_module_default3.nsAvatarListItemIcon, "cursor-pointer", {
|
|
1400
1339
|
[styles_module_default3.nsAvatarListItemIconActive]: activeCharacter.id === item.id
|
|
1401
1340
|
}),
|
|
1402
1341
|
size: 50,
|
|
@@ -1491,7 +1430,7 @@ var ChatHeader_default = ({
|
|
|
1491
1430
|
const chatStore = useChatStore();
|
|
1492
1431
|
const receiverState = useSnapshot(chatStore.receiver);
|
|
1493
1432
|
const configState = useSnapshot(chatStore.config);
|
|
1494
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Flex, { justify: "space-between", align: "center", className:
|
|
1433
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Flex, { justify: "space-between", align: "center", className: classNames8(styles_module_default3.nsChatHeader, "zero-chat-header"), children: [
|
|
1495
1434
|
/* @__PURE__ */ jsxs(Flex, { gap: 4, align: "center", children: [
|
|
1496
1435
|
/* @__PURE__ */ jsx(
|
|
1497
1436
|
RenderWrapper,
|
|
@@ -1801,7 +1740,7 @@ var SenderPromptsItems_default = () => {
|
|
|
1801
1740
|
title: /* @__PURE__ */ jsx(
|
|
1802
1741
|
"div",
|
|
1803
1742
|
{
|
|
1804
|
-
className:
|
|
1743
|
+
className: classNames8(styles_module_default3.nsSenderListTitle, "text-ellipsis"),
|
|
1805
1744
|
children: `${receiverState.active.name}\u5F00\u59CB\u5173\u6CE8${question.name}\u5185\u5BB9\uFF01`
|
|
1806
1745
|
}
|
|
1807
1746
|
),
|
|
@@ -1930,7 +1869,7 @@ var ConversationListHeader_default = () => {
|
|
|
1930
1869
|
type: "primary",
|
|
1931
1870
|
shape: "round",
|
|
1932
1871
|
onClick: () => chatStore.createConversation(),
|
|
1933
|
-
className:
|
|
1872
|
+
className: classNames8("m-t-16"),
|
|
1934
1873
|
icon: /* @__PURE__ */ jsx(PlusOutlined, {}),
|
|
1935
1874
|
children: "\u65B0\u5EFA\u4F1A\u8BDD"
|
|
1936
1875
|
}
|
|
@@ -1938,7 +1877,7 @@ var ConversationListHeader_default = () => {
|
|
|
1938
1877
|
] });
|
|
1939
1878
|
};
|
|
1940
1879
|
var ConversationListPanel_default = ({ header }) => {
|
|
1941
|
-
return /* @__PURE__ */ jsxs(Flex, { vertical: true, className:
|
|
1880
|
+
return /* @__PURE__ */ jsxs(Flex, { vertical: true, className: classNames8("height-full", "zero-chat-conversations", styles_module_default3.nsConversationListPanel), children: [
|
|
1942
1881
|
/* @__PURE__ */ jsx(RenderWrapper, { control: header, DefaultComponent: ConversationListHeader_default }),
|
|
1943
1882
|
/* @__PURE__ */ jsx("div", { className: "full-scroll", children: /* @__PURE__ */ jsx(ConversationList_default, {}) })
|
|
1944
1883
|
] });
|
|
@@ -2036,7 +1975,7 @@ var layouts_default = forwardRef(({ theme, params, userInfo, hooks, layout, conf
|
|
|
2036
1975
|
useEffect(() => {
|
|
2037
1976
|
configState.hooks?.onBeforeInit?.();
|
|
2038
1977
|
}, []);
|
|
2039
|
-
return /* @__PURE__ */ jsx(XProvider, { theme: { cssVar: true, ...theme }, children: /* @__PURE__ */ jsx(ChatProvider, { store: chatStore, children: /* @__PURE__ */ jsx(Spin, { spinning: receiverState.loading, wrapperClassName: "full-spin", children: /* @__PURE__ */ jsxs(Flex, { vertical: true, className:
|
|
1978
|
+
return /* @__PURE__ */ jsx(XProvider, { theme: { cssVar: true, ...theme }, children: /* @__PURE__ */ jsx(ChatProvider, { store: chatStore, children: /* @__PURE__ */ jsx(Spin, { spinning: receiverState.loading, wrapperClassName: "full-spin", children: /* @__PURE__ */ jsxs(Flex, { vertical: true, className: classNames8(styles_module_default4.nsChatLayout, "zero-chat-layout", "height-full"), children: [
|
|
2040
1979
|
/* @__PURE__ */ jsx(RenderWrapper, { control: configState.layout.globalHeader, DefaultComponent: ChatHeader_default }),
|
|
2041
1980
|
/* @__PURE__ */ jsxs(Flex, { className: "full-scroll", children: [
|
|
2042
1981
|
/* @__PURE__ */ jsx(RenderWrapper, { control: configState.layout.leftPanel }),
|
|
@@ -2090,15 +2029,15 @@ var layouts_default = forwardRef(({ theme, params, userInfo, hooks, layout, conf
|
|
|
2090
2029
|
}
|
|
2091
2030
|
)
|
|
2092
2031
|
] }) }),
|
|
2093
|
-
/* @__PURE__ */ jsx(Splitter.Panel, { collapsible: false, max: 800, min: 400, size: sizes[1], children: /* @__PURE__ */ jsxs(Flex, { vertical: true, className:
|
|
2032
|
+
/* @__PURE__ */ jsx(Splitter.Panel, { collapsible: false, max: 800, min: 400, size: sizes[1], children: /* @__PURE__ */ jsxs(Flex, { vertical: true, className: classNames8("height-full"), children: [
|
|
2094
2033
|
/* @__PURE__ */ jsx(RenderWrapper, { control: configState.layout.chatHeader, DefaultComponent: ChatHeader_default }),
|
|
2095
|
-
/* @__PURE__ */ jsx(Flex, { vertical: true, className:
|
|
2034
|
+
/* @__PURE__ */ jsx(Flex, { vertical: true, className: classNames8("full-scroll"), children: /* @__PURE__ */ jsxs(
|
|
2096
2035
|
Flex,
|
|
2097
2036
|
{
|
|
2098
2037
|
justify: "center",
|
|
2099
2038
|
vertical: true,
|
|
2100
2039
|
gap: 24,
|
|
2101
|
-
className:
|
|
2040
|
+
className: classNames8("height-full", styles_module_default4.nsChatBody, "zero-chat-body", styles_module_default4.nsBodyWidth),
|
|
2102
2041
|
children: [
|
|
2103
2042
|
shouldRender(configState.layout.messageList) && /* @__PURE__ */ jsx("div", { className: "full-scroll", children: /* @__PURE__ */ jsx(RenderWrapper, { control: configState.layout.messageList, DefaultComponent: BubbleListItems_default }) }),
|
|
2104
2043
|
/* @__PURE__ */ jsxs(Flex, { vertical: true, gap: 8, children: [
|