Add files via upload

This commit is contained in:
公明
2026-07-06 17:00:03 +08:00
committed by GitHub
parent 00a936e5dc
commit 404feb372e
5 changed files with 120 additions and 31 deletions
+26
View File
@@ -97,6 +97,24 @@ function closeRobotCreateModal() {
if (modal) modal.style.display = 'none';
}
function openRobotCommandsModal() {
if (typeof openAppModal === 'function') {
openAppModal('robot-commands-modal', { focus: false });
return;
}
const modal = document.getElementById('robot-commands-modal');
if (modal) modal.style.display = 'block';
}
function closeRobotCommandsModal() {
if (typeof closeAppModal === 'function') {
closeAppModal('robot-commands-modal');
return;
}
const modal = document.getElementById('robot-commands-modal');
if (modal) modal.style.display = 'none';
}
function selectRobotType(type) {
closeRobotCreateModal();
openRobotEditor(type);
@@ -129,6 +147,14 @@ function bindRobotManagerEvents() {
});
modal.dataset.robotManagerBound = 'true';
}
const commandsModal = document.getElementById('robot-commands-modal');
if (commandsModal && !commandsModal.dataset.robotManagerBound) {
commandsModal.addEventListener('click', (event) => {
if (event.target === commandsModal) closeRobotCommandsModal();
});
commandsModal.dataset.robotManagerBound = 'true';
}
}
// 生成工具的唯一标识符,用于区分同名但来源不同的工具