From 41f3985248b3c22914029e7fdf7ca718c5e884df Mon Sep 17 00:00:00 2001 From: host Date: Fri, 6 Nov 2026 17:09:34 +0000 Subject: [PATCH] console: unify goal mode to no-time-limit only (port of 395dffb onto 37ba687) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DispatchSection keeps a single 'goal 模式' checkbox (the former invincible option): checking it sends goal_mode=1 plus no_time_limit=1. TaskDetailPanel drops the '无敌版' label. Ported verbatim from feat-console-goal-unify commit 395dffb (base 622c51e); console.html rebuilt from cloud/console-react with npm run build:console (tsc+vite pass) and synced verbatim from dist/index.html (sha256 daba1941...). --- .../src/sections/DispatchSection.tsx | 18 +++--- .../src/sections/TaskDetailPanel.tsx | 2 +- cloud/console.html | 56 +++++++++---------- 3 files changed, 36 insertions(+), 40 deletions(-) diff --git a/cloud/console-react/src/sections/DispatchSection.tsx b/cloud/console-react/src/sections/DispatchSection.tsx index a30efcc..b0a01c2 100644 --- a/cloud/console-react/src/sections/DispatchSection.tsx +++ b/cloud/console-react/src/sections/DispatchSection.tsx @@ -9,7 +9,6 @@ export default function DispatchSection() { const [prompt, setPrompt] = useState(""); const [coordParts, setCoordParts] = useState(""); const [goalMode, setGoalMode] = useState(false); - const [goalInvincible, setGoalInvincible] = useState(false); const [planMode, setPlanMode] = useState(false); const [executor, setExecutor] = useState("docker"); const [model, setModel] = useState(""); @@ -45,19 +44,18 @@ export default function DispatchSection() { } if (planMode) { if (approval === "full") { setMsg("计划模式不能与完全访问同用"); return; } - if (goalMode || goalInvincible) { setMsg("计划模式不能与 goal 模式同用"); return; } + if (goalMode) { setMsg("计划模式不能与 goal 模式同用"); return; } body.plan = 1; } - // 无敌版 = goal 模式 + 任务不限时:勾了它就同时发 goal_mode 与 - // no_time_limit(服务端已支持该字段);与普通 goal 勾选不冲突, - // 无敌版优先,单独勾普通 goal 时行为不变。 - if (goalInvincible) { body.goal_mode = 1; body.no_time_limit = 1; } - else if (goalMode) body.goal_mode = 1; + // 唯一 goal 模式 = 原无敌版:勾选即同时发 goal_mode 与 + // no_time_limit(任务不限时);普通 goal 入口已取消,不再 + // 单独发不带 no_time_limit 的 goal_mode。 + if (goalMode) { body.goal_mode = 1; body.no_time_limit = 1; } const coordRaw = coordParts.trim(); if (coordRaw) { try { body.coordinator_parts = JSON.parse(coordRaw); } catch { setMsg("协调员子任务 JSON 解析失败"); return; } if (!Array.isArray(body.coordinator_parts)) { setMsg("协调员子任务必须是数组"); return; } - if (goalMode || goalInvincible || planMode) { setMsg("协调员任务不能与 goal/计划模式同用:协调员任务本身不跑模型回合,请取消 goal/计划勾选,或清空协调员 JSON"); return; } + if (goalMode || planMode) { setMsg("协调员任务不能与 goal/计划模式同用:协调员任务本身不跑模型回合,请取消 goal/计划勾选,或清空协调员 JSON"); return; } } const atts = gatherAttachments(filesRef.current?.files || null, dirRef.current?.files || null, imgRef.current?.files || null); try { @@ -81,7 +79,6 @@ export default function DispatchSection() { -