pcm-agents 0.3.2 → 0.3.3
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 +56 -53
- 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 +3 -4
- package/dist/collection/components/pcm-app-chat-modal/pcm-app-chat-modal.js.map +1 -1
- package/dist/collection/components/pcm-hr-chat-modal/pcm-hr-chat-modal.js +2 -2
- 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 +2 -2
- 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-BctfuDvG.js → p-BG-UIl44.js} +4 -5
- package/dist/components/p-BG-UIl44.js.map +1 -0
- package/dist/components/pcm-app-chat-modal.js +1 -1
- package/dist/components/pcm-hr-chat-modal.js +1 -1
- 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} +26 -26
- package/dist/components/pcm-jlpp-modal.js.map +1 -0
- package/dist/components/pcm-mnms-modal.js +15 -15
- package/dist/components/pcm-mnms-modal.js.map +1 -1
- package/dist/components/pcm-video-chat-modal.js +1 -1
- package/dist/components/pcm-video-chat-modal.js.map +1 -1
- package/dist/components/pcm-zygh-modal.js +19 -15
- 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 +56 -53
- 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/app-globals-DQuL1Twl.js.map +1 -0
- package/dist/pcm-agents/index-Csq0E9fM.js.map +1 -0
- package/dist/pcm-agents/index.esm.js +1 -1
- package/dist/pcm-agents/index.esm.js.map +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-e7221181.entry.js +2 -0
- package/dist/pcm-agents/p-e7221181.entry.js.map +1 -0
- package/dist/pcm-agents/pcm-agents.esm.js +1 -1
- package/dist/pcm-agents/pcm-agents.esm.js.map +1 -1
- package/dist/pcm-agents/pcm-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/pcm-agents/utils-CfkrvVlp.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-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 +48 -48
- package/dist/types/utils/utils.d.ts +1 -1
- package/package.json +1 -1
- 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/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,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-SU3eqPPs.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-RmBfqEV7.js');
|
|
5
5
|
|
|
6
6
|
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}}";
|
|
7
7
|
|
|
@@ -20,7 +20,7 @@ const ChatAPPModal = class {
|
|
|
20
20
|
*/
|
|
21
21
|
modalTitle = '在线客服';
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* SDK鉴权密钥
|
|
24
24
|
*/
|
|
25
25
|
token = '';
|
|
26
26
|
/**
|
|
@@ -244,7 +244,7 @@ const ChatAPPModal = class {
|
|
|
244
244
|
},
|
|
245
245
|
data: requestData,
|
|
246
246
|
onMessage: (data) => {
|
|
247
|
-
console.log('收到Stream数据:', data);
|
|
247
|
+
// console.log('收到Stream数据:', data);
|
|
248
248
|
if (data.conversation_id && !this.conversationId) {
|
|
249
249
|
this.conversationId = data.conversation_id;
|
|
250
250
|
this.conversationStart.emit({
|
|
@@ -257,7 +257,6 @@ const ChatAPPModal = class {
|
|
|
257
257
|
// 检查是否有 node_finished 事件和 LLMText
|
|
258
258
|
if (data.event === 'node_finished' && data.data.inputs && data.data.inputs.LLMText) {
|
|
259
259
|
llmText = data.data.inputs.LLMText;
|
|
260
|
-
console.log('获取到 LLMText:', llmText);
|
|
261
260
|
}
|
|
262
261
|
if (data.event === 'message') {
|
|
263
262
|
if (data.event === 'agent_message' || data.event === 'message') {
|
|
@@ -3798,7 +3797,7 @@ const ChatHRModal = class {
|
|
|
3798
3797
|
*/
|
|
3799
3798
|
modalTitle = '在线客服';
|
|
3800
3799
|
/**
|
|
3801
|
-
*
|
|
3800
|
+
* SDK鉴权密钥
|
|
3802
3801
|
*/
|
|
3803
3802
|
token = '';
|
|
3804
3803
|
/**
|
|
@@ -4822,11 +4821,11 @@ const ChatHRModal = class {
|
|
|
4822
4821
|
};
|
|
4823
4822
|
ChatHRModal.style = pcmHrChatModalCss;
|
|
4824
4823
|
|
|
4825
|
-
const
|
|
4824
|
+
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}";
|
|
4826
4825
|
|
|
4827
|
-
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}";
|
|
4826
|
+
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}";
|
|
4828
4827
|
|
|
4829
|
-
const
|
|
4828
|
+
const JlppModal = class {
|
|
4830
4829
|
constructor(hostRef) {
|
|
4831
4830
|
index.registerInstance(this, hostRef);
|
|
4832
4831
|
this.modalClosed = index.createEvent(this, "modalClosed");
|
|
@@ -4834,14 +4833,14 @@ const JlpxModal = class {
|
|
|
4834
4833
|
this.streamComplete = index.createEvent(this, "streamComplete");
|
|
4835
4834
|
this.conversationStart = index.createEvent(this, "conversationStart");
|
|
4836
4835
|
this.interviewComplete = index.createEvent(this, "interviewComplete");
|
|
4837
|
-
this.
|
|
4836
|
+
this.tokenInvalid = index.createEvent(this, "tokenInvalid");
|
|
4838
4837
|
}
|
|
4839
4838
|
/**
|
|
4840
4839
|
* 模态框标题
|
|
4841
4840
|
*/
|
|
4842
4841
|
modalTitle = '简历剖析助手';
|
|
4843
4842
|
/**
|
|
4844
|
-
*
|
|
4843
|
+
* SDK鉴权密钥
|
|
4845
4844
|
*/
|
|
4846
4845
|
token = '';
|
|
4847
4846
|
/**
|
|
@@ -4901,9 +4900,9 @@ const JlpxModal = class {
|
|
|
4901
4900
|
*/
|
|
4902
4901
|
interviewComplete;
|
|
4903
4902
|
/**
|
|
4904
|
-
*
|
|
4903
|
+
* SDK密钥验证失败事件
|
|
4905
4904
|
*/
|
|
4906
|
-
|
|
4905
|
+
tokenInvalid;
|
|
4907
4906
|
selectedFile = null;
|
|
4908
4907
|
isUploading = false;
|
|
4909
4908
|
uploadedFileInfo = null;
|
|
@@ -4982,12 +4981,12 @@ const JlpxModal = class {
|
|
|
4982
4981
|
}
|
|
4983
4982
|
}
|
|
4984
4983
|
// 使用预设的job_info或用户输入的jobDescription
|
|
4985
|
-
const jobInfo = this.customInputs?.job_info || this.jobDescription;
|
|
4986
|
-
console.log('传递的customInputs:', {
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
});
|
|
4984
|
+
// const jobInfo = this.customInputs?.job_info || this.jobDescription;
|
|
4985
|
+
// console.log('传递的customInputs:', {
|
|
4986
|
+
// ...this.customInputs,
|
|
4987
|
+
// file_url: this.uploadedFileInfo.cos_key,
|
|
4988
|
+
// job_info: jobInfo
|
|
4989
|
+
// });
|
|
4991
4990
|
// 直接显示聊天模态框
|
|
4992
4991
|
this.showChatModal = true;
|
|
4993
4992
|
}
|
|
@@ -5025,7 +5024,7 @@ const JlpxModal = class {
|
|
|
5025
5024
|
*/
|
|
5026
5025
|
async verifyApiKey() {
|
|
5027
5026
|
if (!this.token) {
|
|
5028
|
-
this.
|
|
5027
|
+
this.tokenInvalid.emit();
|
|
5029
5028
|
return;
|
|
5030
5029
|
}
|
|
5031
5030
|
try {
|
|
@@ -5044,7 +5043,7 @@ const JlpxModal = class {
|
|
|
5044
5043
|
catch (error) {
|
|
5045
5044
|
console.error('API密钥验证错误:', error);
|
|
5046
5045
|
// 通知父组件API密钥无效
|
|
5047
|
-
this.
|
|
5046
|
+
this.tokenInvalid.emit();
|
|
5048
5047
|
}
|
|
5049
5048
|
}
|
|
5050
5049
|
componentWillLoad() {
|
|
@@ -5090,7 +5089,7 @@ const JlpxModal = class {
|
|
|
5090
5089
|
return (index.h("div", { class: overlayClass, style: modalStyle }, index.h("div", { class: containerClass }, this.isShowHeader && (index.h("div", { class: "modal-header" }, index.h("div", { class: "header-left" }, this.icon && index.h("img", { src: this.icon, class: "header-icon", alt: "\u5E94\u7528\u56FE\u6807" }), index.h("div", null, this.modalTitle)), this.isNeedClose && (index.h("button", { class: "close-button", onClick: this.handleClose }, index.h("span", null, "\u00D7"))))), !this.showChatModal && !this.conversationId && (index.h("div", { class: "input-container" }, !hideJdInput && (index.h("div", { class: "jd-input-section" }, index.h("label", { htmlFor: "job-description" }, "\u8BF7\u8F93\u5165\u804C\u4F4D\u63CF\u8FF0 (JD)"), index.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 }))), index.h("div", { class: "resume-upload-section" }, index.h("label", null, "\u4E0A\u4F20\u7B80\u5386"), index.h("div", { class: "upload-area", onClick: this.handleUploadClick }, this.selectedFile ? (index.h("div", { class: "file-info" }, index.h("span", null, this.selectedFile.name), index.h("button", { class: "remove-file", onClick: (e) => {
|
|
5091
5090
|
e.stopPropagation();
|
|
5092
5091
|
this.clearSelectedFile();
|
|
5093
|
-
} }, "\u00D7"))) : (index.h("div", { class: "upload-placeholder" }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", width: "48", height: "48" }, index.h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M12 4v16m0-16l-4 4m4-4l4 4" })), index.h("p", null, "\u70B9\u51FB\u4E0A\u4F20\u7B80\u5386"), index.h("p", { class: "upload-hint" }, "\u652F\u6301 txt\u3001markdown\u3001pdf\u3001docx\u3001md \u683C\u5F0F"))))), index.h("button", { class: "submit-button", disabled: !this.selectedFile || (!hideJdInput && !this.jobDescription.trim()) || this.isUploading || this.isSubmitting, onClick: this.handleStartAnalysis }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始分析'), index.h("input", { type: "file", class: "file-input", onChange: this.handleFileChange
|
|
5092
|
+
} }, "\u00D7"))) : (index.h("div", { class: "upload-placeholder" }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", width: "48", height: "48" }, index.h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M12 4v16m0-16l-4 4m4-4l4 4" })), index.h("p", null, "\u70B9\u51FB\u4E0A\u4F20\u7B80\u5386"), index.h("p", { class: "upload-hint" }, "\u652F\u6301 txt\u3001markdown\u3001pdf\u3001docx\u3001doc\u3001md \u683C\u5F0F"))))), index.h("button", { class: "submit-button", disabled: !this.selectedFile || (!hideJdInput && !this.jobDescription.trim()) || this.isUploading || this.isSubmitting, onClick: this.handleStartAnalysis }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始分析'), index.h("div", { class: "ai-disclaimer" }, index.h("p", null, "\u6240\u6709\u5185\u5BB9\u5747\u7531AI\u751F\u6210\u4EC5\u4F9B\u53C2\u8003"), index.h("p", { class: "beian-info" }, index.h("span", null, "\u4E2D\u592E\u7F51\u4FE1\u529E\u751F\u6210\u5F0F\u4EBA\u5DE5\u667A\u80FD\u670D\u52A1\u5907\u6848\u53F7"), "\uFF1A", index.h("a", { href: "https://www.pincaimao.com", target: "_blank", rel: "noopener noreferrer" }, "Hunan-PinCaiMao-202412310003"))), index.h("input", { type: "file", class: "file-input", onChange: this.handleFileChange }))), this.showChatModal && (index.h("div", { class: "chat-modal-container" }, index.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 : {
|
|
5094
5093
|
...this.customInputs,
|
|
5095
5094
|
file_url: this.uploadedFileInfo?.cos_key,
|
|
5096
5095
|
job_info: this.customInputs?.job_info || this.jobDescription
|
|
@@ -5100,11 +5099,11 @@ const JlpxModal = class {
|
|
|
5100
5099
|
"isOpen": ["handleIsOpenChange"]
|
|
5101
5100
|
}; }
|
|
5102
5101
|
};
|
|
5103
|
-
|
|
5102
|
+
JlppModal.style = pcmJlppModalCss + globalCss$2;
|
|
5104
5103
|
|
|
5105
5104
|
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}";
|
|
5106
5105
|
|
|
5107
|
-
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}";
|
|
5106
|
+
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}";
|
|
5108
5107
|
|
|
5109
5108
|
const MnmsModal = class {
|
|
5110
5109
|
constructor(hostRef) {
|
|
@@ -5114,14 +5113,14 @@ const MnmsModal = class {
|
|
|
5114
5113
|
this.streamComplete = index.createEvent(this, "streamComplete");
|
|
5115
5114
|
this.conversationStart = index.createEvent(this, "conversationStart");
|
|
5116
5115
|
this.interviewComplete = index.createEvent(this, "interviewComplete");
|
|
5117
|
-
this.
|
|
5116
|
+
this.tokenInvalid = index.createEvent(this, "tokenInvalid");
|
|
5118
5117
|
}
|
|
5119
5118
|
/**
|
|
5120
5119
|
* 模态框标题
|
|
5121
5120
|
*/
|
|
5122
5121
|
modalTitle = '模拟面试';
|
|
5123
5122
|
/**
|
|
5124
|
-
*
|
|
5123
|
+
* SDK鉴权密钥
|
|
5125
5124
|
*/
|
|
5126
5125
|
token = '';
|
|
5127
5126
|
/**
|
|
@@ -5181,9 +5180,9 @@ const MnmsModal = class {
|
|
|
5181
5180
|
*/
|
|
5182
5181
|
interviewComplete;
|
|
5183
5182
|
/**
|
|
5184
|
-
*
|
|
5183
|
+
* SDK密钥验证失败事件
|
|
5185
5184
|
*/
|
|
5186
|
-
|
|
5185
|
+
tokenInvalid;
|
|
5187
5186
|
selectedFile = null;
|
|
5188
5187
|
isUploading = false;
|
|
5189
5188
|
uploadedFileInfo = null;
|
|
@@ -5262,12 +5261,12 @@ const MnmsModal = class {
|
|
|
5262
5261
|
}
|
|
5263
5262
|
}
|
|
5264
5263
|
// 使用预设的job_info或用户输入的jobDescription
|
|
5265
|
-
const jobInfo = this.customInputs?.job_info || this.jobDescription;
|
|
5266
|
-
console.log('传递的customInputs:', {
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
});
|
|
5264
|
+
// const jobInfo = this.customInputs?.job_info || this.jobDescription;
|
|
5265
|
+
// console.log('传递的customInputs:', {
|
|
5266
|
+
// ...this.customInputs,
|
|
5267
|
+
// file_url: this.uploadedFileInfo.cos_key,
|
|
5268
|
+
// job_info: jobInfo
|
|
5269
|
+
// });
|
|
5271
5270
|
// 直接显示聊天模态框
|
|
5272
5271
|
this.showChatModal = true;
|
|
5273
5272
|
}
|
|
@@ -5324,7 +5323,7 @@ const MnmsModal = class {
|
|
|
5324
5323
|
*/
|
|
5325
5324
|
async verifyApiKey() {
|
|
5326
5325
|
if (!this.token) {
|
|
5327
|
-
this.
|
|
5326
|
+
this.tokenInvalid.emit();
|
|
5328
5327
|
return;
|
|
5329
5328
|
}
|
|
5330
5329
|
try {
|
|
@@ -5343,7 +5342,7 @@ const MnmsModal = class {
|
|
|
5343
5342
|
catch (error) {
|
|
5344
5343
|
console.error('API密钥验证错误:', error);
|
|
5345
5344
|
// 通知父组件API密钥无效
|
|
5346
|
-
this.
|
|
5345
|
+
this.tokenInvalid.emit();
|
|
5347
5346
|
}
|
|
5348
5347
|
}
|
|
5349
5348
|
render() {
|
|
@@ -5371,7 +5370,7 @@ const MnmsModal = class {
|
|
|
5371
5370
|
return (index.h("div", { class: overlayClass, style: modalStyle }, index.h("div", { class: containerClass }, this.isShowHeader && (index.h("div", { class: "modal-header" }, index.h("div", { class: "header-left" }, this.icon && index.h("img", { src: this.icon, class: "header-icon", alt: "\u5E94\u7528\u56FE\u6807" }), index.h("div", null, this.modalTitle)), this.isNeedClose && (index.h("button", { class: "close-button", onClick: this.handleClose }, index.h("span", null, "\u00D7"))))), !this.showChatModal && !this.conversationId && (index.h("div", { class: "input-container" }, !hideJdInput && (index.h("div", { class: "jd-input-section" }, index.h("label", { htmlFor: "job-description" }, "\u8BF7\u8F93\u5165\u804C\u4F4D\u63CF\u8FF0 (JD)"), index.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 }))), index.h("div", { class: "resume-upload-section" }, index.h("label", null, "\u4E0A\u4F20\u7B80\u5386"), index.h("div", { class: "upload-area", onClick: this.handleUploadClick }, this.selectedFile ? (index.h("div", { class: "file-info" }, index.h("span", null, this.selectedFile.name), index.h("button", { class: "remove-file", onClick: (e) => {
|
|
5372
5371
|
e.stopPropagation();
|
|
5373
5372
|
this.clearSelectedFile();
|
|
5374
|
-
} }, "\u00D7"))) : (index.h("div", { class: "upload-placeholder" }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", width: "48", height: "48" }, index.h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M12 4v16m0-16l-4 4m4-4l4 4" })), index.h("p", null, "\u70B9\u51FB\u4E0A\u4F20\u7B80\u5386"), index.h("p", { class: "upload-hint" }, "\u652F\u6301 txt\u3001markdown\u3001pdf\u3001docx\u3001md \u683C\u5F0F"))))), index.h("button", { class: "submit-button", disabled: !this.selectedFile || (!hideJdInput && !this.jobDescription.trim()) || this.isUploading || this.isSubmitting, onClick: this.handleStartInterview }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始分析'), index.h("input", { type: "file", class: "file-input", onChange: this.handleFileChange
|
|
5373
|
+
} }, "\u00D7"))) : (index.h("div", { class: "upload-placeholder" }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", width: "48", height: "48" }, index.h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M12 4v16m0-16l-4 4m4-4l4 4" })), index.h("p", null, "\u70B9\u51FB\u4E0A\u4F20\u7B80\u5386"), index.h("p", { class: "upload-hint" }, "\u652F\u6301 txt\u3001markdown\u3001pdf\u3001docx\u3001doc\u3001md \u683C\u5F0F"))))), index.h("button", { class: "submit-button", disabled: !this.selectedFile || (!hideJdInput && !this.jobDescription.trim()) || this.isUploading || this.isSubmitting, onClick: this.handleStartInterview }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始分析'), index.h("div", { class: "ai-disclaimer" }, index.h("p", null, "\u6240\u6709\u5185\u5BB9\u5747\u7531AI\u751F\u6210\u4EC5\u4F9B\u53C2\u8003"), index.h("p", { class: "beian-info" }, index.h("span", null, "\u4E2D\u592E\u7F51\u4FE1\u529E\u751F\u6210\u5F0F\u4EBA\u5DE5\u667A\u80FD\u670D\u52A1\u5907\u6848\u53F7"), "\uFF1A", index.h("a", { href: "https://www.pincaimao.com", target: "_blank", rel: "noopener noreferrer" }, "Hunan-PinCaiMao-202412310003"))), index.h("input", { type: "file", class: "file-input", onChange: this.handleFileChange }))), this.showChatModal && (index.h("div", { class: "chat-modal-container" }, index.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 : {
|
|
5375
5374
|
...this.customInputs,
|
|
5376
5375
|
file_url: this.uploadedFileInfo?.cos_key,
|
|
5377
5376
|
job_info: this.customInputs?.job_info || this.jobDescription
|
|
@@ -5399,7 +5398,7 @@ const VideoChatModal = class {
|
|
|
5399
5398
|
*/
|
|
5400
5399
|
modalTitle = '在线客服';
|
|
5401
5400
|
/**
|
|
5402
|
-
*
|
|
5401
|
+
* SDK鉴权密钥
|
|
5403
5402
|
*/
|
|
5404
5403
|
token = '';
|
|
5405
5404
|
/**
|
|
@@ -6279,7 +6278,7 @@ VideoChatModal.style = pcmVideoChatModalCss;
|
|
|
6279
6278
|
|
|
6280
6279
|
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}";
|
|
6281
6280
|
|
|
6282
|
-
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}";
|
|
6281
|
+
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}";
|
|
6283
6282
|
|
|
6284
6283
|
const ZyghModal = class {
|
|
6285
6284
|
constructor(hostRef) {
|
|
@@ -6289,14 +6288,14 @@ const ZyghModal = class {
|
|
|
6289
6288
|
this.streamComplete = index.createEvent(this, "streamComplete");
|
|
6290
6289
|
this.conversationStart = index.createEvent(this, "conversationStart");
|
|
6291
6290
|
this.planningComplete = index.createEvent(this, "planningComplete");
|
|
6292
|
-
this.
|
|
6291
|
+
this.tokenInvalid = index.createEvent(this, "tokenInvalid");
|
|
6293
6292
|
}
|
|
6294
6293
|
/**
|
|
6295
6294
|
* 模态框标题
|
|
6296
6295
|
*/
|
|
6297
6296
|
modalTitle = '职业规划助手';
|
|
6298
6297
|
/**
|
|
6299
|
-
*
|
|
6298
|
+
* SDK鉴权密钥
|
|
6300
6299
|
*/
|
|
6301
6300
|
token = '';
|
|
6302
6301
|
/**
|
|
@@ -6336,7 +6335,11 @@ const ZyghModal = class {
|
|
|
6336
6335
|
*/
|
|
6337
6336
|
fullscreen = false;
|
|
6338
6337
|
/**
|
|
6339
|
-
*
|
|
6338
|
+
* 自定义输入参数,传入plan_type则可以指定规划类型,可传入"长期规划"、"转行建议"、"晋升路径"
|
|
6339
|
+
* 例如:
|
|
6340
|
+
* zyghModal.customInputs = {
|
|
6341
|
+
* plan_type: "转行建议"
|
|
6342
|
+
* };
|
|
6340
6343
|
*/
|
|
6341
6344
|
customInputs = {};
|
|
6342
6345
|
/**
|
|
@@ -6356,9 +6359,9 @@ const ZyghModal = class {
|
|
|
6356
6359
|
*/
|
|
6357
6360
|
planningComplete;
|
|
6358
6361
|
/**
|
|
6359
|
-
*
|
|
6362
|
+
* SDK密钥验证失败事件
|
|
6360
6363
|
*/
|
|
6361
|
-
|
|
6364
|
+
tokenInvalid;
|
|
6362
6365
|
selectedFile = null;
|
|
6363
6366
|
isUploading = false;
|
|
6364
6367
|
uploadedFileInfo = null;
|
|
@@ -6429,11 +6432,11 @@ const ZyghModal = class {
|
|
|
6429
6432
|
return; // 上传失败
|
|
6430
6433
|
}
|
|
6431
6434
|
}
|
|
6432
|
-
console.log('传递的customInputs:', {
|
|
6433
|
-
|
|
6434
|
-
|
|
6435
|
-
|
|
6436
|
-
});
|
|
6435
|
+
// console.log('传递的customInputs:', {
|
|
6436
|
+
// ...this.customInputs,
|
|
6437
|
+
// file_url: this.uploadedFileInfo.cos_key,
|
|
6438
|
+
// plan_type: this.selectedPlanType
|
|
6439
|
+
// });
|
|
6437
6440
|
// 直接显示聊天模态框
|
|
6438
6441
|
this.showChatModal = true;
|
|
6439
6442
|
}
|
|
@@ -6470,7 +6473,7 @@ const ZyghModal = class {
|
|
|
6470
6473
|
*/
|
|
6471
6474
|
async verifyApiKey() {
|
|
6472
6475
|
if (!this.token) {
|
|
6473
|
-
this.
|
|
6476
|
+
this.tokenInvalid.emit();
|
|
6474
6477
|
return;
|
|
6475
6478
|
}
|
|
6476
6479
|
try {
|
|
@@ -6489,7 +6492,7 @@ const ZyghModal = class {
|
|
|
6489
6492
|
catch (error) {
|
|
6490
6493
|
console.error('API密钥验证错误:', error);
|
|
6491
6494
|
// 通知父组件API密钥无效
|
|
6492
|
-
this.
|
|
6495
|
+
this.tokenInvalid.emit();
|
|
6493
6496
|
}
|
|
6494
6497
|
}
|
|
6495
6498
|
componentWillLoad() {
|
|
@@ -6536,7 +6539,7 @@ const ZyghModal = class {
|
|
|
6536
6539
|
return (index.h("div", { class: overlayClass, style: modalStyle }, index.h("div", { class: containerClass }, this.isShowHeader && (index.h("div", { class: "modal-header" }, index.h("div", { class: "header-left" }, this.icon && index.h("img", { src: this.icon, class: "header-icon", alt: "\u5E94\u7528\u56FE\u6807" }), index.h("div", null, this.modalTitle)), this.isNeedClose && (index.h("button", { class: "close-button", onClick: this.handleClose }, index.h("span", null, "\u00D7"))))), !this.showChatModal && !this.conversationId && (index.h("div", { class: "input-container" }, index.h("div", { class: "plan-type-section" }, index.h("label", null, "\u9009\u62E9\u89C4\u5212\u7C7B\u578B"), index.h("div", { class: "plan-type-options" }, index.h("div", { class: `plan-type-option ${this.selectedPlanType === '长期规划' ? 'selected' : ''}`, onClick: () => this.handlePlanTypeChange('长期规划') }, index.h("div", { class: "option-icon" }, "\uD83D\uDCC8"), index.h("div", { class: "option-label" }, "\u957F\u671F\u89C4\u5212")), index.h("div", { class: `plan-type-option ${this.selectedPlanType === '转行建议' ? 'selected' : ''}`, onClick: () => this.handlePlanTypeChange('转行建议') }, index.h("div", { class: "option-icon" }, "\uD83D\uDD04"), index.h("div", { class: "option-label" }, "\u8F6C\u884C\u5EFA\u8BAE")), index.h("div", { class: `plan-type-option ${this.selectedPlanType === '晋升路径' ? 'selected' : ''}`, onClick: () => this.handlePlanTypeChange('晋升路径') }, index.h("div", { class: "option-icon" }, "\uD83D\uDE80"), index.h("div", { class: "option-label" }, "\u664B\u5347\u8DEF\u5F84")))), index.h("div", { class: "resume-upload-section" }, index.h("label", null, "\u4E0A\u4F20\u7B80\u5386"), index.h("div", { class: "upload-area", onClick: this.handleUploadClick }, this.selectedFile ? (index.h("div", { class: "file-info" }, index.h("span", null, this.selectedFile.name), index.h("button", { class: "remove-file", onClick: (e) => {
|
|
6537
6540
|
e.stopPropagation();
|
|
6538
6541
|
this.clearSelectedFile();
|
|
6539
|
-
} }, "\u00D7"))) : (index.h("div", { class: "upload-placeholder" }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", width: "48", height: "48" }, index.h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M12 4v16m0-16l-4 4m4-4l4 4" })), index.h("p", null, "\u70B9\u51FB\u4E0A\u4F20\u7B80\u5386"), index.h("p", { class: "upload-hint" }, "\u652F\u6301 txt\u3001markdown\u3001pdf\u3001docx\u3001md \u683C\u5F0F"))))), index.h("button", { class: "submit-button", disabled: !this.selectedFile || this.isUploading || this.isSubmitting, onClick: this.handleStartPlanning }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始规划'), index.h("input", { type: "file", class: "file-input", onChange: this.handleFileChange
|
|
6542
|
+
} }, "\u00D7"))) : (index.h("div", { class: "upload-placeholder" }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", width: "48", height: "48" }, index.h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M12 4v16m0-16l-4 4m4-4l4 4" })), index.h("p", null, "\u70B9\u51FB\u4E0A\u4F20\u7B80\u5386"), index.h("p", { class: "upload-hint" }, "\u652F\u6301 txt\u3001markdown\u3001pdf\u3001docx\u3001doc\u3001md \u683C\u5F0F"))))), index.h("button", { class: "submit-button", disabled: !this.selectedFile || this.isUploading || this.isSubmitting, onClick: this.handleStartPlanning }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始规划'), index.h("div", { class: "ai-disclaimer" }, index.h("p", null, "\u6240\u6709\u5185\u5BB9\u5747\u7531AI\u751F\u6210\u4EC5\u4F9B\u53C2\u8003"), index.h("p", { class: "beian-info" }, index.h("span", null, "\u4E2D\u592E\u7F51\u4FE1\u529E\u751F\u6210\u5F0F\u4EBA\u5DE5\u667A\u80FD\u670D\u52A1\u5907\u6848\u53F7"), "\uFF1A", index.h("a", { href: "https://www.pincaimao.com", target: "_blank", rel: "noopener noreferrer" }, "Hunan-PinCaiMao-202412310003"))), index.h("input", { type: "file", class: "file-input", onChange: this.handleFileChange }))), this.showChatModal && (index.h("div", { class: "chat-modal-container" }, index.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 : {
|
|
6540
6543
|
...this.customInputs,
|
|
6541
6544
|
file_url: this.uploadedFileInfo?.cos_key,
|
|
6542
6545
|
type: this.selectedPlanType
|
|
@@ -6551,10 +6554,10 @@ ZyghModal.style = pcmZyghModalCss + globalCss;
|
|
|
6551
6554
|
exports.pcm_app_chat_modal = ChatAPPModal;
|
|
6552
6555
|
exports.pcm_chat_message = ChatMessageComponent;
|
|
6553
6556
|
exports.pcm_hr_chat_modal = ChatHRModal;
|
|
6554
|
-
exports.
|
|
6557
|
+
exports.pcm_jlpp_modal = JlppModal;
|
|
6555
6558
|
exports.pcm_mnms_modal = MnmsModal;
|
|
6556
6559
|
exports.pcm_video_chat_modal = VideoChatModal;
|
|
6557
6560
|
exports.pcm_zygh_modal = ZyghModal;
|
|
6558
|
-
//# sourceMappingURL=pcm-app-chat-modal.pcm-chat-message.pcm-hr-chat-modal.pcm-
|
|
6561
|
+
//# 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.cjs.js.map
|
|
6559
6562
|
|
|
6560
6563
|
//# sourceMappingURL=pcm-app-chat-modal_7.cjs.entry.js.map
|