Open cheruvian opened 4 years ago
One shot intents are equivalent to launching a skill (new skill session ID) with an intent. So, the one shot intent will enter your launch state. If you have intent handlers in your launch state, it will trigger those. If you do not and do not have an otherwise
handler, then Litexa will report this as an unhandled intent error. In other words, treat the launch state behavior the same as any other state, and know that one shot intents get routed to the launch state.
Interesting this somewhat precludes having a welcome message, are there solutions here besides doing some custom variable tracking or duplication of all logic?
e.g.:
launch
say "welcome message"
-> waitForCommand
waitForCommand
when "some intent"
-> doSomeIntent
when HelpIntent
say "try saying some intent"
-> waitForCommand
"Regular" Open Skill Name
user: open skill name
alexa: waitForCommand, "welcome message"
One Shot:
user: ask skill name to some intent
alexa: "" (unhandled intent error results in no message)
It almost seems like Litexa should recognize non-when
terminated launch
states and flow through to the first state that ends with a when.
This would require special treatment of the launch
state that changes the expectations of state behavior. Each state defines its handlers; one-shot intents are simply intents received in the launch
state (unless resetOnLaunch
was false).
Feature Request
Document how litexa chooses which state to enter for one shot intents ie "Alexa tell SKILL_NAME to SOME_INTENT"
Given a litexa file something like
Is this deterministic? How is this chosen? Do I get the opportunity to intercept and run something before it hits that state?