fix(homeagent): 删除 plugin.go 里与 tools.go 重复的 6 个方法

plugin.go 与 tools.go 各自声明了同名工具处理器。逐个 diff 后保留
tools.go 的版本 —— 它严格更丰富:read_thread 多 ParentHid → parent_hidden
并区分「父邮件无权查看」与「父邮件尚未加载」,suggest_address 多解析
candidates,connect_to_server 多一条注释。

plugin.go 删除 handleConnectToServer / handleForwardMail /
handleSuggestAddress / handleListContacts / handleSessionParticipants /
handleReadThread + minInt。

tools.go 删除本地 min():go.mod 是 go 1.25.0,内置 min 可用,
本地定义只是遮蔽。

部署验证:11 项工具注册(日志里硬编码的「13 个工具」是错的数字)。
This commit is contained in:
2026-09-03 21:11:15 +08:00
parent a2f3db143b
commit 473c46659a
2 changed files with 469 additions and 106 deletions

View File

@ -397,13 +397,6 @@ func (p *Plugin) handleReadThread(args map[string]interface{}) (interface{}, err
}, nil
}
func min(a, b int) int {
if a < b {
return a
}
return b
}
// oneStringParam 给只有一个参数的工具生成 schema。
//
// 单独提出来不是为了省字数,而是因为手写 JSON Schema 字面量很容易漏掉