change v1

This commit is contained in:
lky-spec
2026-04-25 16:18:45 +08:00
parent 737f9bca95
commit c244e4cdf1
89 changed files with 17382 additions and 6198 deletions

View File

@@ -39,6 +39,10 @@ func (s *Server) handleCreateAgentPreference(c *gin.Context) {
c.JSON(http.StatusBadRequest, gin.H{"error": "text required"})
return
}
if len([]rune(strings.TrimSpace(req.Text))) > 500 {
c.JSON(http.StatusBadRequest, gin.H{"error": "text too long"})
return
}
created, err := agent.NewPersistentPreference(req.Text)
if err != nil {