From a6322c1116a7ec3ca51e71173f6eb9a864e49c21 Mon Sep 17 00:00:00 2001 From: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com> Date: Thu, 11 Sep 2025 16:53:33 -0700 Subject: [PATCH] Small improvements --- .../copilotstudio/agent_framework_copilotstudio/_agent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/packages/copilotstudio/agent_framework_copilotstudio/_agent.py b/python/packages/copilotstudio/agent_framework_copilotstudio/_agent.py index c7e34b0933..8b253fa63b 100644 --- a/python/packages/copilotstudio/agent_framework_copilotstudio/_agent.py +++ b/python/packages/copilotstudio/agent_framework_copilotstudio/_agent.py @@ -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)])