Skip to content

Commit

Permalink
fix: intent layers
Browse files Browse the repository at this point in the history
intentlayers was using the munged name preffixed with skill_id: and was failing to enable/disable intents
  • Loading branch information
JarbasAl committed Dec 18, 2024
1 parent 7791941 commit 64f32bf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ovos_workshop/decorators/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ def activate_layer(self, layer_name: str):
if layer_name not in self._active_layers:
self._active_layers.append(layer_name)
for intent in self._layers[layer_name]:
self.skill.enable_intent(intent)
intent_name = intent.split(f"{self.skill_id}:")[-1]
self.skill.enable_intent(intent_name)
else:
LOG.debug("no layer named: " + layer_name)

Expand All @@ -223,7 +224,8 @@ def deactivate_layer(self, layer_name: str):
if layer_name in self._active_layers:
self._active_layers.remove(layer_name)
for intent in self._layers[layer_name]:
self.skill.disable_intent(intent)
intent_name = intent.split(f"{self.skill_id}:")[-1]
self.skill.disable_intent(intent_name)
else:
LOG.debug("no layer named: " + layer_name)

Expand Down

0 comments on commit 64f32bf

Please sign in to comment.