fix: harden telegram streaming finalize and resolve session lock-copy vet issue

This commit is contained in:
lpf
2026-03-04 14:16:48 +08:00
parent 57961d2911
commit 09c06786a4
2 changed files with 3 additions and 2 deletions

View File

@@ -1760,7 +1760,8 @@ func rewriteSystemMessageContent(content, template string) string {
func alSessionListForTool(sm *session.SessionManager, limit int) []tools.SessionInfo {
items := sm.List(limit)
out := make([]tools.SessionInfo, 0, len(items))
for _, s := range items {
for i := range items {
s := &items[i]
out = append(out, tools.SessionInfo{
Key: s.Key,
Kind: s.Kind,