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
+44
View File
@@ -5732,6 +5732,16 @@ html[data-theme="dark"] .openapi-doc-btn:hover {
max-width: 680px; max-width: 680px;
} }
.robot-commands-modal-content {
max-width: 720px;
max-height: 86vh;
}
.robot-commands-modal-body {
max-height: calc(86vh - 88px);
overflow-y: auto;
}
.robot-type-grid { .robot-type-grid {
display: grid; display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
@@ -5804,6 +5814,29 @@ html[data-theme="dark"] .openapi-doc-btn:hover {
margin-bottom: 12px; margin-bottom: 12px;
} }
.robot-command-entry {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 16px 18px;
border: 1px solid var(--border-color);
border-radius: 8px;
background: var(--bg-secondary);
}
.robot-command-entry h4 {
margin: 0 0 6px;
}
.robot-command-entry .settings-description {
margin: 0;
}
.robot-command-entry-copy {
min-width: 0;
}
.robot-cmd-category { .robot-cmd-category {
font-size: 0.8125rem; font-size: 0.8125rem;
font-weight: 600; font-weight: 600;
@@ -5829,6 +5862,17 @@ html[data-theme="dark"] .openapi-doc-btn:hover {
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
@media (max-width: 768px) {
.robot-command-entry {
align-items: stretch;
flex-direction: column;
}
.robot-command-entry .btn-secondary {
width: 100%;
}
}
.form-hint { .form-hint {
display: block; display: block;
font-size: 0.8125rem; font-size: 0.8125rem;
+2
View File
@@ -2565,6 +2565,8 @@
}, },
"settingsRobotsExtra": { "settingsRobotsExtra": {
"botCommandsTitle": "Bot command instructions", "botCommandsTitle": "Bot command instructions",
"botCommandsEntryDesc": "View the Chinese and English commands available in robot chats, including common conversation, role, and project actions.",
"viewAllCommands": "View all commands",
"botCommandsDesc": "You can send the following commands in chat (Chinese and English supported):", "botCommandsDesc": "You can send the following commands in chat (Chinese and English supported):",
"botCmdCategoryGeneral": "General", "botCmdCategoryGeneral": "General",
"botCmdCategoryConversation": "Conversation", "botCmdCategoryConversation": "Conversation",
+2
View File
@@ -2553,6 +2553,8 @@
}, },
"settingsRobotsExtra": { "settingsRobotsExtra": {
"botCommandsTitle": "机器人命令说明", "botCommandsTitle": "机器人命令说明",
"botCommandsEntryDesc": "查看机器人对话中可用的中英文命令,包括对话、角色、项目等常用操作。",
"viewAllCommands": "查看全部命令",
"botCommandsDesc": "在对话中可发送以下命令(支持中英文):", "botCommandsDesc": "在对话中可发送以下命令(支持中英文):",
"botCmdCategoryGeneral": "通用", "botCmdCategoryGeneral": "通用",
"botCmdCategoryConversation": "对话", "botCmdCategoryConversation": "对话",
+26
View File
@@ -97,6 +97,24 @@ function closeRobotCreateModal() {
if (modal) modal.style.display = 'none'; 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) { function selectRobotType(type) {
closeRobotCreateModal(); closeRobotCreateModal();
openRobotEditor(type); openRobotEditor(type);
@@ -129,6 +147,14 @@ function bindRobotManagerEvents() {
}); });
modal.dataset.robotManagerBound = 'true'; 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';
}
} }
// 生成工具的唯一标识符,用于区分同名但来源不同的工具 // 生成工具的唯一标识符,用于区分同名但来源不同的工具
+17 -2
View File
@@ -3717,8 +3717,13 @@
</div> </div>
</div> </div>
<div class="settings-subsection"> <div id="robot-commands-modal" class="modal" role="dialog" aria-modal="true" aria-labelledby="robot-commands-title">
<h4 data-i18n="settingsRobotsExtra.botCommandsTitle">机器人命令说明</h4> <div class="modal-content robot-commands-modal-content">
<div class="modal-header">
<h2 id="robot-commands-title" data-i18n="settingsRobotsExtra.botCommandsTitle">机器人命令说明</h2>
<button type="button" class="modal-close" onclick="closeRobotCommandsModal()" aria-label="Close"></button>
</div>
<div class="modal-body robot-commands-modal-body">
<p class="settings-description" data-i18n="settingsRobotsExtra.botCommandsDesc">在对话中可发送以下命令(支持中英文):</p> <p class="settings-description" data-i18n="settingsRobotsExtra.botCommandsDesc">在对话中可发送以下命令(支持中英文):</p>
<p class="robot-cmd-category" data-i18n="settingsRobotsExtra.botCmdCategoryGeneral">通用</p> <p class="robot-cmd-category" data-i18n="settingsRobotsExtra.botCmdCategoryGeneral">通用</p>
@@ -3754,6 +3759,16 @@
<p class="settings-description robot-cmd-footer" data-i18n="settingsRobotsExtra.botCommandsFooter">除以上命令外,直接输入内容将发送给 AI 进行渗透测试/安全分析。Otherwise, send any text for AI penetration testing / security analysis.</p> <p class="settings-description robot-cmd-footer" data-i18n="settingsRobotsExtra.botCommandsFooter">除以上命令外,直接输入内容将发送给 AI 进行渗透测试/安全分析。Otherwise, send any text for AI penetration testing / security analysis.</p>
</div> </div>
</div>
</div>
<div class="settings-subsection robot-command-entry">
<div class="robot-command-entry-copy">
<h4 data-i18n="settingsRobotsExtra.botCommandsTitle">机器人命令说明</h4>
<p class="settings-description" data-i18n="settingsRobotsExtra.botCommandsEntryDesc">查看机器人对话中可用的中英文命令,包括对话、角色、项目等常用操作。</p>
</div>
<button type="button" class="btn-secondary" onclick="openRobotCommandsModal()" data-i18n="settingsRobotsExtra.viewAllCommands">查看全部命令</button>
</div>
<div class="settings-actions"> <div class="settings-actions">
<button class="btn-primary" onclick="applySettings()" data-i18n="settings.apply.button">应用配置</button> <button class="btn-primary" onclick="applySettings()" data-i18n="settings.apply.button">应用配置</button>