Skip to content

Commit

Permalink
fix: intent layers
Browse files Browse the repository at this point in the history
accept both munged and unmunged intent names

intentlayers use the munged name preffixed with skill_id: and was failing to enable/disable intents
  • Loading branch information
JarbasAl committed Dec 18, 2024
1 parent 26b01a2 commit 4ddf8e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ovos_workshop/skills/ovos.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}'
Expand All @@ -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:
Expand Down

0 comments on commit 4ddf8e8

Please sign in to comment.