@zero-library/chat-agent 2.1.10 → 2.1.12

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
@@ -54,6 +54,42 @@
54
54
  border-radius: 4px;
55
55
  }
56
56
 
57
+ /* src/components/styles.module.less */
58
+ .styles_module_chatAttachments > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-progress .ant-progress-text {
59
+ display: none;
60
+ }
61
+ .styles_module_chatAttachments > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-progress .ant-progress-circle {
62
+ animation: spin 2s linear infinite;
63
+ }
64
+ .styles_module_chatAttachments > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-attachment-list-card-content {
65
+ gap: 4px;
66
+ }
67
+ .styles_module_chatAttachments > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-attachment-list-card-content .ant-attachment-list-card-desc {
68
+ width: 15px;
69
+ height: 15px;
70
+ border: 2px solid transparent;
71
+ border-color: #1890ff;
72
+ border-radius: 50%;
73
+ animation: spin 1s linear infinite;
74
+ box-sizing: border-box;
75
+ position: relative;
76
+ clip-path: inset(0 0 30% 0);
77
+ }
78
+ .styles_module_chatAttachments > .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 {
79
+ display: none;
80
+ }
81
+ .styles_module_chatSender.ant-sender:focus-within {
82
+ box-shadow: none;
83
+ }
84
+ .styles_module_chatQuoteMsg {
85
+ margin-top: 4px;
86
+ }
87
+ .styles_module_chatQuoteMsg.ant-bubble > .ant-bubble-content {
88
+ min-height: auto;
89
+ background-color: var(--ant-color-fill-tertiary) !important;
90
+ color: var(--ant-color-text-tertiary);
91
+ }
92
+
57
93
  /* src/ui/common/styles.module.less */
58
94
  .styles_module_loadingMessage {
59
95
  background-image:
@@ -195,34 +231,6 @@
195
231
  font-size: 12px;
196
232
  }
197
233
 
198
- /* src/components/styles.module.less */
199
- .styles_module_chatAttachments > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-progress .ant-progress-text {
200
- display: none;
201
- }
202
- .styles_module_chatAttachments > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-progress .ant-progress-circle {
203
- animation: spin 2s linear infinite;
204
- }
205
- .styles_module_chatAttachments > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-attachment-list-card-content {
206
- gap: 4px;
207
- }
208
- .styles_module_chatAttachments > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-attachment-list-card-content .ant-attachment-list-card-desc {
209
- width: 15px;
210
- height: 15px;
211
- border: 2px solid transparent;
212
- border-color: #1890ff;
213
- border-radius: 50%;
214
- animation: spin 1s linear infinite;
215
- box-sizing: border-box;
216
- position: relative;
217
- clip-path: inset(0 0 30% 0);
218
- }
219
- .styles_module_chatAttachments > .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 {
220
- display: none;
221
- }
222
- .styles_module_chatSender.ant-sender:focus-within {
223
- box-shadow: none;
224
- }
225
-
226
234
  /* src/ui/layouts/styles.module.less */
227
235
  .styles_module_nsPreviewHeader {
228
236
  padding: 16px 24px;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ui/common/markdownAlert/styles.module.less","../src/ui/common/styles.module.less","../src/components/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",".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.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.nsBubbleList:global.ant-bubble-list .ant-bubble .ant-bubble-content .ant-typography {\n font-size: 16px;\n}\n.nsBubbleList:global.ant-bubble-list .ant-bubble .ant-bubble-content > .ant-collapse {\n margin-bottom: 16px;\n}\n.nsBubbleList:global.ant-bubble-list .ant-bubble .ant-bubble-content > .ant-collapse .ant-collapse-header {\n color: #8f91a8;\n}\n.nsBubbleList:global.ant-bubble-list .ant-bubble .ant-bubble-content > .ant-collapse .ant-collapse-content {\n color: #8f91a8;\n margin-top: -10px;\n}\n.nsBubbleList:global.ant-bubble-list .ant-bubble .ant-bubble-content > .ant-collapse .ant-collapse-content .ant-collapse-content-box {\n padding: 0 10px 0 24px;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\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",".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",".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;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,CATC,oBASoB,CATC,0CAS0C,CAHC,iCAGiC,CAAC;AAC3H,SAAO;AACP,UAAQ;AACR,UAAQ,IAAI,MAAM;AAClB,gBAAc;AACd,iBAAe;AACf,aAAW,KAAK,GAAG,OAAO;AAC1B,cAAY;AACZ,YAAU;AACV,aAAW,MAAM,EAAE,EAAE,IAAI;AAC3B;AACA,CApBCA,8BAoBuB,EAAE,CApBC,oBAoBoB,CApBC,0CAoB0C,CAdC,iCAciC,CAXC,8BAW8B,CAAC;AAC1J,WAAS;AACX;AACA,CAACC,wBAAiB,CAAC,UAAU;AAC3B,cAAY;AACd;;;ACzBA,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","loadingMessage","nsConversationListPanel","nsConversations","nsBubbleList","spin","nsChatHeader","nsChatTitle","nsChatHeaderPopover","chatWelcomeWrap","chatWelcome","chatWelcomePrompts","nsSenderListTitle","nsSenderList","historyList","nsSenderListItem","nsSenderListFooter","nsChatUserName","nsSenderReferenceHeaderTitle","nsSenderReferenceHeaderContent","nsAvatarListContainer","nsAvatarList","nsAvatarListItem","nsAvatarListItemIcon","nsAvatarListItemIconActive","nsAvatarListItemName","chatAttachments","chatSender","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",".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",".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.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.nsBubbleList:global.ant-bubble-list .ant-bubble .ant-bubble-content .ant-typography {\n font-size: 16px;\n}\n.nsBubbleList:global.ant-bubble-list .ant-bubble .ant-bubble-content > .ant-collapse {\n margin-bottom: 16px;\n}\n.nsBubbleList:global.ant-bubble-list .ant-bubble .ant-bubble-content > .ant-collapse .ant-collapse-header {\n color: #8f91a8;\n}\n.nsBubbleList:global.ant-bubble-list .ant-bubble .ant-bubble-content > .ant-collapse .ant-collapse-content {\n color: #8f91a8;\n margin-top: -10px;\n}\n.nsBubbleList:global.ant-bubble-list .ant-bubble .ant-bubble-content > .ant-collapse .ant-collapse-content .ant-collapse-content-box {\n padding: 0 10px 0 24px;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\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;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;AAC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gB,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","chatAttachments","chatSender","chatQuoteMsg","loadingMessage","nsConversationListPanel","nsConversations","nsBubbleList","spin","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.d.mts CHANGED
@@ -1,10 +1,156 @@
1
- import { RenderControl, UserInfo } from '@zero-library/common';
1
+ import { createRequest, RenderControl, UserInfo } from '@zero-library/common';
2
2
  import { ButtonProps, ThemeConfig } from 'antd';
3
3
  import * as react from 'react';
4
4
  import { Conversation, BubbleProps } from '@ant-design/x';
5
5
  export * from '@ant-design/x';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
7
 
8
+ interface ConversationsQuery extends PageReq {
9
+ businessId?: string;
10
+ businessType?: number;
11
+ targetId: string;
12
+ targetType: number;
13
+ }
14
+ /**
15
+ * 会话成员返回模型
16
+ */
17
+ interface ConversationMember {
18
+ /**
19
+ * Conversationid,会话ID
20
+ */
21
+ conversationId: string;
22
+ /**
23
+ * Id,会话成员表ID
24
+ */
25
+ id: string;
26
+ /**
27
+ * Jointime,加入时间
28
+ */
29
+ joinTime: Date;
30
+ /**
31
+ * Memberavatar,成员头像
32
+ */
33
+ memberAvatar: string;
34
+ /**
35
+ * Memberid,成员ID
36
+ */
37
+ memberId: string;
38
+ /**
39
+ * Membername,成员名称
40
+ */
41
+ memberName: string;
42
+ /**
43
+ * Membertype,成员类型
44
+ */
45
+ memberType: number;
46
+ /**
47
+ * Orgid,机构ID
48
+ */
49
+ orgId: number;
50
+ /**
51
+ * Orgname,机构名称
52
+ */
53
+ orgName: string;
54
+ }
55
+ interface ConversationType {
56
+ /**
57
+ * Agentid,智能体 ID
58
+ */
59
+ agentId: string;
60
+ /**
61
+ * Agentname,智能体名称
62
+ */
63
+ agentName: string;
64
+ /**
65
+ * Id,会话 ID
66
+ */
67
+ id: string;
68
+ /**
69
+ * Logourl,头像路径
70
+ */
71
+ logoUrl: string;
72
+ /**
73
+ * Members,会话成员
74
+ */
75
+ members?: ConversationMember[];
76
+ /**
77
+ * Selected,当前选择的会话
78
+ */
79
+ selected: boolean;
80
+ /**
81
+ * State,会话状态 1-正常 2-结束
82
+ */
83
+ state: number;
84
+ /**
85
+ * Title,会话标题
86
+ */
87
+ title: string;
88
+ /**
89
+ * Unreadcount,当前用户未读消息数
90
+ */
91
+ unreadCount: number;
92
+ /**
93
+ * Updatetime,更新时间
94
+ */
95
+ updateTime: number;
96
+ }
97
+ interface ConversationCreate {
98
+ /**
99
+ * Businessdata,业务扩展参数,非必填
100
+ */
101
+ businessData?: string;
102
+ /**
103
+ * Businessid,业务数据唯一ID,非必填
104
+ */
105
+ businessId?: string;
106
+ /**
107
+ * Businesstype,业务类型,非必填。1-风控;2-弹窗
108
+ */
109
+ businessType?: number;
110
+ /**
111
+ * Receiverid,接收者ID
112
+ */
113
+ receiverId: string;
114
+ /**
115
+ * Receivertype,接收者类型:1-用户 2-专家 3-Agent 4-税协
116
+ */
117
+ receiverType: number;
118
+ /**
119
+ * Source,会话来源: 1-罗拉-APP; 2-罗拉-pc端; 3-合作伙伴端 4-税协 5-罗拉-cube 6-api
120
+ */
121
+ source: number;
122
+ /**
123
+ * Type,会话类型: 1-对话; 2-工具
124
+ */
125
+ type: number;
126
+ }
127
+ interface ConversationRecentUpdate extends ConversationRecentQuery {
128
+ /**
129
+ * Conversationid,会话ID
130
+ */
131
+ conversationId: string;
132
+ }
133
+ interface ConversationRecentQuery {
134
+ /**
135
+ * Businessid,业务数据唯一ID,非必填
136
+ */
137
+ businessId?: string;
138
+ /**
139
+ * Businesstype,业务类型,非必填。1-风控;2-弹窗
140
+ */
141
+ businessType?: number;
142
+ /**
143
+ * Receiverid,接收者ID
144
+ */
145
+ receiverId: string;
146
+ /**
147
+ * Receivertype,接收者类型:1-用户 2-专家 3-Agent 4-税协
148
+ */
149
+ receiverType: number;
150
+ }
151
+ interface conversationMessagesQuery extends PageReq {
152
+ conversationId: string;
153
+ }
8
154
  interface InputFile {
9
155
  /**
10
156
  * Content,文件内容
@@ -39,7 +185,7 @@ interface MessageQuoteMsg {
39
185
  /**
40
186
  * Msgfiles,附件文件列表
41
187
  */
42
- msgFiles?: InputFile;
188
+ msgFiles?: InputFile[];
43
189
  }
44
190
  interface MessageSender {
45
191
  /**
@@ -95,6 +241,24 @@ interface ConversationMessage {
95
241
  */
96
242
  stopFlag?: boolean;
97
243
  }
244
+ interface FeedbackUpdate {
245
+ /**
246
+ * Conversationid,会话ID
247
+ */
248
+ conversationId: string;
249
+ /**
250
+ * Id,消息ID
251
+ */
252
+ id: string;
253
+ /**
254
+ * Msgfeedback,反馈类型:1-赞,2-踩
255
+ */
256
+ msgFeedback: number;
257
+ /**
258
+ * Msgfeedbackcontent,消息反馈内容
259
+ */
260
+ msgFeedbackContent?: string;
261
+ }
98
262
  interface ConversationMessageSend {
99
263
  /**
100
264
  * Conversationid,会话 ID
@@ -241,9 +405,101 @@ interface AgentInfo {
241
405
  logo: string;
242
406
  feature?: string;
243
407
  }
408
+ interface AgentCharacter {
409
+ /**
410
+ * Agentid,智能体ID
411
+ */
412
+ agentId: number;
413
+ /**
414
+ * Charactername,性格名称
415
+ */
416
+ characterName: string;
417
+ /**
418
+ * Detaillevel,详细程度:1-10
419
+ */
420
+ detailLevel: number;
421
+ /**
422
+ * Humorlevel,幽默程度:1-10
423
+ */
424
+ humorLevel: number;
425
+ /**
426
+ * Id,id
427
+ */
428
+ id: number;
429
+ /**
430
+ * Logo,头像,存储图片路径
431
+ */
432
+ logo: string;
433
+ /**
434
+ * Professionallevel,专业程度:1-10
435
+ */
436
+ professionalLevel: number;
437
+ /**
438
+ * Selected,是否已选择
439
+ */
440
+ selected: boolean;
441
+ /**
442
+ * Sex,性别:1-男,2-女
443
+ */
444
+ sex: number;
445
+ }
446
+ declare const createChatService: (request: ReturnType<typeof createRequest>) => {
447
+ conversationsQuery: (params: ConversationsQuery) => Promise<R<PageRes<ConversationType>>>;
448
+ conversationCreate: (params: ConversationCreate) => Promise<R<string>>;
449
+ conversationDelete: (conversationId: string) => Promise<R<null>>;
450
+ conversationRecentUpdate: (params: ConversationRecentUpdate) => Promise<R<boolean>>;
451
+ conversationRecentQuery: (params: ConversationRecentQuery) => Promise<R<string>>;
452
+ conversationMessagesQuery: (params: conversationMessagesQuery) => Promise<R<PageRes<ConversationMessage>>>;
453
+ conversationMessageRead: (conversationId: ConversationType["id"]) => Promise<R<boolean>>;
454
+ feedbackUpdate: (params: FeedbackUpdate) => Promise<R<null>>;
455
+ messageSuggestedQuery: (msgId: ConversationMessage["id"], maxCount?: number) => Promise<R<string[]>>;
456
+ conversationMemberQuery: (conversationId: ConversationType["id"]) => Promise<R<ConversationMember[]>>;
457
+ conversationStateUpdate: (conversationId: ConversationType["id"], state: ConversationType["state"]) => Promise<R<boolean>>;
458
+ conversationMessageSend: (params: ConversationMessageSend) => Promise<R<void>>;
459
+ conversationStop: (conversationId: ConversationType["id"]) => Promise<R<void>>;
460
+ agentInfoQuery: (agentId: AgentInfo["id"]) => Promise<R<AgentInfo>>;
461
+ agentCharacterQuery: (agentId: AgentInfo["id"]) => Promise<R<AgentCharacter[]>>;
462
+ agentCharacterSelect: (agentId: AgentInfo["id"], characterId: AgentCharacter["id"]) => Promise<R<null>>;
463
+ fileUpload: (formData: FormData) => Promise<R<InputFile>>;
464
+ };
244
465
 
245
466
  type ConversationMemberEnum = 'agent' | 'user' | 'other';
246
467
 
468
+ interface DocType {
469
+ /**
470
+ * 内容
471
+ */
472
+ content: string;
473
+ /**
474
+ * 文档ID
475
+ */
476
+ docId: string;
477
+ /**
478
+ * 关键字
479
+ */
480
+ keywords?: string[];
481
+ /**
482
+ * 位置
483
+ */
484
+ position?: number;
485
+ /**
486
+ * 分段ID
487
+ */
488
+ sid?: string;
489
+ /**
490
+ * 令牌数
491
+ */
492
+ tokens?: number;
493
+ /**
494
+ * 字数
495
+ */
496
+ wordCount?: number;
497
+ }
498
+ declare const createFileService: (request: ReturnType<typeof createRequest>) => {
499
+ docQuery: (paramsStr: string) => Promise<R<DocType>>;
500
+ fileCreate: (fileContent: string, fileName?: string, targetFormat?: string) => Promise<void>;
501
+ };
502
+
247
503
  type ConversationStrategy = 1 | 2;
248
504
  interface ReferencesContent extends MessageQuoteMsg {
249
505
  name?: string;
@@ -312,6 +568,20 @@ interface ChatLayout {
312
568
  chatHeader?: RenderControl<void, ChatLayoutHeader>;
313
569
  disclaimerNotice?: RenderControl<void, void>;
314
570
  }
571
+ interface ChatServices {
572
+ websocketBaseUrls?: string[];
573
+ baseUrl?: string;
574
+ request?: ReturnType<typeof createChatService> & ReturnType<typeof createFileService>;
575
+ }
576
+
577
+ interface AttachmentsProps {
578
+ fileUpload: (formData: FormData) => Promise<R<InputFile>>;
579
+ fileUploadConfig?: FileUploadConfig[];
580
+ extraParams?: ObjectType<string | undefined>;
581
+ fileList?: InputFile[];
582
+ onChange: (fileList: InputFile[]) => void;
583
+ }
584
+ declare const _default$3: react.ForwardRefExoticComponent<AttachmentsProps & react.RefAttributes<unknown>>;
315
585
 
316
586
  interface ChatSenderHandle {
317
587
  focus: (options?: {
@@ -321,8 +591,9 @@ interface ChatSenderHandle {
321
591
  interface FileUpload {
322
592
  params?: ObjectType<any>;
323
593
  config: FileUploadConfig[];
594
+ request: AttachmentsProps['fileUpload'];
324
595
  }
325
- interface Props$2 {
596
+ interface Props$1 {
326
597
  placeholder?: string;
327
598
  content?: string;
328
599
  fileList?: InputFile[];
@@ -340,7 +611,7 @@ interface Props$2 {
340
611
  sendBtnProps?: ButtonProps;
341
612
  fileUpload?: FileUpload;
342
613
  }
343
- declare const _default$3: react.ForwardRefExoticComponent<Props$2 & react.RefAttributes<ChatSenderHandle>>;
614
+ declare const _default$2: react.ForwardRefExoticComponent<Props$1 & react.RefAttributes<ChatSenderHandle>>;
344
615
 
345
616
  interface ChatConfig {
346
617
  receiverType?: number;
@@ -357,6 +628,7 @@ interface ChatHandle {
357
628
  setMessage: (message?: string) => void;
358
629
  setFiles: (files?: InputFile[]) => void;
359
630
  setParams: (params?: ChatParams) => void;
631
+ setServices: (services?: ChatServices) => void;
360
632
  senderFocus: ChatSenderHandle['focus'];
361
633
  }
362
634
  interface ChatProps {
@@ -366,16 +638,9 @@ interface ChatProps {
366
638
  hooks?: ChatHooks;
367
639
  layout?: ChatLayout;
368
640
  userInfo?: UserInfo;
641
+ services?: ChatServices;
369
642
  }
370
- declare const _default$2: react.ForwardRefExoticComponent<ChatProps & react.RefAttributes<ChatHandle>>;
371
-
372
- interface Props$1 {
373
- fileUploadConfig?: FileUploadConfig[];
374
- extraParams?: ObjectType<string | undefined>;
375
- fileList?: InputFile[];
376
- onChange: (fileList: InputFile[]) => void;
377
- }
378
- declare const _default$1: react.ForwardRefExoticComponent<Props$1 & react.RefAttributes<unknown>>;
643
+ declare const _default$1: react.ForwardRefExoticComponent<ChatProps & react.RefAttributes<ChatHandle>>;
379
644
 
380
645
  interface Props {
381
646
  message: ConversationMessage;
@@ -383,4 +648,4 @@ interface Props {
383
648
  }
384
649
  declare const _default: ({ message, placement }: Props) => react_jsx_runtime.JSX.Element;
385
650
 
386
- export { type AgentInfo, _default$1 as Attachments, type ChatConfig, _default$2 as ChatCopilot, type ChatHandle, type ChatHooks, type ChatLayout, type ChatParams, type ChatProps, _default$3 as ChatSender, type ConversationStrategy, type InputFile, _default as MessageRender, type ReferencesType };
651
+ export { type AgentInfo, _default$3 as Attachments, type ChatConfig, _default$1 as ChatCopilot, type ChatHandle, type ChatHooks, type ChatLayout, type ChatParams, type ChatProps, _default$2 as ChatSender, type ConversationStrategy, type InputFile, _default as MessageRender, type ReferencesType };