Skip to content

Commit

Permalink
missing skill ids in message.context
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Aug 7, 2023
1 parent edda05c commit 1d09e95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions ovos_core/intent_services/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ def handle_utterance(self, message):

if match.skill_id:
self.converse.activate_skill(match.skill_id)
message.context["skill_id"] = match.skill_id
# If the service didn't report back the skill_id it
# takes on the responsibility of making the skill "active"

Expand Down
2 changes: 2 additions & 0 deletions ovos_core/intent_services/converse_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def deactivate_skill(self, skill_id, source_skill=None):
self.active_skills.pop(idx)
self.bus.emit(
Message("intent.service.skills.deactivated",
{"skill_id": skill_id},
{"skill_id": skill_id}))
if skill_id in self._consecutive_activations:
self._consecutive_activations[skill_id] = 0
Expand Down Expand Up @@ -75,6 +76,7 @@ def activate_skill(self, skill_id, source_skill=None):
self.active_skills.insert(0, [skill_id, time.time()])
self.bus.emit(
Message("intent.service.skills.activated",
{"skill_id": skill_id},
{"skill_id": skill_id}))

self._consecutive_activations[skill_id] += 1
Expand Down

0 comments on commit 1d09e95

Please sign in to comment.