feat(context): 优化对话压缩系统
- 添加独立摘要模型配置支持(SUMMARY_PROVIDER/MODEL/API_KEY/BASE_URL) - 添加 CompressionStatus 枚举和 DetailedCompressionResult 详细返回类型 - 实现压缩失败检测(空摘要、token膨胀) - 添加首条 user-assistant 对保护,确保上下文连贯性 - CompressionManager 支持独立摘要模型(优先使用小模型降低成本) - Agent 自动压缩时显示详细状态信息 - 更新相关测试用例
This commit is contained in:
@@ -49,9 +49,10 @@ vi.mock('../../../src/agent/index.js', () => ({
|
||||
})),
|
||||
}));
|
||||
|
||||
// Mock vision config
|
||||
// Mock vision and summary config
|
||||
vi.mock('../../../src/utils/config.js', () => ({
|
||||
loadVisionConfig: vi.fn(() => null),
|
||||
loadSummaryConfig: vi.fn(() => null),
|
||||
}));
|
||||
|
||||
// Create mock tool
|
||||
|
||||
Reference in New Issue
Block a user