Skip to content

Conversation

@pontemonti
Copy link
Contributor

  • Added send_chat_history_messages and send_chat_history methods to handle chat history messaging.
  • Introduced message conversion logic to transform ThreadMessage objects into ChatHistoryMessage format.
  • Implemented input validation for method parameters.
  • Created unit tests for input validation, message conversion, success paths, error handling, and edge cases.
  • Added mock classes for testing Azure AI Foundry message structures.
  • Established shared pytest fixtures for consistent testing setup.

- Added `send_chat_history_messages` and `send_chat_history` methods to handle chat history messaging.
- Introduced message conversion logic to transform ThreadMessage objects into ChatHistoryMessage format.
- Implemented input validation for method parameters.
- Created unit tests for input validation, message conversion, success paths, error handling, and edge cases.
- Added mock classes for testing Azure AI Foundry message structures.
- Established shared pytest fixtures for consistent testing setup.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements an Azure AI Foundry–specific chat history API on top of the existing MCP tooling, including message conversion, validation, and comprehensive tests/documentation.

Changes:

  • Added send_chat_history_messages and send_chat_history to McpToolRegistrationService to convert Azure AI Foundry ThreadMessage instances into ChatHistoryMessage objects and delegate to the core MCP tool server configuration service, with input validation and error handling.
  • Introduced Azure AI Foundry test fixtures and a rich test suite covering validation, message conversion, success paths, error handling, edge cases, concurrency, and tool option propagation.
  • Added PRD and task documents describing the design, behavior, and implementation tasks for the Azure AI Foundry chat history API.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
libraries/microsoft-agents-a365-tooling-extensions-azureaifoundry/microsoft_agents_a365/tooling/extensions/azureaifoundry/services/mcp_tool_registration_service.py Adds Azure AI Foundry–specific chat history methods, including conversion from ThreadMessage to ChatHistoryMessage, orchestration of default ToolOptions, and delegation to the shared McpToolServerConfigurationService, with logging and error handling.
tests/tooling/extensions/azureaifoundry/services/conftest.py Provides shared pytest fixtures for Azure AI Foundry tests (mock ThreadMessage/roles, AgentsClient, TurnContext, async iterator, and service instances with both successful and failing core services).
tests/tooling/extensions/azureaifoundry/services/test_send_chat_history.py Defines unit tests for input validation, content extraction, message conversion/filtering, success paths, error propagation, edge cases (including concurrent calls and role without .value), and option propagation; one test contains an unnecessary isinstance patch now that content extraction uses duck-typing.
tests/tooling/extensions/azureaifoundry/services/__init__.py Initializes the Azure AI Foundry services test package (header only).
tests/tooling/extensions/azureaifoundry/__init__.py Initializes the Azure AI Foundry tests package (header only).
docs/prd/azure-ai-foundry-chat-history-api.md Introduces a detailed PRD for the Azure AI Foundry chat history API (objectives, requirements, design, logging, testing, and acceptance criteria); one default-behavior row currently overstates what happens for empty histories compared to the existing core service implementation.
docs/prd/azure-ai-foundry-chat-history-api-tasks.md Adds an implementation task breakdown for the feature; a few acceptance-criteria bullets (empty list handling and UUID generation for missing IDs) no longer match the agreed PRD or the implemented code.

Copilot AI review requested due to automatic review settings January 27, 2026 05:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Copilot AI review requested due to automatic review settings January 28, 2026 00:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

@pontemonti pontemonti enabled auto-merge (squash) January 28, 2026 00:32
@pontemonti pontemonti merged commit d20dcdd into main Jan 28, 2026
8 checks passed
@pontemonti pontemonti deleted the users/johanb/RTP_AzureAIFoundry branch January 28, 2026 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants