Remember process remember checks for prior remembering, as it is used by the
final callback on both listen and respond, as respond might be called without a
listen.
There could be a more graceful way of handling the thought process completion,
like possible using a single interface for all processes. e.g.
thought('hear', args)
Then it can add the final piece only once, when used either as thought('hear')
or thought('respond'). Could still retain bot.hear and bot.respond as proxies.
Should that also revert usage of bot.listen in place of bot.listenText.
Maybe all thought stages should only be called internally and bot accessors are
bot.receive and bot.send - for hubot compatibility and since when
bot.respond is called directly, its actually unprompted, therefore not a
response.
Consider renaming thought-process.ts as just thought.ts too.
Move adapter storage check into brain, remember should just call keep.
Consider use of thought for custom contained sets of listeners (e.g. within a
scene), might make sense to accept the listeners as arg, but use the 'global'
listeners as default. Scenes shouldn't reproduce thought process the way it is
in current Playbook.
Remember process
remember
checks for prior remembering, as it is used by the final callback on both listen and respond, as respond might be called without a listen.There could be a more graceful way of handling the thought process completion, like possible using a single interface for all processes. e.g.
thought('hear', args)
Then it can add the final piece only once, when used either as thought('hear') or thought('respond'). Could still retain bot.hear and bot.respond as proxies.
Should that also revert usage of
bot.listen
in place ofbot.listenText
. Maybe all thought stages should only be called internally and bot accessors arebot.receive
andbot.send
- for hubot compatibility and since whenbot.respond
is called directly, its actually unprompted, therefore not a response.Consider renaming
thought-process.ts
as justthought.ts
too. Move adapter storage check into brain, remember should just call keep.Consider use of thought for custom contained sets of listeners (e.g. within a scene), might make sense to accept the listeners as arg, but use the 'global' listeners as default. Scenes shouldn't reproduce thought process the way it is in current Playbook.
see https://github.com/Amazebot/bbot/blob/master/src/lib/thought-process.ts#L94