From 33560def35e434f0a78a0eb4446917bab17fa377 Mon Sep 17 00:00:00 2001 From: Sycun <165354365+Sycun@users.noreply.github.com> Date: Thu, 19 Nov 2026 15:44:26 +0800 Subject: [PATCH] fix(chat): restore execution mode descriptions --- web/frontend/src/pages/chat/Composer.jsx | 42 +++++++++++++++---- web/frontend/src/pages/chat/page.css | 10 +++++ web/frontend/tests/ui.spec.mjs | 35 ++++++++++++++++ ...UMNcB.js => agents-management-DCa_3yt-.js} | 2 +- ...-docs-DUP3fbt8.js => api-docs-Clg-fLzc.js} | 2 +- ...-DR_p3Y5s.js => asset-library-Akm-Hu68.js} | 2 +- ...BqsT_OBs.js => asset-overview-C9ACNQd-.js} | 2 +- ...ents-_tkmiODT.js => c2-events-CqbeY6fl.js} | 2 +- ...s-CMkqn-kv.js => c2-listeners-BSSfXddM.js} | 2 +- ...ds-BblbRZ3V.js => c2-payloads-CV0VsheD.js} | 2 +- ...es-Bi_cnE6y.js => c2-profiles-Dq06IPIs.js} | 2 +- ...ns-CGpE0gz_.js => c2-sessions-D-lYIMj5.js} | 2 +- ...ared-DlFqgnDx.js => c2-shared-BVmgN2DT.js} | 2 +- ...ared-Xr4UAA5Y.js => c2-shared-CH-QAVpV.js} | 2 +- ...tasks-E6_3NkMg.js => c2-tasks-gwxY9U-G.js} | 2 +- .../{chat-TCElQU2N.js => chat-CLs-iNLs.js} | 4 +- .../{chat-DkmiFBWT.css => chat-DdpPOGkz.css} | 2 +- ...les-DprfcoAt.js => chat-files-BhQwYNsb.js} | 2 +- ...oard-Bk-Q2IKw.js => dashboard-CEPOaqD_.js} | 2 +- ...vE_dLr.js => deep-assessments-wlaJxGSu.js} | 2 +- .../{hitl-CU41NRGU.js => hitl-B6xuUo5K.js} | 2 +- .../{index-wUju_QgH.js => index-DtLN9Tl2.js} | 4 +- ...t-CheEv4hz.js => info-collect-B0UWcuyP.js} | 2 +- ...V_.js => knowledge-management-CqHJoCPP.js} | 2 +- ...s => knowledge-retrieval-logs-BuxptpXM.js} | 2 +- ...BDV44fSO.js => mcp-management-CjIrO-ML.js} | 2 +- ...or-B8an4PZY.js => mcp-monitor-11v5tw1A.js} | 2 +- ...-BqGHPWg6.js => platform-rbac-Bh9qs4Yi.js} | 2 +- ...m-Dx2jBoTV.js => project-form-B_zaeEz2.js} | 2 +- ...jects-CmriuPoa.js => projects-SM2xzBPT.js} | 2 +- ...9kS4nl.js => roles-management-DBlntTy2.js} | 2 +- ...tings-B9o7NalY.js => settings-CEghhIfC.js} | 2 +- ...eoSRO.js => skills-management-DZbfq1Q8.js} | 2 +- ...CoD6Mmps.js => skills-monitor-BiQhBmWG.js} | 2 +- .../{tasks-BinAAaFq.js => tasks--GDOJS-M.js} | 2 +- ...ard-Bw4We3PJ.js => tool-guard-CE8eTrhN.js} | 2 +- ...evo9Vrc.js => vulnerabilities-DUtK4Xfv.js} | 2 +- ...shell-CzMzkCH6.js => webshell-AtSbAu6X.js} | 2 +- ...lows-CnDGHE42.js => workflows-YBbYWPL3.js} | 2 +- web/static/app/index.html | 2 +- 40 files changed, 119 insertions(+), 46 deletions(-) rename web/static/app/assets/{agents-management-C11UMNcB.js => agents-management-DCa_3yt-.js} (97%) rename web/static/app/assets/{api-docs-DUP3fbt8.js => api-docs-Clg-fLzc.js} (98%) rename web/static/app/assets/{asset-library-DR_p3Y5s.js => asset-library-Akm-Hu68.js} (99%) rename web/static/app/assets/{asset-overview-BqsT_OBs.js => asset-overview-C9ACNQd-.js} (98%) rename web/static/app/assets/{c2-events-_tkmiODT.js => c2-events-CqbeY6fl.js} (96%) rename web/static/app/assets/{c2-listeners-CMkqn-kv.js => c2-listeners-BSSfXddM.js} (97%) rename web/static/app/assets/{c2-payloads-BblbRZ3V.js => c2-payloads-CV0VsheD.js} (97%) rename web/static/app/assets/{c2-profiles-Bi_cnE6y.js => c2-profiles-Dq06IPIs.js} (98%) rename web/static/app/assets/{c2-sessions-CGpE0gz_.js => c2-sessions-D-lYIMj5.js} (98%) rename web/static/app/assets/{c2-shared-DlFqgnDx.js => c2-shared-BVmgN2DT.js} (96%) rename web/static/app/assets/{c2-shared-Xr4UAA5Y.js => c2-shared-CH-QAVpV.js} (94%) rename web/static/app/assets/{c2-tasks-E6_3NkMg.js => c2-tasks-gwxY9U-G.js} (97%) rename web/static/app/assets/{chat-TCElQU2N.js => chat-CLs-iNLs.js} (60%) rename web/static/app/assets/{chat-DkmiFBWT.css => chat-DdpPOGkz.css} (54%) rename web/static/app/assets/{chat-files-DprfcoAt.js => chat-files-BhQwYNsb.js} (99%) rename web/static/app/assets/{dashboard-Bk-Q2IKw.js => dashboard-CEPOaqD_.js} (99%) rename web/static/app/assets/{deep-assessments-CHvE_dLr.js => deep-assessments-wlaJxGSu.js} (99%) rename web/static/app/assets/{hitl-CU41NRGU.js => hitl-B6xuUo5K.js} (99%) rename web/static/app/assets/{index-wUju_QgH.js => index-DtLN9Tl2.js} (96%) rename web/static/app/assets/{info-collect-CheEv4hz.js => info-collect-B0UWcuyP.js} (99%) rename web/static/app/assets/{knowledge-management-BvibXFV_.js => knowledge-management-CqHJoCPP.js} (98%) rename web/static/app/assets/{knowledge-retrieval-logs-4sTFEteP.js => knowledge-retrieval-logs-BuxptpXM.js} (96%) rename web/static/app/assets/{mcp-management-BDV44fSO.js => mcp-management-CjIrO-ML.js} (99%) rename web/static/app/assets/{mcp-monitor-B8an4PZY.js => mcp-monitor-11v5tw1A.js} (99%) rename web/static/app/assets/{platform-rbac-BqGHPWg6.js => platform-rbac-Bh9qs4Yi.js} (99%) rename web/static/app/assets/{project-form-Dx2jBoTV.js => project-form-B_zaeEz2.js} (95%) rename web/static/app/assets/{projects-CmriuPoa.js => projects-SM2xzBPT.js} (99%) rename web/static/app/assets/{roles-management-CD9kS4nl.js => roles-management-DBlntTy2.js} (96%) rename web/static/app/assets/{settings-B9o7NalY.js => settings-CEghhIfC.js} (99%) rename web/static/app/assets/{skills-management-CwAeoSRO.js => skills-management-DZbfq1Q8.js} (97%) rename web/static/app/assets/{skills-monitor-CoD6Mmps.js => skills-monitor-BiQhBmWG.js} (95%) rename web/static/app/assets/{tasks-BinAAaFq.js => tasks--GDOJS-M.js} (99%) rename web/static/app/assets/{tool-guard-Bw4We3PJ.js => tool-guard-CE8eTrhN.js} (99%) rename web/static/app/assets/{vulnerabilities-Cevo9Vrc.js => vulnerabilities-DUtK4Xfv.js} (99%) rename web/static/app/assets/{webshell-CzMzkCH6.js => webshell-AtSbAu6X.js} (99%) rename web/static/app/assets/{workflows-CnDGHE42.js => workflows-YBbYWPL3.js} (99%) diff --git a/web/frontend/src/pages/chat/Composer.jsx b/web/frontend/src/pages/chat/Composer.jsx index d3625e8d..32bbe303 100644 --- a/web/frontend/src/pages/chat/Composer.jsx +++ b/web/frontend/src/pages/chat/Composer.jsx @@ -1,4 +1,4 @@ -import { useId, useRef } from 'react'; +import { useId, useMemo, useRef } from 'react'; import { Banner, Button, Popover, Select, Tag, TextArea, Tooltip, Typography } from '@douyinfe/semi-ui'; import { IconArrowUp, IconChevronDown, IconDesktop, IconFolder, IconPaperclip, IconPlus, IconShield, IconStop } from '@douyinfe/semi-icons'; import { useT } from '../../lib/i18n'; @@ -41,12 +41,37 @@ export default function Composer({ const modeLabelId = useId(); const projectLabelId = useId(); const list = Array.isArray(attachments) ? attachments : []; - const modeOptions = [ - { value: 'single', label: t('chat.agentModePiSingle', null, '单代理') }, - { value: 'deep', label: t('chat.agentModeDeep', null, '深度协作(deep)') }, - { value: 'plan_execute', label: t('chat.agentModePlanExecuteLabel', null, '先规划再执行') }, - { value: 'supervisor', label: t('chat.agentModeSupervisorLabel', null, '监督者(supervisor)') } - ]; + const modeOptions = useMemo(() => [ + { + value: 'single', + title: t('chat.agentModePiSingle', null, '单代理'), + description: t('chat.agentModePiSingleHint', null, '使用设置中选择的 Pi 或兼容运行时执行单代理任务') + }, + { + value: 'deep', + title: t('chat.agentModeDeep', null, 'Deep(DeepAgent)'), + description: t('chat.agentModeDeepHint', null, 'Pi 多代理,适合复杂安全测试、多阶段 task 子代理委派与汇总') + }, + { + value: 'plan_execute', + title: t('chat.agentModePlanExecuteLabel', null, 'Plan-Execute'), + description: t('chat.agentModePlanExecuteHint', null, '规划 → 执行 → 重规划(单执行器带工具)') + }, + { + value: 'supervisor', + title: t('chat.agentModeSupervisorLabel', null, 'Supervisor(专家路由)'), + description: t('chat.agentModeSupervisorHint', null, '专家路由场景:监督者通过 transfer 动态分派多个专业子代理') + } + ].map(({ value, title, description }) => ({ + value, + title, + label: ( + + {title} + {description} + + ) + })), [t]); const projectOptions = [ { value: '', label: t('chat.noProject', null, '不绑定项目') }, ...(Array.isArray(projects) ? projects : []).map(project => ({ value: project.id, label: project.name || project.id })) @@ -93,9 +118,12 @@ export default function Composer({