feat(agent-service): 添加直接模式下的消息处理支持
当代理服务处于非运行状态时,现在会使用process_direct方法来处理入站消息, 而不是依赖submit_direct方法。这使得服务能够在两种模式下都能正确处理消息。 添加了新的DirectModeInboundService和RunningInboundService测试类来验证 不同模式下的行为,并增加了相应的集成测试用例。
This commit is contained in:
@ -1285,7 +1285,8 @@ class AgentService:
|
||||
|
||||
channel_identity = inbound.channel_identity
|
||||
try:
|
||||
result = await self.submit_direct(
|
||||
runner = self.submit_direct if self.is_running else self.process_direct
|
||||
result = await runner(
|
||||
inbound.content,
|
||||
session_id=inbound.session_id,
|
||||
source=f"gateway:{inbound.channel}",
|
||||
|
||||
Reference in New Issue
Block a user