From 313bac538adff9cb94fe1d89fd74d5461120e971 Mon Sep 17 00:00:00 2001 From: RuoJi6 Date: Sat, 24 Oct 2026 22:44:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BA=94=E7=94=A8=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=97=B6=E5=B0=86=E5=A4=87=E6=B3=A8=E4=B8=8E=20Worker=20?= =?UTF-8?q?=E6=95=B0=E7=BA=B3=E5=85=A5=E8=A6=86=E7=9B=96=E7=A1=AE=E8=AE=A4?= =?UTF-8?q?=EF=BC=88Codex=20gpt-6.1-sol=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/task-template-controls.tsx | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/web/src/components/task-template-controls.tsx b/web/src/components/task-template-controls.tsx index 5d286f0..864b537 100644 --- a/web/src/components/task-template-controls.tsx +++ b/web/src/components/task-template-controls.tsx @@ -464,8 +464,18 @@ export function TaskTemplateControls({ return; } setTemplateInputValue(template.name); - const hasContent = description.trim() !== "" || goal.trim() !== ""; - const changesContent = description !== template.description || goal !== template.goal; + const currentWorkerCount = parseWorkerCountInput(workerCount); + const templateWorkerCount = template.worker_count ?? 0; + const hasContent = + description.trim() !== "" || + goal.trim() !== "" || + remark.trim() !== "" || + (currentWorkerCount == null ? workerCount.trim() !== "" : currentWorkerCount !== 0); + const changesContent = + description !== template.description || + goal !== template.goal || + remark !== (template.remark ?? "") || + (currentWorkerCount == null ? workerCount.trim() !== "" : currentWorkerCount !== templateWorkerCount); if (hasContent && changesContent) { setPendingTemplate(template); return; @@ -554,7 +564,9 @@ export function TaskTemplateControls({ - 选择后会复制模板的描述、目标、分类与任务级规则,不与模板保持关联。 + + 选择后会复制模板的描述、目标、备注、Worker 数量、分类与任务级规则,不与模板保持关联。 + 使用模板「{pendingTemplate?.name}」? - 当前已填写的描述和目标将被模板内容覆盖。 + 当前已填写的描述、目标、备注和 Worker 数量将被模板内容覆盖。 取消