Small improvements

This commit is contained in:
Dmytro Struk
2025-09-11 16:53:33 -07:00
Unverified
parent ef624d8711
commit a6322c1116
@@ -264,8 +264,8 @@ class CopilotStudioAgent(BaseAgent):
self, activities: AsyncIterable[Activity], streaming: bool
) -> AsyncIterable[ChatMessage]:
async for activity in activities:
if (activity.type == "message" and activity.text and not streaming) or (
activity.type == "typing" and activity.text and streaming
if activity.text and (
(activity.type == "message" and not streaming) or (activity.type == "typing" and streaming)
):
yield self._create_chat_message_from_activity(activity, [TextContent(activity.text)])