agent.language 配置强制回复语言

This commit is contained in:
2026-09-02 15:07:00 +08:00
parent 4fe8715a31
commit 96d63c7ddc
6 changed files with 32 additions and 10 deletions
+1 -1
View File
@@ -415,7 +415,7 @@ async function runLoopInner(sessionId, run) {
if (!session || session.status !== 'active' || !session.model_id) break;
session.history = loadHistory(sessionId);
for (const m of session.history) if (m.id > lastIncludedId) lastIncludedId = m.id;
const messages = buildMessages(session);
const messages = buildMessages(session, (cfg.agent || {}).language);
// 内置工具 + 启动时发现的 MCP 工具,一起随 system prompt 发给模型
const tools = TOOL_DEFINITIONS.concat(mcp.toolDefinitions());