pcm-agents 0.2.3 → 0.2.4
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/loader.cjs.js +1 -1
- package/dist/cjs/pcm-agents.cjs.js +1 -1
- package/dist/cjs/pcm-chat-message.pcm-hr-chat-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/pcm-chat-message_2.cjs.entry.js +19 -17
- package/dist/cjs/pcm-chat-message_2.cjs.entry.js.map +1 -1
- package/dist/collection/components/pcm-hr-chat-modal/pcm-hr-chat-modal.js +55 -32
- package/dist/collection/components/pcm-hr-chat-modal/pcm-hr-chat-modal.js.map +1 -1
- package/dist/components/pcm-hr-chat-modal.js +22 -19
- package/dist/components/pcm-hr-chat-modal.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pcm-agents.js +1 -1
- package/dist/esm/pcm-chat-message.pcm-hr-chat-modal.entry.js.map +1 -1
- package/dist/esm/pcm-chat-message_2.entry.js +19 -17
- package/dist/esm/pcm-chat-message_2.entry.js.map +1 -1
- package/dist/pcm-agents/app-globals-DQuL1Twl.js.map +1 -0
- package/dist/pcm-agents/index-Csq0E9fM.js.map +1 -0
- package/dist/pcm-agents/index.esm.js.map +1 -1
- package/dist/pcm-agents/{p-9a428ad8.entry.js → p-ed58d206.entry.js} +2 -2
- package/dist/pcm-agents/p-ed58d206.entry.js.map +1 -0
- package/dist/pcm-agents/pcm-agents.esm.js +1 -1
- package/dist/pcm-agents/pcm-agents.esm.js.map +1 -1
- package/dist/pcm-agents/pcm-chat-message.pcm-hr-chat-modal.entry.esm.js.map +1 -1
- package/dist/pcm-agents/utils-CxmVTYHl.js.map +1 -0
- package/dist/types/components/pcm-hr-chat-modal/pcm-hr-chat-modal.d.ts +12 -6
- package/dist/types/components.d.ts +16 -8
- package/package.json +1 -1
- package/dist/pcm-agents/p-9a428ad8.entry.js.map +0 -1
|
@@ -2608,9 +2608,9 @@ const ChatHRModal = class {
|
|
|
2608
2608
|
countdownWarningTime = 30;
|
|
2609
2609
|
showCountdownWarning = false;
|
|
2610
2610
|
/**
|
|
2611
|
-
*
|
|
2611
|
+
* 接收报告的邮箱地址
|
|
2612
2612
|
*/
|
|
2613
|
-
|
|
2613
|
+
toEmail = '';
|
|
2614
2614
|
/**
|
|
2615
2615
|
* 是否以全屏模式打开
|
|
2616
2616
|
*/
|
|
@@ -2625,10 +2625,6 @@ const ChatHRModal = class {
|
|
|
2625
2625
|
isPlayingAudio = false;
|
|
2626
2626
|
audioUrl = null;
|
|
2627
2627
|
audioElement = null;
|
|
2628
|
-
/**
|
|
2629
|
-
* 欢迎提示语,如果不提供则不显示提示
|
|
2630
|
-
*/
|
|
2631
|
-
welcomeMessage;
|
|
2632
2628
|
/**
|
|
2633
2629
|
* 录制错误事件
|
|
2634
2630
|
*/
|
|
@@ -2641,6 +2637,16 @@ const ChatHRModal = class {
|
|
|
2641
2637
|
* 是否播放语音问题
|
|
2642
2638
|
*/
|
|
2643
2639
|
enableVoice = true;
|
|
2640
|
+
/**
|
|
2641
|
+
* 是否显示题干内容
|
|
2642
|
+
* 1: 显示题干内容
|
|
2643
|
+
* 0: 不显示题干内容
|
|
2644
|
+
*/
|
|
2645
|
+
displayContentStatus = "1";
|
|
2646
|
+
/**
|
|
2647
|
+
* 用户ID
|
|
2648
|
+
*/
|
|
2649
|
+
userId = '';
|
|
2644
2650
|
handleClose = () => {
|
|
2645
2651
|
this.isOpen = false;
|
|
2646
2652
|
this.stopRecording();
|
|
@@ -2712,7 +2718,7 @@ const ChatHRModal = class {
|
|
|
2712
2718
|
const lastAIMessage = this.messages.length > 0 ? this.messages[this.messages.length - 1] : null;
|
|
2713
2719
|
// 保存AI提问和用户回答
|
|
2714
2720
|
if (lastAIMessage && this.conversationId && message !== "下一题") {
|
|
2715
|
-
this.saveAnswer(this.conversationId,
|
|
2721
|
+
this.saveAnswer(this.conversationId, lastAIMessage.answer, // AI的提问作为question
|
|
2716
2722
|
queryText // 用户的输入作为answer
|
|
2717
2723
|
);
|
|
2718
2724
|
}
|
|
@@ -2755,12 +2761,13 @@ const ChatHRModal = class {
|
|
|
2755
2761
|
response_mode: 'streaming',
|
|
2756
2762
|
conversation_id: this.conversationId,
|
|
2757
2763
|
query: queryText,
|
|
2758
|
-
user:
|
|
2764
|
+
user: this.userId // 使用传入的 userId
|
|
2759
2765
|
};
|
|
2760
2766
|
requestData.inputs = {
|
|
2761
2767
|
job_info: this.selectedJobCategory,
|
|
2762
2768
|
dimensional_info: this.selectedDimensions.join(','),
|
|
2763
|
-
email: this.
|
|
2769
|
+
email: this.toEmail,
|
|
2770
|
+
display_content_status: this.displayContentStatus
|
|
2764
2771
|
};
|
|
2765
2772
|
// 如果有上传的文件,添加到inputs参数
|
|
2766
2773
|
if (this.uploadedFileInfo.length > 0) {
|
|
@@ -2857,7 +2864,7 @@ const ChatHRModal = class {
|
|
|
2857
2864
|
});
|
|
2858
2865
|
}
|
|
2859
2866
|
// 添加保存答案的方法
|
|
2860
|
-
async saveAnswer(conversationId,
|
|
2867
|
+
async saveAnswer(conversationId, question, answer) {
|
|
2861
2868
|
try {
|
|
2862
2869
|
await sendHttpRequest({
|
|
2863
2870
|
url: 'https://pcm_api.ylzhaopin.com/agents/hr_competition/answer',
|
|
@@ -2867,7 +2874,7 @@ const ChatHRModal = class {
|
|
|
2867
2874
|
},
|
|
2868
2875
|
data: {
|
|
2869
2876
|
conversation_id: conversationId,
|
|
2870
|
-
user:
|
|
2877
|
+
user: this.userId, // 使用传入的 userId
|
|
2871
2878
|
question: question,
|
|
2872
2879
|
answer: answer
|
|
2873
2880
|
},
|
|
@@ -2929,7 +2936,6 @@ const ChatHRModal = class {
|
|
|
2929
2936
|
data: {
|
|
2930
2937
|
conversation_id: this.conversationId,
|
|
2931
2938
|
bot_id: this.botId,
|
|
2932
|
-
user: '1234567890',
|
|
2933
2939
|
limit: 20
|
|
2934
2940
|
},
|
|
2935
2941
|
onMessage: (data) => {
|
|
@@ -2983,10 +2989,6 @@ const ChatHRModal = class {
|
|
|
2983
2989
|
if (this.conversationId) {
|
|
2984
2990
|
await this.loadHistoryMessages();
|
|
2985
2991
|
}
|
|
2986
|
-
else if (this.welcomeMessage) {
|
|
2987
|
-
// 如果是新会话且提供了欢迎提示语,则显示
|
|
2988
|
-
alert(this.welcomeMessage);
|
|
2989
|
-
}
|
|
2990
2992
|
}
|
|
2991
2993
|
}
|
|
2992
2994
|
handleJobCategorySelect = (category) => {
|
|
@@ -3348,7 +3350,7 @@ const ChatHRModal = class {
|
|
|
3348
3350
|
},
|
|
3349
3351
|
data: {
|
|
3350
3352
|
conversation_id: this.conversationId,
|
|
3351
|
-
user:
|
|
3353
|
+
user: this.userId, // 使用传入的 userId
|
|
3352
3354
|
question: lastAIMessage.answer,
|
|
3353
3355
|
file_url: cosKey
|
|
3354
3356
|
},
|