fix(slack): skip thread context for slash commands so /restart is not buried
_with_thread_context prepends conversation history to the message content. This turned "/restart" into "Slack thread context...\n\n Current message:\n/restart", which the command router could not match as a priority command. Skip the context enrichment when the stripped text starts with "/". Made-with: Cursor
This commit is contained in:
@@ -348,7 +348,8 @@ class SlackChannel(BaseChannel):
|
||||
|
||||
# Thread-scoped session key for channel/group messages
|
||||
session_key = f"slack:{chat_id}:{thread_ts}" if thread_ts and channel_type != "im" else None
|
||||
content = await self._with_thread_context(
|
||||
is_slash = text.strip().startswith("/")
|
||||
content = text if is_slash else await self._with_thread_context(
|
||||
text,
|
||||
chat_id=chat_id,
|
||||
channel_type=channel_type,
|
||||
|
||||
Reference in New Issue
Block a user