mirror of
https://github.com/Ed1s0nZ/CyberStrikeAI.git
synced 2026-07-31 16:17:35 +02:00
Add files via upload
This commit is contained in:
@@ -4532,6 +4532,10 @@ async function loadConversation(conversationId) {
|
||||
// 更新当前对话ID
|
||||
currentConversationId = conversationId;
|
||||
window._loadedConversationProjectId = conversation.projectId || conversation.project_id || '';
|
||||
const conversationRoleName = conversation.roleName || conversation.role_name || '';
|
||||
if (typeof window.setCurrentRole === 'function') {
|
||||
window.setCurrentRole(conversationRoleName || '默认');
|
||||
}
|
||||
try {
|
||||
window.currentConversationId = conversationId;
|
||||
} catch (e) { /* ignore */ }
|
||||
|
||||
@@ -1892,6 +1892,7 @@ function getCurrentRole() {
|
||||
// 暴露函数到全局作用域
|
||||
if (typeof window !== 'undefined') {
|
||||
window.getCurrentRole = getCurrentRole;
|
||||
window.setCurrentRole = handleRoleChange;
|
||||
window.toggleRoleSelectionPanel = toggleRoleSelectionPanel;
|
||||
window.closeRoleSelectionPanel = closeRoleSelectionPanel;
|
||||
window.closeRoleSelectModal = closeRoleSelectModal;
|
||||
@@ -1905,6 +1906,7 @@ if (typeof window !== 'undefined') {
|
||||
originalHandleRoleChange(roleName);
|
||||
if (typeof window !== 'undefined') {
|
||||
window.currentSelectedRole = getCurrentRole();
|
||||
window.setCurrentRole = handleRoleChange;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user