feat(agent): comandos /reset /limpiar /start borran historial desde Telegram

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro GD
2026-07-13 19:46:18 +00:00
co-authored by Claude Opus 4.6
parent c7b71d914f
commit d9933a754b
@@ -79,6 +79,13 @@ func TelegramAgentWebhook(c *fiber.Ctx) error {
}
}
// Comandos de control (sincrónicos, respuesta inmediata)
if text == "/reset" || text == "/limpiar" || text == "/start" {
_ = models.ClearAgentHistory(chatID)
sendAgentReply(tgCfg.BotToken, chatID, "Historial borrado. Empezamos de cero.")
return c.SendStatus(200)
}
// Procesar en goroutine para responder 200 inmediatamente a Telegram
go func() {
response, err := services.ProcessAgentMessage(chatID, text, ai)