triggers:
# First mention: spawn and bind the thread.
- event: chat.message.mentioned
connection: slack
where:
$.auto.authored: false
$.auto.attributions:
exists: false
message: |
A user mentioned the chat assistant:
{{message.text}}
Reply in this thread as the same assistant and preserve the conversation context.
routing:
kind: spawn
bind:
target: slack.thread
# Replies: deliver into the session already attributed to the thread.
- events:
- chat.message.mentioned
- chat.message.subscribed
connection: slack
where:
$.auto.authored: false
$.auto.attributions:
exists: true
message: |
A user continued the chat assistant conversation:
{{message.text}}
Continue as the same assistant and reply in this thread using the existing context.
routing:
kind: deliver
routeBy:
kind: attributedSessions
onUnmatched: drop