feat(message-processing-status): unified processing status indicator for Telegram, Slack, Discord, Feishu

- Add ChannelCapability.PROCESSING_STATUS and capability detection for supported channels
- Implement mark_message_processing_started/finished in Telegram, Slack, Discord, Feishu modules
  - Telegram: manage typing lifecycle with max duration and explicit stop
  - Slack: add/remove reaction as processing indicator
  - Discord: start/stop typing indicator with async task management
  - Feishu: add/remove reaction for processing status
- Refactor message chain to invoke processing status hooks for supported channels
- Ensure processing status is properly finished on sync and async message handling paths
- Add tests for processing status lifecycle and capability detection across channels
This commit is contained in:
jxxghp
2026-05-15 12:45:41 +08:00
parent 5a06e7b8bc
commit b2a18f9ae4
13 changed files with 1101 additions and 92 deletions
+6
View File
@@ -275,6 +275,8 @@ class ChannelCapability(Enum):
LINKS = "links"
# 支持文件发送
FILE_SENDING = "file_sending"
# 支持可收口的消息处理状态提示,如 reaction 或 typing
PROCESSING_STATUS = "processing_status"
@dataclass
@@ -312,6 +314,7 @@ class ChannelCapabilityManager:
ChannelCapability.IMAGES,
ChannelCapability.LINKS,
ChannelCapability.FILE_SENDING,
ChannelCapability.PROCESSING_STATUS,
},
max_buttons_per_row=4,
max_button_rows=10,
@@ -339,6 +342,7 @@ class ChannelCapabilityManager:
ChannelCapability.IMAGES,
ChannelCapability.LINKS,
ChannelCapability.FILE_SENDING,
ChannelCapability.PROCESSING_STATUS,
},
max_buttons_per_row=3,
max_button_rows=8,
@@ -370,6 +374,7 @@ class ChannelCapabilityManager:
ChannelCapability.LINKS,
ChannelCapability.MENU_COMMANDS,
ChannelCapability.FILE_SENDING,
ChannelCapability.PROCESSING_STATUS,
},
max_buttons_per_row=3,
max_button_rows=8,
@@ -390,6 +395,7 @@ class ChannelCapabilityManager:
ChannelCapability.IMAGES,
ChannelCapability.LINKS,
ChannelCapability.FILE_SENDING,
ChannelCapability.PROCESSING_STATUS,
},
max_buttons_per_row=5,
max_button_rows=5,