mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-11-06 09:17:31 +00:00
fix(memory): 时间线按声明渲染工具回执 + 能力判定改为配置层
时间线此前只写「→ 调用工具: a, b」,工具取回的正文下一轮彻底消失: 模型记得自己查过,却不记得查到了什么(刚说的话转头就忘)。 ToolDef 上的 Cleaner / NoMemory 声明一直存在,缺的是消费端。 - formatMergedTimeline 渲染 e.ToolResults:Cleaner 优先,NoMemory 工具跳过, 单条 160 字、每事件最多 3 条(+N more),预算估算同步计入 - 模态能力改由配置层声明(ProviderManager.SetCapabilities), 不再靠 provider.(ModalProvider) 断言穿过 adapter 与安全装饰器 - a2a 通道 RecallPolicy none→auto(NoMemory 仍 true:可读不写)
This commit is contained in:
@ -63,6 +63,13 @@ func buildProviderManager(cfg *types.Config, luaVM *luapkg.VM, baseAPIKey string
|
||||
Audio: src.Audio,
|
||||
}, luaVM, src.Name, src.Adapter)
|
||||
providerMgr.Register(src.Name, luaProvider)
|
||||
// ★ 能力是**配置事实**,由装配层登记;不让内核靠 adapter 上的
|
||||
// 类型断言去猜(断言穿过 adapter + 安全装饰器,任一层漏实现方法
|
||||
// 就会静默变成"没有视觉"—— 这是反复出现的老 bug)。
|
||||
providerMgr.SetCapabilities(src.Name, api.ProviderCaps{
|
||||
Vision: src.Vision,
|
||||
Audio: src.Audio,
|
||||
})
|
||||
if src.Adapter != "" {
|
||||
adapterConcurrency[src.Adapter] += src.MaxConcurrent
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user