pcm-agents 0.2.2 → 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.
Files changed (28) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/pcm-agents.cjs.js +1 -1
  3. package/dist/cjs/pcm-chat-message.pcm-hr-chat-modal.entry.cjs.js.map +1 -1
  4. package/dist/cjs/pcm-chat-message_2.cjs.entry.js +23 -19
  5. package/dist/cjs/pcm-chat-message_2.cjs.entry.js.map +1 -1
  6. package/dist/collection/components/pcm-hr-chat-modal/pcm-hr-chat-modal.css +34 -1
  7. package/dist/collection/components/pcm-hr-chat-modal/pcm-hr-chat-modal.js +58 -33
  8. package/dist/collection/components/pcm-hr-chat-modal/pcm-hr-chat-modal.js.map +1 -1
  9. package/dist/components/pcm-hr-chat-modal.js +26 -21
  10. package/dist/components/pcm-hr-chat-modal.js.map +1 -1
  11. package/dist/esm/loader.js +1 -1
  12. package/dist/esm/pcm-agents.js +1 -1
  13. package/dist/esm/pcm-chat-message.pcm-hr-chat-modal.entry.js.map +1 -1
  14. package/dist/esm/pcm-chat-message_2.entry.js +23 -19
  15. package/dist/esm/pcm-chat-message_2.entry.js.map +1 -1
  16. package/dist/pcm-agents/app-globals-DQuL1Twl.js.map +1 -0
  17. package/dist/pcm-agents/index-Csq0E9fM.js.map +1 -0
  18. package/dist/pcm-agents/index.esm.js.map +1 -1
  19. package/dist/pcm-agents/{p-f8a52c86.entry.js → p-ed58d206.entry.js} +2 -2
  20. package/dist/pcm-agents/p-ed58d206.entry.js.map +1 -0
  21. package/dist/pcm-agents/pcm-agents.esm.js +1 -1
  22. package/dist/pcm-agents/pcm-agents.esm.js.map +1 -1
  23. package/dist/pcm-agents/pcm-chat-message.pcm-hr-chat-modal.entry.esm.js.map +1 -1
  24. package/dist/pcm-agents/utils-CxmVTYHl.js.map +1 -0
  25. package/dist/types/components/pcm-hr-chat-modal/pcm-hr-chat-modal.d.ts +12 -6
  26. package/dist/types/components.d.ts +16 -8
  27. package/package.json +1 -1
  28. package/dist/pcm-agents/p-f8a52c86.entry.js.map +0 -1
@@ -2468,7 +2468,7 @@ const ChatMessageComponent = class {
2468
2468
  };
2469
2469
  ChatMessageComponent.style = pcmChatMessageCss;
2470
2470
 
2471
- const pcmHrChatModalCss = ":host{display:block}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;overflow-y:auto;padding:20px;z-index:1000}.fullscreen-overlay{padding:0}.modal-container{background:white;border-radius:8px;width:100%;max-width:800px;display:flex;flex-direction:column;position:relative;margin:auto}.modal-container.fullscreen{width:100vw;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;height:100vh;max-height:100vh}.modal-container.fullscreen>div:not(.modal-header):not(.initial-upload){display:flex;flex-direction:column;flex:1;overflow:hidden;height:100%}.pc-layout{width:80%;max-width:800px;min-width:320px;min-height:400px}.mobile-layout{width:100%;height:100%;border-radius:0}@media screen and (max-width: 768px){.pc-layout{width:95%;}.modal-overlay{padding:0}.modal-container.fullscreen{height:-webkit-fill-available;max-height:-webkit-fill-available;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}.modal-container.mobile-layout{width:100%;height:100vh;max-height:100vh;min-height:100vh;border-radius:0;margin:0;display:flex;flex-direction:column}}.video-preview.placeholder{display:flex;justify-content:center;align-items:center;background:#EAEAEA}.placeholder-status{color:#00000066}.waiting-message p{margin:0;font-size:16px;color:white;font-weight:500}.recording-container{width:100%;display:flex;flex-direction:column;align-items:center}.video-area{width:100%;display:flex;flex-direction:column;align-items:center}.stop-recording-button{width:100%;height:100%;font-size:16px;background:#f44336;border-radius:6px;color:white;border:none;cursor:pointer}.stop-recording-button:hover{background:#d32f2f}.play-audio-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0;}.header-left{display:flex;align-items:center;gap:8px}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.chat-history{position:relative;flex:1;overflow-y:auto;padding:20px;scroll-behavior:smooth;min-height:200px;background:url(https://pcm-resource-1312611446.cos.ap-guangzhou.myqcloud.com/web/sdk/chat_bg.png);background-size:100%}.fullscreen .chat-history{height:auto;flex:1 1 auto}.message-input{padding:16px;border-top:1px solid #eee;display:flex;gap:8px;align-items:center}.message-input input{flex:1;padding:8px 12px;border:1px solid #ddd;border-radius:4px;outline:none;transition:border-color 0.2s ease}.message-input input:focus{border-color:#bbb}.message{margin-bottom:16px;opacity:1;transition:opacity 0.3s ease}.message-content{max-width:70%;padding:8px 12px;border-radius:8px;word-break:break-word}.message-content p{margin:0;word-break:break-word}.user-message{display:flex;justify-content:flex-end}.agent-message{display:flex;justify-content:flex-start}.user-message .message-content{background-color:#007bff;color:white}.agent-message .message-content{background-color:#f1f1f1}.message-time{font-size:12px;color:#999;margin-top:4px;display:block}.send-button{background-color:#1890ff;color:white;border:none;border-radius:4px;padding:8px 16px;cursor:pointer;font-weight:500}.send-button:disabled{background-color:#ccc;cursor:not-allowed}.empty-state{display:flex;justify-content:center;align-items:center;height:100%;color:#999;text-align:center}.loading-container{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:rgba(255, 255, 255, 0.98);z-index:1;opacity:1;transition:opacity 0.3s ease}.loading-container p{margin-top:16px;color:#666;font-size:14px}.loading-spinner{width:40px;height:40px;border:3px solid #f3f3f3;border-top:3px solid #1890ff;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.messages-wrapper{width:100%;min-height:100%;display:flex;flex-direction:column;justify-content:flex-end}.messages-wrapper.has-overflow{justify-content:flex-start}.suggested-questions{display:flex;flex-direction:column;gap:8px;padding:16px}.suggested-question{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background-color:#f3f4f6;border-radius:4px;cursor:pointer;font-size:14px;color:#374151;transition:background-color 0.2s}.suggested-question:hover{background-color:#e5e7eb}.arrow-right{margin-left:8px}.loading-suggestions{display:flex;justify-content:center;padding:16px}.loading-spinner-small{width:20px;height:20px;border:2px solid #e5e7eb;border-top-color:#6b7280;border-radius:50%;animation:spin 1s linear infinite}.upload-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;color:#666;border-radius:4px;transition:background-color 0.2s}.upload-button:hover{background-color:rgba(0, 0, 0, 0.04)}.upload-button svg{width:20px;height:20px}.file-input{display:none}.selected-file{font-size:12px;color:#666;margin-left:8px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.input-wrapper{flex:1;display:flex;align-items:center;border:1px solid #ddd;border-radius:4px;padding:0 4px;background:white}.input-wrapper input{border:none;flex:1;padding:8px;outline:none}.input-wrapper:focus-within{border-color:#bbb}.file-preview{padding:8px 16px;border-top:1px solid #eee;background-color:#f9f9f9}.file-info{display:flex;align-items:center;justify-content:space-between;padding:8px;background:white;border:1px solid #e8e8e8;border-radius:4px}.file-name{font-size:13px;color:#333;margin-right:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:calc(100% - 30px)}.remove-file{background:transparent;border:none;color:#999;cursor:pointer;padding:4px 8px;font-size:16px;line-height:1;border-radius:4px;transition:all 0.2s}.remove-file:hover{background-color:#f0f0f0;color:#666}.initial-upload{padding:1rem 1rem;display:flex;flex-direction:column;align-items:center;height:100%}.upload-section{max-width:600px;width:100%;text-align:center}.upload-area{border:2px dashed #ddd;border-radius:8px;padding:1rem;cursor:pointer;transition:all 0.3s ease}.upload-area:hover{border-color:#1890ff;background-color:rgba(24, 144, 255, 0.05)}.upload-placeholder{display:flex;flex-direction:column;align-items:center;color:#666}.upload-hint{font-size:0.8rem;color:#999;margin-top:0.5rem}.function-select{margin-top:2rem}.function-options{display:flex;flex-wrap:wrap;gap:1rem;justify-content:center;margin-top:1rem}.function-button{padding:0.5rem 1rem;border:1px solid #ddd;border-radius:4px;background:white;cursor:pointer;transition:all 0.3s ease}.function-button:hover{border-color:#1890ff;color:#1890ff}.function-button.selected{background:#1890ff;color:white;border-color:#1890ff}.submit-button{margin-top:1rem;padding:0.8rem 2rem;background:#1890ff;color:white;border:none;border-radius:4px;font-size:1rem;cursor:pointer;transition:all 0.3s ease;width:95%}.submit-button:disabled{background:#ccc;cursor:not-allowed}.submit-button:hover:not(:disabled){background:#40a9ff}.category-select,.dimension-select{margin:30px 0}.category-options,.dimension-options{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}.category-button,.dimension-button{padding:12px 16px;border:1px solid #E5E5E5;border-radius:6px;background:white;cursor:pointer;transition:all 0.3s}.category-button:hover,.dimension-button:hover{background:#f5f5f5}.category-button.selected{background-image:linear-gradient(111deg, #4A9FFF 0%, #1058FF 100%);color:white}.dimension-button.selected{background-image:linear-gradient(111deg, #4A9FFF 0%, #1058FF 100%);color:white}.recording-section{border-top:1px solid #eee;display:flex;flex-direction:column;align-items:center;padding:20px;border-radius:14px 14px 0 0;flex:0 0 auto}.recording-section .video-preview{width:100%;height:200px;max-width:400px;position:relative;margin-bottom:10px;border:1px solid #ddd;border-radius:12px;overflow:hidden}.recording-section video{width:100%;height:100%;object-fit:cover}.recording-status{position:absolute;bottom:10px;left:10px;background-color:rgba(0, 0, 0, 0.6);color:white;padding:4px 8px;border-radius:4px;display:flex;align-items:center;gap:5px;font-size:0.8rem;z-index:2}.recording-status .recording-dot{display:inline-block;width:10px;height:10px;background-color:red;border-radius:50%;margin-right:5px;animation:blink 1s infinite}.recording-status.warning{color:#ff4d4f;animation:blink 1s infinite}@keyframes blink{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}.recording-section .stop-recording-button{background-color:#f44336;color:white;border:none;cursor:pointer;font-weight:bold}.recording-section .stop-recording-button:hover{background-color:#d32f2f}.fullscreen{width:100vw;border-radius:0;height:100vh;display:flex;flex-direction:column;overflow-y:auto}.recording-controls{margin-top:10px;height:53px;width:100%;max-width:400px;display:flex;justify-content:center}.recording-controls .waiting-message{text-align:center;color:white;font-size:1rem;background-image:linear-gradient(100deg, #4A9FFF 0%, #1058FF 100%);border-radius:6px;box-shadow:0 2px 8px rgba(0, 0, 0, 0.15);width:95%;display:flex;justify-content:center;align-items:center;cursor:pointer}.recording-controls .waiting-message.loading{background:#faad14}.recording-controls .waiting-message p{margin:0;font-size:16px;color:white;font-weight:500}.recording-controls .stop-recording-button{background-color:#dc3545;color:white;border:none;cursor:pointer;font-size:1rem}.recording-controls .stop-recording-button:hover{background-color:#c82333}.recording-controls .stop-recording-button.disabled{background:#ccc;cursor:not-allowed}.recording-controls .stop-recording-button.disabled:hover{background:#ccc}";
2471
+ const pcmHrChatModalCss = ":host{display:block}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;overflow-y:auto;padding:20px;z-index:1000}.fullscreen-overlay{padding:0}.modal-container{background:white;border-radius:8px;width:100%;max-width:800px;display:flex;flex-direction:column;position:relative;margin:auto}.modal-container.fullscreen{width:100vw;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;height:100vh;max-height:100vh}.modal-container.fullscreen>div:not(.modal-header):not(.initial-upload){display:flex;flex-direction:column;flex:1;overflow:hidden;height:100%}.pc-layout{width:80%;max-width:800px;min-width:320px;min-height:400px}.mobile-layout{width:100%;height:100%;border-radius:0}@media screen and (max-width: 768px){.pc-layout{width:95%;}.modal-overlay{padding:0}.modal-container.fullscreen{height:-webkit-fill-available;max-height:-webkit-fill-available;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}.modal-container.mobile-layout{width:100%;height:100vh;max-height:100vh;min-height:100vh;border-radius:0;margin:0;display:flex;flex-direction:column}}.video-preview.placeholder{display:flex;justify-content:center;align-items:center;background:#EAEAEA}.placeholder-status{color:#00000066}.waiting-message p{margin:0;font-size:16px;color:white;font-weight:500}.recording-container{width:100%;display:flex;flex-direction:column;align-items:center}.video-area{width:100%;display:flex;flex-direction:column;align-items:center}.stop-recording-button{width:100%;height:100%;font-size:16px;background:#f44336;border-radius:6px;color:white;border:none;cursor:pointer}.stop-recording-button:hover{background:#d32f2f}.play-audio-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0;}.header-left{display:flex;align-items:center;gap:8px}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.chat-history{position:relative;flex:1;overflow-y:auto;padding:20px;scroll-behavior:smooth;min-height:200px;background:url(https://pcm-resource-1312611446.cos.ap-guangzhou.myqcloud.com/web/sdk/chat_bg.png);background-size:100%}.fullscreen .chat-history{height:auto;flex:1 1 auto}.message-input{padding:16px;border-top:1px solid #eee;display:flex;gap:8px;align-items:center}.message-input input{flex:1;padding:8px 12px;border:1px solid #ddd;border-radius:4px;outline:none;transition:border-color 0.2s ease}.message-input input:focus{border-color:#bbb}.message{margin-bottom:16px;opacity:1;transition:opacity 0.3s ease}.message-content{max-width:70%;padding:8px 12px;border-radius:8px;word-break:break-word}.message-content p{margin:0;word-break:break-word}.user-message{display:flex;justify-content:flex-end}.agent-message{display:flex;justify-content:flex-start}.user-message .message-content{background-color:#007bff;color:white}.agent-message .message-content{background-color:#f1f1f1}.message-time{font-size:12px;color:#999;margin-top:4px;display:block}.send-button{background-color:#1890ff;color:white;border:none;border-radius:4px;padding:8px 16px;cursor:pointer;font-weight:500}.send-button:disabled{background-color:#ccc;cursor:not-allowed}.empty-state{display:flex;justify-content:center;align-items:center;height:100%;color:#999;text-align:center}.loading-container{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:rgba(255, 255, 255, 0.98);z-index:1;opacity:1;transition:opacity 0.3s ease}.loading-container p{margin-top:16px;color:#666;font-size:14px}.loading-spinner{width:40px;height:40px;border:3px solid #f3f3f3;border-top:3px solid #1890ff;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.messages-wrapper{width:100%;min-height:100%;display:flex;flex-direction:column;justify-content:flex-end}.messages-wrapper.has-overflow{justify-content:flex-start}.suggested-questions{display:flex;flex-direction:column;gap:8px;padding:16px}.suggested-question{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background-color:#f3f4f6;border-radius:4px;cursor:pointer;font-size:14px;color:#374151;transition:background-color 0.2s}.suggested-question:hover{background-color:#e5e7eb}.arrow-right{margin-left:8px}.loading-suggestions{display:flex;justify-content:center;padding:16px}.loading-spinner-small{width:20px;height:20px;border:2px solid #e5e7eb;border-top-color:#6b7280;border-radius:50%;animation:spin 1s linear infinite}.upload-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;color:#666;border-radius:4px;transition:background-color 0.2s}.upload-button:hover{background-color:rgba(0, 0, 0, 0.04)}.upload-button svg{width:20px;height:20px}.file-input{display:none}.selected-file{font-size:12px;color:#666;margin-left:8px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.input-wrapper{flex:1;display:flex;align-items:center;border:1px solid #ddd;border-radius:4px;padding:0 4px;background:white}.input-wrapper input{border:none;flex:1;padding:8px;outline:none}.input-wrapper:focus-within{border-color:#bbb}.file-preview{padding:8px 16px;border-top:1px solid #eee;background-color:#f9f9f9}.file-info{display:flex;align-items:center;justify-content:space-between;padding:8px;background:white;border:1px solid #e8e8e8;border-radius:4px}.file-name{font-size:13px;color:#333;margin-right:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:calc(100% - 30px)}.remove-file{background:transparent;border:none;color:#999;cursor:pointer;padding:4px 8px;font-size:16px;line-height:1;border-radius:4px;transition:all 0.2s}.remove-file:hover{background-color:#f0f0f0;color:#666}.initial-upload{padding:1rem 1rem;display:flex;flex-direction:column;align-items:center;height:100%}.upload-section{max-width:600px;width:100%;text-align:center}.upload-area{border:2px dashed #ddd;border-radius:8px;padding:1rem;cursor:pointer;transition:all 0.3s ease}.upload-area:hover{border-color:#1890ff;background-color:rgba(24, 144, 255, 0.05)}.upload-placeholder{display:flex;flex-direction:column;align-items:center;color:#666}.upload-hint{font-size:0.8rem;color:#999;margin-top:0.5rem}.function-select{margin-top:2rem}.function-options{display:flex;flex-wrap:wrap;gap:1rem;justify-content:center;margin-top:1rem}.function-button{padding:0.5rem 1rem;border:1px solid #ddd;border-radius:4px;background:white;cursor:pointer;transition:all 0.3s ease}.function-button:hover{border-color:#1890ff;color:#1890ff}.function-button.selected{background:#1890ff;color:white;border-color:#1890ff}.submit-button{margin-top:1rem;padding:0.8rem 2rem;background:#1890ff;color:white;border:none;border-radius:4px;font-size:1rem;cursor:pointer;transition:all 0.3s ease;width:95%}.submit-button:disabled{background:#ccc;cursor:not-allowed}.submit-button:hover:not(:disabled){background:#40a9ff}.category-select,.dimension-select{margin:30px 0}.category-options,.dimension-options{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}.category-button,.dimension-button{padding:12px 16px;border:1px solid #E5E5E5;border-radius:6px;background:white;cursor:pointer;transition:all 0.3s}.category-button:hover,.dimension-button:hover{background:#f5f5f5}.category-button.selected{background-image:linear-gradient(111deg, #4A9FFF 0%, #1058FF 100%);color:white}.dimension-button.selected{background-image:linear-gradient(111deg, #4A9FFF 0%, #1058FF 100%);color:white}.recording-section{border-top:1px solid #eee;display:flex;flex-direction:column;align-items:center;padding:20px;border-radius:14px 14px 0 0;flex:0 0 auto}.recording-section .video-preview{width:100%;height:200px;max-width:400px;position:relative;margin-bottom:10px;border:1px solid #ddd;border-radius:12px;overflow:hidden}.recording-section video{width:100%;height:100%;object-fit:cover}.recording-status{position:absolute;top:10px;left:10px;background-color:rgba(0, 0, 0, 0.6);color:white;padding:4px 8px;border-radius:4px;display:flex;align-items:center;gap:5px;font-size:0.8rem;z-index:2}.recording-status .recording-dot{display:inline-block;width:10px;height:10px;background-color:red;border-radius:50%;margin-right:5px;animation:blink 1s infinite}.recording-status.warning{color:#ff4d4f;animation:blink 1s infinite}@keyframes blink{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}.recording-section .stop-recording-button{background-color:#f44336;color:white;border:none;cursor:pointer;font-weight:bold}.recording-section .stop-recording-button:hover{background-color:#d32f2f}.fullscreen{width:100vw;border-radius:0;height:100vh;display:flex;flex-direction:column;overflow-y:auto}.recording-controls{margin-top:10px;height:53px;width:100%;max-width:400px;display:flex;justify-content:center}.recording-controls .waiting-message{text-align:center;color:white;font-size:1rem;background-image:linear-gradient(100deg, #4A9FFF 0%, #1058FF 100%);border-radius:6px;box-shadow:0 2px 8px rgba(0, 0, 0, 0.15);width:95%;display:flex;justify-content:center;align-items:center;cursor:pointer}.recording-controls .waiting-message.loading{background:#faad14}.recording-controls .waiting-message p{margin:0;font-size:16px;color:white;font-weight:500}.recording-controls .stop-recording-button{background-color:#dc3545;color:white;border:none;cursor:pointer;font-size:1rem}.recording-controls .stop-recording-button:hover{background-color:#c82333}.recording-controls .stop-recording-button.disabled{background:#ccc;cursor:not-allowed}.recording-controls .stop-recording-button.disabled:hover{background:#ccc}.progress-container{display:flex;justify-content:space-between;align-items:center;width:100%;max-width:400px;margin-top:10px;padding:0 5px}.progress-bar-container{height:4px;background-color:#E5E5E5;border-radius:2px;overflow:hidden;margin-right:10px;width:75px}.progress-bar{height:100%;background-image:linear-gradient(111deg, #4A9FFF 0%, #1058FF 100%);border-radius:2px;transition:width 0.3s ease}.progress-text{font-size:14px;color:#666;white-space:nowrap}";
2472
2472
 
2473
2473
  const ChatHRModal = class {
2474
2474
  constructor(hostRef) {
@@ -2610,9 +2610,9 @@ const ChatHRModal = class {
2610
2610
  countdownWarningTime = 30;
2611
2611
  showCountdownWarning = false;
2612
2612
  /**
2613
- * 用户邮箱
2613
+ * 接收报告的邮箱地址
2614
2614
  */
2615
- email = '';
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, '1234567890', lastAIMessage.answer, // AI的提问作为question
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: '1234567890'
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.email,
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, user, question, answer) {
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: 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: '1234567890',
3355
+ user: this.userId, // 使用传入的 userId
3354
3356
  question: lastAIMessage.answer,
3355
3357
  file_url: cosKey
3356
3358
  },
@@ -3527,7 +3529,9 @@ const ChatHRModal = class {
3527
3529
  (this.requireResume && this.isUploading), onClick: this.handleInitialSubmit }, this.requireResume && this.isUploading ? '上传中...' : '开始面试')), this.requireResume && (index.h("input", { type: "file", class: "file-input", onChange: this.handleFileChange, accept: ".pdf,.doc,.docx,.txt" })))) : (index.h("div", { style: { height: '100%' } }, index.h("div", { class: "chat-history", onScroll: this.handleScroll }, this.isLoadingHistory ? (index.h("div", { class: "loading-container" }, index.h("div", { class: "loading-spinner" }), index.h("p", null, "\u52A0\u8F7D\u5386\u53F2\u6D88\u606F\u4E2D..."))) : (index.h("div", null, this.messages.map((message) => (index.h("div", { id: `message_${message.id}`, key: message.id }, index.h("pcm-chat-message", { message: message, onMessageChange: (event) => {
3528
3530
  const updatedMessages = this.messages.map(msg => msg.id === message.id ? { ...msg, ...event.detail } : msg);
3529
3531
  this.messages = updatedMessages;
3530
- } })))), this.currentStreamingMessage && (index.h("div", { id: `message_${this.currentStreamingMessage.id}` }, index.h("pcm-chat-message", { message: this.currentStreamingMessage }))), this.messages.length === 0 && !this.currentStreamingMessage && (index.h("div", { class: "empty-state" }, index.h("p", null, "\u8BF7\u4E0A\u4F20\u7B80\u5386\u5F00\u59CB\u9762\u8BD5")))))), index.h("div", { class: "recording-section" }, index.h("div", { class: "recording-container" }, index.h("div", { class: "video-area" }, this.showRecordingUI ? (renderVideoPreview()) : (index.h("div", { class: "video-preview placeholder" }, renderPlaceholderStatus()))), index.h("div", { class: "recording-controls" }, this.showRecordingUI ? (index.h("button", { class: "stop-recording-button", onClick: () => this.stopRecording() }, "\u5B8C\u6210\u672C\u9898\u56DE\u7B54")) : (index.h("div", { class: "waiting-message" }, (() => {
3532
+ } })))), this.currentStreamingMessage && (index.h("div", { id: `message_${this.currentStreamingMessage.id}` }, index.h("pcm-chat-message", { message: this.currentStreamingMessage }))), this.messages.length === 0 && !this.currentStreamingMessage && (index.h("div", { class: "empty-state" }, index.h("p", null, "\u8BF7\u4E0A\u4F20\u7B80\u5386\u5F00\u59CB\u9762\u8BD5")))))), index.h("div", { class: "recording-section" }, index.h("div", { class: "recording-container" }, index.h("div", { class: "video-area" }, this.showRecordingUI ? (renderVideoPreview()) : (index.h("div", { class: "video-preview placeholder" }, renderPlaceholderStatus()))), index.h("div", { class: "progress-container" }, index.h("div", { class: "progress-bar-container" }, index.h("div", { class: "progress-bar", style: {
3533
+ width: `${Math.max(0, this.currentQuestionNumber - 1) / this.totalQuestions * 100}%`
3534
+ } })), index.h("div", { class: "progress-text" }, "\u5DF2\u5B8C\u6210", Math.max(0, this.currentQuestionNumber - 1), "/", this.totalQuestions)), index.h("div", { class: "recording-controls" }, this.showRecordingUI ? (index.h("button", { class: "stop-recording-button", onClick: () => this.stopRecording() }, "\u5B8C\u6210\u672C\u9898\u56DE\u7B54")) : (index.h("div", { class: "waiting-message" }, (() => {
3531
3535
  // 显示播放按钮(当不自动播放且有音频URL时)
3532
3536
  if (!this.enableVoice && this.audioUrl && !this.isPlayingAudio) {
3533
3537
  return (index.h("div", { class: "play-audio-container", onClick: this.handlePlayAudio }, index.h("p", null, index.h("svg", { viewBox: "0 0 24 24", width: "24", height: "24", fill: "currentColor", style: { verticalAlign: 'middle', marginRight: '8px' } }, index.h("path", { d: "M8 5v14l11-7z" })), index.h("span", { style: { verticalAlign: 'middle' } }, "\u64AD\u653E\u9898\u76EE"))));