Skip to content

Commit

Permalink
feat/active skills from Session
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Sep 20, 2023
1 parent 2a9c613 commit 1039090
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion ovos_core/intent_services/converse_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class ConverseService:
def __init__(self, bus):
self.bus = bus
self._consecutive_activations = {}

self.bus.on('mycroft.speech.recognition.unknown', self.reset_converse)
self.bus.on('intent.service.skills.deactivate', self.handle_deactivate_skill_request)
self.bus.on('intent.service.skills.activate', self.handle_activate_skill_request)
Expand All @@ -33,6 +32,18 @@ def config(self):
"""
return Configuration().get("skills", {}).get("converse") or {}

@property
def active_skills(self):
session = SessionManager.get()
return session.active_skills

@active_skills.setter
def active_skills(self, val):
session = SessionManager.get()
session.active_skills = []
for skill_id, ts in val:
session.activate_skill(skill_id)

def get_active_skills(self, message=None):
"""Active skill ids ordered by converse priority
this represents the order in which converse will be called
Expand Down

0 comments on commit 1039090

Please sign in to comment.