@zero-library/chat-agent 2.1.15 → 2.1.17

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.css CHANGED
@@ -226,6 +226,30 @@
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
+ }
229
253
 
230
254
  /* src/ui/layouts/styles.module.less */
231
255
  .styles_module_nsPreviewHeader {
@@ -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",".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;A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C,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"]}
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,CAAC;AACjD,SAAO;AACP,oBAAkB;AACpB;AACA,CAACC;AACC,UAAQ,KAAK;AACb,oBAAkB,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;AACtC,UAAQ,IAAI,MAAM;AAClB,WAAS;A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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"]}
package/dist/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
- import { useRefState, useDebounce, useSyncInput, RenderWrapper, shouldRender, isFunction, useDeepEffect, useWebSocket, getWebSocketUrl, getToken, isLocalhost, downloadFile, FilePreview, MarkdownEditor, useCreateValtioContext, isNumber, getFileSuffixName, isObject, isNullOrUnDef, isBoolean, UserAvatar, deepCopy, 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, Modal, Row, Col, Collapse, Drawer } from 'antd';
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, Collapse, Modal, Row, Col, 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 classNames8 from 'classnames';
10
+ import classNames9 from 'classnames';
11
11
  import InfiniteScroll from 'react-infinite-scroll-component';
12
12
 
13
13
  var __defProp = Object.defineProperty;
@@ -19,31 +19,9 @@ var __export = (target, all) => {
19
19
  for (var name in all)
20
20
  __defProp(target, name, { get: all[name], enumerable: true });
21
21
  };
22
- function transform(source, fieldMap) {
23
- const result = {};
24
- for (const [targetKey, mapping] of Object.entries(fieldMap)) {
25
- const key = targetKey;
26
- if (typeof mapping === "function") {
27
- result[key] = mapping(source);
28
- } else if (typeof mapping === "string" && source && mapping in source) {
29
- result[key] = source[mapping];
30
- } else {
31
- result[key] = mapping;
32
- }
33
- }
34
- return result;
35
- }
36
- function transforms(sources, fieldMap) {
37
- return sources?.map((source) => transform(source, fieldMap)) || [];
38
- }
39
- var copy, classifyTime, replaceThinkTags;
22
+ var classifyTime, copy;
40
23
  var init_utils = __esm({
41
24
  "src/core/utils.ts"() {
42
- copy = (value) => {
43
- copyText(value).then(() => {
44
- message.success("\u590D\u5236\u6210\u529F");
45
- });
46
- };
47
25
  classifyTime = (timestamp) => {
48
26
  const now = dayjs();
49
27
  const target = dayjs(timestamp);
@@ -61,8 +39,10 @@ var init_utils = __esm({
61
39
  return "\u66F4\u65E9";
62
40
  }
63
41
  };
64
- replaceThinkTags = (str) => {
65
- return str.replace(/<think>/g, ":::alert type=think data={content:'").replace(/<\/think>/g, "'} :::");
42
+ copy = (value) => {
43
+ copyText(value).then(() => {
44
+ message.success("\u590D\u5236\u6210\u529F");
45
+ });
66
46
  };
67
47
  }
68
48
  });
@@ -825,9 +805,9 @@ function createChatStore() {
825
805
  conversationId
826
806
  });
827
807
  conversation.messages[conversationId].message = data.items;
828
- config.hooks?.onAfterInitMessages?.(conversation.messages[conversationId].message);
829
- config.hooks?.onAfterInit?.();
830
808
  }
809
+ config.hooks?.onAfterInitMessages?.(conversation.messages[conversationId].message);
810
+ config.hooks?.onAfterInit?.();
831
811
  };
832
812
  const pickReceiver = () => {
833
813
  const { agent, other } = conversation.active.member;
@@ -1002,9 +982,6 @@ function createChatStore() {
1002
982
  // src/ui/layouts/index.tsx
1003
983
  init_Context();
1004
984
 
1005
- // src/components/MessageRender.tsx
1006
- init_utils();
1007
-
1008
985
  // src/ui/common/markdownAlert/index.ts
1009
986
  var customComponents = {
1010
987
  appCard: () => Promise.resolve().then(() => (init_AppCard(), AppCard_exports)),
@@ -1029,8 +1006,8 @@ var MessageRender_default = ({ message: message3, placement }) => {
1029
1006
  Bubble,
1030
1007
  {
1031
1008
  placement,
1032
- className: classNames8({ [styles_module_default2.loadingMessage]: message3.type }),
1033
- content: /* @__PURE__ */ jsx(RenderMarkdown, { content: replaceThinkTags(message3.msgContent), customComponents })
1009
+ className: classNames9({ [styles_module_default2.loadingMessage]: message3.type }),
1010
+ content: /* @__PURE__ */ jsx(RenderMarkdown, { content: message3.msgContent, customComponents })
1034
1011
  }
1035
1012
  ),
1036
1013
  message3.msgFiles?.map((file) => /* @__PURE__ */ jsx(
@@ -1056,7 +1033,7 @@ var MessageRender_default = ({ message: message3, placement }) => {
1056
1033
  message3.quoteMsg?.id && /* @__PURE__ */ jsx(
1057
1034
  Bubble,
1058
1035
  {
1059
- className: classNames8(styles_module_default2.chatQuoteMsg),
1036
+ className: classNames9(styles_module_default2.chatQuoteMsg),
1060
1037
  placement,
1061
1038
  content: /* @__PURE__ */ jsxs(Flex, { vertical: true, gap: 8, children: [
1062
1039
  message3.quoteMsg.msgContent && /* @__PURE__ */ jsxs(Flex, { children: [
@@ -1117,7 +1094,73 @@ var styles_module_default3 = {
1117
1094
  nsAvatarListItem: "styles_module_nsAvatarListItem",
1118
1095
  nsAvatarListItemIcon: "styles_module_nsAvatarListItemIcon",
1119
1096
  nsAvatarListItemIconActive: "styles_module_nsAvatarListItemIconActive",
1120
- nsAvatarListItemName: "styles_module_nsAvatarListItemName"
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
+ ) });
1121
1164
  };
1122
1165
  var BubbleListItems_default = ({ firstMessage = false, avatar = { user: false, agent: true, other: true } }) => {
1123
1166
  const chatStore = useChatStore();
@@ -1167,7 +1210,7 @@ var BubbleListItems_default = ({ firstMessage = false, avatar = { user: false, a
1167
1210
  /* @__PURE__ */ jsx(
1168
1211
  Welcome,
1169
1212
  {
1170
- className: classNames8(styles_module_default3.chatWelcome, "p-t-32"),
1213
+ className: classNames9(styles_module_default3.chatWelcome, "p-t-32"),
1171
1214
  variant: "borderless",
1172
1215
  icon: /* @__PURE__ */ jsx(Avatar, { shape: "square", size: 58, src: receiverState.active.logo }),
1173
1216
  title: `\u4F60\u597D\uFF0C\u6211\u662F${receiverState.active.name || ""}`,
@@ -1185,7 +1228,7 @@ var BubbleListItems_default = ({ firstMessage = false, avatar = { user: false, a
1185
1228
  label: "\u{1F914} \u63A8\u8350\u95EE\u9898:",
1186
1229
  children: receiverState.active.config.recommendQuestions.map(({ question }) => ({
1187
1230
  key: question,
1188
- description: /* @__PURE__ */ jsx("span", { onClick: () => chatStore.sendMessage(question), className: classNames8(styles_module_default3.chatWelcomePrompts, "text-ellipsis"), children: question })
1231
+ description: /* @__PURE__ */ jsx("span", { onClick: () => chatStore.sendMessage(question), className: classNames9(styles_module_default3.chatWelcomePrompts, "text-ellipsis"), children: question })
1189
1232
  }))
1190
1233
  }
1191
1234
  ]
@@ -1231,7 +1274,8 @@ var BubbleListItems_default = ({ firstMessage = false, avatar = { user: false, a
1231
1274
  placement: role.placement,
1232
1275
  variant: "borderless",
1233
1276
  avatar: role.avatar,
1234
- content: /* @__PURE__ */ jsx(MessageRender_default, { message: message3, placement: role.placement }),
1277
+ // content: <MessageRender message={message as ConversationMessage} placement={role.placement} />,
1278
+ content: role.user === "agent" ? /* @__PURE__ */ jsx(MessageAIRender_default, { message: message3, placement: role.placement }) : /* @__PURE__ */ jsx(MessageRender_default, { message: message3, placement: role.placement }),
1235
1279
  footer: role.user === "agent" && /* @__PURE__ */ jsxs(Flex, { children: [
1236
1280
  /* @__PURE__ */ jsx(Button, { onClick: () => copy(message3.msgContent), color: "default", variant: "text", size: "small", icon: /* @__PURE__ */ jsx(CopyOutlined, {}) }),
1237
1281
  /* @__PURE__ */ jsx(
@@ -1317,7 +1361,7 @@ var BubbleListItems_default = ({ firstMessage = false, avatar = { user: false, a
1317
1361
  autoScroll: false,
1318
1362
  ref: listRef,
1319
1363
  items: bubbleListItems,
1320
- className: classNames8(styles_module_default3.nsBubbleList, "height-full", "scroll-fade-in", "zero-chat-bubbles"),
1364
+ className: classNames9(styles_module_default3.nsBubbleList, "height-full", "scroll-fade-in", "zero-chat-bubbles"),
1321
1365
  onScroll: handleScroll
1322
1366
  },
1323
1367
  conversationState.active.id
@@ -1352,7 +1396,7 @@ var CharacterList_default = () => {
1352
1396
  /* @__PURE__ */ jsx(
1353
1397
  Avatar,
1354
1398
  {
1355
- className: classNames8(styles_module_default3.nsAvatarListItemIcon, "cursor-pointer", {
1399
+ className: classNames9(styles_module_default3.nsAvatarListItemIcon, "cursor-pointer", {
1356
1400
  [styles_module_default3.nsAvatarListItemIconActive]: activeCharacter.id === item.id
1357
1401
  }),
1358
1402
  size: 50,
@@ -1447,7 +1491,7 @@ var ChatHeader_default = ({
1447
1491
  const chatStore = useChatStore();
1448
1492
  const receiverState = useSnapshot(chatStore.receiver);
1449
1493
  const configState = useSnapshot(chatStore.config);
1450
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Flex, { justify: "space-between", align: "center", className: classNames8(styles_module_default3.nsChatHeader, "zero-chat-header"), children: [
1494
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Flex, { justify: "space-between", align: "center", className: classNames9(styles_module_default3.nsChatHeader, "zero-chat-header"), children: [
1451
1495
  /* @__PURE__ */ jsxs(Flex, { gap: 4, align: "center", children: [
1452
1496
  /* @__PURE__ */ jsx(
1453
1497
  RenderWrapper,
@@ -1757,7 +1801,7 @@ var SenderPromptsItems_default = () => {
1757
1801
  title: /* @__PURE__ */ jsx(
1758
1802
  "div",
1759
1803
  {
1760
- className: classNames8(styles_module_default3.nsSenderListTitle, "text-ellipsis"),
1804
+ className: classNames9(styles_module_default3.nsSenderListTitle, "text-ellipsis"),
1761
1805
  children: `${receiverState.active.name}\u5F00\u59CB\u5173\u6CE8${question.name}\u5185\u5BB9\uFF01`
1762
1806
  }
1763
1807
  ),
@@ -1886,7 +1930,7 @@ var ConversationListHeader_default = () => {
1886
1930
  type: "primary",
1887
1931
  shape: "round",
1888
1932
  onClick: () => chatStore.createConversation(),
1889
- className: classNames8("m-t-16"),
1933
+ className: classNames9("m-t-16"),
1890
1934
  icon: /* @__PURE__ */ jsx(PlusOutlined, {}),
1891
1935
  children: "\u65B0\u5EFA\u4F1A\u8BDD"
1892
1936
  }
@@ -1894,7 +1938,7 @@ var ConversationListHeader_default = () => {
1894
1938
  ] });
1895
1939
  };
1896
1940
  var ConversationListPanel_default = ({ header }) => {
1897
- return /* @__PURE__ */ jsxs(Flex, { vertical: true, className: classNames8("height-full", "zero-chat-conversations", styles_module_default3.nsConversationListPanel), children: [
1941
+ return /* @__PURE__ */ jsxs(Flex, { vertical: true, className: classNames9("height-full", "zero-chat-conversations", styles_module_default3.nsConversationListPanel), children: [
1898
1942
  /* @__PURE__ */ jsx(RenderWrapper, { control: header, DefaultComponent: ConversationListHeader_default }),
1899
1943
  /* @__PURE__ */ jsx("div", { className: "full-scroll", children: /* @__PURE__ */ jsx(ConversationList_default, {}) })
1900
1944
  ] });
@@ -1992,7 +2036,7 @@ var layouts_default = forwardRef(({ theme, params, userInfo, hooks, layout, conf
1992
2036
  useEffect(() => {
1993
2037
  configState.hooks?.onBeforeInit?.();
1994
2038
  }, []);
1995
- 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: [
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: classNames9(styles_module_default4.nsChatLayout, "zero-chat-layout", "height-full"), children: [
1996
2040
  /* @__PURE__ */ jsx(RenderWrapper, { control: configState.layout.globalHeader, DefaultComponent: ChatHeader_default }),
1997
2041
  /* @__PURE__ */ jsxs(Flex, { className: "full-scroll", children: [
1998
2042
  /* @__PURE__ */ jsx(RenderWrapper, { control: configState.layout.leftPanel }),
@@ -2046,15 +2090,15 @@ var layouts_default = forwardRef(({ theme, params, userInfo, hooks, layout, conf
2046
2090
  }
2047
2091
  )
2048
2092
  ] }) }),
2049
- /* @__PURE__ */ jsx(Splitter.Panel, { collapsible: false, max: 800, min: 400, size: sizes[1], children: /* @__PURE__ */ jsxs(Flex, { vertical: true, className: classNames8("height-full"), children: [
2093
+ /* @__PURE__ */ jsx(Splitter.Panel, { collapsible: false, max: 800, min: 400, size: sizes[1], children: /* @__PURE__ */ jsxs(Flex, { vertical: true, className: classNames9("height-full"), children: [
2050
2094
  /* @__PURE__ */ jsx(RenderWrapper, { control: configState.layout.chatHeader, DefaultComponent: ChatHeader_default }),
2051
- /* @__PURE__ */ jsx(Flex, { vertical: true, className: classNames8("full-scroll"), children: /* @__PURE__ */ jsxs(
2095
+ /* @__PURE__ */ jsx(Flex, { vertical: true, className: classNames9("full-scroll"), children: /* @__PURE__ */ jsxs(
2052
2096
  Flex,
2053
2097
  {
2054
2098
  justify: "center",
2055
2099
  vertical: true,
2056
2100
  gap: 24,
2057
- className: classNames8("height-full", styles_module_default4.nsChatBody, "zero-chat-body", styles_module_default4.nsBodyWidth),
2101
+ className: classNames9("height-full", styles_module_default4.nsChatBody, "zero-chat-body", styles_module_default4.nsBodyWidth),
2058
2102
  children: [
2059
2103
  shouldRender(configState.layout.messageList) && /* @__PURE__ */ jsx("div", { className: "full-scroll", children: /* @__PURE__ */ jsx(RenderWrapper, { control: configState.layout.messageList, DefaultComponent: BubbleListItems_default }) }),
2060
2104
  /* @__PURE__ */ jsxs(Flex, { vertical: true, gap: 8, children: [