turnstack 0.1.0__tar.gz → 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {turnstack-0.1.0 → turnstack-0.1.1}/PKG-INFO +1 -1
- {turnstack-0.1.0 → turnstack-0.1.1}/pyproject.toml +1 -1
- {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/engine.py +6 -5
- {turnstack-0.1.0 → turnstack-0.1.1}/turnstack.egg-info/PKG-INFO +1 -1
- {turnstack-0.1.0 → turnstack-0.1.1}/README.md +0 -0
- {turnstack-0.1.0 → turnstack-0.1.1}/setup.cfg +0 -0
- {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/__init__.py +0 -0
- {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/exceptions.py +0 -0
- {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/handlers/__init__.py +0 -0
- {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/handlers/action.py +0 -0
- {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/handlers/base.py +0 -0
- {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/handlers/confirm.py +0 -0
- {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/handlers/input.py +0 -0
- {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/handlers/list_handler.py +0 -0
- {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/handlers/media_handler.py +0 -0
- {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/handlers/menu.py +0 -0
- {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/handlers/render_helpers.py +0 -0
- {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/handlers/router.py +0 -0
- {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/message.py +0 -0
- {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/nodes.py +0 -0
- {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/reply.py +0 -0
- {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/session.py +0 -0
- {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/stores/__init__.py +0 -0
- {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/stores/memory.py +0 -0
- {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/tree.py +0 -0
- {turnstack-0.1.0 → turnstack-0.1.1}/turnstack.egg-info/SOURCES.txt +0 -0
- {turnstack-0.1.0 → turnstack-0.1.1}/turnstack.egg-info/dependency_links.txt +0 -0
- {turnstack-0.1.0 → turnstack-0.1.1}/turnstack.egg-info/top_level.txt +0 -0
|
@@ -189,6 +189,8 @@ class BotEngine:
|
|
|
189
189
|
if incoming.type == "text" and incoming.text:
|
|
190
190
|
cmd_reply = await self._handle_global_command(session, incoming.text.strip().lower())
|
|
191
191
|
if cmd_reply:
|
|
192
|
+
if cmd_reply.type == "end":
|
|
193
|
+
return [cmd_reply]
|
|
192
194
|
# Command handled – render the resulting node
|
|
193
195
|
reply = await self._render_current(session)
|
|
194
196
|
if reply is None:
|
|
@@ -246,14 +248,13 @@ class BotEngine:
|
|
|
246
248
|
"""
|
|
247
249
|
# Exit / reset
|
|
248
250
|
if text in self.exit_keywords:
|
|
249
|
-
|
|
250
|
-
# Optionally send a goodbye message (could be configured)
|
|
251
|
+
await self.session_store.delete(session.user_id)
|
|
251
252
|
return Reply(
|
|
252
|
-
type="
|
|
253
|
-
body="👋
|
|
253
|
+
type="end",
|
|
254
|
+
body="👋 Goodbye! Send us a message anytime to start a new session.",
|
|
254
255
|
phone=session.user_id,
|
|
255
256
|
node_type="text",
|
|
256
|
-
current_node=
|
|
257
|
+
current_node=None,
|
|
257
258
|
)
|
|
258
259
|
|
|
259
260
|
# Go home
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|