From 5e29a6e9b7ce83e43fd2621f7f8c93a499668d1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AC=E6=98=8E?= <83812544+Ed1s0nZ@users.noreply.github.com> Date: Wed, 25 Mar 2026 20:06:06 +0800 Subject: [PATCH] Add files via upload --- web/static/css/style.css | 5 ++--- web/static/i18n/en-US.json | 13 +++++++++++++ web/static/i18n/zh-CN.json | 12 ++++++++++++ web/static/js/webshell.js | 24 +++++++++++++++--------- web/templates/index.html | 18 +++++++++--------- 5 files changed, 51 insertions(+), 21 deletions(-) diff --git a/web/static/css/style.css b/web/static/css/style.css index 0e22af09..5d0c335b 100644 --- a/web/static/css/style.css +++ b/web/static/css/style.css @@ -9264,9 +9264,8 @@ header { white-space: nowrap; } -.webshell-col-owner, -.webshell-col-group { - width: 110px; +.webshell-col-owner { + width: 150px; color: var(--text-secondary); font-size: 0.82rem; white-space: nowrap; diff --git a/web/static/i18n/en-US.json b/web/static/i18n/en-US.json index 341a1796..59e972a2 100644 --- a/web/static/i18n/en-US.json +++ b/web/static/i18n/en-US.json @@ -402,7 +402,10 @@ "dbRows": "rows", "dbColumns": "columns", "dbSchemaFailed": "Failed to load schema", + "dbSchemaLoaded": "Schema loaded successfully", "dbAddProfile": "Add connection", + "dbExecSuccess": "SQL executed successfully", + "dbNoOutput": "Execution completed (no output)", "dbRenameProfile": "Rename", "dbDeleteProfile": "Delete connection", "dbDeleteProfileConfirm": "Delete this database connection profile?", @@ -458,6 +461,7 @@ "searchPlaceholder": "Search connections...", "noMatchConnections": "No matching connections", "breadcrumbHome": "Root", + "dirTree": "Directory tree", "back": "Back", "moreActions": "More actions", "batchProbe": "Batch probe", @@ -1231,6 +1235,15 @@ "fofaApiKeyHint": "Stored in server config (config.yaml) only.", "maxIterations": "Max iterations", "iterationsPlaceholder": "30", + "enableMultiAgent": "Enable Eino multi-agent (DeepAgent)", + "enableMultiAgentHint": "After enabling, the chat page can use multi-agent mode; sub-agents are configured in config.yaml under multi_agent.sub_agents.", + "multiAgentDefaultMode": "Default mode on chat page", + "multiAgentModeSingle": "Single-agent (ReAct)", + "multiAgentModeMulti": "Multi-agent (Eino)", + "multiAgentRobotUse": "Use multi-agent for WeCom / DingTalk / Lark bots", + "multiAgentRobotUseHint": "Requires 'Enable multi-agent' to be checked; usage and cost will be higher.", + "multiAgentBatchUse": "Use multi-agent for batch task queues", + "multiAgentBatchUseHint": "When enabled, each sub-task executed by queue in Task Management will run through Eino DeepAgent (requires multi-agent).", "enableKnowledge": "Enable knowledge retrieval", "knowledgeBasePath": "Knowledge base path", "knowledgeBasePathPlaceholder": "knowledge_base", diff --git a/web/static/i18n/zh-CN.json b/web/static/i18n/zh-CN.json index 7703ec4d..cfcbd1af 100644 --- a/web/static/i18n/zh-CN.json +++ b/web/static/i18n/zh-CN.json @@ -402,7 +402,10 @@ "dbRows": "行", "dbColumns": "列", "dbSchemaFailed": "加载数据库结构失败", + "dbSchemaLoaded": "结构加载完成", "dbAddProfile": "新增连接", + "dbExecSuccess": "SQL 执行成功", + "dbNoOutput": "执行完成(无输出)", "dbRenameProfile": "重命名", "dbDeleteProfile": "删除连接", "dbDeleteProfileConfirm": "确定删除该数据库连接配置吗?", @@ -1232,6 +1235,15 @@ "fofaApiKeyHint": "仅保存在服务器配置中(`config.yaml`)。", "maxIterations": "最大迭代次数", "iterationsPlaceholder": "30", + "enableMultiAgent": "启用 Eino 多代理(DeepAgent)", + "enableMultiAgentHint": "开启后对话页可选「多代理」模式;子代理在 config.yaml 的 multi_agent.sub_agents 中配置。", + "multiAgentDefaultMode": "对话页默认模式", + "multiAgentModeSingle": "单代理(ReAct)", + "multiAgentModeMulti": "多代理(Eino)", + "multiAgentRobotUse": "企业微信 / 钉钉 / 飞书机器人也使用多代理", + "multiAgentRobotUseHint": "需同时勾选「启用多代理」;调用量与成本更高。", + "multiAgentBatchUse": "批量任务队列也使用多代理", + "multiAgentBatchUseHint": "开启后,任务管理中按队列执行的每个子任务将走 Eino DeepAgent(需启用多代理)。", "enableKnowledge": "启用知识检索功能", "knowledgeBasePath": "知识库路径", "knowledgeBasePathPlaceholder": "knowledge_base", diff --git a/web/static/js/webshell.js b/web/static/js/webshell.js index 91ec1c31..c39696c7 100644 --- a/web/static/js/webshell.js +++ b/web/static/js/webshell.js @@ -127,7 +127,10 @@ function wsT(key) { 'webshell.dbRows': '行', 'webshell.dbColumns': '列', 'webshell.dbSchemaFailed': '加载数据库结构失败', + 'webshell.dbSchemaLoaded': '结构加载完成', 'webshell.dbAddProfile': '新增连接', + 'webshell.dbExecSuccess': 'SQL 执行成功', + 'webshell.dbNoOutput': '执行完成(无输出)', 'webshell.dbRenameProfile': '重命名', 'webshell.dbDeleteProfile': '删除连接', 'webshell.dbDeleteProfileConfirm': '确定删除该数据库连接配置吗?', @@ -2116,11 +2119,11 @@ function selectWebshell(id, stateReady) { return; } cfg.schema = parseWebshellDbSchema(parsed.output); - cfg.output = '结构加载完成'; + cfg.output = wsT('webshell.dbSchemaLoaded') || '结构加载完成'; cfg.outputIsError = false; saveWebshellDbConfig(conn, cfg); renderDbSchemaTree(); - webshellDbSetOutput('结构加载完成', false); + webshellDbSetOutput(wsT('webshell.dbSchemaLoaded') || '结构加载完成', false); }).catch(function (err) { webshellDbSetOutput((wsT('webshell.dbSchemaFailed') || '加载数据库结构失败') + ': ' + (err && err.message ? err.message : String(err)), true); }).finally(function () { @@ -2175,12 +2178,12 @@ function selectWebshell(id, stateReady) { } var hasTable = webshellDbRenderTable(content); if (hasTable) { - cfg.output = 'SQL 执行成功'; + cfg.output = wsT('webshell.dbExecSuccess') || 'SQL 执行成功'; cfg.outputIsError = false; saveWebshellDbConfig(conn, cfg); webshellDbSetOutput(cfg.output, false); } else { - cfg.output = content || '执行完成(无输出)'; + cfg.output = content || (wsT('webshell.dbNoOutput') || '执行完成(无输出)'); cfg.outputIsError = false; saveWebshellDbConfig(conn, cfg); webshellDbSetOutput(cfg.output, false); @@ -3107,14 +3110,14 @@ function renderFileList(listEl, currentPath, rawOutput, conn, nameFilter) { if (rawOutput.trim() && !nameFilter) { html = '
' + escapeHtml(rawOutput) + ''; } else { - html = '
| ' + wsT('webshell.filePath') + ' | 大小 | ' + (wsT('webshell.colModifiedAt') || '修改时间') + ' | ' + (wsT('webshell.colOwner') || '所有者') + ' | ' + (wsT('webshell.colGroup') || '用户组') + ' | ' + (wsT('webshell.colPerms') || '权限') + ' | ||
|---|---|---|---|---|---|---|---|
| ' + (wsT('common.noData') || '暂无文件') + ' | |||||||
| ' + wsT('webshell.filePath') + ' | 大小 | ' + (wsT('webshell.colModifiedAt') || '修改时间') + ' | ' + (wsT('webshell.colOwner') || '所有者') + ' | ' + (wsT('webshell.colPerms') || '权限') + ' | ||
|---|---|---|---|---|---|---|
| ' + (wsT('common.noData') || '暂无文件') + ' | ||||||
| ' + wsT('webshell.filePath') + ' | 大小 | ' + (wsT('webshell.colModifiedAt') || '修改时间') + ' | ' + (wsT('webshell.colOwner') || '所有者') + ' | ' + (wsT('webshell.colGroup') || '用户组') + ' | ' + (wsT('webshell.colPerms') || '权限') + ' |
|---|
| ' + wsT('webshell.filePath') + ' | 大小 | ' + (wsT('webshell.colModifiedAt') || '修改时间') + ' | ' + (wsT('webshell.colOwner') || '所有者') + ' | ' + (wsT('webshell.colPerms') || '权限') + ' | |||
|---|---|---|---|---|---|---|---|
| .. | |||||||
| .. | ' + escapeHtml(item.size) + ' | '; html += '' + escapeHtml(item.mtime || '') + ' | '; html += '' + escapeHtml(item.owner || '') + ' | '; - html += '' + escapeHtml(item.group || '') + ' | '; html += '' + escapeHtml(item.mode || '') + ' | '; html += '';
if (item.isDir) {
@@ -3705,9 +3707,13 @@ function refreshWebshellUIOnLanguageChange() {
setWebshellTerminalStatus(webshellTerminalRunning);
if (webshellCurrentConn) renderWebshellTerminalSessions(webshellCurrentConn);
var pathLabel = workspace.querySelector('.webshell-file-toolbar label span');
+ var fileSidebarTitle = workspace.querySelector('.webshell-file-sidebar-title');
+ var fileMoreActionsBtn = workspace.querySelector('.webshell-toolbar-actions-btn');
var listDirBtn = document.getElementById('webshell-list-dir');
var parentDirBtn = document.getElementById('webshell-parent-dir');
if (pathLabel) pathLabel.textContent = wsT('webshell.filePath');
+ if (fileSidebarTitle) fileSidebarTitle.textContent = wsT('webshell.dirTree') || '目录列表';
+ if (fileMoreActionsBtn) fileMoreActionsBtn.textContent = wsT('webshell.moreActions') || '更多操作';
if (listDirBtn) listDirBtn.textContent = wsT('webshell.listDir');
if (parentDirBtn) parentDirBtn.textContent = wsT('webshell.parentDir');
// 文件管理工具栏按钮(红框区域):切换语言时立即更新
diff --git a/web/templates/index.html b/web/templates/index.html
index cd72a52d..4415cf5d 100644
--- a/web/templates/index.html
+++ b/web/templates/index.html
@@ -1399,32 +1399,32 @@
- 开启后对话页可选「多代理」模式;子代理在 config.yaml 的 multi_agent.sub_agents 中配置。
+ 开启后对话页可选「多代理」模式;子代理在 config.yaml 的 multi_agent.sub_agents 中配置。
-
+
- 需同时勾选「启用多代理」;调用量与成本更高。
+ 需同时勾选「启用多代理」;调用量与成本更高。
- 开启后,任务管理中按队列执行的每个子任务将走 Eino DeepAgent(需启用多代理)。
+ 开启后,任务管理中按队列执行的每个子任务将走 Eino DeepAgent(需启用多代理)。
|