Skip to content

Commit 3d06d7d

Browse files
Copilotpontemonti
andcommitted
Address code review: make comments more concise
Co-authored-by: pontemonti <7850950+pontemonti@users.noreply.github.com>
1 parent c5fa5be commit 3d06d7d

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

libraries/microsoft-agents-a365-tooling-extensions-agentframework/microsoft_agents_a365/tooling/extensions/agentframework/services/mcp_tool_registration_service.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,8 @@ async def send_chat_history_messages(
266266
# Convert messages to ChatHistoryMessage format
267267
history_messages = self._convert_chat_messages_to_history(chat_messages)
268268

269-
# Note: Even if history_messages is empty (either from empty input or all messages filtered),
270-
# we still call the core service. This is required so that the user message from
271-
# turn_context.activity.text gets registered correctly in the MCP platform.
269+
# Call core service even with empty history_messages to register
270+
# the user message from turn_context.activity.text in the MCP platform.
272271
if len(history_messages) == 0:
273272
self._logger.info(
274273
"Empty history messages (either no input or all filtered), "

libraries/microsoft-agents-a365-tooling-extensions-openai/microsoft_agents_a365/tooling/extensions/openai/mcp_tool_registration_service.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,10 +401,8 @@ async def send_chat_history_messages(
401401
# Convert OpenAI messages to ChatHistoryMessage format
402402
chat_history_messages = self._convert_openai_messages_to_chat_history(messages)
403403

404-
# Note: Even if chat_history_messages is empty (either from empty input or all messages
405-
# filtered during conversion), we still call the core service. This is required so that
406-
# the user message from turn_context.activity.text gets registered correctly in the
407-
# MCP platform.
404+
# Call core service even with empty chat_history_messages to register
405+
# the user message from turn_context.activity.text in the MCP platform.
408406
if len(chat_history_messages) == 0:
409407
self._logger.info(
410408
"Empty chat history messages (either no input or all filtered), "

libraries/microsoft-agents-a365-tooling/microsoft_agents_a365/tooling/services/mcp_tool_server_configuration_service.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -608,9 +608,8 @@ async def send_chat_history(
608608
if chat_history_messages is None:
609609
raise ValueError("chat_history_messages cannot be None")
610610

611-
# Note: Empty chat_history_messages is allowed and will still be sent to the MCP platform.
612-
# This is required so that the user message from turn_context.activity.text gets registered
613-
# correctly in the MCP platform for real-time threat protection.
611+
# Empty chat_history_messages is allowed - the request will still be sent
612+
# to register the user message from turn_context.activity.text in the MCP platform.
614613

615614
# Extract required information from turn context
616615
if not turn_context.activity:

0 commit comments

Comments
 (0)