Define a context

let contextName = context(() => { action })

Activate a context

intent('pattern', p => {..., p.then(contextName)}

Pass data to the context

p.then(contextName, state: {data:yourData}) => p.state.data

Resolve a context

p.resolve([data:yourData])

Reset a context

p.resetContext()

Define intents to be matched at any time without switching the current context

intent(noctx, 'pattern', ...) or noContext(() => {intent(...)})

Play a prompt for an expected input

fallback('pattern1'[, 'patternN'])

Title a context

title('contextName')
Comments