fix: agregar comando 'salir' y limpiar __api_vars en reset de comandos

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-07-30 23:47:12 -05:00
co-authored by Claude Sonnet 4.6
parent fe048f53a3
commit 79d2399ddf
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ class NormalBot
// Clear any in-progress multi-step state so the command is a clean reset
$m = ConversationContext::getMetadata($ctxId);
$dirty = false;
foreach (['collecting', '__foreach', '__cap'] as $stateKey) {
foreach (['collecting', '__foreach', '__cap', '__api_vars', '__ep_vars', '__ep_vars_flat'] as $stateKey) {
if (isset($m[$stateKey])) { unset($m[$stateKey]); $dirty = true; }
}
if ($dirty) ConversationContext::updateMetadata($ctxId, $m);