fix: 上下文压缩阈值与摘要截断修复

1. engine: 压缩阈值改用 contextLength ?? contextWindow, Ollama 小 numCtx 时正确触发压缩

2. main: reloadAdapter 在 provider 切换时同步 contextLength, 非 Ollama 清除避免残留

3. engine: compressMessages 移除每条消息 500 字符截断, 摘要请求是独立 API 调用无需截断

4. delegate-task: 修复 items 缺少 description 的 TS2741 预存错误
This commit is contained in:
thzxx
2026-07-07 21:22:24 +08:00
parent ed59305b5e
commit 9ed4837950
3 changed files with 14 additions and 4 deletions
@@ -25,7 +25,7 @@ export class DelegateTaskTool implements IMetonaTool {
},
tools: {
type: 'array',
items: { type: 'string' },
items: { type: 'string', description: 'Tool name' },
description: 'Optional whitelist of tool names the SubAgent can use (e.g. ["read_file", "web_search"]). If omitted, SubAgent inherits all tools.',
},
maxIterations: {