فهرست منبع

feat: clarify team coordination modes

Jax Docker 1 ماه پیش
والد
کامیت
1efa676099
3فایلهای تغییر یافته به همراه43 افزوده شده و 12 حذف شده
  1. 8 0
      web/src/locales/en.json
  2. 8 0
      web/src/locales/zh.json
  3. 27 12
      web/src/pages/teams/components/CreateTeamDialog.tsx

+ 8 - 0
web/src/locales/en.json

@@ -978,6 +978,14 @@
     "pipeline": "Pipeline",
     "debate": "Debate",
     "parallel": "Parallel",
+    "coordinationSupervisorOption": "Supervisor: one lead coordinates",
+    "coordinationPipelineOption": "Pipeline: hand off in order",
+    "coordinationParallelOption": "Parallel: members work together",
+    "coordinationDebateOption": "Debate: compare viewpoints",
+    "coordinationSupervisorDescription": "Best for group chat and everyday Q&A. The supervisor or planner responds first, then delegates only when needed.",
+    "coordinationPipelineDescription": "Best for fixed workflows. Members work in sequence, and each step reads the previous result.",
+    "coordinationParallelDescription": "Best for research, comparison, and multi-angle analysis. Members can work in parallel and merge the result.",
+    "coordinationDebateDescription": "Best for reviews, tradeoffs, and disputed questions. Roles present viewpoints before forming a conclusion.",
     "teamCreated": "Team created",
     "failedCreateTeam": "Failed to create team",
     "editTeam": "Edit Team",

+ 8 - 0
web/src/locales/zh.json

@@ -978,6 +978,14 @@
     "pipeline": "流水线",
     "debate": "辩论",
     "parallel": "并行",
+    "coordinationSupervisorOption": "主管:一人统筹分配",
+    "coordinationPipelineOption": "流水线:按顺序交接",
+    "coordinationParallelOption": "并行:成员同时处理",
+    "coordinationDebateOption": "辩论:多方给出观点",
+    "coordinationSupervisorDescription": "适合群聊和日常问答。默认由主管或规划者先回应,必要时再拆分任务给其他成员。",
+    "coordinationPipelineDescription": "适合固定流程任务。成员按顺序接力,每一步会读取前一步结果。",
+    "coordinationParallelDescription": "适合资料收集、对比和多角度分析。成员可并行处理,最后合并结果。",
+    "coordinationDebateDescription": "适合评审、方案取舍和争议问题。不同角色会提出观点,再形成结论。",
     "teamCreated": "团队已创建",
     "failedCreateTeam": "创建团队失败",
     "editTeam": "编辑团队",

+ 27 - 12
web/src/pages/teams/components/CreateTeamDialog.tsx

@@ -123,13 +123,11 @@ export function CreateTeamDialog({
                     <Select
                       value={form.coordination_mode}
                       onChange={(event) => setForm({ ...form, coordination_mode: event.target.value })}
-                      options={[
-                        { value: "supervisor", label: t("teams.supervisor") },
-                        { value: "pipeline", label: t("teams.pipeline") },
-                        { value: "parallel", label: t("teams.parallel") },
-                        { value: "debate", label: t("teams.debate") },
-                      ]}
+                      options={coordinationModeOptions(t)}
                     />
+                    <p className="text-xs leading-5 text-muted-foreground">
+                      {coordinationModeDescription(t, form.coordination_mode)}
+                    </p>
                   </Field>
                 </div>
                 <Field label={t("common.description")}>
@@ -409,13 +407,11 @@ export function EditTeamDialog({
                     <Select
                       value={form.coordination_mode}
                       onChange={(event) => setForm({ ...form, coordination_mode: event.target.value })}
-                      options={[
-                        { value: "supervisor", label: t("teams.supervisor") },
-                        { value: "pipeline", label: t("teams.pipeline") },
-                        { value: "parallel", label: t("teams.parallel") },
-                        { value: "debate", label: t("teams.debate") },
-                      ]}
+                      options={coordinationModeOptions(t)}
                     />
+                    <p className="text-xs leading-5 text-muted-foreground">
+                      {coordinationModeDescription(t, form.coordination_mode)}
+                    </p>
                   </Field>
                 </div>
                 <Field label={t("common.description")}>
@@ -457,6 +453,25 @@ function SummaryPill({ icon, label, value }: { icon: React.ReactNode; label: str
   );
 }
 
+function coordinationModeOptions(t: (key: string) => string) {
+  return [
+    { value: "supervisor", label: t("teams.coordinationSupervisorOption") },
+    { value: "pipeline", label: t("teams.coordinationPipelineOption") },
+    { value: "parallel", label: t("teams.coordinationParallelOption") },
+    { value: "debate", label: t("teams.coordinationDebateOption") },
+  ];
+}
+
+function coordinationModeDescription(t: (key: string) => string, mode: string) {
+  const keyByMode: Record<string, string> = {
+    supervisor: "coordinationSupervisorDescription",
+    pipeline: "coordinationPipelineDescription",
+    parallel: "coordinationParallelDescription",
+    debate: "coordinationDebateDescription",
+  };
+  return t(`teams.${keyByMode[mode] ?? keyByMode.supervisor}`);
+}
+
 function Field({ label, children }: { label: string; children: React.ReactNode }) {
   return (
     <label className="block space-y-1.5 text-sm">