pcm-agents 0.3.2 → 0.3.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/LICENSE +21 -21
- package/dist/cjs/{index-BFPEnLbS.js → index-RmBfqEV7.js} +4 -3
- package/dist/cjs/index-RmBfqEV7.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/my-component.cjs.entry.js +2 -2
- package/dist/cjs/my-component.cjs.entry.js.map +1 -1
- package/dist/cjs/my-component.entry.cjs.js.map +1 -1
- package/dist/cjs/pcm-agents.cjs.js +1 -1
- package/dist/cjs/pcm-app-chat-modal.pcm-chat-message.pcm-hr-chat-modal.pcm-jlpp-modal.pcm-mnms-modal.pcm-video-chat-modal.pcm-zygh-modal.entry.cjs.js.map +1 -0
- package/dist/cjs/pcm-app-chat-modal_7.cjs.entry.js +68 -61
- package/dist/cjs/pcm-app-chat-modal_7.cjs.entry.js.map +1 -1
- package/dist/cjs/pcm-chat-modal.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/my-component/my-component.css +3 -3
- package/dist/collection/components/my-component/my-component.js +1 -1
- package/dist/collection/components/my-component/my-component.js.map +1 -1
- package/dist/collection/components/pcm-app-chat-modal/pcm-app-chat-modal.js +5 -6
- package/dist/collection/components/pcm-app-chat-modal/pcm-app-chat-modal.js.map +1 -1
- package/dist/collection/components/pcm-chat-message/pcm-chat-message.js +26 -2
- package/dist/collection/components/pcm-chat-message/pcm-chat-message.js.map +1 -1
- package/dist/collection/components/pcm-hr-chat-modal/pcm-hr-chat-modal.js +4 -4
- package/dist/collection/components/pcm-hr-chat-modal/pcm-hr-chat-modal.js.map +1 -1
- package/dist/collection/components/{pcm-jlpx-modal/pcm-jlpx-modal.js → pcm-jlpp-modal/pcm-jlpp-modal.js} +21 -21
- package/dist/collection/components/pcm-jlpp-modal/pcm-jlpp-modal.js.map +1 -0
- package/dist/collection/components/pcm-mnms-modal/pcm-mnms-modal.js +16 -16
- package/dist/collection/components/pcm-mnms-modal/pcm-mnms-modal.js.map +1 -1
- package/dist/collection/components/pcm-video-chat-modal/pcm-video-chat-modal.js +4 -4
- package/dist/collection/components/pcm-video-chat-modal/pcm-video-chat-modal.js.map +1 -1
- package/dist/collection/components/pcm-zygh-modal/pcm-zygh-modal.js +22 -18
- package/dist/collection/components/pcm-zygh-modal/pcm-zygh-modal.js.map +1 -1
- package/dist/collection/global/global.css +31 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/utils/utils.js +2 -1
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/index.js +2 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/my-component.js +1 -1
- package/dist/components/my-component.js.map +1 -1
- package/dist/components/{p-LkDC0SN2.js → p-CBMLAbWp.js} +10 -5
- package/dist/components/p-CBMLAbWp.js.map +1 -0
- package/dist/components/{p-BctfuDvG.js → p-VU0niiMk.js} +7 -8
- package/dist/components/p-VU0niiMk.js.map +1 -0
- package/dist/components/pcm-app-chat-modal.js +1 -1
- package/dist/components/pcm-chat-message.js +1 -1
- package/dist/components/pcm-chat-modal.js +1 -1
- package/dist/components/pcm-hr-chat-modal.js +4 -4
- package/dist/components/pcm-hr-chat-modal.js.map +1 -1
- package/dist/components/{pcm-jlpx-modal.d.ts → pcm-jlpp-modal.d.ts} +4 -4
- package/dist/components/{pcm-jlpx-modal.js → pcm-jlpp-modal.js} +27 -27
- package/dist/components/pcm-jlpp-modal.js.map +1 -0
- package/dist/components/pcm-mnms-modal.js +16 -16
- package/dist/components/pcm-mnms-modal.js.map +1 -1
- package/dist/components/pcm-video-chat-modal.js +4 -4
- package/dist/components/pcm-video-chat-modal.js.map +1 -1
- package/dist/components/pcm-zygh-modal.js +20 -16
- package/dist/components/pcm-zygh-modal.js.map +1 -1
- package/dist/esm/{index-nVjZGfA8.js → index-CDtyzi83.js} +4 -3
- package/dist/esm/index-CDtyzi83.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/my-component.entry.js +2 -2
- package/dist/esm/my-component.entry.js.map +1 -1
- package/dist/esm/pcm-agents.js +1 -1
- package/dist/esm/pcm-app-chat-modal.pcm-chat-message.pcm-hr-chat-modal.pcm-jlpp-modal.pcm-mnms-modal.pcm-video-chat-modal.pcm-zygh-modal.entry.js.map +1 -0
- package/dist/esm/pcm-app-chat-modal_7.entry.js +68 -61
- package/dist/esm/pcm-app-chat-modal_7.entry.js.map +1 -1
- package/dist/esm/pcm-chat-modal.entry.js +1 -1
- package/dist/pcm-agents/index.esm.js +1 -1
- package/dist/pcm-agents/my-component.entry.esm.js.map +1 -1
- package/dist/pcm-agents/p-11c829b3.entry.js +2 -0
- package/dist/pcm-agents/p-11c829b3.entry.js.map +1 -0
- package/dist/pcm-agents/{p-f3ca99b4.entry.js → p-430f9a9f.entry.js} +2 -2
- package/dist/pcm-agents/p-CDtyzi83.js +2 -0
- package/dist/pcm-agents/p-CDtyzi83.js.map +1 -0
- package/dist/pcm-agents/p-a0826602.entry.js +2 -0
- package/dist/pcm-agents/p-a0826602.entry.js.map +1 -0
- package/dist/pcm-agents/pcm-agents.esm.js +1 -1
- package/dist/pcm-agents/pcm-app-chat-modal.pcm-chat-message.pcm-hr-chat-modal.pcm-jlpp-modal.pcm-mnms-modal.pcm-video-chat-modal.pcm-zygh-modal.entry.esm.js.map +1 -0
- package/dist/types/components/pcm-app-chat-modal/pcm-app-chat-modal.d.ts +1 -1
- package/dist/types/components/pcm-chat-message/pcm-chat-message.d.ts +4 -0
- package/dist/types/components/pcm-hr-chat-modal/pcm-hr-chat-modal.d.ts +1 -1
- package/dist/types/components/{pcm-jlpx-modal/pcm-jlpx-modal.d.ts → pcm-jlpp-modal/pcm-jlpp-modal.d.ts} +4 -4
- package/dist/types/components/pcm-mnms-modal/pcm-mnms-modal.d.ts +3 -3
- package/dist/types/components/pcm-video-chat-modal/pcm-video-chat-modal.d.ts +1 -1
- package/dist/types/components/pcm-zygh-modal/pcm-zygh-modal.d.ts +8 -4
- package/dist/types/components.d.ts +56 -48
- package/dist/types/utils/utils.d.ts +1 -1
- package/package.json +62 -61
- package/readme.md +307 -307
- package/dist/cjs/index-BFPEnLbS.js.map +0 -1
- package/dist/cjs/pcm-app-chat-modal.pcm-chat-message.pcm-hr-chat-modal.pcm-jlpx-modal.pcm-mnms-modal.pcm-video-chat-modal.pcm-zygh-modal.entry.cjs.js.map +0 -1
- package/dist/collection/components/pcm-jlpx-modal/pcm-jlpx-modal.js.map +0 -1
- package/dist/components/p-BctfuDvG.js.map +0 -1
- package/dist/components/p-LkDC0SN2.js.map +0 -1
- package/dist/components/pcm-jlpx-modal.js.map +0 -1
- package/dist/esm/index-nVjZGfA8.js.map +0 -1
- package/dist/esm/pcm-app-chat-modal.pcm-chat-message.pcm-hr-chat-modal.pcm-jlpx-modal.pcm-mnms-modal.pcm-video-chat-modal.pcm-zygh-modal.entry.js.map +0 -1
- package/dist/pcm-agents/p-55417392.entry.js +0 -2
- package/dist/pcm-agents/p-55417392.entry.js.map +0 -1
- package/dist/pcm-agents/p-a698b59f.entry.js +0 -2
- package/dist/pcm-agents/p-a698b59f.entry.js.map +0 -1
- package/dist/pcm-agents/p-nVjZGfA8.js +0 -2
- package/dist/pcm-agents/p-nVjZGfA8.js.map +0 -1
- package/dist/pcm-agents/pcm-app-chat-modal.pcm-chat-message.pcm-hr-chat-modal.pcm-jlpx-modal.pcm-mnms-modal.pcm-video-chat-modal.pcm-zygh-modal.entry.esm.js.map +0 -1
- /package/dist/collection/components/{pcm-jlpx-modal/pcm-jlpx-modal.css → pcm-jlpp-modal/pcm-jlpp-modal.css} +0 -0
- /package/dist/pcm-agents/{p-f3ca99b4.entry.js.map → p-430f9a9f.entry.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, g as getElement, h } from './index-DaMwkrv5.js';
|
|
2
|
-
import { a as sendSSERequest, s as sendHttpRequest, u as uploadFileToBackend, A as API_DOMAIN } from './index-
|
|
2
|
+
import { a as sendSSERequest, s as sendHttpRequest, u as uploadFileToBackend, A as API_DOMAIN } from './index-CDtyzi83.js';
|
|
3
3
|
|
|
4
4
|
const pcmAppChatModalCss = ":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:900px;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}.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;height:400px;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}.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}.text-input-area{display:flex;flex-direction:column;width:100%;height:100%;padding:16px;border-radius:8px;border:none;}.text-answer-input{flex:1;min-height:80px;padding:12px 12px 0px 12px;border:1px solid #ddd;border-radius:8px 8px 0 0;resize:none;font-size:16px;background-color:#fff;border-bottom:none;outline:none;}.input-toolbar{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background-color:#fff;border:1px solid #ddd;border-top:none;border-radius:0 0 8px 8px}.text-answer-input:focus{border-color:rgb(74, 144, 226);border-bottom:none}.text-answer-input:focus+.input-toolbar{border-color:rgb(74, 144, 226);border-top:none}.toolbar-actions{display:flex;gap:8px}.toolbar-button{background:transparent;border:none;color:#666;padding:4px;cursor:pointer;border-radius:4px}.toolbar-button:hover{background-color:#f0f0f0}.submit-text-button{padding:6px 16px;background-color:#4a90e2;color:white;border:none;border-radius:4px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color 0.2s}.submit-text-button:hover:not(.disabled){background-color:#3a7bc8}.submit-text-button.disabled{background-color:#b3b3b3;cursor:not-allowed}@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}.chat-history{min-height:200px;max-height:350px}}";
|
|
5
5
|
|
|
@@ -18,7 +18,7 @@ const ChatAPPModal = class {
|
|
|
18
18
|
*/
|
|
19
19
|
modalTitle = '在线客服';
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* SDK鉴权密钥
|
|
22
22
|
*/
|
|
23
23
|
token = '';
|
|
24
24
|
/**
|
|
@@ -242,7 +242,7 @@ const ChatAPPModal = class {
|
|
|
242
242
|
},
|
|
243
243
|
data: requestData,
|
|
244
244
|
onMessage: (data) => {
|
|
245
|
-
console.log('收到Stream数据:', data);
|
|
245
|
+
// console.log('收到Stream数据:', data);
|
|
246
246
|
if (data.conversation_id && !this.conversationId) {
|
|
247
247
|
this.conversationId = data.conversation_id;
|
|
248
248
|
this.conversationStart.emit({
|
|
@@ -255,7 +255,6 @@ const ChatAPPModal = class {
|
|
|
255
255
|
// 检查是否有 node_finished 事件和 LLMText
|
|
256
256
|
if (data.event === 'node_finished' && data.data.inputs && data.data.inputs.LLMText) {
|
|
257
257
|
llmText = data.data.inputs.LLMText;
|
|
258
|
-
console.log('获取到 LLMText:', llmText);
|
|
259
258
|
}
|
|
260
259
|
if (data.event === 'message') {
|
|
261
260
|
if (data.event === 'agent_message' || data.event === 'message') {
|
|
@@ -971,10 +970,10 @@ const ChatAPPModal = class {
|
|
|
971
970
|
'submit-text-button': true,
|
|
972
971
|
'disabled': !this.textAnswer.trim() || this.isSubmittingText || this.isLoading || !!this.currentStreamingMessage || this.waitingToRecord || this.isPlayingAudio
|
|
973
972
|
}, disabled: !this.textAnswer.trim() || this.isSubmittingText || this.isLoading || !!this.currentStreamingMessage || this.waitingToRecord || this.isPlayingAudio, onClick: this.submitTextAnswer }, this.isSubmittingText ? '发送中...' : '发送'))));
|
|
974
|
-
return (h("div", { class: overlayClass, style: modalStyle }, h("div", { class: containerClass }, this.isShowHeader && (h("div", { class: "modal-header" }, h("div", { class: "header-left" }, this.icon && h("img", { src: this.icon, class: "header-icon", alt: "\u5E94\u7528\u56FE\u6807" }), h("div", null, this.modalTitle)), this.isNeedClose && (h("button", { class: "close-button", onClick: this.handleClose }, h("span", null, "\u00D7"))))), h("div", { style: { height: '100%' } }, h("div", { class: "chat-history", onScroll: this.handleScroll }, this.isLoadingHistory ? (h("div", { class: "loading-container" }, h("div", { class: "loading-spinner" }), h("p", null, "\u52A0\u8F7D\u5386\u53F2\u6D88\u606F\u4E2D..."))) : (h("div", null, this.messages.map((message) => (h("div", { id: `message_${message.id}`, key: message.id }, h("pcm-chat-message", { message: message, onMessageChange: (event) => {
|
|
973
|
+
return (h("div", { class: overlayClass, style: modalStyle }, h("div", { class: containerClass }, this.isShowHeader && (h("div", { class: "modal-header" }, h("div", { class: "header-left" }, this.icon && h("img", { src: this.icon, class: "header-icon", alt: "\u5E94\u7528\u56FE\u6807" }), h("div", null, this.modalTitle)), this.isNeedClose && (h("button", { class: "close-button", onClick: this.handleClose }, h("span", null, "\u00D7"))))), h("div", { style: { height: '100%' } }, h("div", { class: "chat-history", onScroll: this.handleScroll }, this.isLoadingHistory ? (h("div", { class: "loading-container" }, h("div", { class: "loading-spinner" }), h("p", null, "\u52A0\u8F7D\u5386\u53F2\u6D88\u606F\u4E2D..."))) : (h("div", null, this.messages.map((message) => (h("div", { id: `message_${message.id}`, key: message.id }, h("pcm-chat-message", { message: message, token: this.token, onMessageChange: (event) => {
|
|
975
974
|
const updatedMessages = this.messages.map(msg => msg.id === message.id ? { ...msg, ...event.detail } : msg);
|
|
976
975
|
this.messages = updatedMessages;
|
|
977
|
-
} })))), this.currentStreamingMessage && (h("div", { id: `message_${this.currentStreamingMessage.id}` }, h("pcm-chat-message", { message: this.currentStreamingMessage }))), this.messages.length === 0 && !this.currentStreamingMessage && (h("div", { class: "empty-state" }, h("p", null, "\u6B63\u5728\u51C6\u5907\u9762\u8BD5...")))))), h("div", { class: "recording-section" }, h("div", { class: "recording-container" }, this.interviewMode === 'text' && (renderTextInputArea()), this.interviewMode === 'video' && (h("div", { style: { width: '100%', display: 'flex', flexWrap: 'wrap', justifyContent: 'center' } }, h("div", { class: "video-area" }, this.showRecordingUI ? (renderVideoPreview()) : (h("div", { class: "video-preview placeholder" }, renderPlaceholderStatus())), h("div", { class: "progress-container" }, h("div", { class: "progress-bar-container" }, h("div", { class: "progress-bar", style: {
|
|
976
|
+
} })))), this.currentStreamingMessage && (h("div", { id: `message_${this.currentStreamingMessage.id}` }, h("pcm-chat-message", { token: this.token, message: this.currentStreamingMessage }))), this.messages.length === 0 && !this.currentStreamingMessage && (h("div", { class: "empty-state" }, h("p", null, "\u6B63\u5728\u51C6\u5907\u9762\u8BD5...")))))), h("div", { class: "recording-section" }, h("div", { class: "recording-container" }, this.interviewMode === 'text' && (renderTextInputArea()), this.interviewMode === 'video' && (h("div", { style: { width: '100%', display: 'flex', flexWrap: 'wrap', justifyContent: 'center' } }, h("div", { class: "video-area" }, this.showRecordingUI ? (renderVideoPreview()) : (h("div", { class: "video-preview placeholder" }, renderPlaceholderStatus())), h("div", { class: "progress-container" }, h("div", { class: "progress-bar-container" }, h("div", { class: "progress-bar", style: {
|
|
978
977
|
width: `${Math.max(0, this.currentQuestionNumber - 1) / this.totalQuestions * 100}%`
|
|
979
978
|
} })), h("div", { class: "progress-text" }, "\u5DF2\u5B8C\u6210", Math.max(0, this.currentQuestionNumber - 1), "/", this.totalQuestions))), h("div", { class: "recording-controls" }, this.showRecordingUI ? (h("button", { class: "stop-recording-button", onClick: () => this.stopRecording() }, "\u5B8C\u6210\u672C\u9898\u56DE\u7B54")) : (h("div", { class: "waiting-message" }, (() => {
|
|
980
979
|
// 显示播放按钮(当不自动播放且有音频URL时)
|
|
@@ -3613,6 +3612,10 @@ const ChatMessageComponent = class {
|
|
|
3613
3612
|
*/
|
|
3614
3613
|
message;
|
|
3615
3614
|
/**
|
|
3615
|
+
* SDK鉴权密钥
|
|
3616
|
+
*/
|
|
3617
|
+
token = '';
|
|
3618
|
+
/**
|
|
3616
3619
|
* 消息变更事件
|
|
3617
3620
|
*/
|
|
3618
3621
|
messageChange;
|
|
@@ -3713,7 +3716,7 @@ const ChatMessageComponent = class {
|
|
|
3713
3716
|
url: '/sdk/v1/files/presigned-url',
|
|
3714
3717
|
method: 'GET',
|
|
3715
3718
|
headers: {
|
|
3716
|
-
'authorization':
|
|
3719
|
+
'authorization': `Bearer ${this.token}`
|
|
3717
3720
|
},
|
|
3718
3721
|
params: {
|
|
3719
3722
|
cos_key: cosKey
|
|
@@ -3775,7 +3778,7 @@ const ChatMessageComponent = class {
|
|
|
3775
3778
|
})));
|
|
3776
3779
|
}
|
|
3777
3780
|
render() {
|
|
3778
|
-
return (h("div", { key: '
|
|
3781
|
+
return (h("div", { key: 'fd26d8b6c4f13847c987badee00a8add00486f84', class: "message-round" }, this.renderUserMessage(), this.renderAssistantMessage()));
|
|
3779
3782
|
}
|
|
3780
3783
|
};
|
|
3781
3784
|
ChatMessageComponent.style = pcmChatMessageCss;
|
|
@@ -3796,7 +3799,7 @@ const ChatHRModal = class {
|
|
|
3796
3799
|
*/
|
|
3797
3800
|
modalTitle = '在线客服';
|
|
3798
3801
|
/**
|
|
3799
|
-
*
|
|
3802
|
+
* SDK鉴权密钥
|
|
3800
3803
|
*/
|
|
3801
3804
|
token = '';
|
|
3802
3805
|
/**
|
|
@@ -4800,10 +4803,10 @@ const ChatHRModal = class {
|
|
|
4800
4803
|
}, onClick: () => this.handleDimensionSelect(dimension) }, dimension))))), h("button", { class: "submit-button", disabled: (this.requireResume && !this.selectedFile) ||
|
|
4801
4804
|
!this.selectedJobCategory ||
|
|
4802
4805
|
this.selectedDimensions.length === 0 ||
|
|
4803
|
-
(this.requireResume && this.isUploading), onClick: this.handleInitialSubmit }, this.requireResume && this.isUploading ? '上传中...' : '开始面试')), this.requireResume && (h("input", { type: "file", class: "file-input", onChange: this.handleFileChange, accept: ".pdf,.doc,.docx,.txt" })))) : (h("div", { style: { height: '100%' } }, h("div", { class: "chat-history", onScroll: this.handleScroll }, this.isLoadingHistory ? (h("div", { class: "loading-container" }, h("div", { class: "loading-spinner" }), h("p", null, "\u52A0\u8F7D\u5386\u53F2\u6D88\u606F\u4E2D..."))) : (h("div", null, this.messages.map((message) => (h("div", { id: `message_${message.id}`, key: message.id }, h("pcm-chat-message", { message: message, onMessageChange: (event) => {
|
|
4806
|
+
(this.requireResume && this.isUploading), onClick: this.handleInitialSubmit }, this.requireResume && this.isUploading ? '上传中...' : '开始面试')), this.requireResume && (h("input", { type: "file", class: "file-input", onChange: this.handleFileChange, accept: ".pdf,.doc,.docx,.txt" })))) : (h("div", { style: { height: '100%' } }, h("div", { class: "chat-history", onScroll: this.handleScroll }, this.isLoadingHistory ? (h("div", { class: "loading-container" }, h("div", { class: "loading-spinner" }), h("p", null, "\u52A0\u8F7D\u5386\u53F2\u6D88\u606F\u4E2D..."))) : (h("div", null, this.messages.map((message) => (h("div", { id: `message_${message.id}`, key: message.id }, h("pcm-chat-message", { token: this.token, message: message, onMessageChange: (event) => {
|
|
4804
4807
|
const updatedMessages = this.messages.map(msg => msg.id === message.id ? { ...msg, ...event.detail } : msg);
|
|
4805
4808
|
this.messages = updatedMessages;
|
|
4806
|
-
} })))), this.currentStreamingMessage && (h("div", { id: `message_${this.currentStreamingMessage.id}` }, h("pcm-chat-message", { message: this.currentStreamingMessage }))), this.messages.length === 0 && !this.currentStreamingMessage && (h("div", { class: "empty-state" }, h("p", null, "\u8BF7\u4E0A\u4F20\u7B80\u5386\u5F00\u59CB\u9762\u8BD5")))))), h("div", { class: "recording-section" }, h("div", { class: "recording-container" }, h("div", { class: "video-area" }, this.showRecordingUI ? (renderVideoPreview()) : (h("div", { class: "video-preview placeholder" }, renderPlaceholderStatus()))), h("div", { class: "progress-container" }, h("div", { class: "progress-bar-container" }, h("div", { class: "progress-bar", style: {
|
|
4809
|
+
} })))), this.currentStreamingMessage && (h("div", { id: `message_${this.currentStreamingMessage.id}` }, h("pcm-chat-message", { token: this.token, message: this.currentStreamingMessage }))), this.messages.length === 0 && !this.currentStreamingMessage && (h("div", { class: "empty-state" }, h("p", null, "\u8BF7\u4E0A\u4F20\u7B80\u5386\u5F00\u59CB\u9762\u8BD5")))))), h("div", { class: "recording-section" }, h("div", { class: "recording-container" }, h("div", { class: "video-area" }, this.showRecordingUI ? (renderVideoPreview()) : (h("div", { class: "video-preview placeholder" }, renderPlaceholderStatus()))), h("div", { class: "progress-container" }, h("div", { class: "progress-bar-container" }, h("div", { class: "progress-bar", style: {
|
|
4807
4810
|
width: `${Math.max(0, this.currentQuestionNumber - 1) / this.totalQuestions * 100}%`
|
|
4808
4811
|
} })), h("div", { class: "progress-text" }, "\u5DF2\u5B8C\u6210", Math.max(0, this.currentQuestionNumber - 1), "/", this.totalQuestions)), h("div", { class: "recording-controls" }, this.showRecordingUI ? (h("button", { class: "stop-recording-button", onClick: () => this.stopRecording() }, "\u5B8C\u6210\u672C\u9898\u56DE\u7B54")) : (h("div", { class: "waiting-message" }, (() => {
|
|
4809
4812
|
// 显示播放按钮(当不自动播放且有音频URL时)
|
|
@@ -4820,11 +4823,11 @@ const ChatHRModal = class {
|
|
|
4820
4823
|
};
|
|
4821
4824
|
ChatHRModal.style = pcmHrChatModalCss;
|
|
4822
4825
|
|
|
4823
|
-
const
|
|
4826
|
+
const pcmJlppModalCss = ":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:500px;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.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}.pc-layout{width:80%;max-width:500px;min-width:320px}.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);margin-top:40px;height:calc(100% - 40px);max-height:calc(100% - 40px);border-radius:16px 16px 0 0}.modal-container.mobile-layout{width:100%;height:100vh;max-height:100vh;min-height:100vh;border-radius:0;margin:0;display:flex;flex-direction:column}}.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}.file-input{display:none}.chat-modal-container{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column}";
|
|
4824
4827
|
|
|
4825
|
-
const globalCss$2 = ".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;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.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}.pc-layout{width:80%;max-width:500px;min-width:320px}.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);margin-top:40px;height:calc(100% - 40px);max-height:calc(100% - 40px);border-radius:16px 16px 0 0}.modal-container.mobile-layout{width:100%;height:100vh;max-height:100vh;min-height:100vh;border-radius:0;margin:0;display:flex;flex-direction:column}}.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}.upload-area{border:2px dashed #ddd;border-radius:8px;cursor:pointer;transition:all 0.3s ease;margin-bottom:20px;width:100%}.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-placeholder svg{color:#1890ff;margin-bottom:8px}.upload-placeholder p{margin:4px 0}.upload-hint{font-size:0.8rem;color:#999;margin-top:0.5rem}.file-info{display:flex;align-items:center;justify-content:space-between;padding:8px;background:#f9f9f9;border:1px solid #e8e8e8;border-radius:4px}.file-info span{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}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:100%;border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#1890ff;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center;}.submit-button:disabled{background:#ccc;cursor:not-allowed}.submit-button:hover:not(:disabled){background:#40a9ff}.chat-modal-container{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column}";
|
|
4828
|
+
const globalCss$2 = ".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;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.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}.pc-layout{width:80%;max-width:500px;min-width:320px}.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);margin-top:40px;height:calc(100% - 40px);max-height:calc(100% - 40px);border-radius:16px 16px 0 0}.modal-container.mobile-layout{width:100%;height:100vh;max-height:100vh;min-height:100vh;border-radius:0;margin:0;display:flex;flex-direction:column}}.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}.upload-area{border:2px dashed #ddd;border-radius:8px;cursor:pointer;transition:all 0.3s ease;margin-bottom:20px;width:100%}.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-placeholder svg{color:#1890ff;margin-bottom:8px}.upload-placeholder p{margin:4px 0}.upload-hint{font-size:0.8rem;color:#999;margin-top:0.5rem}.file-info{display:flex;align-items:center;justify-content:space-between;padding:8px;background:#f9f9f9;border:1px solid #e8e8e8;border-radius:4px}.file-info span{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}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:100%;border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#1890ff;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center;}.submit-button:disabled{background:#ccc;cursor:not-allowed}.submit-button:hover:not(:disabled){background:#40a9ff}.chat-modal-container{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}";
|
|
4826
4829
|
|
|
4827
|
-
const
|
|
4830
|
+
const JlppModal = class {
|
|
4828
4831
|
constructor(hostRef) {
|
|
4829
4832
|
registerInstance(this, hostRef);
|
|
4830
4833
|
this.modalClosed = createEvent(this, "modalClosed");
|
|
@@ -4832,14 +4835,14 @@ const JlpxModal = class {
|
|
|
4832
4835
|
this.streamComplete = createEvent(this, "streamComplete");
|
|
4833
4836
|
this.conversationStart = createEvent(this, "conversationStart");
|
|
4834
4837
|
this.interviewComplete = createEvent(this, "interviewComplete");
|
|
4835
|
-
this.
|
|
4838
|
+
this.tokenInvalid = createEvent(this, "tokenInvalid");
|
|
4836
4839
|
}
|
|
4837
4840
|
/**
|
|
4838
4841
|
* 模态框标题
|
|
4839
4842
|
*/
|
|
4840
4843
|
modalTitle = '简历剖析助手';
|
|
4841
4844
|
/**
|
|
4842
|
-
*
|
|
4845
|
+
* SDK鉴权密钥
|
|
4843
4846
|
*/
|
|
4844
4847
|
token = '';
|
|
4845
4848
|
/**
|
|
@@ -4899,9 +4902,9 @@ const JlpxModal = class {
|
|
|
4899
4902
|
*/
|
|
4900
4903
|
interviewComplete;
|
|
4901
4904
|
/**
|
|
4902
|
-
*
|
|
4905
|
+
* SDK密钥验证失败事件
|
|
4903
4906
|
*/
|
|
4904
|
-
|
|
4907
|
+
tokenInvalid;
|
|
4905
4908
|
selectedFile = null;
|
|
4906
4909
|
isUploading = false;
|
|
4907
4910
|
uploadedFileInfo = null;
|
|
@@ -4980,12 +4983,12 @@ const JlpxModal = class {
|
|
|
4980
4983
|
}
|
|
4981
4984
|
}
|
|
4982
4985
|
// 使用预设的job_info或用户输入的jobDescription
|
|
4983
|
-
const jobInfo = this.customInputs?.job_info || this.jobDescription;
|
|
4984
|
-
console.log('传递的customInputs:', {
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
});
|
|
4986
|
+
// const jobInfo = this.customInputs?.job_info || this.jobDescription;
|
|
4987
|
+
// console.log('传递的customInputs:', {
|
|
4988
|
+
// ...this.customInputs,
|
|
4989
|
+
// file_url: this.uploadedFileInfo.cos_key,
|
|
4990
|
+
// job_info: jobInfo
|
|
4991
|
+
// });
|
|
4989
4992
|
// 直接显示聊天模态框
|
|
4990
4993
|
this.showChatModal = true;
|
|
4991
4994
|
}
|
|
@@ -5023,7 +5026,7 @@ const JlpxModal = class {
|
|
|
5023
5026
|
*/
|
|
5024
5027
|
async verifyApiKey() {
|
|
5025
5028
|
if (!this.token) {
|
|
5026
|
-
this.
|
|
5029
|
+
this.tokenInvalid.emit();
|
|
5027
5030
|
return;
|
|
5028
5031
|
}
|
|
5029
5032
|
try {
|
|
@@ -5042,7 +5045,7 @@ const JlpxModal = class {
|
|
|
5042
5045
|
catch (error) {
|
|
5043
5046
|
console.error('API密钥验证错误:', error);
|
|
5044
5047
|
// 通知父组件API密钥无效
|
|
5045
|
-
this.
|
|
5048
|
+
this.tokenInvalid.emit();
|
|
5046
5049
|
}
|
|
5047
5050
|
}
|
|
5048
5051
|
componentWillLoad() {
|
|
@@ -5088,7 +5091,7 @@ const JlpxModal = class {
|
|
|
5088
5091
|
return (h("div", { class: overlayClass, style: modalStyle }, h("div", { class: containerClass }, this.isShowHeader && (h("div", { class: "modal-header" }, h("div", { class: "header-left" }, this.icon && h("img", { src: this.icon, class: "header-icon", alt: "\u5E94\u7528\u56FE\u6807" }), h("div", null, this.modalTitle)), this.isNeedClose && (h("button", { class: "close-button", onClick: this.handleClose }, h("span", null, "\u00D7"))))), !this.showChatModal && !this.conversationId && (h("div", { class: "input-container" }, !hideJdInput && (h("div", { class: "jd-input-section" }, h("label", { htmlFor: "job-description" }, "\u8BF7\u8F93\u5165\u804C\u4F4D\u63CF\u8FF0 (JD)"), h("textarea", { id: "job-description", class: "job-description-textarea", placeholder: "\u8BF7\u8F93\u5165\u804C\u4F4D\u63CF\u8FF0\uFF0C\u5305\u62EC\u804C\u8D23\u3001\u8981\u6C42\u7B49\u4FE1\u606F...", rows: 6, value: this.jobDescription, onInput: this.handleJobDescriptionChange }))), h("div", { class: "resume-upload-section" }, h("label", null, "\u4E0A\u4F20\u7B80\u5386"), h("div", { class: "upload-area", onClick: this.handleUploadClick }, this.selectedFile ? (h("div", { class: "file-info" }, h("span", null, this.selectedFile.name), h("button", { class: "remove-file", onClick: (e) => {
|
|
5089
5092
|
e.stopPropagation();
|
|
5090
5093
|
this.clearSelectedFile();
|
|
5091
|
-
} }, "\u00D7"))) : (h("div", { class: "upload-placeholder" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", width: "48", height: "48" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M12 4v16m0-16l-4 4m4-4l4 4" })), h("p", null, "\u70B9\u51FB\u4E0A\u4F20\u7B80\u5386"), h("p", { class: "upload-hint" }, "\u652F\u6301 txt\u3001markdown\u3001pdf\u3001docx\u3001md \u683C\u5F0F"))))), h("button", { class: "submit-button", disabled: !this.selectedFile || (!hideJdInput && !this.jobDescription.trim()) || this.isUploading || this.isSubmitting, onClick: this.handleStartAnalysis }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始分析'), h("input", { type: "file", class: "file-input", onChange: this.handleFileChange
|
|
5094
|
+
} }, "\u00D7"))) : (h("div", { class: "upload-placeholder" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", width: "48", height: "48" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M12 4v16m0-16l-4 4m4-4l4 4" })), h("p", null, "\u70B9\u51FB\u4E0A\u4F20\u7B80\u5386"), h("p", { class: "upload-hint" }, "\u652F\u6301 txt\u3001markdown\u3001pdf\u3001docx\u3001doc\u3001md \u683C\u5F0F"))))), h("button", { class: "submit-button", disabled: !this.selectedFile || (!hideJdInput && !this.jobDescription.trim()) || this.isUploading || this.isSubmitting, onClick: this.handleStartAnalysis }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始分析'), h("div", { class: "ai-disclaimer" }, h("p", null, "\u6240\u6709\u5185\u5BB9\u5747\u7531AI\u751F\u6210\u4EC5\u4F9B\u53C2\u8003"), h("p", { class: "beian-info" }, h("span", null, "\u4E2D\u592E\u7F51\u4FE1\u529E\u751F\u6210\u5F0F\u4EBA\u5DE5\u667A\u80FD\u670D\u52A1\u5907\u6848\u53F7"), "\uFF1A", h("a", { href: "https://www.pincaimao.com", target: "_blank", rel: "noopener noreferrer" }, "Hunan-PinCaiMao-202412310003"))), h("input", { type: "file", class: "file-input", onChange: this.handleFileChange }))), this.showChatModal && (h("div", { class: "chat-modal-container" }, h("pcm-app-chat-modal", { isOpen: true, modalTitle: this.modalTitle, icon: this.icon, token: this.token, isShowHeader: this.isShowHeader, isNeedClose: this.isShowHeader, zIndex: this.zIndex, fullscreen: this.fullscreen, conversationId: this.conversationId, defaultQuery: this.defaultQuery, enableTTS: false, enableVoice: false, botId: "3022316191018881", customInputs: this.conversationId ? undefined : {
|
|
5092
5095
|
...this.customInputs,
|
|
5093
5096
|
file_url: this.uploadedFileInfo?.cos_key,
|
|
5094
5097
|
job_info: this.customInputs?.job_info || this.jobDescription
|
|
@@ -5098,11 +5101,11 @@ const JlpxModal = class {
|
|
|
5098
5101
|
"isOpen": ["handleIsOpenChange"]
|
|
5099
5102
|
}; }
|
|
5100
5103
|
};
|
|
5101
|
-
|
|
5104
|
+
JlppModal.style = pcmJlppModalCss + globalCss$2;
|
|
5102
5105
|
|
|
5103
5106
|
const pcmMnmsModalCss = ":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:500px;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.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}.pc-layout{width:80%;max-width:500px;min-width:320px}.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);margin-top:40px;height:calc(100% - 40px);max-height:calc(100% - 40px);border-radius:16px 16px 0 0}.modal-container.mobile-layout{width:100%;height:100vh;max-height:100vh;min-height:100vh;border-radius:0;margin:0;display:flex;flex-direction:column}}.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}.upload-container{padding:30px 20px;display:flex;flex-direction:column;align-items:center;text-align:center;height:calc(100% - 60px);transition:opacity 0.5s ease-out}.upload-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333}.submit-button{max-width:400px}.file-input{display:none}.transitioning{position:relative;overflow:hidden}.fade-out{opacity:0.7;transition:opacity 0.5s ease-out}.transition-container{margin-top:20px;width:100%}.progress-bar{width:100%;height:6px;background-color:#f0f0f0;border-radius:3px;overflow:hidden;margin-bottom:10px}.progress-fill{height:100%;background-color:#4285f4;transition:width 0.3s ease-out}.upload-container.fade-out{opacity:0;transform:translateY(-20px);transition:opacity 0.3s ease, transform 0.3s ease}.chat-modal-container{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column}.modal-container{position:relative;overflow:hidden}";
|
|
5104
5107
|
|
|
5105
|
-
const globalCss$1 = ".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;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.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}.pc-layout{width:80%;max-width:500px;min-width:320px}.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);margin-top:40px;height:calc(100% - 40px);max-height:calc(100% - 40px);border-radius:16px 16px 0 0}.modal-container.mobile-layout{width:100%;height:100vh;max-height:100vh;min-height:100vh;border-radius:0;margin:0;display:flex;flex-direction:column}}.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}.upload-area{border:2px dashed #ddd;border-radius:8px;cursor:pointer;transition:all 0.3s ease;margin-bottom:20px;width:100%}.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-placeholder svg{color:#1890ff;margin-bottom:8px}.upload-placeholder p{margin:4px 0}.upload-hint{font-size:0.8rem;color:#999;margin-top:0.5rem}.file-info{display:flex;align-items:center;justify-content:space-between;padding:8px;background:#f9f9f9;border:1px solid #e8e8e8;border-radius:4px}.file-info span{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}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:100%;border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#1890ff;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center;}.submit-button:disabled{background:#ccc;cursor:not-allowed}.submit-button:hover:not(:disabled){background:#40a9ff}.chat-modal-container{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column}";
|
|
5108
|
+
const globalCss$1 = ".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;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.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}.pc-layout{width:80%;max-width:500px;min-width:320px}.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);margin-top:40px;height:calc(100% - 40px);max-height:calc(100% - 40px);border-radius:16px 16px 0 0}.modal-container.mobile-layout{width:100%;height:100vh;max-height:100vh;min-height:100vh;border-radius:0;margin:0;display:flex;flex-direction:column}}.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}.upload-area{border:2px dashed #ddd;border-radius:8px;cursor:pointer;transition:all 0.3s ease;margin-bottom:20px;width:100%}.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-placeholder svg{color:#1890ff;margin-bottom:8px}.upload-placeholder p{margin:4px 0}.upload-hint{font-size:0.8rem;color:#999;margin-top:0.5rem}.file-info{display:flex;align-items:center;justify-content:space-between;padding:8px;background:#f9f9f9;border:1px solid #e8e8e8;border-radius:4px}.file-info span{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}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:100%;border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#1890ff;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center;}.submit-button:disabled{background:#ccc;cursor:not-allowed}.submit-button:hover:not(:disabled){background:#40a9ff}.chat-modal-container{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}";
|
|
5106
5109
|
|
|
5107
5110
|
const MnmsModal = class {
|
|
5108
5111
|
constructor(hostRef) {
|
|
@@ -5112,14 +5115,14 @@ const MnmsModal = class {
|
|
|
5112
5115
|
this.streamComplete = createEvent(this, "streamComplete");
|
|
5113
5116
|
this.conversationStart = createEvent(this, "conversationStart");
|
|
5114
5117
|
this.interviewComplete = createEvent(this, "interviewComplete");
|
|
5115
|
-
this.
|
|
5118
|
+
this.tokenInvalid = createEvent(this, "tokenInvalid");
|
|
5116
5119
|
}
|
|
5117
5120
|
/**
|
|
5118
5121
|
* 模态框标题
|
|
5119
5122
|
*/
|
|
5120
5123
|
modalTitle = '模拟面试';
|
|
5121
5124
|
/**
|
|
5122
|
-
*
|
|
5125
|
+
* SDK鉴权密钥
|
|
5123
5126
|
*/
|
|
5124
5127
|
token = '';
|
|
5125
5128
|
/**
|
|
@@ -5179,9 +5182,9 @@ const MnmsModal = class {
|
|
|
5179
5182
|
*/
|
|
5180
5183
|
interviewComplete;
|
|
5181
5184
|
/**
|
|
5182
|
-
*
|
|
5185
|
+
* SDK密钥验证失败事件
|
|
5183
5186
|
*/
|
|
5184
|
-
|
|
5187
|
+
tokenInvalid;
|
|
5185
5188
|
selectedFile = null;
|
|
5186
5189
|
isUploading = false;
|
|
5187
5190
|
uploadedFileInfo = null;
|
|
@@ -5260,12 +5263,12 @@ const MnmsModal = class {
|
|
|
5260
5263
|
}
|
|
5261
5264
|
}
|
|
5262
5265
|
// 使用预设的job_info或用户输入的jobDescription
|
|
5263
|
-
const jobInfo = this.customInputs?.job_info || this.jobDescription;
|
|
5264
|
-
console.log('传递的customInputs:', {
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
});
|
|
5266
|
+
// const jobInfo = this.customInputs?.job_info || this.jobDescription;
|
|
5267
|
+
// console.log('传递的customInputs:', {
|
|
5268
|
+
// ...this.customInputs,
|
|
5269
|
+
// file_url: this.uploadedFileInfo.cos_key,
|
|
5270
|
+
// job_info: jobInfo
|
|
5271
|
+
// });
|
|
5269
5272
|
// 直接显示聊天模态框
|
|
5270
5273
|
this.showChatModal = true;
|
|
5271
5274
|
}
|
|
@@ -5322,7 +5325,7 @@ const MnmsModal = class {
|
|
|
5322
5325
|
*/
|
|
5323
5326
|
async verifyApiKey() {
|
|
5324
5327
|
if (!this.token) {
|
|
5325
|
-
this.
|
|
5328
|
+
this.tokenInvalid.emit();
|
|
5326
5329
|
return;
|
|
5327
5330
|
}
|
|
5328
5331
|
try {
|
|
@@ -5341,7 +5344,7 @@ const MnmsModal = class {
|
|
|
5341
5344
|
catch (error) {
|
|
5342
5345
|
console.error('API密钥验证错误:', error);
|
|
5343
5346
|
// 通知父组件API密钥无效
|
|
5344
|
-
this.
|
|
5347
|
+
this.tokenInvalid.emit();
|
|
5345
5348
|
}
|
|
5346
5349
|
}
|
|
5347
5350
|
render() {
|
|
@@ -5369,7 +5372,7 @@ const MnmsModal = class {
|
|
|
5369
5372
|
return (h("div", { class: overlayClass, style: modalStyle }, h("div", { class: containerClass }, this.isShowHeader && (h("div", { class: "modal-header" }, h("div", { class: "header-left" }, this.icon && h("img", { src: this.icon, class: "header-icon", alt: "\u5E94\u7528\u56FE\u6807" }), h("div", null, this.modalTitle)), this.isNeedClose && (h("button", { class: "close-button", onClick: this.handleClose }, h("span", null, "\u00D7"))))), !this.showChatModal && !this.conversationId && (h("div", { class: "input-container" }, !hideJdInput && (h("div", { class: "jd-input-section" }, h("label", { htmlFor: "job-description" }, "\u8BF7\u8F93\u5165\u804C\u4F4D\u63CF\u8FF0 (JD)"), h("textarea", { id: "job-description", class: "job-description-textarea", placeholder: "\u8BF7\u8F93\u5165\u804C\u4F4D\u63CF\u8FF0\uFF0C\u5305\u62EC\u804C\u8D23\u3001\u8981\u6C42\u7B49\u4FE1\u606F...", rows: 6, value: this.jobDescription, onInput: this.handleJobDescriptionChange }))), h("div", { class: "resume-upload-section" }, h("label", null, "\u4E0A\u4F20\u7B80\u5386"), h("div", { class: "upload-area", onClick: this.handleUploadClick }, this.selectedFile ? (h("div", { class: "file-info" }, h("span", null, this.selectedFile.name), h("button", { class: "remove-file", onClick: (e) => {
|
|
5370
5373
|
e.stopPropagation();
|
|
5371
5374
|
this.clearSelectedFile();
|
|
5372
|
-
} }, "\u00D7"))) : (h("div", { class: "upload-placeholder" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", width: "48", height: "48" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M12 4v16m0-16l-4 4m4-4l4 4" })), h("p", null, "\u70B9\u51FB\u4E0A\u4F20\u7B80\u5386"), h("p", { class: "upload-hint" }, "\u652F\u6301 txt\u3001markdown\u3001pdf\u3001docx\u3001md \u683C\u5F0F"))))), h("button", { class: "submit-button", disabled: !this.selectedFile || (!hideJdInput && !this.jobDescription.trim()) || this.isUploading || this.isSubmitting, onClick: this.handleStartInterview }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始分析'), h("input", { type: "file", class: "file-input", onChange: this.handleFileChange
|
|
5375
|
+
} }, "\u00D7"))) : (h("div", { class: "upload-placeholder" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", width: "48", height: "48" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M12 4v16m0-16l-4 4m4-4l4 4" })), h("p", null, "\u70B9\u51FB\u4E0A\u4F20\u7B80\u5386"), h("p", { class: "upload-hint" }, "\u652F\u6301 txt\u3001markdown\u3001pdf\u3001docx\u3001doc\u3001md \u683C\u5F0F"))))), h("button", { class: "submit-button", disabled: !this.selectedFile || (!hideJdInput && !this.jobDescription.trim()) || this.isUploading || this.isSubmitting, onClick: this.handleStartInterview }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始分析'), h("div", { class: "ai-disclaimer" }, h("p", null, "\u6240\u6709\u5185\u5BB9\u5747\u7531AI\u751F\u6210\u4EC5\u4F9B\u53C2\u8003"), h("p", { class: "beian-info" }, h("span", null, "\u4E2D\u592E\u7F51\u4FE1\u529E\u751F\u6210\u5F0F\u4EBA\u5DE5\u667A\u80FD\u670D\u52A1\u5907\u6848\u53F7"), "\uFF1A", h("a", { href: "https://www.pincaimao.com", target: "_blank", rel: "noopener noreferrer" }, "Hunan-PinCaiMao-202412310003"))), h("input", { type: "file", class: "file-input", onChange: this.handleFileChange }))), this.showChatModal && (h("div", { class: "chat-modal-container" }, h("pcm-app-chat-modal", { isOpen: true, modalTitle: this.modalTitle, icon: this.icon, token: this.token, isShowHeader: this.isShowHeader, isNeedClose: this.isShowHeader, zIndex: this.zIndex, fullscreen: this.fullscreen, botId: "3022316191018884", conversationId: this.conversationId, defaultQuery: this.defaultQuery, enableVoice: false, customInputs: this.conversationId ? undefined : {
|
|
5373
5376
|
...this.customInputs,
|
|
5374
5377
|
file_url: this.uploadedFileInfo?.cos_key,
|
|
5375
5378
|
job_info: this.customInputs?.job_info || this.jobDescription
|
|
@@ -5397,7 +5400,7 @@ const VideoChatModal = class {
|
|
|
5397
5400
|
*/
|
|
5398
5401
|
modalTitle = '在线客服';
|
|
5399
5402
|
/**
|
|
5400
|
-
*
|
|
5403
|
+
* SDK鉴权密钥
|
|
5401
5404
|
*/
|
|
5402
5405
|
token = '';
|
|
5403
5406
|
/**
|
|
@@ -6255,10 +6258,10 @@ const VideoChatModal = class {
|
|
|
6255
6258
|
// 添加默认状态
|
|
6256
6259
|
return (h("div", { class: "placeholder-status default-status" }, h("p", null, "\u51C6\u5907\u4E2D...")));
|
|
6257
6260
|
};
|
|
6258
|
-
return (h("div", { class: overlayClass, style: modalStyle }, h("div", { class: containerClass }, this.isShowHeader && (h("div", { class: "modal-header" }, h("div", { class: "header-left" }, this.icon && h("img", { src: this.icon, class: "header-icon", alt: "\u5E94\u7528\u56FE\u6807" }), h("div", null, this.modalTitle)), this.isNeedClose && (h("button", { class: "close-button", onClick: this.handleClose }, h("span", null, "\u00D7"))))), h("div", { style: { height: '100%' } }, h("div", { class: "chat-history", onScroll: this.handleScroll }, this.isLoadingHistory ? (h("div", { class: "loading-container" }, h("div", { class: "loading-spinner" }), h("p", null, "\u52A0\u8F7D\u5386\u53F2\u6D88\u606F\u4E2D..."))) : (h("div", null, this.messages.map((message) => (h("div", { id: `message_${message.id}`, key: message.id }, h("pcm-chat-message", { message: message, onMessageChange: (event) => {
|
|
6261
|
+
return (h("div", { class: overlayClass, style: modalStyle }, h("div", { class: containerClass }, this.isShowHeader && (h("div", { class: "modal-header" }, h("div", { class: "header-left" }, this.icon && h("img", { src: this.icon, class: "header-icon", alt: "\u5E94\u7528\u56FE\u6807" }), h("div", null, this.modalTitle)), this.isNeedClose && (h("button", { class: "close-button", onClick: this.handleClose }, h("span", null, "\u00D7"))))), h("div", { style: { height: '100%' } }, h("div", { class: "chat-history", onScroll: this.handleScroll }, this.isLoadingHistory ? (h("div", { class: "loading-container" }, h("div", { class: "loading-spinner" }), h("p", null, "\u52A0\u8F7D\u5386\u53F2\u6D88\u606F\u4E2D..."))) : (h("div", null, this.messages.map((message) => (h("div", { id: `message_${message.id}`, key: message.id }, h("pcm-chat-message", { token: this.token, message: message, onMessageChange: (event) => {
|
|
6259
6262
|
const updatedMessages = this.messages.map(msg => msg.id === message.id ? { ...msg, ...event.detail } : msg);
|
|
6260
6263
|
this.messages = updatedMessages;
|
|
6261
|
-
} })))), this.currentStreamingMessage && (h("div", { id: `message_${this.currentStreamingMessage.id}` }, h("pcm-chat-message", { message: this.currentStreamingMessage })))))), h("div", { class: "recording-section" }, h("div", { class: "recording-container" }, h("div", { class: "video-area" }, this.showRecordingUI ? (renderVideoPreview()) : (h("div", { class: "video-preview placeholder" }, renderPlaceholderStatus()))), h("div", { class: "progress-container" }, h("div", { class: "progress-bar-container" }, h("div", { class: "progress-bar", style: {
|
|
6264
|
+
} })))), this.currentStreamingMessage && (h("div", { id: `message_${this.currentStreamingMessage.id}` }, h("pcm-chat-message", { token: this.token, message: this.currentStreamingMessage })))))), h("div", { class: "recording-section" }, h("div", { class: "recording-container" }, h("div", { class: "video-area" }, this.showRecordingUI ? (renderVideoPreview()) : (h("div", { class: "video-preview placeholder" }, renderPlaceholderStatus()))), h("div", { class: "progress-container" }, h("div", { class: "progress-bar-container" }, h("div", { class: "progress-bar", style: {
|
|
6262
6265
|
width: `${Math.max(0, this.currentQuestionNumber - 1) / this.totalQuestions * 100}%`
|
|
6263
6266
|
} })), h("div", { class: "progress-text" }, "\u5DF2\u5B8C\u6210", Math.max(0, this.currentQuestionNumber - 1), "/", this.totalQuestions)), h("div", { class: "recording-controls" }, this.showRecordingUI ? (h("button", { class: "stop-recording-button", onClick: () => this.stopRecording() }, "\u5B8C\u6210\u672C\u9898\u56DE\u7B54")) : (h("div", { class: "waiting-message" }, (() => {
|
|
6264
6267
|
// 显示播放按钮(当不自动播放且有音频URL时)
|
|
@@ -6277,7 +6280,7 @@ VideoChatModal.style = pcmVideoChatModalCss;
|
|
|
6277
6280
|
|
|
6278
6281
|
const pcmZyghModalCss = ".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;z-index:1000}.fullscreen-overlay{background-color:rgba(0, 0, 0, 0.7)}.modal-container{background-color:#fff;border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);width:90%;max-width:800px;max-height:90vh;display:flex;flex-direction:column;overflow:hidden}.fullscreen{width:100%;height:100%;max-width:100%;max-height:100%;border-radius:0}.pc-layout{width:90%;max-width:800px;max-height:90vh}.mobile-layout{width:100%;height:100%;max-width:100%;max-height:100%;border-radius:0}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid #f0f0f0;background-color:#fff}.header-left{display:flex;align-items:center;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px;margin-right:8px;border-radius:4px}.close-button{background:none;border:none;font-size:20px;cursor:pointer;color:#999;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;transition:background-color 0.3s}.close-button:hover{background-color:#f5f5f5;color:#666}.input-container{padding:20px;overflow-y:auto;flex:1;display:flex;flex-direction:column;gap:20px}.plan-type-section{display:flex;flex-direction:column;gap:10px}.plan-type-section label{font-weight:600;color:#333;margin-bottom:8px}.plan-type-options{display:flex;gap:15px;flex-wrap:wrap}.plan-type-option{flex:1;min-width:120px;border:1px solid #e8e8e8;border-radius:8px;padding:15px;cursor:pointer;display:flex;flex-direction:column;align-items:center;transition:all 0.3s}.plan-type-option:hover{border-color:#1890ff;background-color:#f0f7ff}.plan-type-option.selected{border-color:#1890ff;background-color:#e6f7ff;box-shadow:0 2px 8px rgba(24, 144, 255, 0.2)}.option-icon{font-size:24px;margin-bottom:8px}.option-label{font-size:14px;font-weight:500;color:#333}.resume-upload-section{display:flex;flex-direction:column;gap:8px}.resume-upload-section label{font-weight:600;color:#333}.upload-area{border:2px dashed #d9d9d9;border-radius:4px;text-align:center;cursor:pointer;transition:border-color 0.3s, background-color 0.3s}.upload-area:hover{border-color:#1890ff;background-color:#f0f7ff}.upload-placeholder{display:flex;flex-direction:column;align-items:center;color:#666}.upload-placeholder svg{color:#1890ff;margin-bottom:8px}.upload-placeholder p{margin:4px 0}.upload-hint{font-size:12px;color:#999}.file-info{display:flex;align-items:center;justify-content:space-between;background-color:#f5f5f5;padding:8px 12px;border-radius:4px}.file-info span{flex:1;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;word-break:break-word;margin-right:8px;max-width:calc(100% - 32px);line-height:1.4}.remove-file{flex-shrink:0;background:none;border:none;color:#ff4d4f;cursor:pointer;font-size:16px;padding:4px 8px;border-radius:50%;transition:background-color 0.3s}.remove-file:hover{background-color:#fff1f0}.file-input{display:none}.submit-button{background-color:#1890ff;color:white;border:none;border-radius:4px;padding:12px 20px;font-size:16px;font-weight:500;cursor:pointer;transition:background-color 0.3s;margin-top:10px}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:#d9d9d9;cursor:not-allowed}.chat-modal-container{flex:1;display:flex;flex-direction:column;overflow:hidden}";
|
|
6279
6282
|
|
|
6280
|
-
const globalCss = ".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;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.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}.pc-layout{width:80%;max-width:500px;min-width:320px}.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);margin-top:40px;height:calc(100% - 40px);max-height:calc(100% - 40px);border-radius:16px 16px 0 0}.modal-container.mobile-layout{width:100%;height:100vh;max-height:100vh;min-height:100vh;border-radius:0;margin:0;display:flex;flex-direction:column}}.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}.upload-area{border:2px dashed #ddd;border-radius:8px;cursor:pointer;transition:all 0.3s ease;margin-bottom:20px;width:100%}.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-placeholder svg{color:#1890ff;margin-bottom:8px}.upload-placeholder p{margin:4px 0}.upload-hint{font-size:0.8rem;color:#999;margin-top:0.5rem}.file-info{display:flex;align-items:center;justify-content:space-between;padding:8px;background:#f9f9f9;border:1px solid #e8e8e8;border-radius:4px}.file-info span{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}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:100%;border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#1890ff;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center;}.submit-button:disabled{background:#ccc;cursor:not-allowed}.submit-button:hover:not(:disabled){background:#40a9ff}.chat-modal-container{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column}";
|
|
6283
|
+
const globalCss = ".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;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.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}.pc-layout{width:80%;max-width:500px;min-width:320px}.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);margin-top:40px;height:calc(100% - 40px);max-height:calc(100% - 40px);border-radius:16px 16px 0 0}.modal-container.mobile-layout{width:100%;height:100vh;max-height:100vh;min-height:100vh;border-radius:0;margin:0;display:flex;flex-direction:column}}.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}.upload-area{border:2px dashed #ddd;border-radius:8px;cursor:pointer;transition:all 0.3s ease;margin-bottom:20px;width:100%}.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-placeholder svg{color:#1890ff;margin-bottom:8px}.upload-placeholder p{margin:4px 0}.upload-hint{font-size:0.8rem;color:#999;margin-top:0.5rem}.file-info{display:flex;align-items:center;justify-content:space-between;padding:8px;background:#f9f9f9;border:1px solid #e8e8e8;border-radius:4px}.file-info span{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}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:100%;border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#1890ff;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center;}.submit-button:disabled{background:#ccc;cursor:not-allowed}.submit-button:hover:not(:disabled){background:#40a9ff}.chat-modal-container{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}";
|
|
6281
6284
|
|
|
6282
6285
|
const ZyghModal = class {
|
|
6283
6286
|
constructor(hostRef) {
|
|
@@ -6287,14 +6290,14 @@ const ZyghModal = class {
|
|
|
6287
6290
|
this.streamComplete = createEvent(this, "streamComplete");
|
|
6288
6291
|
this.conversationStart = createEvent(this, "conversationStart");
|
|
6289
6292
|
this.planningComplete = createEvent(this, "planningComplete");
|
|
6290
|
-
this.
|
|
6293
|
+
this.tokenInvalid = createEvent(this, "tokenInvalid");
|
|
6291
6294
|
}
|
|
6292
6295
|
/**
|
|
6293
6296
|
* 模态框标题
|
|
6294
6297
|
*/
|
|
6295
6298
|
modalTitle = '职业规划助手';
|
|
6296
6299
|
/**
|
|
6297
|
-
*
|
|
6300
|
+
* SDK鉴权密钥
|
|
6298
6301
|
*/
|
|
6299
6302
|
token = '';
|
|
6300
6303
|
/**
|
|
@@ -6334,7 +6337,11 @@ const ZyghModal = class {
|
|
|
6334
6337
|
*/
|
|
6335
6338
|
fullscreen = false;
|
|
6336
6339
|
/**
|
|
6337
|
-
*
|
|
6340
|
+
* 自定义输入参数,传入plan_type则可以指定规划类型,可传入"长期规划"、"转行建议"、"晋升路径"
|
|
6341
|
+
* 例如:
|
|
6342
|
+
* zyghModal.customInputs = {
|
|
6343
|
+
* plan_type: "转行建议"
|
|
6344
|
+
* };
|
|
6338
6345
|
*/
|
|
6339
6346
|
customInputs = {};
|
|
6340
6347
|
/**
|
|
@@ -6354,9 +6361,9 @@ const ZyghModal = class {
|
|
|
6354
6361
|
*/
|
|
6355
6362
|
planningComplete;
|
|
6356
6363
|
/**
|
|
6357
|
-
*
|
|
6364
|
+
* SDK密钥验证失败事件
|
|
6358
6365
|
*/
|
|
6359
|
-
|
|
6366
|
+
tokenInvalid;
|
|
6360
6367
|
selectedFile = null;
|
|
6361
6368
|
isUploading = false;
|
|
6362
6369
|
uploadedFileInfo = null;
|
|
@@ -6427,11 +6434,11 @@ const ZyghModal = class {
|
|
|
6427
6434
|
return; // 上传失败
|
|
6428
6435
|
}
|
|
6429
6436
|
}
|
|
6430
|
-
console.log('传递的customInputs:', {
|
|
6431
|
-
|
|
6432
|
-
|
|
6433
|
-
|
|
6434
|
-
});
|
|
6437
|
+
// console.log('传递的customInputs:', {
|
|
6438
|
+
// ...this.customInputs,
|
|
6439
|
+
// file_url: this.uploadedFileInfo.cos_key,
|
|
6440
|
+
// plan_type: this.selectedPlanType
|
|
6441
|
+
// });
|
|
6435
6442
|
// 直接显示聊天模态框
|
|
6436
6443
|
this.showChatModal = true;
|
|
6437
6444
|
}
|
|
@@ -6468,7 +6475,7 @@ const ZyghModal = class {
|
|
|
6468
6475
|
*/
|
|
6469
6476
|
async verifyApiKey() {
|
|
6470
6477
|
if (!this.token) {
|
|
6471
|
-
this.
|
|
6478
|
+
this.tokenInvalid.emit();
|
|
6472
6479
|
return;
|
|
6473
6480
|
}
|
|
6474
6481
|
try {
|
|
@@ -6487,7 +6494,7 @@ const ZyghModal = class {
|
|
|
6487
6494
|
catch (error) {
|
|
6488
6495
|
console.error('API密钥验证错误:', error);
|
|
6489
6496
|
// 通知父组件API密钥无效
|
|
6490
|
-
this.
|
|
6497
|
+
this.tokenInvalid.emit();
|
|
6491
6498
|
}
|
|
6492
6499
|
}
|
|
6493
6500
|
componentWillLoad() {
|
|
@@ -6534,7 +6541,7 @@ const ZyghModal = class {
|
|
|
6534
6541
|
return (h("div", { class: overlayClass, style: modalStyle }, h("div", { class: containerClass }, this.isShowHeader && (h("div", { class: "modal-header" }, h("div", { class: "header-left" }, this.icon && h("img", { src: this.icon, class: "header-icon", alt: "\u5E94\u7528\u56FE\u6807" }), h("div", null, this.modalTitle)), this.isNeedClose && (h("button", { class: "close-button", onClick: this.handleClose }, h("span", null, "\u00D7"))))), !this.showChatModal && !this.conversationId && (h("div", { class: "input-container" }, h("div", { class: "plan-type-section" }, h("label", null, "\u9009\u62E9\u89C4\u5212\u7C7B\u578B"), h("div", { class: "plan-type-options" }, h("div", { class: `plan-type-option ${this.selectedPlanType === '长期规划' ? 'selected' : ''}`, onClick: () => this.handlePlanTypeChange('长期规划') }, h("div", { class: "option-icon" }, "\uD83D\uDCC8"), h("div", { class: "option-label" }, "\u957F\u671F\u89C4\u5212")), h("div", { class: `plan-type-option ${this.selectedPlanType === '转行建议' ? 'selected' : ''}`, onClick: () => this.handlePlanTypeChange('转行建议') }, h("div", { class: "option-icon" }, "\uD83D\uDD04"), h("div", { class: "option-label" }, "\u8F6C\u884C\u5EFA\u8BAE")), h("div", { class: `plan-type-option ${this.selectedPlanType === '晋升路径' ? 'selected' : ''}`, onClick: () => this.handlePlanTypeChange('晋升路径') }, h("div", { class: "option-icon" }, "\uD83D\uDE80"), h("div", { class: "option-label" }, "\u664B\u5347\u8DEF\u5F84")))), h("div", { class: "resume-upload-section" }, h("label", null, "\u4E0A\u4F20\u7B80\u5386"), h("div", { class: "upload-area", onClick: this.handleUploadClick }, this.selectedFile ? (h("div", { class: "file-info" }, h("span", null, this.selectedFile.name), h("button", { class: "remove-file", onClick: (e) => {
|
|
6535
6542
|
e.stopPropagation();
|
|
6536
6543
|
this.clearSelectedFile();
|
|
6537
|
-
} }, "\u00D7"))) : (h("div", { class: "upload-placeholder" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", width: "48", height: "48" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M12 4v16m0-16l-4 4m4-4l4 4" })), h("p", null, "\u70B9\u51FB\u4E0A\u4F20\u7B80\u5386"), h("p", { class: "upload-hint" }, "\u652F\u6301 txt\u3001markdown\u3001pdf\u3001docx\u3001md \u683C\u5F0F"))))), h("button", { class: "submit-button", disabled: !this.selectedFile || this.isUploading || this.isSubmitting, onClick: this.handleStartPlanning }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始规划'), h("input", { type: "file", class: "file-input", onChange: this.handleFileChange
|
|
6544
|
+
} }, "\u00D7"))) : (h("div", { class: "upload-placeholder" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", width: "48", height: "48" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M12 4v16m0-16l-4 4m4-4l4 4" })), h("p", null, "\u70B9\u51FB\u4E0A\u4F20\u7B80\u5386"), h("p", { class: "upload-hint" }, "\u652F\u6301 txt\u3001markdown\u3001pdf\u3001docx\u3001doc\u3001md \u683C\u5F0F"))))), h("button", { class: "submit-button", disabled: !this.selectedFile || this.isUploading || this.isSubmitting, onClick: this.handleStartPlanning }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始规划'), h("div", { class: "ai-disclaimer" }, h("p", null, "\u6240\u6709\u5185\u5BB9\u5747\u7531AI\u751F\u6210\u4EC5\u4F9B\u53C2\u8003"), h("p", { class: "beian-info" }, h("span", null, "\u4E2D\u592E\u7F51\u4FE1\u529E\u751F\u6210\u5F0F\u4EBA\u5DE5\u667A\u80FD\u670D\u52A1\u5907\u6848\u53F7"), "\uFF1A", h("a", { href: "https://www.pincaimao.com", target: "_blank", rel: "noopener noreferrer" }, "Hunan-PinCaiMao-202412310003"))), h("input", { type: "file", class: "file-input", onChange: this.handleFileChange }))), this.showChatModal && (h("div", { class: "chat-modal-container" }, h("pcm-app-chat-modal", { isOpen: true, modalTitle: this.modalTitle, icon: this.icon, token: this.token, isShowHeader: this.isShowHeader, isNeedClose: this.isShowHeader, zIndex: this.zIndex, botId: "3022316191018898", fullscreen: this.fullscreen, conversationId: this.conversationId, defaultQuery: this.defaultQuery, enableVoice: false, customInputs: this.conversationId ? undefined : {
|
|
6538
6545
|
...this.customInputs,
|
|
6539
6546
|
file_url: this.uploadedFileInfo?.cos_key,
|
|
6540
6547
|
type: this.selectedPlanType
|
|
@@ -6546,7 +6553,7 @@ const ZyghModal = class {
|
|
|
6546
6553
|
};
|
|
6547
6554
|
ZyghModal.style = pcmZyghModalCss + globalCss;
|
|
6548
6555
|
|
|
6549
|
-
export { ChatAPPModal as pcm_app_chat_modal, ChatMessageComponent as pcm_chat_message, ChatHRModal as pcm_hr_chat_modal,
|
|
6550
|
-
//# sourceMappingURL=pcm-app-chat-modal.pcm-chat-message.pcm-hr-chat-modal.pcm-
|
|
6556
|
+
export { ChatAPPModal as pcm_app_chat_modal, ChatMessageComponent as pcm_chat_message, ChatHRModal as pcm_hr_chat_modal, JlppModal as pcm_jlpp_modal, MnmsModal as pcm_mnms_modal, VideoChatModal as pcm_video_chat_modal, ZyghModal as pcm_zygh_modal };
|
|
6557
|
+
//# sourceMappingURL=pcm-app-chat-modal.pcm-chat-message.pcm-hr-chat-modal.pcm-jlpp-modal.pcm-mnms-modal.pcm-video-chat-modal.pcm-zygh-modal.entry.js.map
|
|
6551
6558
|
|
|
6552
6559
|
//# sourceMappingURL=pcm-app-chat-modal_7.entry.js.map
|