pcm-agents 1.0.13-beta.1 → 1.0.13
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/cjs/components-chat-message_32.cjs.entry.js +24 -24
- package/dist/cjs/components-chat-message_32.cjs.entry.js.map +1 -1
- package/dist/cjs/{conversation-utils-CA-Hv_tp.js → conversation-utils-CPqGzavk.js} +4 -4
- package/dist/cjs/{conversation-utils-CA-Hv_tp.js.map → conversation-utils-CPqGzavk.js.map} +1 -1
- package/dist/cjs/index-C_qhED9Z.js.map +1 -1
- package/dist/cjs/{index-BRNzAGrW.js → index-NE6PPZAs.js} +5 -5
- package/dist/cjs/{index-BRNzAGrW.js.map → index-NE6PPZAs.js.map} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/pcm-ats-mnms-modal.cjs.entry.js +2 -2
- package/dist/cjs/pcm-ats-mnms-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/pcm-ats-mnms-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/pcm-hr-chat-modal.cjs.entry.js +3 -3
- package/dist/cjs/pcm-hr-chat-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/pcm-hr-chat-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/pcm-htws-modal.cjs.entry.js +4 -4
- package/dist/cjs/pcm-htws-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/pcm-htws-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/pcm-jd-modal.cjs.entry.js +4 -4
- package/dist/cjs/pcm-jd-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/pcm-jd-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/pcm-jlpp-modal.cjs.entry.js +4 -4
- package/dist/cjs/pcm-jlpp-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/pcm-jlpp-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/pcm-jlsx-modal.cjs.entry.js +3 -3
- package/dist/cjs/pcm-jlsx-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/pcm-jlsx-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/pcm-jlzz-modal.cjs.entry.js +3 -3
- package/dist/cjs/pcm-jlzz-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/pcm-jlzz-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/pcm-mnct-modal.cjs.entry.js +4 -4
- package/dist/cjs/pcm-mnct-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/pcm-mnct-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/pcm-mnms-modal.cjs.entry.js +2 -2
- package/dist/cjs/pcm-mnms-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/pcm-mnms-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/pcm-qgqjl-modal.cjs.entry.js +4 -4
- package/dist/cjs/pcm-qgqjl-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/pcm-qgqjl-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/pcm-zygh-modal.cjs.entry.js +4 -4
- package/dist/cjs/pcm-zygh-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/pcm-zygh-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/pcm-zygh-v2-modal.cjs.entry.js +4 -4
- package/dist/cjs/pcm-zygh-v2-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/pcm-zygh-v2-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/{sentry-reporter-B4Hvkcwg.js → sentry-reporter-DGcrp5UG.js} +3 -3
- package/dist/cjs/{sentry-reporter-B4Hvkcwg.js.map → sentry-reporter-DGcrp5UG.js.map} +1 -1
- package/dist/collection/components/pcm-app-chat-modal/pcm-app-chat-modal.css +1 -1
- package/dist/collection/components/pcm-hr-chat-modal/pcm-hr-chat-modal.css +1 -1
- package/dist/collection/components/pcm-zsk-chat-modal/pcm-zsk-chat-modal.css +1 -1
- package/dist/collection/global/global.css +1 -1
- package/dist/components/components-chat-message.js +1 -1
- package/dist/components/components-digital-human.js +1 -1
- package/dist/components/components-export-records-modal.js +1 -1
- package/dist/components/components-mobile-input-btn.js +1 -1
- package/dist/components/components-mobile-upload-btn.js +1 -1
- package/dist/components/components-oem-virtual-chat-modal.js +1 -1
- package/dist/components/components-position-selector.js +1 -1
- package/dist/components/components-thousand-resume-wrapper.js +1 -1
- package/dist/components/components-upload.js +1 -1
- package/dist/components/components-voice-input-btn.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/oem-cast-modal.js +2 -2
- package/dist/components/oem-cast-modal.js.map +1 -1
- package/dist/components/oem-htws-modal.js +6 -6
- package/dist/components/oem-htws-modal.js.map +1 -1
- package/dist/components/oem-jd-modal.js +6 -6
- package/dist/components/oem-jd-modal.js.map +1 -1
- package/dist/components/oem-jlpp-modal.js +8 -8
- package/dist/components/oem-jlpp-modal.js.map +1 -1
- package/dist/components/oem-jlsx-modal.js +6 -6
- package/dist/components/oem-jlsx-modal.js.map +1 -1
- package/dist/components/oem-jlzz-modal.js +6 -6
- package/dist/components/oem-jlzz-modal.js.map +1 -1
- package/dist/components/oem-mnct-modal.js +8 -8
- package/dist/components/oem-mnct-modal.js.map +1 -1
- package/dist/components/oem-mnms-modal.js +9 -9
- package/dist/components/oem-mnms-modal.js.map +1 -1
- package/dist/components/oem-qgqjl-modal.js +10 -10
- package/dist/components/oem-qgqjl-modal.js.map +1 -1
- package/dist/components/oem-zygh-modal.js +6 -6
- package/dist/components/oem-zygh-modal.js.map +1 -1
- package/dist/components/{p-BNtPLllR.js → p-0MnCPMlD.js} +4 -4
- package/dist/components/p-0MnCPMlD.js.map +1 -0
- package/dist/components/{p-DgZytger.js → p-BHGE0FbX.js} +3 -3
- package/dist/components/{p-DgZytger.js.map → p-BHGE0FbX.js.map} +1 -1
- package/dist/components/{p-CRp7LA2U.js → p-BeWDm0mF.js} +6 -6
- package/dist/components/p-BeWDm0mF.js.map +1 -0
- package/dist/components/{p-SUadsiZY.js → p-BjsKmogW.js} +5 -5
- package/dist/components/{p-SUadsiZY.js.map → p-BjsKmogW.js.map} +1 -1
- package/dist/components/{p-BbPIRJmj.js → p-BmauzBxj.js} +3 -3
- package/dist/components/{p-BbPIRJmj.js.map → p-BmauzBxj.js.map} +1 -1
- package/dist/components/{p-CpxoSw17.js → p-C-m99qtl.js} +3 -3
- package/dist/components/{p-CpxoSw17.js.map → p-C-m99qtl.js.map} +1 -1
- package/dist/components/p-CR7WLzmM.js.map +1 -1
- package/dist/components/{p-G6YI_wcf.js → p-CexN0q9e.js} +3 -3
- package/dist/components/{p-G6YI_wcf.js.map → p-CexN0q9e.js.map} +1 -1
- package/dist/components/{p-CP309neM.js → p-CktuIetD.js} +4 -4
- package/dist/components/p-CktuIetD.js.map +1 -0
- package/dist/components/{p-D5rukIxO.js → p-DAVHlXKp.js} +4 -4
- package/dist/components/p-DAVHlXKp.js.map +1 -0
- package/dist/components/{p-B22msIHg.js → p-DGGRMlp4.js} +3 -3
- package/dist/components/{p-B22msIHg.js.map → p-DGGRMlp4.js.map} +1 -1
- package/dist/components/{p-kCuVjQGw.js → p-DvyajdW9.js} +5 -5
- package/dist/components/p-DvyajdW9.js.map +1 -0
- package/dist/components/{p-B4atkUbc.js → p-OsSWj-Xy.js} +4 -4
- package/dist/components/p-OsSWj-Xy.js.map +1 -0
- package/dist/components/{p-tSCG18hV.js → p-cBiBW1uG.js} +3 -3
- package/dist/components/{p-tSCG18hV.js.map → p-cBiBW1uG.js.map} +1 -1
- package/dist/components/{p-CJVbp6FU.js → p-liZRbDRm.js} +3 -3
- package/dist/components/{p-CJVbp6FU.js.map → p-liZRbDRm.js.map} +1 -1
- package/dist/components/pcm-1zhanshi-mnms-modal.js +6 -6
- package/dist/components/pcm-1zhanshi-mnms-modal.js.map +1 -1
- package/dist/components/pcm-app-chat-modal.js +1 -1
- package/dist/components/pcm-ats-mnms-modal.js +6 -6
- package/dist/components/pcm-ats-mnms-modal.js.map +1 -1
- package/dist/components/pcm-card.js +1 -1
- package/dist/components/pcm-hr-chat-modal.js +3 -3
- package/dist/components/pcm-hr-chat-modal.js.map +1 -1
- package/dist/components/pcm-htws-modal.js +9 -9
- package/dist/components/pcm-htws-modal.js.map +1 -1
- package/dist/components/pcm-hyzj-modal.js +6 -6
- package/dist/components/pcm-hyzj-modal.js.map +1 -1
- package/dist/components/pcm-jd-modal.js +7 -7
- package/dist/components/pcm-jd-modal.js.map +1 -1
- package/dist/components/pcm-jlpp-modal.js +9 -9
- package/dist/components/pcm-jlpp-modal.js.map +1 -1
- package/dist/components/pcm-jlsx-modal.js +6 -6
- package/dist/components/pcm-jlsx-modal.js.map +1 -1
- package/dist/components/pcm-jlzz-modal.js +7 -7
- package/dist/components/pcm-jlzz-modal.js.map +1 -1
- package/dist/components/pcm-mnct-modal.js +8 -8
- package/dist/components/pcm-mnct-modal.js.map +1 -1
- package/dist/components/pcm-mnms-modal.js +9 -9
- package/dist/components/pcm-mnms-modal.js.map +1 -1
- package/dist/components/pcm-mnms-zp-modal.js +9 -9
- package/dist/components/pcm-mnms-zp-modal.js.map +1 -1
- package/dist/components/pcm-msbg-modal.js +6 -6
- package/dist/components/pcm-msbg-modal.js.map +1 -1
- package/dist/components/pcm-qgqjl-modal.js +10 -10
- package/dist/components/pcm-qgqjl-modal.js.map +1 -1
- package/dist/components/pcm-virtual-chat-modal.js +1 -1
- package/dist/components/pcm-zsk-chat-modal.js +3 -3
- package/dist/components/pcm-zsk-chat-modal.js.map +1 -1
- package/dist/components/pcm-zygh-modal.js +8 -8
- package/dist/components/pcm-zygh-modal.js.map +1 -1
- package/dist/components/pcm-zygh-v2-modal.js +8 -8
- package/dist/components/pcm-zygh-v2-modal.js.map +1 -1
- package/dist/esm/components-chat-message_32.entry.js +24 -24
- package/dist/esm/components-chat-message_32.entry.js.map +1 -1
- package/dist/esm/{conversation-utils-DrMWisKd.js → conversation-utils-B9qQBoU9.js} +4 -4
- package/dist/esm/{conversation-utils-DrMWisKd.js.map → conversation-utils-B9qQBoU9.js.map} +1 -1
- package/dist/esm/{index-Dx2KIdYY.js → index-BZsU3Ilz.js} +5 -5
- package/dist/esm/{index-Dx2KIdYY.js.map → index-BZsU3Ilz.js.map} +1 -1
- package/dist/esm/index-Bq0K-WqZ.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/pcm-ats-mnms-modal.entry.js +2 -2
- package/dist/esm/pcm-ats-mnms-modal.entry.js.map +1 -1
- package/dist/esm/pcm-hr-chat-modal.entry.js +3 -3
- package/dist/esm/pcm-hr-chat-modal.entry.js.map +1 -1
- package/dist/esm/pcm-htws-modal.entry.js +4 -4
- package/dist/esm/pcm-htws-modal.entry.js.map +1 -1
- package/dist/esm/pcm-jd-modal.entry.js +4 -4
- package/dist/esm/pcm-jd-modal.entry.js.map +1 -1
- package/dist/esm/pcm-jlpp-modal.entry.js +4 -4
- package/dist/esm/pcm-jlpp-modal.entry.js.map +1 -1
- package/dist/esm/pcm-jlsx-modal.entry.js +3 -3
- package/dist/esm/pcm-jlsx-modal.entry.js.map +1 -1
- package/dist/esm/pcm-jlzz-modal.entry.js +3 -3
- package/dist/esm/pcm-jlzz-modal.entry.js.map +1 -1
- package/dist/esm/pcm-mnct-modal.entry.js +4 -4
- package/dist/esm/pcm-mnct-modal.entry.js.map +1 -1
- package/dist/esm/pcm-mnms-modal.entry.js +2 -2
- package/dist/esm/pcm-mnms-modal.entry.js.map +1 -1
- package/dist/esm/pcm-qgqjl-modal.entry.js +4 -4
- package/dist/esm/pcm-qgqjl-modal.entry.js.map +1 -1
- package/dist/esm/pcm-zygh-modal.entry.js +4 -4
- package/dist/esm/pcm-zygh-modal.entry.js.map +1 -1
- package/dist/esm/pcm-zygh-v2-modal.entry.js +4 -4
- package/dist/esm/pcm-zygh-v2-modal.entry.js.map +1 -1
- package/dist/esm/{sentry-reporter--nvPcN3T.js → sentry-reporter-DKj9zGeA.js} +3 -3
- package/dist/esm/{sentry-reporter--nvPcN3T.js.map → sentry-reporter-DKj9zGeA.js.map} +1 -1
- package/dist/pcm-agents/index.esm.js +1 -1
- package/dist/pcm-agents/p-287e38d2.entry.js +2 -0
- package/dist/pcm-agents/p-287e38d2.entry.js.map +1 -0
- package/dist/pcm-agents/p-2b1d0fa4.entry.js +2 -0
- package/dist/pcm-agents/p-2b1d0fa4.entry.js.map +1 -0
- package/dist/pcm-agents/p-308ce1e2.entry.js +2 -0
- package/dist/pcm-agents/p-308ce1e2.entry.js.map +1 -0
- package/dist/pcm-agents/p-46b75987.entry.js +2 -0
- package/dist/pcm-agents/p-46b75987.entry.js.map +1 -0
- package/dist/pcm-agents/p-54c334ed.entry.js +2 -0
- package/dist/pcm-agents/p-54c334ed.entry.js.map +1 -0
- package/dist/pcm-agents/p-56a6ff18.entry.js +2 -0
- package/dist/pcm-agents/p-56a6ff18.entry.js.map +1 -0
- package/dist/pcm-agents/p-58e74eb8.entry.js +2 -0
- package/dist/pcm-agents/p-58e74eb8.entry.js.map +1 -0
- package/dist/pcm-agents/p-72681fff.entry.js +2 -0
- package/dist/pcm-agents/p-72681fff.entry.js.map +1 -0
- package/dist/pcm-agents/p-8a1d14a4.entry.js +2 -0
- package/dist/pcm-agents/p-8a1d14a4.entry.js.map +1 -0
- package/dist/pcm-agents/p-Bq0K-WqZ.js.map +1 -1
- package/dist/pcm-agents/p-DMw86Tpp.js +2 -0
- package/dist/pcm-agents/{p-CDalfSeE.js.map → p-DMw86Tpp.js.map} +1 -1
- package/dist/pcm-agents/{p-DG_0_d7W.js → p-DcmmWiOJ.js} +2 -2
- package/dist/pcm-agents/{p-DG_0_d7W.js.map → p-DcmmWiOJ.js.map} +1 -1
- package/dist/pcm-agents/p-XrL7lktO.js +2 -0
- package/dist/pcm-agents/{p-Bom3iy5A.js.map → p-XrL7lktO.js.map} +1 -1
- package/dist/pcm-agents/p-c74c49fa.entry.js +2 -0
- package/dist/pcm-agents/p-c74c49fa.entry.js.map +1 -0
- package/dist/pcm-agents/p-d63af61c.entry.js +2 -0
- package/dist/pcm-agents/p-d63af61c.entry.js.map +1 -0
- package/dist/pcm-agents/p-dfe97adc.entry.js +2 -0
- package/dist/pcm-agents/p-dfe97adc.entry.js.map +1 -0
- package/dist/pcm-agents/p-e8e8fac7.entry.js +8 -0
- package/dist/pcm-agents/p-e8e8fac7.entry.js.map +1 -0
- package/dist/pcm-agents/pcm-agents.esm.js +1 -1
- package/dist/pcm-agents/pcm-ats-mnms-modal.entry.esm.js.map +1 -1
- package/dist/pcm-agents/pcm-hr-chat-modal.entry.esm.js.map +1 -1
- package/dist/pcm-agents/pcm-htws-modal.entry.esm.js.map +1 -1
- package/dist/pcm-agents/pcm-jd-modal.entry.esm.js.map +1 -1
- package/dist/pcm-agents/pcm-jlpp-modal.entry.esm.js.map +1 -1
- package/dist/pcm-agents/pcm-jlsx-modal.entry.esm.js.map +1 -1
- package/dist/pcm-agents/pcm-jlzz-modal.entry.esm.js.map +1 -1
- package/dist/pcm-agents/pcm-mnct-modal.entry.esm.js.map +1 -1
- package/dist/pcm-agents/pcm-mnms-modal.entry.esm.js.map +1 -1
- package/dist/pcm-agents/pcm-qgqjl-modal.entry.esm.js.map +1 -1
- package/dist/pcm-agents/pcm-zygh-modal.entry.esm.js.map +1 -1
- package/dist/pcm-agents/pcm-zygh-v2-modal.entry.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/p-B4atkUbc.js.map +0 -1
- package/dist/components/p-BNtPLllR.js.map +0 -1
- package/dist/components/p-CP309neM.js.map +0 -1
- package/dist/components/p-CRp7LA2U.js.map +0 -1
- package/dist/components/p-D5rukIxO.js.map +0 -1
- package/dist/components/p-kCuVjQGw.js.map +0 -1
- package/dist/pcm-agents/p-02d624fd.entry.js +0 -2
- package/dist/pcm-agents/p-02d624fd.entry.js.map +0 -1
- package/dist/pcm-agents/p-0c2108c6.entry.js +0 -8
- package/dist/pcm-agents/p-0c2108c6.entry.js.map +0 -1
- package/dist/pcm-agents/p-13e00532.entry.js +0 -2
- package/dist/pcm-agents/p-13e00532.entry.js.map +0 -1
- package/dist/pcm-agents/p-17e8dcd0.entry.js +0 -2
- package/dist/pcm-agents/p-17e8dcd0.entry.js.map +0 -1
- package/dist/pcm-agents/p-1e4f9f48.entry.js +0 -2
- package/dist/pcm-agents/p-1e4f9f48.entry.js.map +0 -1
- package/dist/pcm-agents/p-2f6c4d32.entry.js +0 -2
- package/dist/pcm-agents/p-2f6c4d32.entry.js.map +0 -1
- package/dist/pcm-agents/p-3384d239.entry.js +0 -2
- package/dist/pcm-agents/p-3384d239.entry.js.map +0 -1
- package/dist/pcm-agents/p-44c7dee3.entry.js +0 -2
- package/dist/pcm-agents/p-44c7dee3.entry.js.map +0 -1
- package/dist/pcm-agents/p-67bd1ffa.entry.js +0 -2
- package/dist/pcm-agents/p-67bd1ffa.entry.js.map +0 -1
- package/dist/pcm-agents/p-6f2ccd66.entry.js +0 -2
- package/dist/pcm-agents/p-6f2ccd66.entry.js.map +0 -1
- package/dist/pcm-agents/p-9bdac7f8.entry.js +0 -2
- package/dist/pcm-agents/p-9bdac7f8.entry.js.map +0 -1
- package/dist/pcm-agents/p-Bom3iy5A.js +0 -2
- package/dist/pcm-agents/p-CDalfSeE.js +0 -2
- package/dist/pcm-agents/p-c9c7b8b8.entry.js +0 -2
- package/dist/pcm-agents/p-c9c7b8b8.entry.js.map +0 -1
- package/dist/pcm-agents/p-ef6aa8fd.entry.js +0 -2
- package/dist/pcm-agents/p-ef6aa8fd.entry.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var sentryReporter = require('./sentry-reporter-
|
|
3
|
+
var index = require('./index-NE6PPZAs.js');
|
|
4
|
+
var sentryReporter = require('./sentry-reporter-DGcrp5UG.js');
|
|
5
5
|
var errorEvent = require('./error-event-J_ZWIqWF.js');
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -102,6 +102,6 @@ async function fetchHistoryConversations(botId, componentName, lastId = '', limi
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
exports.fetchHistoryConversations = fetchHistoryConversations;
|
|
105
|
-
//# sourceMappingURL=conversation-utils-
|
|
105
|
+
//# sourceMappingURL=conversation-utils-CPqGzavk.js.map
|
|
106
106
|
|
|
107
|
-
//# sourceMappingURL=conversation-utils-
|
|
107
|
+
//# sourceMappingURL=conversation-utils-CPqGzavk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-utils-
|
|
1
|
+
{"version":3,"file":"conversation-utils-CPqGzavk.js","sources":["src/utils/conversation-utils.ts"],"sourcesContent":["import { sendHttpRequest } from './utils';\r\nimport { SentryReporter } from './sentry-reporter';\r\nimport { ErrorEventBus } from './error-event';\r\nimport { ConversationItem, ConversationPageResult, ConversationDetail } from '../interfaces/chat';\r\n\r\ninterface ConversationApiItem {\r\n id: string;\r\n name?: string;\r\n created_at: number | string;\r\n updated_at: number | string;\r\n status?: string;\r\n message_count?: number;\r\n inputs?: any;\r\n}\r\n\r\ninterface ConversationApiData {\r\n data?: ConversationApiItem[];\r\n items?: ConversationApiItem[];\r\n has_more?: boolean;\r\n}\r\n\r\n/**\r\n * 格式化会话时间戳为可读字符串\r\n */\r\nfunction formatConversationTime(createdAt: number | string): string {\r\n try {\r\n const timestamp = typeof createdAt === 'string' ? parseInt(createdAt, 10) : createdAt;\r\n if (isNaN(timestamp) || timestamp <= 0) {\r\n return '未知时间';\r\n }\r\n\r\n const createdTime = new Date(timestamp * 1000);\r\n if (isNaN(createdTime.getTime())) {\r\n return '未知时间';\r\n }\r\n\r\n const now = new Date();\r\n const diffDays = Math.floor((now.getTime() - createdTime.getTime()) / (1000 * 60 * 60 * 24));\r\n const hh = createdTime.getHours().toString().padStart(2, '0');\r\n const mm = createdTime.getMinutes().toString().padStart(2, '0');\r\n const month = (createdTime.getMonth() + 1).toString().padStart(2, '0');\r\n const day = createdTime.getDate().toString().padStart(2, '0');\r\n\r\n if (diffDays === 0) {\r\n return `今天 ${hh}:${mm}`;\r\n }\r\n\r\n if (diffDays === 1) {\r\n return `昨天 ${hh}:${mm}`;\r\n }\r\n\r\n if (diffDays > 1 && diffDays < 7) {\r\n const weekdays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];\r\n return `${weekdays[createdTime.getDay()]} ${hh}:${mm}`;\r\n }\r\n\r\n return `${month}-${day} ${hh}:${mm}`;\r\n } catch {\r\n return '时间解析失败';\r\n }\r\n}\r\n\r\n/**\r\n * 获取历史会话列表\r\n * @param botId 机器人 ID\r\n * @param componentName 调用组件名称\r\n * @param lastId 上一页最后一条会话 ID,空字符串表示第一页\r\n * @param limit 每页数量\r\n * @returns 游标分页结果\r\n */\r\nexport async function fetchHistoryConversations(\r\n botId: string,\r\n componentName: string,\r\n lastId: string = '',\r\n limit: number = 20,\r\n): Promise<ConversationPageResult> {\r\n try {\r\n const result = await sendHttpRequest<ConversationApiData>({\r\n url: '/sdk/v1/chat/conversations',\r\n method: 'GET',\r\n data: {\r\n bot_id: botId,\r\n last_id: lastId,\r\n limit,\r\n },\r\n });\r\n\r\n if (result.success && result.data) {\r\n const rawConversations: ConversationApiItem[] = result.data.data || result.data.items || [];\r\n const hasMore = typeof result.data.has_more === 'boolean'\r\n ? result.data.has_more\r\n : rawConversations.length > limit;\r\n const conversations: ConversationItem[] = rawConversations.slice(0, limit).map((conv: ConversationApiItem) => ({\r\n id: conv.id,\r\n name: conv.name || '新会话',\r\n created_at: Number(conv.created_at),\r\n updated_at: Number(conv.updated_at),\r\n status: conv.status,\r\n message_count: conv.message_count || 0,\r\n timeDisplay: formatConversationTime(conv.created_at),\r\n inputs: conv.inputs,\r\n }));\r\n\r\n return {\r\n items: conversations,\r\n hasMore,\r\n nextCursor: conversations.length > 0 ? conversations[conversations.length - 1].id : '',\r\n };\r\n }\r\n\r\n return {\r\n items: [],\r\n hasMore: false,\r\n nextCursor: '',\r\n };\r\n } catch (error) {\r\n console.error('获取历史会话失败:', error);\r\n SentryReporter.captureError(error, {\r\n action: 'fetchHistoryConversations',\r\n component: componentName,\r\n title: '获取历史会话失败',\r\n });\r\n ErrorEventBus.emitError({ error, message: '获取历史会话失败' });\r\n\r\n return {\r\n items: [],\r\n hasMore: false,\r\n nextCursor: '',\r\n };\r\n }\r\n}\r\n\r\n/**\r\n * 获取单个会话详情\r\n * @param conversationId 会话 ID\r\n * @param componentName 调用组件名称\r\n * @returns 会话详情\r\n */\r\nexport async function fetchConversationDetail(\r\n conversationId: string,\r\n componentName: string,\r\n): Promise<ConversationDetail | null> {\r\n try {\r\n const result = await sendHttpRequest<{ data: ConversationDetail }>({\r\n url: '/sdk/v1/chat/conversation',\r\n method: 'GET',\r\n data: {\r\n conversation_id: conversationId,\r\n },\r\n });\r\n\r\n if (result.success && result.data?.data) {\r\n return result.data.data;\r\n }\r\n\r\n return null;\r\n } catch (error) {\r\n console.error('获取会话详情失败:', error);\r\n SentryReporter.captureError(error, {\r\n action: 'fetchConversationDetail',\r\n component: componentName,\r\n title: '获取会话详情失败',\r\n });\r\n ErrorEventBus.emitError({ error, message: '获取会话详情失败' });\r\n\r\n return null;\r\n }\r\n}\r\n"],"names":["sendHttpRequest","SentryReporter","ErrorEventBus"],"mappings":";;;;;;AAqBA;;AAEG;AACH,SAAS,sBAAsB,CAAC,SAA0B,EAAA;AACtD,IAAA,IAAI;AACA,QAAA,MAAM,SAAS,GAAG,OAAO,SAAS,KAAK,QAAQ,GAAG,QAAQ,CAAC,SAAS,EAAE,EAAE,CAAC,GAAG,SAAS;QACrF,IAAI,KAAK,CAAC,SAAS,CAAC,IAAI,SAAS,IAAI,CAAC,EAAE;AACpC,YAAA,OAAO,MAAM;;QAGjB,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QAC9C,IAAI,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,EAAE;AAC9B,YAAA,OAAO,MAAM;;AAGjB,QAAA,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE;AACtB,QAAA,MAAM,QAAQ,GAAG,IAAI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