fix(agent): skip empty fallback outbound for non-cli channels
This commit is contained in:
@@ -273,9 +273,15 @@ class AgentLoop:
|
|||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
response = await self._process_message(msg)
|
response = await self._process_message(msg)
|
||||||
await self.bus.publish_outbound(response or OutboundMessage(
|
if response is not None:
|
||||||
channel=msg.channel, chat_id=msg.chat_id, content="",
|
await self.bus.publish_outbound(response)
|
||||||
))
|
elif msg.channel == "cli":
|
||||||
|
await self.bus.publish_outbound(OutboundMessage(
|
||||||
|
channel=msg.channel,
|
||||||
|
chat_id=msg.chat_id,
|
||||||
|
content="",
|
||||||
|
metadata=msg.metadata or {},
|
||||||
|
))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error("Error processing message: {}", e)
|
logger.error("Error processing message: {}", e)
|
||||||
await self.bus.publish_outbound(OutboundMessage(
|
await self.bus.publish_outbound(OutboundMessage(
|
||||||
|
|||||||
Reference in New Issue
Block a user