From 3f6921d3fd7cccd6b78be5dc18898ccfed1ce406 Mon Sep 17 00:00:00 2001 From: Enmanuel Date: Sat, 7 Mar 2026 01:11:33 +0000 Subject: [PATCH] refactor: eliminar regla !help hardcodeada de agentes existentes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Elimina la regla MatchCommand("help") de assistant-bot y asistente-2 ya que ahora !help es un comando built-in del sistema de comandos. Los agentes solo conservan la regla llm-all para DM/mention → LLM. --- agents/asistente-2/agent.go | 16 +--------------- agents/assistant-bot/agent.go | 17 +---------------- 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/agents/asistente-2/agent.go b/agents/asistente-2/agent.go index 1b4ac1f..de69ea3 100644 --- a/agents/asistente-2/agent.go +++ b/agents/asistente-2/agent.go @@ -7,23 +7,9 @@ import ( ) // Rules returns the decision rules for the asistente-2 bot. +// Note: !help is now handled by the built-in command system. func Rules() []decision.Rule { return []decision.Rule{ - // !help — explicit help command - { - Name: "help", - Match: decision.MatchCommand("help"), - Actions: []decision.Action{{ - Kind: decision.ActionKindReply, - Reply: &decision.ReplyAction{ - Content: "Soy asistente-2. Puedo responder preguntas y además consultar la hora actual.\n" + - "- Pregúntame cualquier cosa\n" + - "- Puedo decirte la fecha y hora actual\n\n" + - "Escríbeme directamente lo que necesitas.", - }, - }}, - }, - // Any DM or mention → LLM (with tool-use enabled) { Name: "llm-all", diff --git a/agents/assistant-bot/agent.go b/agents/assistant-bot/agent.go index 87af43b..203dfd6 100644 --- a/agents/assistant-bot/agent.go +++ b/agents/assistant-bot/agent.go @@ -7,25 +7,10 @@ import ( ) // Rules returns the decision rules for the assistant bot. +// Note: !help is now handled by the built-in command system. func Rules() []decision.Rule { return []decision.Rule{ - // !help — explicit help command - { - Name: "help", - Match: decision.MatchCommand("help"), - Actions: []decision.Action{{ - Kind: decision.ActionKindReply, - Reply: &decision.ReplyAction{ - Content: "Soy tu asistente. Escríbeme directamente lo que necesitas:\n" + - "- Preguntas, explicaciones, resúmenes\n" + - "- Ayuda con código\n" + - "- Redacción de textos", - }, - }}, - }, - // Any DM or mention → LLM - // This is the catch-all: if the message is a DM or a mention, send to LLM. { Name: "llm-all", Match: func(ctx decision.MessageContext) bool {