@zero-library/chat-agent 2.2.19 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +563 -80
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +36 -2
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +117 -9
- package/dist/index.d.ts +117 -9
- package/dist/index.esm.js +565 -82
- package/dist/index.esm.js.map +1 -1
- package/package.json +3 -3
package/dist/index.css
CHANGED
|
@@ -67,8 +67,18 @@
|
|
|
67
67
|
}
|
|
68
68
|
.styles_module_chart {
|
|
69
69
|
padding: 10px;
|
|
70
|
-
max-width:
|
|
71
|
-
width:
|
|
70
|
+
max-width: 100%;
|
|
71
|
+
min-width: 350px;
|
|
72
|
+
overflow-x: scroll;
|
|
73
|
+
display: inline-block;
|
|
74
|
+
border-radius: 12px;
|
|
75
|
+
border: 1px solid #e5e9f0;
|
|
76
|
+
background:
|
|
77
|
+
linear-gradient(
|
|
78
|
+
180deg,
|
|
79
|
+
#fff 0%,
|
|
80
|
+
#f8fafc 100%);
|
|
81
|
+
margin: 12px 0;
|
|
72
82
|
}
|
|
73
83
|
.styles_module_chart .styles_module_chartSkeleton {
|
|
74
84
|
width: 100% !important;
|
|
@@ -265,6 +275,30 @@
|
|
|
265
275
|
font-size: 12px;
|
|
266
276
|
}
|
|
267
277
|
|
|
278
|
+
/* src/ui/common/QuickAsk/styles.module.less */
|
|
279
|
+
.styles_module_quickAskPanel {
|
|
280
|
+
width: 600px;
|
|
281
|
+
height: 400px;
|
|
282
|
+
}
|
|
283
|
+
.styles_module_quickAskPanel .styles_module_tagContainer {
|
|
284
|
+
overflow-y: auto;
|
|
285
|
+
}
|
|
286
|
+
.styles_module_quickAskPanel .styles_module_quickAskItem {
|
|
287
|
+
border-radius: 16px;
|
|
288
|
+
overflow: clip;
|
|
289
|
+
cursor: pointer;
|
|
290
|
+
}
|
|
291
|
+
.styles_module_quickAskPanel .styles_module_quickAskItem .styles_module_quickAskItemHeader {
|
|
292
|
+
background-color: var(--ant-color-primary);
|
|
293
|
+
color: #fff;
|
|
294
|
+
padding: 8px 12px;
|
|
295
|
+
}
|
|
296
|
+
.styles_module_quickAskPanel .styles_module_quickAskItem .styles_module_quickAskItemBody {
|
|
297
|
+
background-color: #f2f2f2;
|
|
298
|
+
color: #555;
|
|
299
|
+
padding: 12px;
|
|
300
|
+
}
|
|
301
|
+
|
|
268
302
|
/* src/ui/layouts/styles.module.less */
|
|
269
303
|
.styles_module_nsPreviewHeader {
|
|
270
304
|
padding: 16px 24px;
|
package/dist/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ui/common/markdownAlert/styles.module.less","../src/components/styles.module.less","../src/ui/common/styles.module.less","../src/ui/layouts/styles.module.less"],"sourcesContent":[".appCard {\n width: 180px;\n border-radius: 10px;\n border: 1px solid #d7d7d7;\n background-color: #fafafa;\n font-size: 16px;\n cursor: pointer;\n margin: 8px;\n padding: 12px 8px;\n}\n.appCard > div {\n max-width: 100%;\n}\n.appCard > img {\n height: 30px;\n}\n.fileView {\n width: 200px;\n padding: 4px 8px;\n cursor: pointer;\n background-color: #f5f3f3;\n border-radius: 6px;\n}\n.fileEdit {\n margin: 12px 0;\n border-radius: 6px;\n border: 1px solid #f2f2f2;\n}\n.fileEdit .fileEditHeader {\n padding: 2px 8px;\n background-color: #f2f2f2;\n}\n.fileEdit .fileEditContent {\n padding: 8px;\n background-color: #fafafa;\n}\n.quoteList {\n min-width: 300px;\n}\n.quoteList:global.ant-collapse .ant-collapse-item .ant-collapse-header {\n padding: 12px 0;\n color: #8f91a8;\n}\n.quoteList:global.ant-collapse .ant-collapse-item .ant-collapse-content {\n color: #8f91a8;\n background-color: #f2f2f2;\n}\n.mdEdit {\n margin: 10px 0;\n background-color: rgba(242, 242, 242, 0.2);\n border: 1px solid #f2f2f2;\n padding: 10px;\n border-radius: 4px;\n}\n.think:global.ant-collapse {\n margin-bottom: 16px;\n}\n.think:global.ant-collapse .ant-collapse-header {\n color: #8f91a8;\n}\n.think:global.ant-collapse .ant-collapse-content {\n color: #8f91a8;\n}\n.think:global.ant-collapse .ant-collapse-content .ant-collapse-content-box {\n padding: 0 10px 0 24px;\n}\n.chart {\n padding: 10px;\n max-width: 800px;\n width: 100%;\n}\n.chart .chartSkeleton {\n width: 100% !important;\n}\n.chart .chartSkeleton .chartSkeletonIcon {\n font-size: 40px;\n color: #bfbfbf;\n}\n","@keyframes loading-line {\n from {\n background-position: 200% 0;\n }\n to {\n background-position: 0 0;\n }\n}\n.loadingMessage {\n position: relative;\n padding-bottom: 6px;\n}\n.loadingMessage::after {\n content: '';\n position: absolute;\n left: 0;\n bottom: 0;\n height: 2px;\n width: 100%;\n background: linear-gradient(90deg, #ff6b23, #af3cb8, #53b6ff);\n background-size: 200% 100%;\n animation: loading-line 1.2s linear infinite;\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.chatQuoteMsg .quoteTooltip {\n max-width: 100%;\n border: 1px solid #000;\n}\n.chatQuoteMsg .quoteTooltip .quoteTooltipContainer {\n max-height: 200px;\n overflow-y: auto;\n background-color: #fff;\n color: #000;\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;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Y,CAACC,0BAAoB,CANX;AAOrB,cAAY;AACd;AACA,CATCD,2BASa,CAACE;AACb,oBAAkB;AAClB,SAAO;AACP,iBAAe;AACf,SAAO;AACP,WAAS,IAAI;AACb,cAAY;AACZ,aAAW;AACX,UAAQ;AACV;AACA,CAnBCF,2BAmBa,CAACG;AACb,aAAW;AACb;AACA,CAACC;AACC,aAAW;AACX,eAAa;AACf;AACA,CAACC,2CAAoC,EAAE,CAAC;AACtC,YAAU;AACZ;AACA,CAACC;AACC,WAAS;AACX;AACA,CAACC;AACC,UAAQ;AACR,WAAS,KAAK,KAAK,KAAK;AACxB,cAAY;AACZ,gBAAc;AAChB;AACA,CANCA,oCAMsB,CAACC,2BAAa,CAACC,8BAAgB;AACpD,WAAS;AACX;AACA,CATCF,oCASsB,CAHCC,2BAGa,CAHCC,+BAGiB,CAACC,kCAAoB,CAACC;AAC3E,WAAS,IAAI,MAAM,IAAI;AACzB;AACA,CAZCJ,oCAYsB,CANCC,2BAMa,CANCC,+BAMiB,CAACG;AACtD,aAAW;AACb;;;ACzGA,CAACC;AACC,WAAS,KAAK;AACd,cAAY,EAAE,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;AACtC;AACA,CAJCA,8BAIgB,CAACC;AAChB,aAAW;AACX,eAAa;AACf;AACA,CAACC;AACC,iBAAe;AACf,WAAS;AACT,aAAW;AACX,cAAY;AACd;AACA,CAACC;AACC,aAAW;AACX,cAAY;AACZ,SAAO;AACT;AACA,CAACC;AACC,oBAAkB;AACpB;AACA,CAHCA,2BAGa,CAACC;AACb,WAAS,IAAI;AACf;AACA,CAACC;AACC,UAAQ,EAAE;AACV,aAAW;AACX,aAAW;AACX,SAAO,KAAK,KAAK,EAAE;AACrB;","names":["appCard","fileView","fileEdit","fileEditHeader","fileEditContent","quoteList","mdEdit","think","chart","chartSkeleton","chartSkeletonIcon","loading-line","loadingMessage","spin","chatAttachments","chatSender","chatQuoteMsg","quoteTooltip","quoteTooltipContainer","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/common/QuickAsk/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.chart {\n padding: 10px;\n max-width: 100%;\n min-width: 350px;\n overflow-x: scroll;\n display: inline-block;\n border-radius: 12px;\n border: 1px solid #e5e9f0;\n background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);\n margin: 12px 0;\n}\n.chart .chartSkeleton {\n width: 100% !important;\n}\n.chart .chartSkeleton .chartSkeletonIcon {\n font-size: 40px;\n color: #bfbfbf;\n}\n","@keyframes loading-line {\n from {\n background-position: 200% 0;\n }\n to {\n background-position: 0 0;\n }\n}\n.loadingMessage {\n position: relative;\n padding-bottom: 6px;\n}\n.loadingMessage::after {\n content: '';\n position: absolute;\n left: 0;\n bottom: 0;\n height: 2px;\n width: 100%;\n background: linear-gradient(90deg, #ff6b23, #af3cb8, #53b6ff);\n background-size: 200% 100%;\n animation: loading-line 1.2s linear infinite;\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.chatQuoteMsg .quoteTooltip {\n max-width: 100%;\n border: 1px solid #000;\n}\n.chatQuoteMsg .quoteTooltip .quoteTooltipContainer {\n max-height: 200px;\n overflow-y: auto;\n background-color: #fff;\n color: #000;\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",".quickAskPanel {\n width: 600px;\n height: 400px;\n}\n.quickAskPanel .tagContainer {\n overflow-y: auto;\n}\n.quickAskPanel .quickAskItem {\n border-radius: 16px;\n overflow: clip;\n cursor: pointer;\n}\n.quickAskPanel .quickAskItem .quickAskItemHeader {\n background-color: var(--ant-color-primary);\n color: #fff;\n padding: 8px 12px;\n}\n.quickAskPanel .quickAskItem .quickAskItemBody {\n background-color: #f2f2f2;\n color: #555;\n padding: 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;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;AACA,CAACC,mBAAY,CAfK;AAgBhB,iBAAe;AACjB;AACA,CAHCA,mBAGY,CAlBK,aAkBS,CAlBwB;AAmBjD,SAAO;AACT;AACA,CANCA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AACV;AACA,CAJCA,4BAIc,CAACC;AACd,cAAY;AACd;AACA,CAPCD,4BAOc,CAACE;AACd,iBAAe;AACf,YAAU;AACV,UAAQ;AACV;AACA,CAZCF,4BAYc,CALCE,2BAKa,CAACC;AAC5B,oBAAkB,IAAI;AACtB,SAAO;AACP,WAAS,IAAI;AACf;AACA,CAjBCH,4BAiBc,CAVCE,2BAUa,CAACE;AAC5B,oBAAkB;AAClB,SAAO;AACP,WAAS;AACX;;;ACrBA,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","chart","chartSkeleton","chartSkeletonIcon","loading-line","loadingMessage","spin","chatAttachments","chatSender","chatQuoteMsg","quoteTooltip","quoteTooltipContainer","nsConversationListPanel","nsConversations","nsBubbleList","nsChatHeader","nsChatTitle","nsChatHeaderPopover","chatWelcomeWrap","chatWelcome","chatWelcomePrompts","nsSenderListTitle","nsSenderList","historyList","nsSenderListItem","nsSenderListFooter","nsChatUserName","nsSenderReferenceHeaderTitle","nsSenderReferenceHeaderContent","nsAvatarListContainer","nsAvatarList","nsAvatarListItem","nsAvatarListItemIcon","nsAvatarListItemIconActive","nsAvatarListItemName","quickAskPanel","tagContainer","quickAskItem","quickAskItemHeader","quickAskItemBody","nsPreviewHeader","nsPreviewHeaderTitle","nsChatSenderHeader","nsDisclaimerNotice","nsChatLayout","nsChatBody","nsBodyWidth"]}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequest, RequestConfig, RenderControl } from '@zero-library/common';
|
|
2
|
+
import { BubbleProps, Conversation } from '@ant-design/x';
|
|
2
3
|
import { ButtonProps, ThemeConfig } from 'antd';
|
|
3
4
|
import * as react from 'react';
|
|
4
|
-
import { Conversation, BubbleProps } from '@ant-design/x';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -130,7 +130,7 @@ interface ConversationCreate {
|
|
|
130
130
|
*/
|
|
131
131
|
businessId?: string;
|
|
132
132
|
/**
|
|
133
|
-
* Businesstype,业务类型,非必填。1-风控;2
|
|
133
|
+
* Businesstype,业务类型,非必填。1-风控;2-弹窗;3-律师
|
|
134
134
|
*/
|
|
135
135
|
businessType?: number;
|
|
136
136
|
/**
|
|
@@ -162,7 +162,7 @@ interface ConversationRecentQuery {
|
|
|
162
162
|
*/
|
|
163
163
|
businessId?: string;
|
|
164
164
|
/**
|
|
165
|
-
* Businesstype,业务类型,非必填。1-风控;2
|
|
165
|
+
* Businesstype,业务类型,非必填。1-风控;2-弹窗;3-律师
|
|
166
166
|
*/
|
|
167
167
|
businessType?: number;
|
|
168
168
|
/**
|
|
@@ -345,8 +345,6 @@ interface AgentConfig {
|
|
|
345
345
|
fileUpload?: FileUploadConfig[];
|
|
346
346
|
/** 热门问题标签列表 */
|
|
347
347
|
labels?: HotQuestionList[];
|
|
348
|
-
/** 推荐问题列表 */
|
|
349
|
-
recommendQuestions?: RecommendQuestion[];
|
|
350
348
|
}
|
|
351
349
|
/**
|
|
352
350
|
* 智能体信息接口
|
|
@@ -394,6 +392,68 @@ interface AgentCharacter {
|
|
|
394
392
|
/** 性别设置:1-男 2-女 */
|
|
395
393
|
sex: number;
|
|
396
394
|
}
|
|
395
|
+
/**
|
|
396
|
+
* 快速提问更新参数接口
|
|
397
|
+
*/
|
|
398
|
+
interface LabelItemUpdate extends LabelItemPrompt {
|
|
399
|
+
/** 快速提问ID,修改时必填 */
|
|
400
|
+
id?: string;
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* 快速提问列表查询参数接口
|
|
404
|
+
*/
|
|
405
|
+
interface LabelItemListQuery {
|
|
406
|
+
/** 分类ID */
|
|
407
|
+
labelId?: string;
|
|
408
|
+
/** 搜索关键字 */
|
|
409
|
+
keyword?: string;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* 快速提问列表项接口
|
|
413
|
+
*/
|
|
414
|
+
interface LabelItem extends LabelItemUpdate {
|
|
415
|
+
/** 问题ID */
|
|
416
|
+
id: string;
|
|
417
|
+
agentId: string;
|
|
418
|
+
seq: number;
|
|
419
|
+
/** 是否置顶 */
|
|
420
|
+
isTop?: 1 | 0;
|
|
421
|
+
createTime: number;
|
|
422
|
+
updateTime: number;
|
|
423
|
+
canDelete?: boolean;
|
|
424
|
+
}
|
|
425
|
+
interface LabelQuery extends PageReq {
|
|
426
|
+
labelName?: string;
|
|
427
|
+
}
|
|
428
|
+
interface LabelType {
|
|
429
|
+
/** 分类ID */
|
|
430
|
+
id: string;
|
|
431
|
+
/** 分类名称 */
|
|
432
|
+
labelName: string;
|
|
433
|
+
createTime: number;
|
|
434
|
+
updateTime: number;
|
|
435
|
+
canDelete?: boolean;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* 快速提问置顶参数接口
|
|
439
|
+
*/
|
|
440
|
+
interface LabelItemTop {
|
|
441
|
+
/** 问题ID */
|
|
442
|
+
id: string;
|
|
443
|
+
/** 是否置顶 */
|
|
444
|
+
isTop: LabelItem['isTop'];
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* 罗拉提示词助手返回接口
|
|
448
|
+
*/
|
|
449
|
+
interface LabelItemPrompt {
|
|
450
|
+
/** 建议的问题名称 */
|
|
451
|
+
title: string;
|
|
452
|
+
/** 建议的问题分类 */
|
|
453
|
+
labelName: string;
|
|
454
|
+
/** 建议的问题内容 */
|
|
455
|
+
content: string;
|
|
456
|
+
}
|
|
397
457
|
/**
|
|
398
458
|
* 创建聊天服务
|
|
399
459
|
* @param request - 请求函数实例
|
|
@@ -417,6 +477,13 @@ declare const createChatService: (request: ReturnType<typeof createRequest>) =>
|
|
|
417
477
|
agentCharacterQuery: (agentId: AgentInfo["id"]) => Promise<R<AgentCharacter[]>>;
|
|
418
478
|
agentCharacterSelect: (agentId: AgentInfo["id"], characterId: AgentCharacter["id"]) => Promise<R<null>>;
|
|
419
479
|
fileUpload: (formData: FormData) => Promise<R<InputFile>>;
|
|
480
|
+
labelItemUpdate: (agentId: AgentInfo["id"], params: LabelItemUpdate) => Promise<R<LabelItem["id"]>>;
|
|
481
|
+
labelItemDelete: (id: LabelItem["id"]) => Promise<R<null>>;
|
|
482
|
+
labelsQuery: (agentId: AgentInfo["id"], params?: LabelQuery) => Promise<R<PageRes<LabelType>>>;
|
|
483
|
+
labelItemsQuery: (agentId: string, params: LabelItemListQuery) => Promise<R<LabelItem[]>>;
|
|
484
|
+
labelItemTop: (params: LabelItemTop) => Promise<R<null>>;
|
|
485
|
+
labelItemPromptAssistant: (prompt: string) => Promise<R<LabelItemPrompt>>;
|
|
486
|
+
recommendQuestionsQuery: (agentId: AgentInfo["id"], conversationId: ConversationType["id"]) => Promise<R<string[]>>;
|
|
420
487
|
};
|
|
421
488
|
|
|
422
489
|
/**
|
|
@@ -1070,6 +1137,22 @@ interface ChatLayoutWelcomeMessage {
|
|
|
1070
1137
|
description?: RenderControl<void, void>;
|
|
1071
1138
|
prompts?: RenderControl<void, void>;
|
|
1072
1139
|
}
|
|
1140
|
+
/**
|
|
1141
|
+
* 首条消息配置接口
|
|
1142
|
+
* 配置首条消息的显示和样式
|
|
1143
|
+
* @example
|
|
1144
|
+
* // 自定义首条消息
|
|
1145
|
+
* const firstMessages: FirstMessage[] = [
|
|
1146
|
+
* {
|
|
1147
|
+
* member: 'agent',
|
|
1148
|
+
* content: <div>欢迎使用AI助手</div>
|
|
1149
|
+
* }
|
|
1150
|
+
* ]
|
|
1151
|
+
*/
|
|
1152
|
+
interface FirstMessage extends BubbleProps {
|
|
1153
|
+
/** 会话成员类型 */
|
|
1154
|
+
member?: ConversationMemberEnum;
|
|
1155
|
+
}
|
|
1073
1156
|
/**
|
|
1074
1157
|
* 聊天布局消息列表配置接口
|
|
1075
1158
|
* 控制消息列表区域的显示和功能
|
|
@@ -1081,17 +1164,24 @@ interface ChatLayoutWelcomeMessage {
|
|
|
1081
1164
|
* agent: true,
|
|
1082
1165
|
* other: false
|
|
1083
1166
|
* },
|
|
1084
|
-
*
|
|
1167
|
+
* firstMessages: [] // 不显示首条消息
|
|
1085
1168
|
* welcomeMessage: false // 不显示欢迎消息
|
|
1086
1169
|
* }
|
|
1087
1170
|
*/
|
|
1088
1171
|
interface ChatLayoutMessageList {
|
|
1089
1172
|
/** 头像显示控制:可以是全局布尔值或按成员类型分别控制 */
|
|
1090
1173
|
avatar?: boolean | Partial<Record<ConversationMemberEnum, boolean>>;
|
|
1091
|
-
/**
|
|
1092
|
-
|
|
1174
|
+
/** 头部消息渲染控制 */
|
|
1175
|
+
firstMessages?: FirstMessage[];
|
|
1093
1176
|
/** 欢迎消息渲染控制, 要渲染时如果列表有内容则不渲染 */
|
|
1094
1177
|
welcomeMessage?: RenderControl<void, ChatLayoutWelcomeMessage>;
|
|
1178
|
+
/** 智能体消息操作区渲染控制 */
|
|
1179
|
+
agentActions?: RenderControl<{
|
|
1180
|
+
message: ConversationMessage;
|
|
1181
|
+
dom?: HTMLElement;
|
|
1182
|
+
}, void>;
|
|
1183
|
+
/** message自定义标记渲染组件 */
|
|
1184
|
+
customComponents?: Record<string, any>;
|
|
1095
1185
|
}
|
|
1096
1186
|
/**
|
|
1097
1187
|
* 聊天布局配置接口(专家和智能体各有一套默认布局)
|
|
@@ -1135,6 +1225,8 @@ interface ChatLayout {
|
|
|
1135
1225
|
chatHeader?: RenderControl<void, ChatLayoutHeader>;
|
|
1136
1226
|
/** 免责声明渲染控制 */
|
|
1137
1227
|
disclaimerNotice?: RenderControl<void, void>;
|
|
1228
|
+
/** 推荐问题渲染控制 */
|
|
1229
|
+
recommendQuestions?: RenderControl<void, void>;
|
|
1138
1230
|
}
|
|
1139
1231
|
type RequestInstance = ReturnType<typeof createChatService> & ReturnType<typeof createFileService>;
|
|
1140
1232
|
/**
|
|
@@ -1452,6 +1544,20 @@ interface ChatHandle {
|
|
|
1452
1544
|
* chatRef.current?.setMessage('')
|
|
1453
1545
|
*/
|
|
1454
1546
|
setMessage: (message?: string) => void;
|
|
1547
|
+
/**
|
|
1548
|
+
* 设置消息内容参数
|
|
1549
|
+
* 用于设置透传给大模型的参数,这些参数将在下一次发送消息时生效,并在发送后自动清空
|
|
1550
|
+
*
|
|
1551
|
+
* @param params - 消息参数对象,将传递给大模型
|
|
1552
|
+
*
|
|
1553
|
+
* @example
|
|
1554
|
+
* // 设置消息参数
|
|
1555
|
+
* chatRef.current?.setMessageParams({
|
|
1556
|
+
* citation: '税务局',
|
|
1557
|
+
* customParam: 'customValue'
|
|
1558
|
+
* })
|
|
1559
|
+
*/
|
|
1560
|
+
setMessageParams: (params?: ObjectType<any>) => void;
|
|
1455
1561
|
/**
|
|
1456
1562
|
* 设置输入框中要上传的文件列表
|
|
1457
1563
|
*
|
|
@@ -1634,11 +1740,13 @@ interface MessageRenderProps {
|
|
|
1634
1740
|
placement: BubbleProps['placement'];
|
|
1635
1741
|
/** 文件预览回调 非图片类型文件点击预览 */
|
|
1636
1742
|
onFilePreview?: (file: InputFile) => void;
|
|
1743
|
+
/** message自定义标记渲染组件 */
|
|
1744
|
+
customComponents?: ChatLayoutMessageList['customComponents'];
|
|
1637
1745
|
}
|
|
1638
1746
|
/**
|
|
1639
1747
|
* 消息渲染组件
|
|
1640
1748
|
* 用于渲染聊天消息内容,包括文本、文件附件和引用消息
|
|
1641
1749
|
*/
|
|
1642
|
-
declare const _default: ({ message, placement, onFilePreview }: MessageRenderProps) => react_jsx_runtime.JSX.Element;
|
|
1750
|
+
declare const _default: ({ message, placement, onFilePreview, customComponents: propsCustomComponents }: MessageRenderProps) => react_jsx_runtime.JSX.Element;
|
|
1643
1751
|
|
|
1644
1752
|
export { type AgentInfo, _default$3 as Attachments, type AttachmentsProps, type ChatConfig, _default$1 as ChatCopilot, type ChatHandle, type ChatHooks, type ChatLayout, type ChatParams, type ChatProps, _default$2 as ChatSender, type ChatServices, type ConversationStrategy, type InputFile, _default as MessageRender, type MessageRenderProps, type ReferencesType, type RequestInstance, type SenderProps, type UserInfo };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequest, RequestConfig, RenderControl } from '@zero-library/common';
|
|
2
|
+
import { BubbleProps, Conversation } from '@ant-design/x';
|
|
2
3
|
import { ButtonProps, ThemeConfig } from 'antd';
|
|
3
4
|
import * as react from 'react';
|
|
4
|
-
import { Conversation, BubbleProps } from '@ant-design/x';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -130,7 +130,7 @@ interface ConversationCreate {
|
|
|
130
130
|
*/
|
|
131
131
|
businessId?: string;
|
|
132
132
|
/**
|
|
133
|
-
* Businesstype,业务类型,非必填。1-风控;2
|
|
133
|
+
* Businesstype,业务类型,非必填。1-风控;2-弹窗;3-律师
|
|
134
134
|
*/
|
|
135
135
|
businessType?: number;
|
|
136
136
|
/**
|
|
@@ -162,7 +162,7 @@ interface ConversationRecentQuery {
|
|
|
162
162
|
*/
|
|
163
163
|
businessId?: string;
|
|
164
164
|
/**
|
|
165
|
-
* Businesstype,业务类型,非必填。1-风控;2
|
|
165
|
+
* Businesstype,业务类型,非必填。1-风控;2-弹窗;3-律师
|
|
166
166
|
*/
|
|
167
167
|
businessType?: number;
|
|
168
168
|
/**
|
|
@@ -345,8 +345,6 @@ interface AgentConfig {
|
|
|
345
345
|
fileUpload?: FileUploadConfig[];
|
|
346
346
|
/** 热门问题标签列表 */
|
|
347
347
|
labels?: HotQuestionList[];
|
|
348
|
-
/** 推荐问题列表 */
|
|
349
|
-
recommendQuestions?: RecommendQuestion[];
|
|
350
348
|
}
|
|
351
349
|
/**
|
|
352
350
|
* 智能体信息接口
|
|
@@ -394,6 +392,68 @@ interface AgentCharacter {
|
|
|
394
392
|
/** 性别设置:1-男 2-女 */
|
|
395
393
|
sex: number;
|
|
396
394
|
}
|
|
395
|
+
/**
|
|
396
|
+
* 快速提问更新参数接口
|
|
397
|
+
*/
|
|
398
|
+
interface LabelItemUpdate extends LabelItemPrompt {
|
|
399
|
+
/** 快速提问ID,修改时必填 */
|
|
400
|
+
id?: string;
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* 快速提问列表查询参数接口
|
|
404
|
+
*/
|
|
405
|
+
interface LabelItemListQuery {
|
|
406
|
+
/** 分类ID */
|
|
407
|
+
labelId?: string;
|
|
408
|
+
/** 搜索关键字 */
|
|
409
|
+
keyword?: string;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* 快速提问列表项接口
|
|
413
|
+
*/
|
|
414
|
+
interface LabelItem extends LabelItemUpdate {
|
|
415
|
+
/** 问题ID */
|
|
416
|
+
id: string;
|
|
417
|
+
agentId: string;
|
|
418
|
+
seq: number;
|
|
419
|
+
/** 是否置顶 */
|
|
420
|
+
isTop?: 1 | 0;
|
|
421
|
+
createTime: number;
|
|
422
|
+
updateTime: number;
|
|
423
|
+
canDelete?: boolean;
|
|
424
|
+
}
|
|
425
|
+
interface LabelQuery extends PageReq {
|
|
426
|
+
labelName?: string;
|
|
427
|
+
}
|
|
428
|
+
interface LabelType {
|
|
429
|
+
/** 分类ID */
|
|
430
|
+
id: string;
|
|
431
|
+
/** 分类名称 */
|
|
432
|
+
labelName: string;
|
|
433
|
+
createTime: number;
|
|
434
|
+
updateTime: number;
|
|
435
|
+
canDelete?: boolean;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* 快速提问置顶参数接口
|
|
439
|
+
*/
|
|
440
|
+
interface LabelItemTop {
|
|
441
|
+
/** 问题ID */
|
|
442
|
+
id: string;
|
|
443
|
+
/** 是否置顶 */
|
|
444
|
+
isTop: LabelItem['isTop'];
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* 罗拉提示词助手返回接口
|
|
448
|
+
*/
|
|
449
|
+
interface LabelItemPrompt {
|
|
450
|
+
/** 建议的问题名称 */
|
|
451
|
+
title: string;
|
|
452
|
+
/** 建议的问题分类 */
|
|
453
|
+
labelName: string;
|
|
454
|
+
/** 建议的问题内容 */
|
|
455
|
+
content: string;
|
|
456
|
+
}
|
|
397
457
|
/**
|
|
398
458
|
* 创建聊天服务
|
|
399
459
|
* @param request - 请求函数实例
|
|
@@ -417,6 +477,13 @@ declare const createChatService: (request: ReturnType<typeof createRequest>) =>
|
|
|
417
477
|
agentCharacterQuery: (agentId: AgentInfo["id"]) => Promise<R<AgentCharacter[]>>;
|
|
418
478
|
agentCharacterSelect: (agentId: AgentInfo["id"], characterId: AgentCharacter["id"]) => Promise<R<null>>;
|
|
419
479
|
fileUpload: (formData: FormData) => Promise<R<InputFile>>;
|
|
480
|
+
labelItemUpdate: (agentId: AgentInfo["id"], params: LabelItemUpdate) => Promise<R<LabelItem["id"]>>;
|
|
481
|
+
labelItemDelete: (id: LabelItem["id"]) => Promise<R<null>>;
|
|
482
|
+
labelsQuery: (agentId: AgentInfo["id"], params?: LabelQuery) => Promise<R<PageRes<LabelType>>>;
|
|
483
|
+
labelItemsQuery: (agentId: string, params: LabelItemListQuery) => Promise<R<LabelItem[]>>;
|
|
484
|
+
labelItemTop: (params: LabelItemTop) => Promise<R<null>>;
|
|
485
|
+
labelItemPromptAssistant: (prompt: string) => Promise<R<LabelItemPrompt>>;
|
|
486
|
+
recommendQuestionsQuery: (agentId: AgentInfo["id"], conversationId: ConversationType["id"]) => Promise<R<string[]>>;
|
|
420
487
|
};
|
|
421
488
|
|
|
422
489
|
/**
|
|
@@ -1070,6 +1137,22 @@ interface ChatLayoutWelcomeMessage {
|
|
|
1070
1137
|
description?: RenderControl<void, void>;
|
|
1071
1138
|
prompts?: RenderControl<void, void>;
|
|
1072
1139
|
}
|
|
1140
|
+
/**
|
|
1141
|
+
* 首条消息配置接口
|
|
1142
|
+
* 配置首条消息的显示和样式
|
|
1143
|
+
* @example
|
|
1144
|
+
* // 自定义首条消息
|
|
1145
|
+
* const firstMessages: FirstMessage[] = [
|
|
1146
|
+
* {
|
|
1147
|
+
* member: 'agent',
|
|
1148
|
+
* content: <div>欢迎使用AI助手</div>
|
|
1149
|
+
* }
|
|
1150
|
+
* ]
|
|
1151
|
+
*/
|
|
1152
|
+
interface FirstMessage extends BubbleProps {
|
|
1153
|
+
/** 会话成员类型 */
|
|
1154
|
+
member?: ConversationMemberEnum;
|
|
1155
|
+
}
|
|
1073
1156
|
/**
|
|
1074
1157
|
* 聊天布局消息列表配置接口
|
|
1075
1158
|
* 控制消息列表区域的显示和功能
|
|
@@ -1081,17 +1164,24 @@ interface ChatLayoutWelcomeMessage {
|
|
|
1081
1164
|
* agent: true,
|
|
1082
1165
|
* other: false
|
|
1083
1166
|
* },
|
|
1084
|
-
*
|
|
1167
|
+
* firstMessages: [] // 不显示首条消息
|
|
1085
1168
|
* welcomeMessage: false // 不显示欢迎消息
|
|
1086
1169
|
* }
|
|
1087
1170
|
*/
|
|
1088
1171
|
interface ChatLayoutMessageList {
|
|
1089
1172
|
/** 头像显示控制:可以是全局布尔值或按成员类型分别控制 */
|
|
1090
1173
|
avatar?: boolean | Partial<Record<ConversationMemberEnum, boolean>>;
|
|
1091
|
-
/**
|
|
1092
|
-
|
|
1174
|
+
/** 头部消息渲染控制 */
|
|
1175
|
+
firstMessages?: FirstMessage[];
|
|
1093
1176
|
/** 欢迎消息渲染控制, 要渲染时如果列表有内容则不渲染 */
|
|
1094
1177
|
welcomeMessage?: RenderControl<void, ChatLayoutWelcomeMessage>;
|
|
1178
|
+
/** 智能体消息操作区渲染控制 */
|
|
1179
|
+
agentActions?: RenderControl<{
|
|
1180
|
+
message: ConversationMessage;
|
|
1181
|
+
dom?: HTMLElement;
|
|
1182
|
+
}, void>;
|
|
1183
|
+
/** message自定义标记渲染组件 */
|
|
1184
|
+
customComponents?: Record<string, any>;
|
|
1095
1185
|
}
|
|
1096
1186
|
/**
|
|
1097
1187
|
* 聊天布局配置接口(专家和智能体各有一套默认布局)
|
|
@@ -1135,6 +1225,8 @@ interface ChatLayout {
|
|
|
1135
1225
|
chatHeader?: RenderControl<void, ChatLayoutHeader>;
|
|
1136
1226
|
/** 免责声明渲染控制 */
|
|
1137
1227
|
disclaimerNotice?: RenderControl<void, void>;
|
|
1228
|
+
/** 推荐问题渲染控制 */
|
|
1229
|
+
recommendQuestions?: RenderControl<void, void>;
|
|
1138
1230
|
}
|
|
1139
1231
|
type RequestInstance = ReturnType<typeof createChatService> & ReturnType<typeof createFileService>;
|
|
1140
1232
|
/**
|
|
@@ -1452,6 +1544,20 @@ interface ChatHandle {
|
|
|
1452
1544
|
* chatRef.current?.setMessage('')
|
|
1453
1545
|
*/
|
|
1454
1546
|
setMessage: (message?: string) => void;
|
|
1547
|
+
/**
|
|
1548
|
+
* 设置消息内容参数
|
|
1549
|
+
* 用于设置透传给大模型的参数,这些参数将在下一次发送消息时生效,并在发送后自动清空
|
|
1550
|
+
*
|
|
1551
|
+
* @param params - 消息参数对象,将传递给大模型
|
|
1552
|
+
*
|
|
1553
|
+
* @example
|
|
1554
|
+
* // 设置消息参数
|
|
1555
|
+
* chatRef.current?.setMessageParams({
|
|
1556
|
+
* citation: '税务局',
|
|
1557
|
+
* customParam: 'customValue'
|
|
1558
|
+
* })
|
|
1559
|
+
*/
|
|
1560
|
+
setMessageParams: (params?: ObjectType<any>) => void;
|
|
1455
1561
|
/**
|
|
1456
1562
|
* 设置输入框中要上传的文件列表
|
|
1457
1563
|
*
|
|
@@ -1634,11 +1740,13 @@ interface MessageRenderProps {
|
|
|
1634
1740
|
placement: BubbleProps['placement'];
|
|
1635
1741
|
/** 文件预览回调 非图片类型文件点击预览 */
|
|
1636
1742
|
onFilePreview?: (file: InputFile) => void;
|
|
1743
|
+
/** message自定义标记渲染组件 */
|
|
1744
|
+
customComponents?: ChatLayoutMessageList['customComponents'];
|
|
1637
1745
|
}
|
|
1638
1746
|
/**
|
|
1639
1747
|
* 消息渲染组件
|
|
1640
1748
|
* 用于渲染聊天消息内容,包括文本、文件附件和引用消息
|
|
1641
1749
|
*/
|
|
1642
|
-
declare const _default: ({ message, placement, onFilePreview }: MessageRenderProps) => react_jsx_runtime.JSX.Element;
|
|
1750
|
+
declare const _default: ({ message, placement, onFilePreview, customComponents: propsCustomComponents }: MessageRenderProps) => react_jsx_runtime.JSX.Element;
|
|
1643
1751
|
|
|
1644
1752
|
export { type AgentInfo, _default$3 as Attachments, type AttachmentsProps, type ChatConfig, _default$1 as ChatCopilot, type ChatHandle, type ChatHooks, type ChatLayout, type ChatParams, type ChatProps, _default$2 as ChatSender, type ChatServices, type ConversationStrategy, type InputFile, _default as MessageRender, type MessageRenderProps, type ReferencesType, type RequestInstance, type SenderProps, type UserInfo };
|