Skip to content

armgit / Orkas

Public Imported from GitHub
0

Orkas is an open-source (MIT), local-first AI team for your desktop: a Commander turns your goal into to-dos and coordinates 16 built-in specialist agents plus Claude Code, Codex, OpenCode, OpenClaw and Hermes, with projects, scheduled automations and connectors. Free app for macOS & Windows; built-in models or your own keys.

Translate Chinese prompt fragments, jsonl markers, and UI fallbacks to English

wytabf2169a3180
diff --git a/src/main/data/avatars.json b/src/main/data/avatars.json
index 70f3cac4..bba1c2ce 100644
--- a/src/main/data/avatars.json
+++ b/src/main/data/avatars.json
@@ -1,39 +1,39 @@
{
"commander_default": { "icon": "crown", "color": "gold" },
"icons": [
- { "id": "crown", "label": "皇冠", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 19h18\"/><path d=\"M3 8l4 5 5-7 5 7 4-5v11H3V8z\"/></svg>" },
- { "id": "sparkle", "label": "闪亮", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M5.6 18.4l2.1-2.1M16.3 7.7l2.1-2.1\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/></svg>" },
- { "id": "rocket", "label": "火箭", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M14 4c4 0 6 2 6 6 0 4-3 7-6 8l-2-2-4 0-2-2 0-4 2-2c1-3 4-6 6-6z\"/><circle cx=\"14.5\" cy=\"9.5\" r=\"1.5\"/><path d=\"M6 14c-1 1-2 3-2 5 2 0 4-1 5-2\"/></svg>" },
- { "id": "brain", "label": "大脑", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9 4a3 3 0 0 0-3 3v1a3 3 0 0 0-2 3 3 3 0 0 0 1 2 3 3 0 0 0 0 4 3 3 0 0 0 4 1 3 3 0 0 0 6 0 3 3 0 0 0 4-1 3 3 0 0 0 0-4 3 3 0 0 0 1-2 3 3 0 0 0-2-3V7a3 3 0 0 0-3-3 3 3 0 0 0-3 2 3 3 0 0 0-3-2z\"/></svg>" },
- { "id": "bulb", "label": "灯泡", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9 18h6M10 22h4M12 2a7 7 0 0 0-4 12c1 1 1 2 1 3h6c0-1 0-2 1-3a7 7 0 0 0-4-12z\"/></svg>" },
- { "id": "bot", "label": "机器人", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"4\" y=\"8\" width=\"16\" height=\"12\" rx=\"2\"/><path d=\"M12 4v4M8 14h.01M16 14h.01M9 18h6\"/><circle cx=\"12\" cy=\"3\" r=\"1\"/></svg>" },
- { "id": "atom", "label": "原子", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"2\"/><ellipse cx=\"12\" cy=\"12\" rx=\"10\" ry=\"4\"/><ellipse cx=\"12\" cy=\"12\" rx=\"10\" ry=\"4\" transform=\"rotate(60 12 12)\"/><ellipse cx=\"12\" cy=\"12\" rx=\"10\" ry=\"4\" transform=\"rotate(120 12 12)\"/></svg>" },
- { "id": "compass", "label": "指南针", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"9\"/><path d=\"M15.5 8.5L13 13l-4.5 2.5L11 11l4.5-2.5z\"/></svg>" },
- { "id": "leaf", "label": "叶子", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M11 20A7 7 0 0 1 4 13V8a4 4 0 0 1 4-4h8a4 4 0 0 1 4 4v1a11 11 0 0 1-9 11\"/><path d=\"M2 22c5-2 8-5 10-9\"/></svg>" },
- { "id": "flame", "label": "火焰", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 2c1 4 5 6 5 11a5 5 0 0 1-10 0c0-2 1-3 2-4-1 3 1 4 1 4s-2-5 2-11z\"/></svg>" },
- { "id": "star", "label": "星星", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polygon points=\"12 2 15 9 22 10 17 15 18 22 12 18 6 22 7 15 2 10 9 9\"/></svg>" },
- { "id": "bolt", "label": "闪电", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polygon points=\"13 2 3 14 12 14 11 22 21 10 12 10\"/></svg>" },
- { "id": "target", "label": "靶心", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"9\"/><circle cx=\"12\" cy=\"12\" r=\"5\"/><circle cx=\"12\" cy=\"12\" r=\"1.5\"/></svg>" },
- { "id": "music", "label": "音符", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9 18V5l11-2v13\"/><circle cx=\"6\" cy=\"18\" r=\"3\"/><circle cx=\"17\" cy=\"16\" r=\"3\"/></svg>" },
- { "id": "code", "label": "代码", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"8 6 2 12 8 18\"/><polyline points=\"16 6 22 12 16 18\"/><line x1=\"14\" y1=\"4\" x2=\"10\" y2=\"20\"/></svg>" },
- { "id": "palette", "label": "调色板", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 3a9 9 0 1 0 0 18c1 0 2-1 2-2s-1-2 0-3 3-1 4-2a9 9 0 0 0-6-11z\"/><circle cx=\"7.5\" cy=\"10.5\" r=\"1\"/><circle cx=\"11\" cy=\"7\" r=\"1\"/><circle cx=\"15.5\" cy=\"9\" r=\"1\"/></svg>" }
+ { "id": "crown", "label": "Crown", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 19h18\"/><path d=\"M3 8l4 5 5-7 5 7 4-5v11H3V8z\"/></svg>" },
+ { "id": "sparkle", "label": "Sparkle", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M5.6 18.4l2.1-2.1M16.3 7.7l2.1-2.1\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/></svg>" },
+ { "id": "rocket", "label": "Rocket", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M14 4c4 0 6 2 6 6 0 4-3 7-6 8l-2-2-4 0-2-2 0-4 2-2c1-3 4-6 6-6z\"/><circle cx=\"14.5\" cy=\"9.5\" r=\"1.5\"/><path d=\"M6 14c-1 1-2 3-2 5 2 0 4-1 5-2\"/></svg>" },
+ { "id": "brain", "label": "Brain", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9 4a3 3 0 0 0-3 3v1a3 3 0 0 0-2 3 3 3 0 0 0 1 2 3 3 0 0 0 0 4 3 3 0 0 0 4 1 3 3 0 0 0 6 0 3 3 0 0 0 4-1 3 3 0 0 0 0-4 3 3 0 0 0 1-2 3 3 0 0 0-2-3V7a3 3 0 0 0-3-3 3 3 0 0 0-3 2 3 3 0 0 0-3-2z\"/></svg>" },
+ { "id": "bulb", "label": "Lightbulb", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9 18h6M10 22h4M12 2a7 7 0 0 0-4 12c1 1 1 2 1 3h6c0-1 0-2 1-3a7 7 0 0 0-4-12z\"/></svg>" },
+ { "id": "bot", "label": "Robot", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"4\" y=\"8\" width=\"16\" height=\"12\" rx=\"2\"/><path d=\"M12 4v4M8 14h.01M16 14h.01M9 18h6\"/><circle cx=\"12\" cy=\"3\" r=\"1\"/></svg>" },
+ { "id": "atom", "label": "Atom", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"2\"/><ellipse cx=\"12\" cy=\"12\" rx=\"10\" ry=\"4\"/><ellipse cx=\"12\" cy=\"12\" rx=\"10\" ry=\"4\" transform=\"rotate(60 12 12)\"/><ellipse cx=\"12\" cy=\"12\" rx=\"10\" ry=\"4\" transform=\"rotate(120 12 12)\"/></svg>" },
+ { "id": "compass", "label": "Compass", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"9\"/><path d=\"M15.5 8.5L13 13l-4.5 2.5L11 11l4.5-2.5z\"/></svg>" },
+ { "id": "leaf", "label": "Leaf", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M11 20A7 7 0 0 1 4 13V8a4 4 0 0 1 4-4h8a4 4 0 0 1 4 4v1a11 11 0 0 1-9 11\"/><path d=\"M2 22c5-2 8-5 10-9\"/></svg>" },
+ { "id": "flame", "label": "Flame", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 2c1 4 5 6 5 11a5 5 0 0 1-10 0c0-2 1-3 2-4-1 3 1 4 1 4s-2-5 2-11z\"/></svg>" },
+ { "id": "star", "label": "Star", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polygon points=\"12 2 15 9 22 10 17 15 18 22 12 18 6 22 7 15 2 10 9 9\"/></svg>" },
+ { "id": "bolt", "label": "Lightning", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polygon points=\"13 2 3 14 12 14 11 22 21 10 12 10\"/></svg>" },
+ { "id": "target", "label": "Target", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"9\"/><circle cx=\"12\" cy=\"12\" r=\"5\"/><circle cx=\"12\" cy=\"12\" r=\"1.5\"/></svg>" },
+ { "id": "music", "label": "Music note", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9 18V5l11-2v13\"/><circle cx=\"6\" cy=\"18\" r=\"3\"/><circle cx=\"17\" cy=\"16\" r=\"3\"/></svg>" },
+ { "id": "code", "label": "Code", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"8 6 2 12 8 18\"/><polyline points=\"16 6 22 12 16 18\"/><line x1=\"14\" y1=\"4\" x2=\"10\" y2=\"20\"/></svg>" },
+ { "id": "palette", "label": "Palette", "svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 3a9 9 0 1 0 0 18c1 0 2-1 2-2s-1-2 0-3 3-1 4-2a9 9 0 0 0-6-11z\"/><circle cx=\"7.5\" cy=\"10.5\" r=\"1\"/><circle cx=\"11\" cy=\"7\" r=\"1\"/><circle cx=\"15.5\" cy=\"9\" r=\"1\"/></svg>" }
],
"colors": [
- { "id": "gold", "label": "金色", "bg": "#f8d568", "fg": "#7a4f00" },
- { "id": "coral", "label": "珊瑚", "bg": "#ff8a7a", "fg": "#7a1f1a" },
- { "id": "mint", "label": "薄荷", "bg": "#86efac", "fg": "#15532f" },
- { "id": "lavender", "label": "薰衣草", "bg": "#c4b5fd", "fg": "#3b1f7a" },
- { "id": "peach", "label": "桃子", "bg": "#fdba74", "fg": "#7a3a0a" },
- { "id": "sky", "label": "天空", "bg": "#7dd3fc", "fg": "#0c4a6e" },
- { "id": "sunshine", "label": "阳光", "bg": "#fde047", "fg": "#713f12" },
- { "id": "rose", "label": "玫瑰", "bg": "#fb7185", "fg": "#7a0f30" },
- { "id": "sage", "label": "鼠尾草", "bg": "#a3d9a5", "fg": "#1b4d22" },
- { "id": "periwinkle", "label": "长春花", "bg": "#a5b4fc", "fg": "#312e81" },
- { "id": "butter", "label": "奶油", "bg": "#fcd34d", "fg": "#78350f" },
- { "id": "blush", "label": "腮红", "bg": "#f9a8d4", "fg": "#7a1d4f" },
- { "id": "cyan", "label": "青色", "bg": "#67e8f9", "fg": "#155e75" },
- { "id": "violet", "label": "紫罗兰", "bg": "#d8b4fe", "fg": "#581c87" },
- { "id": "lime", "label": "青柠", "bg": "#bef264", "fg": "#365314" },
- { "id": "salmon", "label": "三文鱼", "bg": "#fca5a5", "fg": "#7f1d1d" }
+ { "id": "gold", "label": "Gold", "bg": "#f8d568", "fg": "#7a4f00" },
+ { "id": "coral", "label": "Coral", "bg": "#ff8a7a", "fg": "#7a1f1a" },
+ { "id": "mint", "label": "Mint", "bg": "#86efac", "fg": "#15532f" },
+ { "id": "lavender", "label": "Lavender", "bg": "#c4b5fd", "fg": "#3b1f7a" },
+ { "id": "peach", "label": "Peach", "bg": "#fdba74", "fg": "#7a3a0a" },
+ { "id": "sky", "label": "Sky", "bg": "#7dd3fc", "fg": "#0c4a6e" },
+ { "id": "sunshine", "label": "Sunshine", "bg": "#fde047", "fg": "#713f12" },
+ { "id": "rose", "label": "Rose", "bg": "#fb7185", "fg": "#7a0f30" },
+ { "id": "sage", "label": "Sage", "bg": "#a3d9a5", "fg": "#1b4d22" },
+ { "id": "periwinkle", "label": "Periwinkle", "bg": "#a5b4fc", "fg": "#312e81" },
+ { "id": "butter", "label": "Butter", "bg": "#fcd34d", "fg": "#78350f" },
+ { "id": "blush", "label": "Blush", "bg": "#f9a8d4", "fg": "#7a1d4f" },
+ { "id": "cyan", "label": "Cyan", "bg": "#67e8f9", "fg": "#155e75" },
+ { "id": "violet", "label": "Violet", "bg": "#d8b4fe", "fg": "#581c87" },
+ { "id": "lime", "label": "Lime", "bg": "#bef264", "fg": "#365314" },
+ { "id": "salmon", "label": "Salmon", "bg": "#fca5a5", "fg": "#7f1d1d" }
]
}
diff --git a/src/main/features/agents.ts b/src/main/features/agents.ts
index 434a907e..abe6c0fd 100644
--- a/src/main/features/agents.ts
+++ b/src/main/features/agents.ts
@@ -275,7 +275,7 @@ function _agentNameKey(name: string): string {
}
function assertAgentNameAllowed(name: string): void {
const key = _agentNameKey(name);
- if (!key) return; // empty handled elsewhere (defaults to "未命名智能体")
+ if (!key) return; // empty handled elsewhere (defaults to t('agent.default_name'))
if (RESERVED_AGENT_NAMES.has(key)) {
const err: any = new Error(`agent name "${name}" is reserved`);
err.code = 'E_AGENT_NAME_RESERVED';
@@ -710,7 +710,7 @@ export async function createCustomAgent(
const desc = resolveBilingualDescription(description, description_zh, description_en);
const data: AgentRaw = {
agent_id: agentId,
- name: String(name || '').trim() || '未命名智能体',
+ name: String(name || '').trim() || t('agent.default_name'),
description_zh: desc.description_zh,
description_en: desc.description_en,
workflow: String(workflow || ''),
@@ -953,7 +953,7 @@ export async function updateCustomAgent(
else if (without.length) data.inputs = without;
else delete data.inputs;
}
- if (!data.name) data.name = '未命名智能体';
+ if (!data.name) data.name = t('agent.default_name');
data.updated_at = nowIso();
await writeJson(f, data);
_invalidateAgentListCache();
@@ -1307,7 +1307,7 @@ export async function sendToAgentEditChat(userId: string, agentId: string, conte
});
if (!result.ok) {
- const errMsg = `模型响应失败: ${result.error || 'unknown'}`;
+ const errMsg = `Model response failed: ${result.error || 'unknown'}`;
await _appendAgentChatMessage(userId, agentId,
{ time: nowIso(), role: 'assistant', content: errMsg });
return { ok: false, message: errMsg, error: result.error || '' };
@@ -1416,7 +1416,7 @@ export async function* streamSendToAgentEditChat(
finalText = cleanText;
event = { type: 'final', text: cleanText, updated };
} else if (etype === 'error') {
- errMsg = `模型响应失败: ${event.text || 'unknown'}`;
+ errMsg = `Model response failed: ${event.text || 'unknown'}`;
}
for (const text of synthesizedProgress) {
@@ -1442,7 +1442,7 @@ export async function* streamSendToAgentEditChat(
} catch (err) {
log.error('stream failed:', err);
const msg = (err as Error).message || String(err);
- errMsg = `模型响应失败: ${msg}`;
+ errMsg = `Model response failed: ${msg}`;
yield { type: 'error', text: msg };
} finally {
// Must live in finally: on user abort the IPC layer breaks out of the
@@ -1462,8 +1462,8 @@ export async function* streamSendToAgentEditChat(
{ time: nowIso(), role: 'assistant', content, ...(saved ? { process: saved } : {}) });
} else if (streamingText.trim() || processItems.length) {
const content = streamingText.trim()
- ? `${streamingText}\n\n(回复已中断)`
- : '(回复已中断)';
+ ? `${streamingText}\n\n(reply interrupted)`
+ : '(reply interrupted)';
await _appendAgentChatMessage(userId, agentId,
{ time: nowIso(), role: 'assistant', content, ...(saved ? { process: saved } : {}) });
}
diff --git a/src/main/features/auth.ts b/src/main/features/auth.ts
index a4192d70..60795e98 100644
--- a/src/main/features/auth.ts
+++ b/src/main/features/auth.ts
@@ -891,7 +891,7 @@ export async function startOAuth(
const provider = oauth.getOAuthProvider(id as any);
if (!provider) {
const hint = _minimaxRegisterError && id.startsWith('minimax-portal')
- ? `(MiniMax OAuth 注册时报错:${_minimaxRegisterError})`
+ ? t('oauth.minimax.register_error_hint', { message: _minimaxRegisterError })
: '';
throw new Error(`provider "${id}" does not support OAuth${hint}`);
}
diff --git a/src/main/features/avatars.ts b/src/main/features/avatars.ts
index 4ff5e2f1..f5ba2259 100644
--- a/src/main/features/avatars.ts
+++ b/src/main/features/avatars.ts
@@ -1,20 +1,29 @@
/**
* Avatar catalog — single source of truth for icon / color tokens.
*
- * 数据本身在 `src/main/data/avatars.json`:
+ * Data lives at `src/main/data/avatars.json`:
* - icons[]: { id, label, svg }
* - colors[]: { id, label, bg, fg }
- * - commander_default: { icon, color } (指挥官固定图标 + 默认颜色)
+ * - commander_default: { icon, color } (commander's fixed icon + default color)
*
- * 后端只用 id 做白名单校验(agents.ts / config.ts 写入前过这里),
- * 不感知 SVG / hex —— 那两份是渲染数据,靠 `avatars.getCatalog` IPC 一次性
- * 喂给 renderer 缓存。新增/改名/换 SVG 全在 JSON 一处改。
+ * `label` values in the JSON are English defaults; the renderer resolves a
+ * localized name via `t('avatar.icon.<id>')` / `t('avatar.color.<id>')` and
+ * falls back to the JSON `label` when no locale key exists.
*
- * **Why** 一份数据:之前后端为做随机回填复制了一份 token 池,立刻就和
- * 前端的 `avatar.js` 出现了双写风险(改一处忘另一处)。统一到 JSON 后:
- * - 后端只校验 id;不需要颜色 hex / svg;
- * - 前端拿 catalog 时也拿到全套(含 SVG / hex),不再硬编码;
- * - 所有"是否合法 token"的真相都源自这一份文件。
+ * The backend only validates by `id` (agents.ts / config.ts pass writes
+ * through here) — it doesn't care about SVG / hex; those exist as render
+ * data and are pushed to the renderer once via the `avatars.getCatalog` IPC,
+ * which caches them. Add / rename / re-style happens in the JSON, in one
+ * place.
+ *
+ * **Why** one source of truth: an earlier version kept a duplicate token
+ * pool on the backend for random backfill, which immediately invited the
+ * "edit one, forget the other" failure mode with the renderer's `avatar.js`.
+ * After unification to the JSON:
+ * - the backend only validates `id`; no color hex / svg awareness;
+ * - the renderer receives the full catalog (incl. SVG / hex) once, no
+ * hard-coding;
+ * - the canonical "is this token valid" truth lives in this one file.
*/
import * as fs from 'node:fs';
diff --git a/src/main/features/chats.ts b/src/main/features/chats.ts
index 26814dc3..084fae54 100644
--- a/src/main/features/chats.ts
+++ b/src/main/features/chats.ts
@@ -27,6 +27,7 @@ import {
readJson, writeJson, invalidateLineCount, readJsonl,
} from '../storage';
import { createLogger } from '../logger';
+import { t } from '../i18n';
const log = createLogger('chats');
import * as search from './search';
@@ -160,7 +161,7 @@ export async function createConversation(userId: string, {
const cid = genConversationId();
const conv: Conversation = {
conversation_id: cid,
- title: title || '新对话',
+ title: title || t('chat.default_title'),
kind,
agent_id: agentId || '',
skill_id: skillId || '',
@@ -281,9 +282,9 @@ export async function deleteConversationsByAgent(agentId: string): Promise<numbe
}
export function autoTitle(content: string): string {
- let t = (content || '').trim().replace(/\n/g, ' ');
- if (t.length > 40) t = t.slice(0, 40) + '…';
- return t || '新对话';
+ let text = (content || '').trim().replace(/\n/g, ' ');
+ if (text.length > 40) text = text.slice(0, 40) + '…';
+ return text || t('chat.default_title');
}
// ── Boot-time stale state sweep ──────────────────────────────────────────
diff --git a/src/main/features/contexts.ts b/src/main/features/contexts.ts
index 2f3cb7f6..6165ba9d 100644
--- a/src/main/features/contexts.ts
+++ b/src/main/features/contexts.ts
@@ -584,22 +584,22 @@ export function rebuildIndex(): IndexCache {
const pad = (n: number) => String(n).padStart(2, '0');
const stamp = `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())} ${pad(now.getHours())}:${pad(now.getMinutes())}`;
const lines: string[] = [];
- lines.push('# 知识库索引', '');
- lines.push(`_自动维护,请勿手动编辑。最后更新:${stamp}_`, '');
- lines.push('> 模型通过 `kb_search` / `kb_read` 工具访问;本文件仅供在 Finder / 资源管理器里浏览。', '');
+ lines.push(`# ${t('contexts.index.heading')}`, '');
+ lines.push(`_${t('contexts.index.maintained_note', { stamp })}_`, '');
+ lines.push(`> ${t('contexts.index.model_access_note')}`, '');
if (!rootDirs.length && !rootFiles.length) {
- lines.push('(暂无内容)');
+ lines.push(t('contexts.index.empty_section'));
} else {
if (rootDirs.length) {
- lines.push('## 目录');
+ lines.push(`## ${t('contexts.index.dirs_heading')}`);
for (const d of rootDirs) {
const n = dirCounts.get(d.name) || 0;
- lines.push(`- 📁 \`${d.name}/\` — ${n} 篇`);
+ lines.push(`- 📁 \`${d.name}/\` — ${t('contexts.index.file_count', { count: n })}`);
}
lines.push('');
}
if (rootFiles.length) {
- lines.push('## 根目录文件');
+ lines.push(`## ${t('contexts.index.root_files_heading')}`);
for (const f of rootFiles) {
const entry = allEntries.find((e) => e.path === f.name);
lines.push(`- \`${f.name}\`${entry?.title ? ` — ${entry.title}` : ''}`);
@@ -618,11 +618,11 @@ export function rebuildIndex(): IndexCache {
// Full root markdown — re-read what we just wrote, for getContextIndexMarkdown.
let rootMd = '';
try { rootMd = fs.readFileSync(path.join(contextsRoot(), CONTEXTS_INDEX_FILENAME), 'utf8'); }
- catch { rootMd = '(知识库为空)'; }
+ catch { rootMd = t('contexts.index.empty_kb'); }
const flatLines = allEntries.length
? allEntries.map((e) => `- \`${e.path}\`${e.title ? ` — ${e.title}` : ''}`).join('\n')
- : '(知识库为空)';
+ : t('contexts.index.empty_kb');
indexCache.mtime = Date.now();
indexCache.rootMarkdown = rootMd;
diff --git a/src/main/features/group_chat/bus.ts b/src/main/features/group_chat/bus.ts
index 4d44665f..d31c86cb 100644
--- a/src/main/features/group_chat/bus.ts
+++ b/src/main/features/group_chat/bus.ts
@@ -114,7 +114,7 @@ interface QueueItem {
* them as an observer (e.g. commander wakes on every agent → user reply
* so it can advance the plan). If the LLM produces an empty final, the
* post-turn enqueue is suppressed — otherwise every silent observation
- * would emit a "(无回复)" placeholder bubble and pollute the chat. */
+ * would emit a "(no reply)" placeholder bubble and pollute the chat. */
tap?: boolean;
/** Plan-executor stamp: the plan step (1-based index) whose dispatch
* created this turn. When the turn ends, `plan_executor.reconcile` uses
@@ -1034,22 +1034,22 @@ async function runTurn(state: CidState, w: WorkerState, item: QueueItem): Promis
if (editId) {
const target = await agentsFeat.getAgent(editId);
if (!target) {
- workingText = `${workingText}\n\n<span style="color:var(--danger)">⚠️ 智能体编辑失败:找不到智能体 (id=${editId})。</span>`;
+ workingText = `${workingText}\n\n<span style="color:var(--danger)">⚠️ Agent edit failed: agent not found (id=${editId}).</span>`;
} else if (target.source !== 'custom') {
// Built-in agent — read-only here; the dev-mode inline edit chat
// remains the only path that can mutate builtins (per §6).
- workingText = `${workingText}\n\n<span style="color:var(--danger)">⚠️ 内置智能体不能在主对话里改;请在右侧详情面板里 fork 一份再改。</span>`;
+ workingText = `${workingText}\n\n<span style="color:var(--danger)">⚠️ Built-in agents can't be edited from the main chat; fork one in the right-hand detail panel and edit there.</span>`;
} else if (agentsFeat.isCliAgent(target)) {
// CLI-backed agent — runtime / model / args are owned by the
// create-modal + edit-form, not the LLM. Same constraint as
// chat_agent_setup_cli.md applies to the commander flow.
- workingText = `${workingText}\n\n<span style="color:var(--danger)">⚠️ 外接智能体只能在右侧详情面板里改。</span>`;
+ workingText = `${workingText}\n\n<span style="color:var(--danger)">⚠️ External agents can only be edited from the right-hand detail panel.</span>`;
} else {
const updated = await agentsFeat.updateCustomAgent(editId, r.fields);
if (updated) {
createdAgent = { agent_id: updated.agent_id, name: updated.name, kind: 'updated' };
} else {
- workingText = `${workingText}\n\n<span style="color:var(--danger)">⚠️ 智能体更新失败。</span>`;
+ workingText = `${workingText}\n\n<span style="color:var(--danger)">⚠️ Agent update failed.</span>`;
}
}
} else {
@@ -1059,13 +1059,13 @@ async function runTurn(state: CidState, w: WorkerState, item: QueueItem): Promis
} else {
// Append failure marker to text — onTurnFinished will surface
// it as a normal `persist` outcome.
- workingText = `${workingText}\n\n<span style="color:var(--danger)">⚠️ 智能体创建失败:缺少必要字段(name / workflow)。</span>`;
+ workingText = `${workingText}\n\n<span style="color:var(--danger)">⚠️ Agent creation failed: missing required field(s) (name / workflow).</span>`;
}
}
} catch (err) {
- const verb = editId ? '编辑' : '创建';
- log.error(`${editId ? 'edit' : 'create'}-agent failed cid=${cid}: ${(err as Error).message}`);
- workingText = `${workingText}\n\n<span style="color:var(--danger)">⚠️ 智能体${verb}失败:${(err as Error).message}</span>`;
+ const verb = editId ? 'edit' : 'create';
+ log.error(`${verb}-agent failed cid=${cid}: ${(err as Error).message}`);
+ workingText = `${workingText}\n\n<span style="color:var(--danger)">⚠️ Agent ${verb} failed: ${(err as Error).message}</span>`;
}
}
}
@@ -1106,7 +1106,7 @@ async function runTurn(state: CidState, w: WorkerState, item: QueueItem): Promis
// a stalled chat.
outcome = {
kind: 'persist',
- text: workingText || '(无回复)',
+ text: workingText || '(no reply)',
...(form ? { form } : {}),
...(produced.length ? { produced } : {}),
...(createdAgent ? { createdAgent } : {}),
diff --git a/src/main/features/group_chat/conv_workspace.ts b/src/main/features/group_chat/conv_workspace.ts
index 44363a32..6c5309a1 100644
--- a/src/main/features/group_chat/conv_workspace.ts
+++ b/src/main/features/group_chat/conv_workspace.ts
@@ -43,11 +43,12 @@ const log = createLogger('group_chat.conv_workspace');
const MAX_SLUG_LEN = 32;
// Match the literal default titles `chats.createConversation` writes when
-// no title is supplied (currently '新对话') AND any zh / en variant we may
-// localize into. Match by string equality, not lang lookup, because state
-// can carry whatever the conv was named at creation regardless of current
-// UI language.
-const PLACEHOLDER_TITLES: ReadonlySet<string> = new Set([
+// no title is supplied (currently `t('chat.default_title')` resolved at
+// creation time → '新对话' for zh UI / 'New conversation' for en UI) AND
+// any historical / capitalization variant. Match by string equality, not
+// lang lookup, because state can carry whatever the conv was named at
+// creation regardless of the current UI language.
+export const PLACEHOLDER_TITLES: ReadonlySet<string> = new Set([
'新对话',
'New conversation',
'New Conversation',
@@ -55,6 +56,14 @@ const PLACEHOLDER_TITLES: ReadonlySet<string> = new Set([
'New Chat',
]);
+/** True when `title` is a placeholder default written at conversation
+ * creation, i.e. the user hasn't named the chat yet. Locale-agnostic — it
+ * recognises every default form the title generator can emit. */
+export function isPlaceholderTitle(title: string | undefined | null): boolean {
+ if (!title) return true;
+ return PLACEHOLDER_TITLES.has(title);
+}
+
// Windows reserved device names (case-insensitive). A directory bearing
// any of these names cannot be created on Windows — fall back rather than
// fight the OS.
diff --git a/src/main/features/group_chat/index.ts b/src/main/features/group_chat/index.ts
index 29a368ed..03b3def3 100644
--- a/src/main/features/group_chat/index.ts
+++ b/src/main/features/group_chat/index.ts
@@ -19,6 +19,7 @@ import {
USER_ID, readMembers, readState, seedReservedActors, purgeGroupDir,
setCodingProjectDir,
} from './state';
+import { isPlaceholderTitle } from './conv_workspace';
import { readPlan, type PlanFile } from './plan';
import * as planExecutor from './plan_executor';
import {
@@ -66,13 +67,13 @@ export async function send(
if (!safeId(cid)) return { ok: false, error: 'invalid cid' };
if (!text || !text.trim()) return { ok: false, error: 'empty message' };
await seedReservedActors(userId, cid);
- // Auto-title: the first real user message in a fresh "新对话" / unnamed
+ // Auto-title: the first real user message in a fresh / unnamed
// conversation overwrites the placeholder title so the sidebar item
// becomes scannable. Lazy-imported to avoid a chats↔group_chat circular.
try {
const chats = await import('../chats');
const conv = await chats.getConversation(userId, cid);
- if (conv && (!conv.title || conv.title === '新对话')) {
+ if (conv && isPlaceholderTitle(conv.title)) {
await chats.updateConversation(userId, cid, { title: chats.autoTitle(text) });
}
} catch (err) {
diff --git a/src/main/features/group_chat/plan_executor.ts b/src/main/features/group_chat/plan_executor.ts
index a05f37df..6e3f29ba 100644
--- a/src/main/features/group_chat/plan_executor.ts
+++ b/src/main/features/group_chat/plan_executor.ts
@@ -281,7 +281,7 @@ function outcomeForSynthTurn(evt: TurnFinishedEvent): TurnOutcome {
}
// Empty final on a synth turn = user gets a placeholder so they at least
// see "the plan finished but I had nothing more to add".
- return { kind: 'persist', text: '(无回复)' };
+ return { kind: 'persist', text: '(no reply)' };
}
/** User-direct (or non-plan) turn outcome decision.
@@ -300,7 +300,7 @@ function outcomeForSynthTurn(evt: TurnFinishedEvent): TurnOutcome {
* user sees nothing after their message lands. Real config / auth errors
* still surface as an errorBubble.
*
- * agent empty-final → always persist '(无回复)'.
+ * agent empty-final → always persist '(no reply)'.
*/
async function outcomeForUserDirectTurn(uid: string, cid: string, evt: TurnFinishedEvent): Promise<TurnOutcome> {
// Form-pause unblock: if this agent has a blocked step, treat THIS turn
@@ -329,7 +329,7 @@ async function outcomeForUserDirectTurn(uid: string, cid: string, evt: TurnFinis
// case: agent emits ONLY an `agent-input-form` fenced block — bus's
// form extraction strips the block, leaving finalText empty. Without
// checking these signals first we'd fall through to the "agent empty"
- // branch below and replace the actor's form with "(无回复)", losing
+ // branch below and replace the actor's form with "(no reply)", losing
// the form widget entirely (the user-reported bug).
const hasSideEffect = !!evt.form || !!evt.createdAgent || (evt.produced && evt.produced.length > 0);
if ((evt.finalText && evt.finalText.trim()) || hasSideEffect) {
@@ -361,7 +361,7 @@ async function outcomeForUserDirectTurn(uid: string, cid: string, evt: TurnFinis
}
// agent empty + no side effects.
if (evt.errText) return { kind: 'persist', text: errorBubble(evt.errText) };
- return { kind: 'persist', text: '(无回复)' };
+ return { kind: 'persist', text: '(no reply)' };
}
/** Plan-step turn — apply state transition + return outcome for bus. */
@@ -434,7 +434,7 @@ async function applyPlanStepTurn(
if (evt.actor.kind === 'commander') return { kind: 'silent' };
// agent empty: persist placeholder, mark done so plan can advance.
await transitionStepDone(uid, cid, step, '', evt.produced, '');
- return { kind: 'persist', text: '(无回复)' };
+ return { kind: 'persist', text: '(no reply)' };
}
// Normal success.
diff --git a/src/main/features/group_chat/router.ts b/src/main/features/group_chat/router.ts
index 54245403..829a053a 100644
--- a/src/main/features/group_chat/router.ts
+++ b/src/main/features/group_chat/router.ts
@@ -350,9 +350,9 @@ export function decodeSubmission(text: string): DecodedSubmission | null {
* travels above the XML tag. Same logic as the legacy chat had — kept here
* so the renderer can call it without depending on agent_input_form.ts. */
export function formatValueForSummary(field: AgentInput, raw: unknown): string {
- const fallback = '(未填)';
+ const fallback = '(unfilled)';
if (raw === undefined || raw === null) return fallback;
- if (field.type === 'boolean') return raw === true ? '是' : '否';
+ if (field.type === 'boolean') return raw === true ? 'yes' : 'no';
if (field.type === 'select') {
const opt = (field.options || []).find((o) => o.value === raw);
return opt ? opt.label : String(raw);
diff --git a/src/main/features/memory.ts b/src/main/features/memory.ts
index 28da941f..f39e806c 100644
--- a/src/main/features/memory.ts
+++ b/src/main/features/memory.ts
@@ -188,37 +188,37 @@ export function clearMemory(userId: string, target: 'memory' | 'user'): void {
// ── System prompt guidance (always injected) ─────────────────────────────
const MEMORY_GUIDANCE = [
- '## 跨会话记忆',
+ '## Cross-session memory',
'',
- '你拥有跨会话持久记忆能力,通过 `cross_session_memory` 工具实现。记忆在不同对话之间保持。',
+ 'You have persistent memory across sessions via the `cross_session_memory` tool. Memory persists across conversations.',
'',
- '⚠️ 核心原则:当用户分享任何个人信息时,你必须立即调用 cross_session_memory tool 保存,而不是仅口头回应。不调用 tool 等于遗忘。',
+ '⚠️ Core principle: when the user shares any personal information, you MUST immediately call the cross_session_memory tool to save it — not just acknowledge it verbally. Not calling the tool = forgetting.',
'',
- '**必须调用 tool 的场景(不调用 = 遗忘,严禁只口头回应):**',
- '- 用户明确说"记住/记一下/remember/别忘了"',
- '- 用户纠正你的行为("不要这样做"、"以后请...")',
- '- 用户分享个人喜好、兴趣、习惯 -> target="user"',
- ' 例:"我喜欢打篮球"、"我爱喝咖啡"、"我的爱好是游泳"、"我习惯早起"、"我不喜欢加班"',
- '- 用户透露角色、职业、身份 -> target="user"',
- ' 例:"我是产品经理"、"我在创业"、"我是学生"',
- '- 用户提到技术偏好或工具选择 -> target="user"',
- ' 例:"我习惯用 VS Code"、"我更喜欢 TypeScript"、"我们用 React"',
- '- 用户描述自己的性格、沟通风格 -> target="user"',
- ' 例:"我比较直接"、"我喜欢简洁的回答"',
+ '**You MUST call the tool in these situations (verbal acknowledgment alone = forgetting, strictly forbidden):**',
+ '- User explicitly says "remember", "make a note", "don\'t forget"',
+ '- User corrects your behavior ("don\'t do that", "from now on please…")',
+ '- User shares personal preferences, interests, or habits → target="user"',
+ ' e.g. "I like basketball", "I love coffee", "my hobby is swimming", "I\'m an early riser", "I dislike overtime"',
+ '- User reveals their role, profession, or identity → target="user"',
+ ' e.g. "I\'m a product manager", "I\'m a founder", "I\'m a student"',
+ '- User mentions tech preferences or tool choices → target="user"',
+ ' e.g. "I use VS Code", "I prefer TypeScript", "we use React"',
+ '- User describes their personality or communication style → target="user"',
+ ' e.g. "I\'m direct", "I prefer concise answers"',
'',
- '**判断规则:只要用户的话包含"我喜欢/我爱/我习惯/我偏好/我不喜欢/我讨厌/我是/我在做/我的爱好/我平时"等表达个人信息的句式,就必须调用 tool 保存到 target="user"。宁可多存也不要漏存。**',
+ '**Rule of thumb: whenever the user\'s words contain a self-disclosing phrase like "I like / I love / I prefer / I usually / I dislike / I hate / I am / I\'m working on / my hobby / I tend to" — or its equivalent in any other language — you MUST call the tool with target="user". Better to over-save than to miss.**',
'',
- '**应该主动调用 tool 的场景(target="memory"):**',
- '- 重要决策或里程碑("我们决定用 X"、"项目已上线")',
- '- 项目约定或环境信息("部署在 AWS"、"用 PostgreSQL")',
+ '**You should proactively call the tool in these situations (target="memory"):**',
+ '- Important decisions or milestones ("we decided to use X", "the project has shipped")',
+ '- Project conventions or environment info ("deployed on AWS", "uses PostgreSQL")',
'',
- '**不要保存:**',
- '- 一次性调试细节',
- '- 大段代码或日志原文',
+ '**Do NOT save:**',
+ '- One-off debugging details',
+ '- Large code blocks or raw log dumps',
'',
- '两个 target:',
- '- `memory`:你的笔记(事实、决策、里程碑、项目约定)',
- '- `user`:用户画像(角色、偏好、兴趣爱好、沟通风格、技术栈)',
+ 'Two targets:',
+ '- `memory`: your notes (facts, decisions, milestones, project conventions)',
+ '- `user`: user profile (role, preferences, interests, communication style, tech stack)',
].join('\n');
/**
@@ -233,16 +233,16 @@ export function formatForSystemPrompt(userId: string): string {
const parts: string[] = [MEMORY_GUIDANCE];
if (memEntries.length > 0) {
- parts.push('### 当前 MEMORY 条目');
+ parts.push('### Current MEMORY entries');
parts.push(memEntries.map(e => e.text).join(ENTRY_SEPARATOR));
}
if (userEntries.length > 0) {
- parts.push('### 当前 USER 条目');
+ parts.push('### Current USER entries');
parts.push(userEntries.map(e => e.text).join(ENTRY_SEPARATOR));
}
if (memEntries.length === 0 && userEntries.length === 0) {
- parts.push('_(暂无记忆条目)_');
+ parts.push('_(no memory entries yet)_');
}
return parts.join('\n\n');
@@ -275,7 +275,7 @@ export async function extractAndSaveCompactFacts(
userId,
message: extractPrompt,
sessionId: `${userId}-memory-extract-${Date.now()}`,
- systemPrompt: '你是一个事实提取助手。严格按照指示输出,不要添加任何额外内容。',
+ systemPrompt: 'You are a fact extraction assistant. Follow the instructions strictly and do not add any extra content.',
});
if (!result.ok || !result.text.trim()) {
diff --git a/src/main/features/metacognition.ts b/src/main/features/metacognition.ts
index 2e9eb5c0..579f9d82 100644
--- a/src/main/features/metacognition.ts
+++ b/src/main/features/metacognition.ts
@@ -2,13 +2,14 @@
* Metacognition persistence — per-agent self-assessment (COMPETENCE.md)
* and learning strategies (LEARNING_STRATEGIES.md).
*
- * Storage(随 agent 目录形态,落在 `<uid>/cloud/agents/<aid>/meta/`):
+ * Storage (follows the agent directory layout, lives at `<uid>/cloud/agents/<aid>/meta/`):
* <uid>/cloud/agents/<aid>/meta/COMPETENCE.md — free-form markdown
* <uid>/cloud/agents/<aid>/meta/LEARNING_STRATEGIES.md — free-form markdown
* <uid>/cloud/agents/_default/meta/... — for unbound conversations
*
- * 删 agent → `agents.deleteCustomAgent` 直接 `rm -rf agents/<aid>/`,
- * meta/ 子目录随之消失;`purgeAgent` 留作显式清理入口(测试 / 异常恢复用)。
+ * Deleting an agent → `agents.deleteCustomAgent` runs `rm -rf agents/<aid>/`
+ * directly, so the `meta/` subdirectory disappears with it; `purgeAgent`
+ * remains as an explicit cleanup entry point (used by tests / recovery).
*
* Unlike memory.ts (which uses §-separated entries), metacognition files
* are free-form markdown that the agent writes and reads as a whole.
@@ -33,15 +34,17 @@ export const COMPETENCE_CHAR_LIMIT = 3000; // ~1000 tokens
export const STRATEGIES_CHAR_LIMIT = 4000; // ~1300 tokens — strategies is a play-library, naturally grows; competence is a self-check, stays small
// ── Feature gate (single source of truth) ────────────────────────────────
-// 元认知/自演进总开关。两层串联:
-// 1. env `ORKAS_METACOGNITION='0'`:dev/CI kill switch,硬关
-// 2. 用户偏好 `preferences.json::metacognition_enabled`:UI 设置项;
-// undefined(未写过)→ 视为 on,保留历史默认行为
-// runner.ts 与 reflection-trigger.ts 都从这里读,不要再到处复制 env 判断。
+// Master switch for metacognition / self-evolution. Two layers ANDed together:
+// 1. env `ORKAS_METACOGNITION='0'` — dev/CI kill switch, hard off.
+// 2. user preference `preferences.json::metacognition_enabled` — UI setting;
+// undefined (never written) → treated as on, preserving historical default.
+// runner.ts and reflection-trigger.ts both read from here; don't sprinkle the
+// env check around again.
export function isFeatureEnabled(): boolean {
if (process.env.ORKAS_METACOGNITION === '0') return false;
- // 延迟 require 避开循环:features/config -> features/avatars -> ... 链路都很轻,
- // 但元认知在启动早期路径上被调用,保守起见用 require 落到模块缓存。
+ // Lazy-require to break a potential cycle: features/config -> features/avatars
+ // -> ... is light, but metacognition is called early during startup; play
+ // safe and use require so it lands in the module cache.
try {
const cfg = require('./config') as typeof import('./config');
return cfg.getMetacognitionEnabled();
@@ -176,14 +179,14 @@ export function formatForSystemPrompt(agentId: string): string {
if (!comp.content && !strat.content) return '';
- const parts: string[] = ['## 元认知(自我评估与学习策略)'];
+ const parts: string[] = ['## Metacognition (self-assessment & learning strategies)'];
if (comp.content) {
- parts.push('### 能力画像 (COMPETENCE)');
+ parts.push('### Competence profile (COMPETENCE)');
parts.push(comp.content);
}
if (strat.content) {
- parts.push('### 学习策略 (STRATEGIES)');
+ parts.push('### Learning strategies (STRATEGIES)');
parts.push(strat.content);
}
diff --git a/src/main/features/oauth-minimax.ts b/src/main/features/oauth-minimax.ts
index 0b3b4fbf..cbf9b938 100644
--- a/src/main/features/oauth-minimax.ts
+++ b/src/main/features/oauth-minimax.ts
@@ -200,7 +200,7 @@ async function pollToken(opts: {
return { status: 'error', base_resp: { status_msg: msg } };
}
if (!parsed) {
- return { status: 'error', base_resp: { status_msg: 'MiniMax OAuth 响应无法解析' } };
+ return { status: 'error', base_resp: { status_msg: t('oauth.minimax.unparseable_response') } };
}
return parsed;
}
diff --git a/src/main/features/search/index.ts b/src/main/features/search/index.ts
index fffc5984..5da78889 100644
--- a/src/main/features/search/index.ts
+++ b/src/main/features/search/index.ts
@@ -33,6 +33,7 @@ import {
} from '../../paths';
import { getActiveUserId } from '../users';
import { createLogger } from '../../logger';
+import { t } from '../../i18n';
const log = createLogger('search');
@@ -219,7 +220,7 @@ export async function searchChats(userId: string, query: string): Promise<Search
kind: 'chat',
cid: doc.cid,
msg_index: doc.msg_index,
- conv_title: titles[String(doc.cid)] || '新对话',
+ conv_title: titles[String(doc.cid)] || t('chat.default_title'),
role: doc.role,
time: doc.time,
snippet: _makeSnippet(msg && typeof msg.content === 'string' ? msg.content : '', q),
diff --git a/src/main/features/skills.ts b/src/main/features/skills.ts
index 057fd23d..6d9ecdcd 100644
--- a/src/main/features/skills.ts
+++ b/src/main/features/skills.ts
@@ -692,14 +692,14 @@ function _isBlacklistedImportSource(realDir: string): { blocked: true; reason: s
// the source/data.
for (const root of [path.resolve(BUILTIN_SKILLS_SOURCE, '..', '..'), WS_ROOT]) {
if (root && (dir === root || dir.startsWith(root + path.sep))) {
- return { blocked: true, reason: 'Orkas 自身目录' };
+ return { blocked: true, reason: t('skills.import_block.self_dir') };
}
}
// Home-dir root exactly — would trigger the 50 MiB cap only after
// hoovering plenty of sensitive files.
const home = os.homedir();
- if (home && dir === home) return { blocked: true, reason: '用户家目录根' };
+ if (home && dir === home) return { blocked: true, reason: t('skills.import_block.home_root') };
// Platform blacklists (absolute or prefix match).
const mac = ['/System', '/private', '/etc', '/var', '/usr'];
@@ -713,11 +713,11 @@ function _isBlacklistedImportSource(realDir: string): { blocked: true; reason: s
if (process.platform === 'darwin' || process.platform === 'linux') {
if (hitsPrefix(mac) && !hitsException(macExcept)) {
- return { blocked: true, reason: '系统目录' };
+ return { blocked: true, reason: t('skills.import_block.system_dir') };
}
}
if (process.platform === 'win32') {
- if (hitsPrefix(win)) return { blocked: true, reason: '系统目录' };
+ if (hitsPrefix(win)) return { blocked: true, reason: t('skills.import_block.system_dir') };
}
// User-sensitive subdirs (SSH / GPG / AWS creds).
@@ -726,7 +726,7 @@ function _isBlacklistedImportSource(realDir: string): { blocked: true; reason: s
path.join(home, '.gnupg'),
path.join(home, '.aws'),
];
- if (hitsPrefix(sensitive)) return { blocked: true, reason: '用户凭证目录' };
+ if (hitsPrefix(sensitive)) return { blocked: true, reason: t('skills.import_block.credentials_dir') };
return { blocked: false };
}
@@ -1099,7 +1099,7 @@ export async function sendToSkillChat(userId: string, skillId: string, content:
});
if (!result.ok) {
- const errMsg = `模型响应失败: ${result.error || 'unknown'}`;
+ const errMsg = `Model response failed: ${result.error || 'unknown'}`;
await _appendSkillChatMessage(userId, skillId,
{ time: nowIso(), role: 'assistant', content: errMsg });
return { ok: false, message: errMsg, error: result.error || '' };
@@ -1226,7 +1226,7 @@ export async function* streamSendToSkillChat(
finalText = cleanText;
event = { type: 'final', text: cleanText, written };
} else if (etype === 'error') {
- errMsg = `模型响应失败: ${event.text || 'unknown'}`;
+ errMsg = `Model response failed: ${event.text || 'unknown'}`;
}
for (const text of synthesizedProgress) {
@@ -1252,7 +1252,7 @@ export async function* streamSendToSkillChat(
} catch (err) {
log.error('stream failed:', err);
const msg = (err as Error).message || String(err);
- errMsg = `模型响应失败: ${msg}`;
+ errMsg = `Model response failed: ${msg}`;
yield { type: 'error', text: msg };
} finally {
// Must live in finally: on user abort the IPC layer breaks out of the
@@ -1272,8 +1272,8 @@ export async function* streamSendToSkillChat(
{ time: nowIso(), role: 'assistant', content, ...(saved ? { process: saved } : {}) });
} else if (streamingText.trim() || processItems.length) {
const content = streamingText.trim()
- ? `${streamingText}\n\n(回复已中断)`
- : '(回复已中断)';
+ ? `${streamingText}\n\n(reply interrupted)`
+ : '(reply interrupted)';
await _appendSkillChatMessage(userId, skillId,
{ time: nowIso(), role: 'assistant', content, ...(saved ? { process: saved } : {}) });
}
diff --git a/src/main/ipc/index.ts b/src/main/ipc/index.ts
index 998a0183..1af6cd58 100644
--- a/src/main/ipc/index.ts
+++ b/src/main/ipc/index.ts
@@ -159,7 +159,7 @@ const invokeHandlers: Record<string, InvokeHandler> = {
const parent = BrowserWindow.getFocusedWindow() ?? BrowserWindow.getAllWindows()[0];
const opts: Electron.OpenDialogOptions = {
properties: ['openDirectory'],
- title: typeof title === 'string' && title ? title : '选择目录',
+ title: typeof title === 'string' && title ? title : t('dialog.choose_directory'),
};
const res = parent
? await dialog.showOpenDialog(parent, opts)
@@ -282,7 +282,7 @@ const invokeHandlers: Record<string, InvokeHandler> = {
const parent = BrowserWindow.getFocusedWindow() ?? BrowserWindow.getAllWindows()[0];
const opts: Electron.OpenDialogOptions = {
properties: ['openDirectory'],
- title: '选择要导入的技能源目录',
+ title: t('dialog.choose_skill_source_directory'),
};
const res = parent
? await dialog.showOpenDialog(parent, opts)
diff --git a/src/main/locales/en.json b/src/main/locales/en.json
index 5ac2cb4e..92fee773 100644
--- a/src/main/locales/en.json
+++ b/src/main/locales/en.json
@@ -83,5 +83,23 @@
"attachments.skipped.missing": "File no longer exists",
"attachments.skipped.too_many_images": "Exceeded per-message image cap ({max})",
"attachments.skipped.compress_failed": "Image compression failed: {message}",
- "attachments.skipped.video_for_display": "Videos are for display only and are not read by the model"
+ "attachments.skipped.video_for_display": "Videos are for display only and are not read by the model",
+ "chat.default_title": "New conversation",
+ "agent.default_name": "Untitled agent",
+ "dialog.choose_directory": "Choose a directory",
+ "dialog.choose_skill_source_directory": "Choose the skill source directory to import",
+ "contexts.index.heading": "Knowledge base index",
+ "contexts.index.maintained_note": "Auto-maintained — do not edit manually. Last updated: {stamp}",
+ "contexts.index.model_access_note": "The model accesses this knowledge base through the `kb_search` / `kb_read` tools; this file is for browsing in Finder / File Explorer only.",
+ "contexts.index.empty_section": "(empty)",
+ "contexts.index.dirs_heading": "Folders",
+ "contexts.index.root_files_heading": "Root files",
+ "contexts.index.file_count": "{count} files",
+ "contexts.index.empty_kb": "(knowledge base is empty)",
+ "skills.import_block.self_dir": "Orkas's own directory",
+ "skills.import_block.home_root": "User home directory root",
+ "skills.import_block.system_dir": "System directory",
+ "skills.import_block.credentials_dir": "User credentials directory",
+ "oauth.minimax.unparseable_response": "MiniMax OAuth response could not be parsed",
+ "oauth.minimax.register_error_hint": " (MiniMax OAuth registration error: {message})"
}
diff --git a/src/main/locales/zh.json b/src/main/locales/zh.json
index 718f29b3..058ec598 100644
--- a/src/main/locales/zh.json
+++ b/src/main/locales/zh.json
@@ -83,5 +83,23 @@
"attachments.skipped.missing": "文件已不存在",
"attachments.skipped.too_many_images": "超过单条消息图片上限({max} 张)",
"attachments.skipped.compress_failed": "图片压缩失败:{message}",
- "attachments.skipped.video_for_display": "视频文件仅供展示,模型不读取"
+ "attachments.skipped.video_for_display": "视频文件仅供展示,模型不读取",
+ "chat.default_title": "新对话",
+ "agent.default_name": "未命名智能体",
+ "dialog.choose_directory": "选择目录",
+ "dialog.choose_skill_source_directory": "选择要导入的技能源目录",
+ "contexts.index.heading": "知识库索引",
+ "contexts.index.maintained_note": "自动维护,请勿手动编辑。最后更新:{stamp}",
+ "contexts.index.model_access_note": "模型通过 `kb_search` / `kb_read` 工具访问;本文件仅供在 Finder / 资源管理器里浏览。",
+ "contexts.index.empty_section": "(暂无内容)",
+ "contexts.index.dirs_heading": "目录",
+ "contexts.index.root_files_heading": "根目录文件",
+ "contexts.index.file_count": "{count} 篇",
+ "contexts.index.empty_kb": "(知识库为空)",
+ "skills.import_block.self_dir": "Orkas 自身目录",
+ "skills.import_block.home_root": "用户家目录根",
+ "skills.import_block.system_dir": "系统目录",
+ "skills.import_block.credentials_dir": "用户凭证目录",
+ "oauth.minimax.unparseable_response": "MiniMax OAuth 响应无法解析",
+ "oauth.minimax.register_error_hint": "(MiniMax OAuth 注册时报错:{message})"
}
diff --git a/src/main/model/core-agent/client.ts b/src/main/model/core-agent/client.ts
index 644d94f4..4008aada 100644
--- a/src/main/model/core-agent/client.ts
+++ b/src/main/model/core-agent/client.ts
@@ -234,7 +234,7 @@ export async function* streamChatWithModel(opts: ChatOptions): AsyncGenerator<St
// for the short-circuit; tag the stream as aborted for the client.
yield { type: 'error', text: 'aborted', aborted: true };
} else if (idleHit) {
- errText = errText || `模型超过 ${idleTimeout}s 无响应(已中止)`;
+ errText = errText || `Model exceeded ${idleTimeout}s with no response (aborted)`;
yield { type: 'error', text: errText };
}
} catch (err) {
diff --git a/src/main/model/core-agent/search-adapters.ts b/src/main/model/core-agent/search-adapters.ts
index b7063a60..35fba9b3 100644
--- a/src/main/model/core-agent/search-adapters.ts
+++ b/src/main/model/core-agent/search-adapters.ts
@@ -245,8 +245,8 @@ export const SEARCH_PROVIDER_LABEL: Record<string, string> = {
tavily: 'Tavily',
serper: 'Serper',
'brave-search': 'Brave',
- 'baidu-ai-search': '百度',
- metaso: '秘塔',
+ 'baidu-ai-search': 'Baidu',
+ metaso: 'Metaso',
};
/** Documentation URL shown next to the API-key input in the settings UI. */
diff --git a/src/main/model/provider_catalog.ts b/src/main/model/provider_catalog.ts
index b40eeb17..625581dc 100644
--- a/src/main/model/provider_catalog.ts
+++ b/src/main/model/provider_catalog.ts
@@ -303,8 +303,8 @@ export const OAUTH_PROVIDERS: readonly ProviderMeta[] = [
{ id: 'google-antigravity', label: 'Google Antigravity' },
{ id: 'github-copilot', label: 'GitHub Copilot' },
// Custom providers registered at runtime (features/oauth-minimax.ts).
- { id: 'minimax-portal', label: 'MiniMax 订阅 (Global)' },
- { id: 'minimax-portal-cn', label: 'MiniMax 订阅 (CN)' },
+ { id: 'minimax-portal', label: 'MiniMax Subscription (Global)' },
+ { id: 'minimax-portal-cn', label: 'MiniMax Subscription (CN)' },
];
/**
diff --git a/src/renderer/locales/en.json b/src/renderer/locales/en.json
index a0ad59eb..964016e3 100644
--- a/src/renderer/locales/en.json
+++ b/src/renderer/locales/en.json
@@ -427,6 +427,38 @@
"avatar.icon_label": "Icon",
"avatar.color_label": "Color",
"avatar.change": "Change avatar",
+ "avatar.icon.crown": "Crown",
+ "avatar.icon.sparkle": "Sparkle",
+ "avatar.icon.rocket": "Rocket",
+ "avatar.icon.brain": "Brain",
+ "avatar.icon.bulb": "Lightbulb",
+ "avatar.icon.bot": "Robot",
+ "avatar.icon.atom": "Atom",
+ "avatar.icon.compass": "Compass",
+ "avatar.icon.leaf": "Leaf",
+ "avatar.icon.flame": "Flame",
+ "avatar.icon.star": "Star",
+ "avatar.icon.bolt": "Lightning",
+ "avatar.icon.target": "Target",
+ "avatar.icon.music": "Music note",
+ "avatar.icon.code": "Code",
+ "avatar.icon.palette": "Palette",
+ "avatar.color.gold": "Gold",
+ "avatar.color.coral": "Coral",
+ "avatar.color.mint": "Mint",
+ "avatar.color.lavender": "Lavender",
+ "avatar.color.peach": "Peach",
+ "avatar.color.sky": "Sky",
+ "avatar.color.sunshine": "Sunshine",
+ "avatar.color.rose": "Rose",
+ "avatar.color.sage": "Sage",
+ "avatar.color.periwinkle": "Periwinkle",
+ "avatar.color.butter": "Butter",
+ "avatar.color.blush": "Blush",
+ "avatar.color.cyan": "Cyan",
+ "avatar.color.violet": "Violet",
+ "avatar.color.lime": "Lime",
+ "avatar.color.salmon": "Salmon",
"settings.localexec.title": "Local Execution",
"settings.localexec.sub": "Once granted, agents may run shell commands, read/write workspace files, and generate PDFs. Without permission those tools refuse to run.",
"settings.localexec.status_loading": "Loading…",
diff --git a/src/renderer/locales/zh.json b/src/renderer/locales/zh.json
index efb53c5a..98376e9e 100644
--- a/src/renderer/locales/zh.json
+++ b/src/renderer/locales/zh.json
@@ -427,6 +427,38 @@
"avatar.icon_label": "图标",
"avatar.color_label": "颜色",
"avatar.change": "修改头像",
+ "avatar.icon.crown": "皇冠",
+ "avatar.icon.sparkle": "闪亮",
+ "avatar.icon.rocket": "火箭",
+ "avatar.icon.brain": "大脑",
+ "avatar.icon.bulb": "灯泡",
+ "avatar.icon.bot": "机器人",
+ "avatar.icon.atom": "原子",
+ "avatar.icon.compass": "指南针",
+ "avatar.icon.leaf": "叶子",
+ "avatar.icon.flame": "火焰",
+ "avatar.icon.star": "星星",
+ "avatar.icon.bolt": "闪电",
+ "avatar.icon.target": "靶心",
+ "avatar.icon.music": "音符",
+ "avatar.icon.code": "代码",
+ "avatar.icon.palette": "调色板",
+ "avatar.color.gold": "金色",
+ "avatar.color.coral": "珊瑚",
+ "avatar.color.mint": "薄荷",
+ "avatar.color.lavender": "薰衣草",
+ "avatar.color.peach": "桃子",
+ "avatar.color.sky": "天空",
+ "avatar.color.sunshine": "阳光",
+ "avatar.color.rose": "玫瑰",
+ "avatar.color.sage": "鼠尾草",
+ "avatar.color.periwinkle": "长春花",
+ "avatar.color.butter": "奶油",
+ "avatar.color.blush": "腮红",
+ "avatar.color.cyan": "青色",
+ "avatar.color.violet": "紫罗兰",
+ "avatar.color.lime": "青柠",
+ "avatar.color.salmon": "三文鱼",
"settings.localexec.title": "本机执行",
"settings.localexec.sub": "授权后智能体可执行 shell、读写工作区文件、生成 PDF。未授权时这些工具会被拒绝。",
"settings.localexec.status_loading": "加载中…",
diff --git a/src/renderer/modules/avatar-picker.js b/src/renderer/modules/avatar-picker.js
index ffaba670..70acdd5c 100644
--- a/src/renderer/modules/avatar-picker.js
+++ b/src/renderer/modules/avatar-picker.js
@@ -75,14 +75,24 @@ function _renderAvatarPicker() {
const icons = AVATAR_ICONS.filter((i) => allowCommander || i.id !== COMMANDER_DEFAULT.icon);
const colors = AVATAR_COLORS.filter((c) => allowCommander || c.id !== COMMANDER_DEFAULT.color);
+ // i18n.t returns the raw key if no entry exists in either locale, so fall
+ // back to the JSON-side English `label` for forward compatibility when a
+ // new icon/color is added to avatars.json without a matching locale key.
+ const _avatarLabel = (key, fallback) => {
+ const r = t(key);
+ return r === key ? fallback : r;
+ };
+
iconGrid.innerHTML = icons.map((i) => {
const active = i.id === cur.icon ? ' is-active' : '';
- return `<button type="button" class="avatar-picker-cell avatar-picker-icon-cell${active}" data-icon="${i.id}" title="${i.label}" aria-label="${i.label}">${i.svg}</button>`;
+ const label = _avatarLabel('avatar.icon.' + i.id, i.label);
+ return `<button type="button" class="avatar-picker-cell avatar-picker-icon-cell${active}" data-icon="${i.id}" title="${label}" aria-label="${label}">${i.svg}</button>`;
}).join('');
colorGrid.innerHTML = colors.map((c) => {
const active = c.id === cur.color ? ' is-active' : '';
- return `<button type="button" class="avatar-picker-cell avatar-picker-color-cell${active}" data-color="${c.id}" style="background:${c.bg};color:${c.fg}" title="${c.label}" aria-label="${c.label}"></button>`;
+ const label = _avatarLabel('avatar.color.' + c.id, c.label);
+ return `<button type="button" class="avatar-picker-cell avatar-picker-color-cell${active}" data-color="${c.id}" style="background:${c.bg};color:${c.fg}" title="${label}" aria-label="${label}"></button>`;
}).join('');
iconGrid.querySelectorAll('[data-icon]').forEach((btn) => {
diff --git a/test/main/features/agents.test.ts b/test/main/features/agents.test.ts
index cfb1db40..b2090bc4 100644
--- a/test/main/features/agents.test.ts
+++ b/test/main/features/agents.test.ts
@@ -538,10 +538,10 @@ describe('agents › createCustomAgent', () => {
expect(fs.existsSync(file)).toBe(true);
});
- it('defaults empty name to 未命名智能体', async () => {
+ it('defaults empty name to the localized "Untitled agent" fallback', async () => {
const a = await loadAgents();
const agent = await a.createCustomAgent();
- expect(agent?.name).toBe('未命名智能体');
+ expect(agent?.name).toBe('Untitled agent');
});
it('rejects reserved names (collide with commander role / sidebar tab)', async () => {
@@ -620,11 +620,11 @@ describe('agents › updateCustomAgent', () => {
expect(updated?.workflow).toBe('wf'); // preserved
});
- it('backfills empty name to 未命名智能体', async () => {
+ it('backfills empty name to the localized "Untitled agent" fallback', async () => {
writeCustomAgent('abc', { name: 'Old' });
const a = await loadAgents();
const updated = await a.updateCustomAgent('abc', { name: '' });
- expect(updated?.name).toBe('未命名智能体');
+ expect(updated?.name).toBe('Untitled agent');
});
it('rejects renaming to a reserved name', async () => {
diff --git a/test/main/features/chats.test.ts b/test/main/features/chats.test.ts
index eb702fe9..7e062a47 100644
--- a/test/main/features/chats.test.ts
+++ b/test/main/features/chats.test.ts
@@ -83,10 +83,13 @@ describe('chats › deleteConversation', () => {
});
describe('chats › autoTitle on first send', () => {
- it('groupChat.send updates 新对话 title to message text on first user msg', async () => {
+ it('groupChat.send updates the placeholder title to message text on first user msg', async () => {
vi.resetModules();
const groupChat = await import('../../../src/main/features/group_chat');
const chats = await loadChats();
+ // Pass the zh placeholder explicitly so the test exercises the
+ // multilingual `isPlaceholderTitle` detection path regardless of the
+ // test process's i18n default.
const conv = await chats.createConversation(TEST_UID, { title: '新对话' });
expect(conv.title).toBe('新对话');
diff --git a/test/main/features/group_chat/bus-integration.test.ts b/test/main/features/group_chat/bus-integration.test.ts
index f2446d44..6879a320 100644
--- a/test/main/features/group_chat/bus-integration.test.ts
+++ b/test/main/features/group_chat/bus-integration.test.ts
@@ -653,6 +653,6 @@ describe.skip('group_chat bus integration › no shadow-tap on agent → user',
// Exactly 3 messages: user→commander, commander→agent, agent→user.
expect(lines).toHaveLength(3);
expect(lines[2]).toMatchObject({ from: AGENT_ID, to: ['user'] });
- expect(lines.find((l: any) => l.text === '(无回复)')).toBeUndefined();
+ expect(lines.find((l: any) => l.text === '(no reply)')).toBeUndefined();
}, 10_000);
});
diff --git a/test/main/features/group_chat/bus.test.ts b/test/main/features/group_chat/bus.test.ts
index 745d1ebb..df8c8099 100644
--- a/test/main/features/group_chat/bus.test.ts
+++ b/test/main/features/group_chat/bus.test.ts
@@ -6,7 +6,7 @@ import * as path from 'node:path';
// Mock the model client so `runTurn` doesn't try to do a real LLM call.
// `streamChatWithModel` returns an async iterator that yields one final
// event with empty text + a done event; bus interprets that as "done,
-// no reply" and emits a "(无回复)" message. Good enough for the
+// no reply" and emits a "(no reply)" message. Good enough for the
// integration assertions here — we're testing routing / persistence /
// state, not actual model output.
vi.mock('../../../../src/main/model/client', () => ({
diff --git a/test/main/features/search/index.test.ts b/test/main/features/search/index.test.ts
index 7bbf66e3..5f651a64 100644
--- a/test/main/features/search/index.test.ts
+++ b/test/main/features/search/index.test.ts
@@ -141,7 +141,7 @@ describe('search › searchChats', () => {
const ix = await import('../../../../src/main/features/search/indexer');
await ix.reconcileChatsIndex('u1');
const results = await s.searchChats('u1', 'thingamajig');
- expect(results[0].conv_title).toBe('新对话');
+ expect(results[0].conv_title).toBe('New conversation');
});
});