fix: 修复502导致的内存泄漏问题

This commit is contained in:
leookun
2026-07-27 00:15:23 +08:00
parent 799dbda7e0
commit e401303f64
3 changed files with 36 additions and 31 deletions
@@ -10,21 +10,6 @@ import (
modeladapter "cursor/internal/backend/agent/model"
)
func cloneStringAnyMap(value map[string]any) map[string]any {
if len(value) == 0 {
return nil
}
payload, err := json.Marshal(value)
if err != nil {
return nil
}
var decoded map[string]any
if err := json.Unmarshal(payload, &decoded); err != nil {
return nil
}
return decoded
}
func parseRFC3339Time(value string) time.Time {
trimmed := strings.TrimSpace(value)
if trimmed == "" {