@zero-library/chat-agent 2.1.9 → 2.1.11

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
@@ -67,7 +67,7 @@
67
67
  background-position: bottom;
68
68
  padding-bottom: 2px;
69
69
  }
70
- .styles_module_conversationListPanel {
70
+ .styles_module_nsConversationListPanel {
71
71
  width: 360px;
72
72
  }
73
73
  .styles_module_nsConversations {
@@ -88,12 +88,6 @@
88
88
  .styles_module_nsConversations .ant-conversations-list .ant-conversations-item.ant-conversations-item-active .ant-conversations-label {
89
89
  color: var(--ant-color-primary);
90
90
  }
91
- .styles_module_nsBodyWidth {
92
- margin: 0 auto;
93
- max-width: 896px;
94
- min-width: 320px;
95
- width: calc(100% - 24px) !important;
96
- }
97
91
  .styles_module_nsBubbleList.ant-bubble-list .ant-bubble.ant-bubble-start .ant-bubble-content-filled {
98
92
  background-color: transparent;
99
93
  }
@@ -150,19 +144,19 @@
150
144
  .styles_module_chatWelcomeWrap .styles_module_chatWelcomePrompts {
151
145
  width: 300px;
152
146
  }
153
- .styles_module_senderListTitle {
147
+ .styles_module_nsSenderListTitle {
154
148
  width: 300px;
155
149
  }
156
- .styles_module_senderList .ant-list-items {
150
+ .styles_module_nsSenderList .ant-list-items {
157
151
  max-height: 350px;
158
152
  overflow-y: auto;
159
153
  margin-right: -12px;
160
154
  padding-right: 12px;
161
155
  }
162
- .styles_module_senderList.styles_module_historyList .ant-list-items {
156
+ .styles_module_nsSenderList.styles_module_historyList .ant-list-items {
163
157
  max-height: initial;
164
158
  }
165
- .styles_module_senderList .styles_module_senderListItem {
159
+ .styles_module_nsSenderList .styles_module_nsSenderListItem {
166
160
  background-color: #f6f6f6;
167
161
  color: #6b6b6b !important;
168
162
  border-radius: 5px;
@@ -172,7 +166,7 @@
172
166
  font-size: 14px;
173
167
  cursor: pointer;
174
168
  }
175
- .styles_module_senderList .styles_module_senderListFooter {
169
+ .styles_module_nsSenderList .styles_module_nsSenderListFooter {
176
170
  font-size: 12px;
177
171
  }
178
172
  .styles_module_nsChatUserName {
@@ -185,33 +179,33 @@
185
179
  .styles_module_nsSenderReferenceHeaderContent {
186
180
  padding: 0 !important;
187
181
  }
188
- .styles_module_avatarListContainer {
182
+ .styles_module_nsAvatarListContainer {
189
183
  height: 300px;
190
184
  padding: 30px 48px 30px 24px;
191
185
  overflow-y: auto;
192
186
  margin-right: -24px;
193
187
  }
194
- .styles_module_avatarListContainer .styles_module_avatarList .styles_module_avatarListItem:hover {
188
+ .styles_module_nsAvatarListContainer .styles_module_nsAvatarList .styles_module_nsAvatarListItem:hover {
195
189
  opacity: 90%;
196
190
  }
197
- .styles_module_avatarListContainer .styles_module_avatarList .styles_module_avatarListItem .styles_module_avatarListItemIcon.styles_module_avatarListItemIconActive {
191
+ .styles_module_nsAvatarListContainer .styles_module_nsAvatarList .styles_module_nsAvatarListItem .styles_module_nsAvatarListItemIcon.styles_module_nsAvatarListItemIconActive {
198
192
  outline: 2px solid var(--ant-color-primary);
199
193
  }
200
- .styles_module_avatarListContainer .styles_module_avatarList .styles_module_avatarListItem .styles_module_avatarListItemName {
194
+ .styles_module_nsAvatarListContainer .styles_module_nsAvatarList .styles_module_nsAvatarListItem .styles_module_nsAvatarListItemName {
201
195
  font-size: 12px;
202
196
  }
203
197
 
204
198
  /* src/components/styles.module.less */
205
- .styles_module_nsAttachments > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-progress .ant-progress-text {
199
+ .styles_module_chatAttachments > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-progress .ant-progress-text {
206
200
  display: none;
207
201
  }
208
- .styles_module_nsAttachments > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-progress .ant-progress-circle {
202
+ .styles_module_chatAttachments > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-progress .ant-progress-circle {
209
203
  animation: spin 2s linear infinite;
210
204
  }
211
- .styles_module_nsAttachments > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-attachment-list-card-content {
205
+ .styles_module_chatAttachments > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-attachment-list-card-content {
212
206
  gap: 4px;
213
207
  }
214
- .styles_module_nsAttachments > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-attachment-list-card-content .ant-attachment-list-card-desc {
208
+ .styles_module_chatAttachments > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-attachment-list-card-content .ant-attachment-list-card-desc {
215
209
  width: 15px;
216
210
  height: 15px;
217
211
  border: 2px solid transparent;
@@ -222,9 +216,12 @@
222
216
  position: relative;
223
217
  clip-path: inset(0 0 30% 0);
224
218
  }
225
- .styles_module_nsAttachments > .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 {
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 {
226
220
  display: none;
227
221
  }
222
+ .styles_module_chatSender.ant-sender:focus-within {
223
+ box-shadow: none;
224
+ }
228
225
 
229
226
  /* src/ui/layouts/styles.module.less */
230
227
  .styles_module_nsPreviewHeader {
@@ -249,4 +246,13 @@
249
246
  .styles_module_nsChatLayout {
250
247
  background-color: #fff;
251
248
  }
249
+ .styles_module_nsChatLayout .styles_module_nsChatBody {
250
+ padding: 8px 0;
251
+ }
252
+ .styles_module_nsBodyWidth {
253
+ margin: 0 auto;
254
+ max-width: 896px;
255
+ min-width: 320px;
256
+ width: calc(100% - 24px);
257
+ }
252
258
  /*# sourceMappingURL=index.css.map */
@@ -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.conversationListPanel {\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.nsBodyWidth {\n margin: 0 auto;\n max-width: 896px;\n min-width: 320px;\n width: calc(100% - 24px) !important;\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.senderListTitle {\n width: 300px;\n}\n.senderList :global .ant-list-items {\n max-height: 350px;\n overflow-y: auto;\n margin-right: -12px;\n padding-right: 12px;\n}\n.senderList.historyList :global .ant-list-items {\n max-height: initial;\n}\n.senderList .senderListItem {\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.senderList .senderListFooter {\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.avatarListContainer {\n height: 300px;\n padding: 30px 48px 30px 24px;\n overflow-y: auto;\n margin-right: -24px;\n}\n.avatarListContainer .avatarList .avatarListItem:hover {\n opacity: 90%;\n}\n.avatarListContainer .avatarList .avatarListItem .avatarListItemIcon.avatarListItemIconActive {\n outline: 2px solid var(--ant-color-primary);\n}\n.avatarListContainer .avatarList .avatarListItem .avatarListItemName {\n font-size: 12px;\n}\n",".nsAttachments:global > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-progress .ant-progress-text {\n display: none;\n}\n.nsAttachments:global > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-progress .ant-progress-circle {\n animation: spin 2s linear infinite;\n}\n.nsAttachments:global > .ant-attachment-list .ant-attachment-list-card-status-uploading .ant-attachment-list-card-content {\n gap: 4px;\n}\n.nsAttachments: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.nsAttachments: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",".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"],"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;AACT,iBAAe;AACjB;;;ACrDA,CAACC;AACC;AAAA,IAAkB;AAAA,MAAgB,KAAhB;AAAA,MAAuB,QAAQ,EAA/B;AAAA,MAAmC,QAAQ,GAA3C;AAAA,MAAgD,QAAQ;AAC1E,mBAAiB,KAAK;AACtB,qBAAmB;AACnB,uBAAqB;AACrB,kBAAgB;AAClB;AACA,CAACC;AACC,SAAO;AACT;AACA,CAACC;AACC,WAAS,EAAE;AACb;AACA,CAHCA,8BAGwB,CAAC;AACxB,WAAS;AACX;AACA,CANCA,8BAMwB,CAHC,8BAG8B,C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,oBAGoB,CAHC,0CAG0C,CAHC,aAGa,CAAC;AACrG,aAAW,KAAK,GAAG,OAAO;AAC5B;AACA,CANCA,4BAMqB,EAAE,CANC,oBAMoB,CANC,0CAM0C,CAAC;AACvF,OAAK;AACP;AACA,CATCA,4BASqB,EAAE,CATC,oBASoB,CATC,0CAS0C,CAHC,iCAGiC,CAAC;AACzH,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,4BAoBqB,EAAE,CApBC,oBAoBoB,CApBC,0CAoB0C,CAdC,iCAciC,CAXC,8BAW8B,CAAC;AACxJ,WAAS;AACX;;;ACtBA,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;","names":["appCard","fileView","fileEdit","fileEditHeader","fileEditContent","quoteList","mdEdit","loadingMessage","conversationListPanel","nsConversations","nsBodyWidth","nsBubbleList","spin","nsChatHeader","nsChatTitle","nsChatHeaderPopover","chatWelcomeWrap","chatWelcome","chatWelcomePrompts","senderListTitle","senderList","historyList","senderListItem","senderListFooter","nsChatUserName","nsSenderReferenceHeaderTitle","nsSenderReferenceHeaderContent","avatarListContainer","avatarList","avatarListItem","avatarListItemIcon","avatarListItemIconActive","avatarListItemName","nsAttachments","nsPreviewHeader","nsPreviewHeaderTitle","nsChatSenderHeader","nsDisclaimerNotice","nsChatLayout"]}
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;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;AACT,iBAAe;AACjB;;;ACrDA,CAACC;AACC;AAAA,IA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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"]}
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,文件内容
@@ -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;
@@ -293,7 +549,7 @@ interface ChatLayoutSender {
293
549
  extraBtn?: RenderControl<void, void>;
294
550
  referencesBtn?: RenderControl<void, void>;
295
551
  footerBelow?: RenderControl<void, void>;
296
- sendBtnProps?: ButtonProps;
552
+ sendBtnProps?: () => ButtonProps;
297
553
  prompts?: boolean;
298
554
  }
299
555
  interface ChatLayoutMessageList {
@@ -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$3 {
596
+ interface Props$1 {
326
597
  placeholder?: string;
327
598
  content?: string;
328
599
  fileList?: InputFile[];
@@ -340,7 +611,7 @@ interface Props$3 {
340
611
  sendBtnProps?: ButtonProps;
341
612
  fileUpload?: FileUpload;
342
613
  }
343
- declare const _default$3: react.ForwardRefExoticComponent<Props$3 & 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;
@@ -348,14 +619,6 @@ interface ChatConfig {
348
619
  conversationId?: string;
349
620
  conversationStrategy?: ConversationStrategy;
350
621
  }
351
- interface Props$2 {
352
- theme?: ThemeConfig;
353
- config?: ChatConfig;
354
- params?: ChatParams;
355
- hooks?: ChatHooks;
356
- layout?: ChatLayout;
357
- userInfo?: UserInfo;
358
- }
359
622
  interface ChatHandle {
360
623
  sendMessage: (message?: string, files?: InputFile[]) => void;
361
624
  switchAgentConversation: (agentId: AgentInfo['id'], strategy?: ConversationStrategy) => Promise<void>;
@@ -367,15 +630,16 @@ interface ChatHandle {
367
630
  setParams: (params?: ChatParams) => void;
368
631
  senderFocus: ChatSenderHandle['focus'];
369
632
  }
370
- declare const _default$2: react.ForwardRefExoticComponent<Props$2 & react.RefAttributes<ChatHandle>>;
371
-
372
- interface Props$1 {
373
- fileUploadConfig?: FileUploadConfig[];
374
- extraParams?: ObjectType<string | undefined>;
375
- fileList?: InputFile[];
376
- onChange: (fileList: InputFile[]) => void;
633
+ interface ChatProps {
634
+ theme?: ThemeConfig;
635
+ config?: ChatConfig;
636
+ params?: ChatParams;
637
+ hooks?: ChatHooks;
638
+ layout?: ChatLayout;
639
+ userInfo?: UserInfo;
640
+ services?: ChatServices;
377
641
  }
378
- declare const _default$1: react.ForwardRefExoticComponent<Props$1 & react.RefAttributes<unknown>>;
642
+ declare const _default$1: react.ForwardRefExoticComponent<ChatProps & react.RefAttributes<ChatHandle>>;
379
643
 
380
644
  interface Props {
381
645
  message: ConversationMessage;
@@ -383,4 +647,4 @@ interface Props {
383
647
  }
384
648
  declare const _default: ({ message, placement }: Props) => react_jsx_runtime.JSX.Element;
385
649
 
386
- export { type AgentInfo, _default$1 as Attachments, type ChatConfig, _default$2 as ChatCopilot, type ChatHandle, type ChatHooks, type ChatLayout, type ChatParams, _default$3 as ChatSender, type ConversationStrategy, type InputFile, _default as MessageRender, type ReferencesType };
650
+ 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 };