|
@@ -2515,6 +2515,34 @@ class ChattoAdapter(BasePlatformAdapter):
|
|
|
# the next turn that needs room groups refetches once.
|
|
# the next turn that needs room groups refetches once.
|
|
|
logger.debug("Chatto: room_groups_updated — discarding cached group state")
|
|
logger.debug("Chatto: room_groups_updated — discarding cached group state")
|
|
|
|
|
|
|
|
|
|
+ elif event.kind == "message_retracted":
|
|
|
|
|
+ # A message was retracted — no-op for now. Interactive prompts
|
|
|
|
|
+ # are keyed by their own message IDs (not the original event_id),
|
|
|
|
|
+ # and the prompt timeout handles stale cards anyway.
|
|
|
|
|
+ payload = event.payload
|
|
|
|
|
+ logger.debug(
|
|
|
|
|
+ "Chatto: message retracted: %s in %s",
|
|
|
|
|
+ getattr(payload, "message_event_id", None),
|
|
|
|
|
+ getattr(payload, "room_id", None),
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
|
|
+ elif event.kind == "thread_created":
|
|
|
|
|
+ # A human created a thread — no adapter action needed. The thread
|
|
|
|
|
+ # will be seeded on first message because _seeded_threads starts
|
|
|
|
|
+ # empty and seeds on first turn into an unknown root.
|
|
|
|
|
+ payload = event.payload
|
|
|
|
|
+ logger.debug(
|
|
|
|
|
+ "Chatto: thread created: room=%s root=%s",
|
|
|
|
|
+ getattr(payload, "room_id", None),
|
|
|
|
|
+ getattr(payload, "thread_root_event_id", None),
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
|
|
+ elif event.kind == "user_typing":
|
|
|
|
|
+ # Presence-like ephemeral signal: a user is typing in a room.
|
|
|
|
|
+ # The adapter never surfaces this to the agent — it is only useful
|
|
|
|
|
+ # for a client UI cursor, which is not what a bot does.
|
|
|
|
|
+ logger.debug("Chatto: user_typing event received")
|
|
|
|
|
+
|
|
|
# confirmed:
|
|
# confirmed:
|
|
|
# NOTE: "projection_event" (and "caught_up") belong to realtime protocol
|
|
# NOTE: "projection_event" (and "caught_up") belong to realtime protocol
|
|
|
# v2 on unreleased Chatto main — chattolib speaks v1 and can never
|
|
# v2 on unreleased Chatto main — chattolib speaks v1 and can never
|