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:
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)
|
||||
|
||||
Reference in New Issue
Block a user