From 4ddf8e8df42dfd574dcc28554f441702681e3593 Mon Sep 17 00:00:00 2001 From: miro Date: Wed, 18 Dec 2024 14:47:20 +0000 Subject: [PATCH] fix: intent layers accept both munged and unmunged intent names intentlayers use the munged name preffixed with skill_id: and was failing to enable/disable intents --- ovos_workshop/skills/ovos.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ovos_workshop/skills/ovos.py b/ovos_workshop/skills/ovos.py index 065d9dc..3196b67 100644 --- a/ovos_workshop/skills/ovos.py +++ b/ovos_workshop/skills/ovos.py @@ -2387,6 +2387,7 @@ def disable_intent(self, intent_name: str) -> bool: Returns: bool: True if disabled, False if it wasn't registered """ + intent_name = intent_name.split(f"{self.skill_id}:")[-1] if intent_name in self.intent_service: self.log.info('Disabling intent ' + intent_name) name = f'{self.skill_id}:{intent_name}' @@ -2411,6 +2412,7 @@ def enable_intent(self, intent_name: str) -> bool: Returns: bool: True if enabled, False if it wasn't registered """ + intent_name = intent_name.split(f"{self.skill_id}:")[-1] intent = self.intent_service.get_intent(intent_name) if intent: if ".intent" in intent_name: