i18n: Chinese says 子代理 for subagent everywhere, not 子 agent in some places and 子代理 in others (willz on Discord)
willz asked what the difference between 子 agent and 子代理 is. There is
none: the zh and zh-TW GUI strings used 子 agent for the Agents page's
subagent row and subagent effort ("Subagents", "subagents",
"subagent effort" and its hint), and 子代理 for every other subagent
string (Codex subagents, routing's sealed subagent task, subagent model).
Both locales now say 子代理 throughout; zh-TW already used 子代理 for the
rest, so it takes the same term. The zh site docs (intent.html,
start.html) said 子 Agent / 主 Agent and now say 子代理 / 主代理, matching
the GUI's 主代理. ja already says サブエージェント everywhere; the READMEs
don't name subagents. The four GUI tests that expected 子 agent are
updated.
Run: omp-roles, profile-details, subagent-effort, tier-effort,
codex-subagent-model, routing-sealed-task, agent-tweak-fold,
claude-signin, codex-memories(-settings), gateway-mode, mobile-web,
usage-ledger-detail, gui-zh-tw, gui-ja, gui-de and i18n-keys in Chromium
(148/148) and WebKit (79/79); subagent-effort also at 420px wide in both
engines, with the zh screenshot checked (子代理推理强度).
This commit is contained in:
@@ -431,7 +431,7 @@ const I18N = {
|
||||
"In {agent}": "在 {agent} 里",
|
||||
"also for small background tasks": "也用于后台小任务",
|
||||
"the default tier": "默认档位",
|
||||
"Subagents": "子 agent",
|
||||
"Subagents": "子代理",
|
||||
"Claude models": "Claude 模型",
|
||||
"Your Claude subscription is in magpie; picking a claude-* model goes through it as before": "已在 magpie 添加 Claude 订阅,claude-* 模型照常走该订阅",
|
||||
"Add a Claude subscription": "添加 Claude 订阅",
|
||||
@@ -541,8 +541,8 @@ const I18N = {
|
||||
"executor": "执行模型",
|
||||
"planner": "规划模型",
|
||||
"tiers": "分档",
|
||||
"subagents": "子 agent",
|
||||
"subagent effort": "子 agent 推理强度",
|
||||
"subagents": "子代理",
|
||||
"subagent effort": "子代理推理强度",
|
||||
"memories": "记忆整理模型",
|
||||
"Codex's own: gpt-5.6-terra, threads summed up with gpt-5.6-luna": "Codex 自带的:整理用 gpt-5.6-terra,总结对话用 gpt-5.6-luna",
|
||||
"opus effort": "opus 推理强度",
|
||||
@@ -550,7 +550,7 @@ const I18N = {
|
||||
"haiku effort": "haiku 推理强度",
|
||||
"fable effort": "fable 推理强度",
|
||||
"the effort Claude Code asks for": "跟随 Claude Code 请求的推理强度",
|
||||
"the session's effort, or the subagent model's own default": "跟随会话的推理强度,或子 agent 模型的默认强度",
|
||||
"the session's effort, or the subagent model's own default": "跟随会话的推理强度,或子代理模型的默认强度",
|
||||
"slow": "慢模型",
|
||||
"smol": "小模型",
|
||||
"sign-in": "登录方式",
|
||||
@@ -4344,7 +4344,7 @@ const I18N = {
|
||||
"In {agent}": "在 {agent} 裡",
|
||||
"also for small background tasks": "也用於後臺小任務",
|
||||
"the default tier": "預設檔位",
|
||||
"Subagents": "子 agent",
|
||||
"Subagents": "子代理",
|
||||
"Claude models": "Claude 模型",
|
||||
"Your Claude subscription is in magpie; picking a claude-* model goes through it as before": "已在 magpie 新增 Claude 訂閱,claude-* 模型照常走該訂閱",
|
||||
"Add a Claude subscription": "新增 Claude 訂閱",
|
||||
@@ -4454,8 +4454,8 @@ const I18N = {
|
||||
"executor": "執行模型",
|
||||
"planner": "規劃模型",
|
||||
"tiers": "分檔",
|
||||
"subagents": "子 agent",
|
||||
"subagent effort": "子 agent 推理強度",
|
||||
"subagents": "子代理",
|
||||
"subagent effort": "子代理推理強度",
|
||||
"memories": "記憶整理模型",
|
||||
"Codex's own: gpt-5.6-terra, threads summed up with gpt-5.6-luna": "Codex 自帶的:整理用 gpt-5.6-terra,總結對話用 gpt-5.6-luna",
|
||||
"opus effort": "opus 推理強度",
|
||||
@@ -4463,7 +4463,7 @@ const I18N = {
|
||||
"haiku effort": "haiku 推理強度",
|
||||
"fable effort": "fable 推理強度",
|
||||
"the effort Claude Code asks for": "跟隨 Claude Code 請求的推理強度",
|
||||
"the session's effort, or the subagent model's own default": "跟隨會話的推理強度,或子 agent 模型的預設強度",
|
||||
"the session's effort, or the subagent model's own default": "跟隨會話的推理強度,或子代理模型的預設強度",
|
||||
"slow": "慢模型",
|
||||
"smol": "小模型",
|
||||
"sign-in": "登入方式",
|
||||
|
||||
@@ -58,7 +58,7 @@ function server(lang, sets) {
|
||||
// the words as i18n.js has them
|
||||
const W = {
|
||||
en: { follows: (l) => `${l}: same as model`, on: (l, m) => `${l}: ${m}`, same: "Same as model", subagents: "subagents", smol: "smol", slow: "slow" },
|
||||
zh: { follows: (l) => `${l}:同主模型`, on: (l, m) => `${l}:${m}`, same: "同主模型", subagents: "子 agent", smol: "小模型", slow: "慢模型" },
|
||||
zh: { follows: (l) => `${l}:同主模型`, on: (l, m) => `${l}:${m}`, same: "同主模型", subagents: "子代理", smol: "小模型", slow: "慢模型" },
|
||||
};
|
||||
|
||||
const omp = '.row.agent[data-id="omp"]';
|
||||
|
||||
@@ -69,7 +69,7 @@ function server(lang, calls, count) {
|
||||
|
||||
const words = {
|
||||
en: { model: "model", effort: "effort", high: "high", def: "agent default", follows: "follows the main model (magpie/a/main)", subagents: "subagents", servers: "MCP servers", skills: "Skills", instructions: "Instructions", on: "on", apply: "Apply", list: "Model list", all: "every model shown", hidden8: "8 hidden", picked3: "only the 3 picked" },
|
||||
zh: { model: "模型", effort: "推理强度", high: "高", def: "Agent 默认值", follows: "跟随主模型(magpie/a/main)", subagents: "子 agent", servers: "MCP 服务器", skills: "技能", instructions: "指令", on: "开启", apply: "应用", list: "模型列表", all: "全部显示", hidden8: "已隐藏 8 个", picked3: "仅显示所选的 3 个" },
|
||||
zh: { model: "模型", effort: "推理强度", high: "高", def: "Agent 默认值", follows: "跟随主模型(magpie/a/main)", subagents: "子代理", servers: "MCP 服务器", skills: "技能", instructions: "指令", on: "开启", apply: "应用", list: "模型列表", all: "全部显示", hidden8: "已隐藏 8 个", picked3: "仅显示所选的 3 个" },
|
||||
};
|
||||
|
||||
for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", "webkit"])) {
|
||||
|
||||
@@ -68,8 +68,8 @@ const W = {
|
||||
title: "subagent effort", def: "default", high: "high", set: "subagent effort: high", follows: "subagents: same as model",
|
||||
},
|
||||
zh: {
|
||||
unset: "子 agent 推理强度:默认\n跟随会话的推理强度,或子 agent 模型的默认强度",
|
||||
title: "子 agent 推理强度", def: "默认", high: "高", set: "子 agent 推理强度:高", follows: "子 agent:同主模型",
|
||||
unset: "子代理推理强度:默认\n跟随会话的推理强度,或子代理模型的默认强度",
|
||||
title: "子代理推理强度", def: "默认", high: "高", set: "子代理推理强度:高", follows: "子代理:同主模型",
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ const W = {
|
||||
},
|
||||
zh: {
|
||||
asks: "跟随 Claude Code 请求的推理强度", effort: (tier) => tier + " 推理强度", title: "haiku 推理强度", def: "默认", low: "低", high: "高",
|
||||
sub: "子 agent 推理强度:默认\n跟随 Claude Code 请求的推理强度", sep: (l, v) => `${l}:${v}`,
|
||||
sub: "子代理推理强度:默认\n跟随 Claude Code 请求的推理强度", sep: (l, v) => `${l}:${v}`,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ magpie group rule rm coder 2</pre>
|
||||
<h2 id="how"><a class="anchor" href="#how">一轮是怎么路由的</a></h2>
|
||||
<p>Agent 发往带规则的分组的每个请求,都按下面的顺序处理:</p>
|
||||
<ol class="steps">
|
||||
<li><b>是不是新的一轮?</b>magpie 看请求里最后一条用户消息:带文字或图片、不带工具结果,说明是你刚刚发言,新的一轮开始;带工具结果,说明是 Agent 在继续进行中的一轮(见<a href="#turn">这一轮的后续请求</a>)。轮次按会话分别计数。子 Agent 是单独的会话:它和主 Agent 共用一个 session,但第一句话不同。</li>
|
||||
<li><b>是不是新的一轮?</b>magpie 看请求里最后一条用户消息:带文字或图片、不带工具结果,说明是你刚刚发言,新的一轮开始;带工具结果,说明是 Agent 在继续进行中的一轮(见<a href="#turn">这一轮的后续请求</a>)。轮次按会话分别计数。子代理是单独的会话:它和主代理共用一个 session,但第一句话不同。</li>
|
||||
<li><b>哪些意图可能起作用?</b>magpie 从上往下看规则,先不管意图:一条规则的其他条件(tokens、图片、推理、Agent)对这个请求都成立,它就是候选,把它的意图收集起来。只有大小写不同的意图算同一个。遇到第一条<em>不带</em>意图的候选规则就停止,因为它会直接命中,排在它下面的规则都轮不到。一个意图也没收集到时,不会询问意图判断模型,也不会产生费用。</li>
|
||||
<li><b>询问意图判断模型</b>把收集到的意图和你这条消息的文字发给它,完整提示词见<a href="#prompt">下文</a>。这个调用和 Agent 的请求一样,走 magpie 自己的网关,所以用的是该模型所属供应商的 Key 或账号,以及它们的故障转移。它有 8 秒时间作答。</li>
|
||||
<li><b>读取回答</b>取回答里出现的第一个整数:<code>1</code> 到 <code>n</code> 表示对应的意图,<code>0</code> 表示都不是。其他情况(没有数字、数字超出范围)这一轮都不命中意图。同一条消息、同一组意图的回答会缓存 10 分钟。</li>
|
||||
@@ -199,7 +199,7 @@ The number of its kind (0 for none):</pre>
|
||||
<li><b>故障转移后留在接手的模型上。</b>规则指定的模型失败、由组里另一个成员接手后,这一轮剩下的请求都交给接手的成员(<span class="ui">会话保持</span>为「自动」「整个会话」或「一轮之内」时)。等你下次发言,规则再重新决定。</li>
|
||||
<li><b>超出上下文。</b>唯一的例外:这一轮进行中,会话涨到当前模型上下文的 95% 时,magpie 会沿用之前的判断结果重新检查一遍规则。如果有规则把它发往上下文<em>更大</em>的模型,就换过去;不会换到上下文更小的模型。</li>
|
||||
<li><b>等待下一轮。</b>如果 magpie 没看到这一轮开始(magpie 是在某一轮进行中启动或重启的),或者当初决定这一轮的规则被删除、或改成了发往别的模型,那么不会有规则移动这一轮,等你下次发言时再重新决定。</li>
|
||||
<li><b>子 Agent。</b>子 Agent 的轮次单独决定,依据它自己的消息。规则可以把子 Agent 发往别处,而主 Agent 留在原来的模型上。</li>
|
||||
<li><b>子代理。</b>子代理的轮次单独决定,依据它自己的消息。规则可以把子代理发往别处,而主代理留在原来的模型上。</li>
|
||||
</ul>
|
||||
<p>这些决定保存在内存里,保留到会话最后一个请求之后 24 小时。重启 magpie 会清空它们,下一条消息会重新决定。</p>
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
<ul>
|
||||
<li>规则只在一轮开始时决定;Agent 回传工具结果的过程中一直留在那个模型上,不会半途换掉而丢掉厂商的缓存。唯一例外:这一轮涨到超过所在模型的上下文,会换到装得下的成员。</li>
|
||||
<li>token 数取请求大小的估算与厂商对这个会话上一个请求的计数中较大的一个。请留出余量:给 200k 的模型设 150k,而不是 199k。</li>
|
||||
<li>子 Agent 是单独的会话,规则可以把它发到别处,主 Agent 仍留在原处。</li>
|
||||
<li>子代理是单独的会话,规则可以把它发到别处,主代理仍留在原处。</li>
|
||||
<li>意图是用几个词描述用户想做什么,例如“写或修测试”“一个简单问题”。每一轮开始时,magpie 会问一次组里指定的意图判断模型:用户这条消息属于哪个可能命中的意图。这个模型可以是 magpie 里的任意模型,建议选小而快、不带推理的。发过去的只有这条消息,不包括整段对话。它出错、超时(8 秒)或给不出答案时,意图条件都不命中,这一轮按其他规则走。如果前面有不带意图的规则已经能决定,就不会去问;同一条消息也不会问两次。它的调用在用量里显示为 magpie 自己的调用。它具体被问了什么、回答怎么用、失败时怎么办,详见<a href="/docs/zh/intent">意图路由</a>。</li>
|
||||
<li><span class="ui">压缩上下文时</span>:Agent 压缩对话上下文时命中——Claude Code 的 <code>/compact</code> 和自动压缩、Codex、OpenCode、Pi、Gemini CLI、Qwen Code、Kimi Code——让更便宜、更快的模型来写总结,对话本身仍留在原来的模型上。压缩请求单独决定:它所在的这一轮和缓存都留在原处。对话比规则里的模型能装下的还长时,改由下一条命中的规则或组本来的顺序决定。</li>
|
||||
<li>路由标签页会显示每一轮是被哪条规则送到哪里的,以及意图判断模型给出的答案。</li>
|
||||
|
||||
Reference in New Issue
Block a user