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
|
@@ -2610,9 +2610,9 @@ const ChatHRModal = class {
|
|
|
2610
2610
|
countdownWarningTime = 30;
|
|
2611
2611
|
showCountdownWarning = false;
|
|
2612
2612
|
/**
|
|
2613
|
-
*
|
|
2613
|
+
* 接收报告的邮箱地址
|
|
2614
2614
|
*/
|
|
2615
|
-
|
|
2615
|
+
toEmail = '';
|
|
2616
2616
|
/**
|
|
2617
2617
|
* 是否以全屏模式打开
|
|
2618
2618
|
*/
|
|
@@ -2627,10 +2627,6 @@ const ChatHRModal = class {
|
|
|
2627
2627
|
isPlayingAudio = false;
|
|
2628
2628
|
audioUrl = null;
|
|
2629
2629
|
audioElement = null;
|
|
2630
|
-
/**
|
|
2631
|
-
* 欢迎提示语,如果不提供则不显示提示
|
|
2632
|
-
*/
|
|
2633
|
-
welcomeMessage;
|
|
2634
2630
|
/**
|
|
2635
2631
|
* 录制错误事件
|
|
2636
2632
|
*/
|
|
@@ -2643,6 +2639,16 @@ const ChatHRModal = class {
|
|
|
2643
2639
|
* 是否播放语音问题
|
|
2644
2640
|
*/
|
|
2645
2641
|
enableVoice = true;
|
|
2642
|
+
/**
|
|
2643
|
+
* 是否显示题干内容
|
|
2644
|
+
* 1: 显示题干内容
|
|
2645
|
+
* 0: 不显示题干内容
|
|
2646
|
+
*/
|
|
2647
|
+
displayContentStatus = "1";
|
|
2648
|
+
/**
|
|
2649
|
+
* 用户ID
|
|
2650
|
+
*/
|
|
2651
|
+
userId = '';
|
|
2646
2652
|
handleClose = () => {
|
|
2647
2653
|
this.isOpen = false;
|
|
2648
2654
|
this.stopRecording();
|
|
@@ -2714,7 +2720,7 @@ const ChatHRModal = class {
|
|
|
2714
2720
|
const lastAIMessage = this.messages.length > 0 ? this.messages[this.messages.length - 1] : null;
|
|
2715
2721
|
// 保存AI提问和用户回答
|
|
2716
2722
|
if (lastAIMessage && this.conversationId && message !== "下一题") {
|
|
2717
|
-
this.saveAnswer(this.conversationId,
|
|
2723
|
+
this.saveAnswer(this.conversationId, lastAIMessage.answer, // AI的提问作为question
|
|
2718
2724
|
queryText // 用户的输入作为answer
|
|
2719
2725
|
);
|
|
2720
2726
|
}
|
|
@@ -2757,12 +2763,13 @@ const ChatHRModal = class {
|
|
|
2757
2763
|
response_mode: 'streaming',
|
|
2758
2764
|
conversation_id: this.conversationId,
|
|
2759
2765
|
query: queryText,
|
|
2760
|
-
user:
|
|
2766
|
+
user: this.userId // 使用传入的 userId
|
|
2761
2767
|
};
|
|
2762
2768
|
requestData.inputs = {
|
|
2763
2769
|
job_info: this.selectedJobCategory,
|
|
2764
2770
|
dimensional_info: this.selectedDimensions.join(','),
|
|
2765
|
-
email: this.
|
|
2771
|
+
email: this.toEmail,
|
|
2772
|
+
display_content_status: this.displayContentStatus
|
|
2766
2773
|
};
|
|
2767
2774
|
// 如果有上传的文件,添加到inputs参数
|
|
2768
2775
|
if (this.uploadedFileInfo.length > 0) {
|
|
@@ -2859,7 +2866,7 @@ const ChatHRModal = class {
|
|
|
2859
2866
|
});
|
|
2860
2867
|
}
|
|
2861
2868
|
// 添加保存答案的方法
|
|
2862
|
-
async saveAnswer(conversationId,
|
|
2869
|
+
async saveAnswer(conversationId, question, answer) {
|
|
2863
2870
|
try {
|
|
2864
2871
|
await index$1.sendHttpRequest({
|
|
2865
2872
|
url: 'https://pcm_api.ylzhaopin.com/agents/hr_competition/answer',
|
|
@@ -2869,7 +2876,7 @@ const ChatHRModal = class {
|
|
|
2869
2876
|
},
|
|
2870
2877
|
data: {
|
|
2871
2878
|
conversation_id: conversationId,
|
|
2872
|
-
user:
|
|
2879
|
+
user: this.userId, // 使用传入的 userId
|
|
2873
2880
|
question: question,
|
|
2874
2881
|
answer: answer
|
|
2875
2882
|
},
|
|
@@ -2931,7 +2938,6 @@ const ChatHRModal = class {
|
|
|
2931
2938
|
data: {
|
|
2932
2939
|
conversation_id: this.conversationId,
|
|
2933
2940
|
bot_id: this.botId,
|
|
2934
|
-
user: '1234567890',
|
|
2935
2941
|
limit: 20
|
|
2936
2942
|
},
|
|
2937
2943
|
onMessage: (data) => {
|
|
@@ -2985,10 +2991,6 @@ const ChatHRModal = class {
|
|
|
2985
2991
|
if (this.conversationId) {
|
|
2986
2992
|
await this.loadHistoryMessages();
|
|
2987
2993
|
}
|
|
2988
|
-
else if (this.welcomeMessage) {
|
|
2989
|
-
// 如果是新会话且提供了欢迎提示语,则显示
|
|
2990
|
-
alert(this.welcomeMessage);
|
|
2991
|
-
}
|
|
2992
2994
|
}
|
|
2993
2995
|
}
|
|
2994
2996
|
handleJobCategorySelect = (category) => {
|
|
@@ -3350,7 +3352,7 @@ const ChatHRModal = class {
|
|
|
3350
3352
|
},
|
|
3351
3353
|
data: {
|
|
3352
3354
|
conversation_id: this.conversationId,
|
|
3353
|
-
user:
|
|
3355
|
+
user: this.userId, // 使用传入的 userId
|
|
3354
3356
|
question: lastAIMessage.answer,
|
|
3355
3357
|
file_url: cosKey
|
|
3356
3358
|
},
|