Skip to content

AgentApplication route selector changes - #240

Merged
tracyboehrer (tracyboehrer) merged 2 commits into
mainfrom
users/tracyboehrer/routehandling
May 2, 2025
Merged

tracyboehrer (tracyboehrer) merged 2 commits into
mainfrom
users/tracyboehrer/routehandling

Conversation

@tracyboehrer

@tracyboehrer tracyboehrer (tracyboehrer) commented May 1, 2025 •

Copy link
Copy Markdown
Member

Fixes #238
Fixes #79

Copilot AI review requested due to automatic review settings May 1, 2025 17:27
@tracyboehrer
tracyboehrer (tracyboehrer) requested a review from a team as a code owner May 1, 2025 17:27
@github-actions github-actions Bot added ML: Core Tags changes to core libraries ML: Tests Tags changes to tests labels May 1, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request updates the route selector logic in AgentApplication and its corresponding tests in order to address issue #238. The changes adjust text matching for message activities and event routing for improved consistency.

Reviewed Changes

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

File Description
src/tests/Microsoft.Agents.Builder.Tests/App/ApplicationRouteTests.cs Updated tests for verifying route selection changes with string, regex and multiple selectors.
src/libraries/Builder/Microsoft.Agents.Builder/App/AgentApplication.cs Modified route selectors to use Activity.IsType and updated matching logic for text and event name handling.
Comments suppressed due to low confidence (1)

src/libraries/Builder/Microsoft.Agents.Builder/App/AgentApplication.cs:450

  • Switching event name matching from checking Activity.Text to Activity.Name clarifies event routing. Please ensure that all event producers correctly set the Activity.Name property so that behavior remains consistent.
&& context.Activity.Name.Equals(eventName, StringComparison.OrdinalIgnoreCase)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ML: Core Tags changes to core libraries ML: Tests Tags changes to tests

Projects

None yet

3 participants