Skip to content
This repository has been archived by the owner on Feb 2, 2020. It is now read-only.

Fix: Only re-enable intents that were enabled before #1

Closed
koenvervloesem opened this issue Apr 2, 2019 · 1 comment
Closed

Fix: Only re-enable intents that were enabled before #1

koenvervloesem opened this issue Apr 2, 2019 · 1 comment

Comments

@koenvervloesem
Copy link
Owner

koenvervloesem commented Apr 2, 2019

Currently the app is doing this:

  • koan:Quiet - I disable all intents except koan:Talk.
  • koan:Talk - I re-enable all intents that are enabled by default and I disable the other ones.

However, at any time other apps could have enabled intents that are disabled by default and/or disabled intents that are enabled by default. So to play nice with other apps, I really should do the following:

  • koan:Quiet - Store the currently enabled intents in a list, and disable all these intents except koan:Talk.
  • koan:Talk - Re-enable all intents that were enabled before receiving koan:Quiet. The ones that were disabled before are not in our list, so they stay disabled.

According to snipsco/hermes-protocol#78, Snips will probably add a way to get the currently enabled intents, but as it's MQTT based, it will be an asynchronous API.

When the proposed MQTT topic hermes/dialogueManager/configuration (and, I suppose, an equivalent Hermes Python callback) and the new behaviour of the hermes/dialogueManager/configure topic is added to the Snips platform, I could use the following approach in my app:

  1. Subscribe to hermes/dialogueManager/configuration and store the list of enabled intents every time this topic is published. This means every time the dialogue configuration is changed or requested. However, it would be helpful if hermes/dialogueManager/configuration would make it clear it's published because of a change or a request, because we only have to store the list in the former situation.
  2. Make a copy of this list in koan:Quiet
  3. Use this list in koan:Talk to only enable the intents that are enabled in this list.
@koenvervloesem
Copy link
Owner Author

Closing this because development of this app has stopped.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant