Skip to content

Fix #686 - Clarify decision logic around agentic route selection#701

Merged
tracyboehrer merged 1 commit intomainfrom
users/benbro/686
Oct 21, 2025
Merged

Fix #686 - Clarify decision logic around agentic route selection#701
tracyboehrer merged 1 commit intomainfrom
users/benbro/686

Conversation

@benbrown
Copy link
Copy Markdown
Contributor

I thought the syntax of the route selection logic was a bit confusing, so I expanded it.

Previously it was

!isAgenticRoute || Activity.isAgenticRequest

The right hand side implies isAgenticRoute is true AND the request isAgentic. The invisible isAgenticRoute was confusing to my simple mortal brain so I put it in.

Copilot AI review requested due to automatic review settings October 21, 2025 16:21
Copy link
Copy Markdown
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

This PR clarifies the boolean logic for agentic route selection by making the implicit condition explicit. The change transforms !isAgenticRoute || context.activity.isAgenticRequest() into !isAgenticRoute || (isAgenticRoute && context.activity.isAgenticRequest()) throughout the codebase to make the logic more readable and easier to understand.

Key Changes

  • Expanded the boolean expression in route selection logic to explicitly show that isAgenticRequest() is only evaluated when isAgenticRoute is true
  • Applied this clarification consistently across all route selector functions in the AgentApplication class

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread packages/agents-hosting/src/app/agentApplication.ts
@tracyboehrer tracyboehrer merged commit ef9d667 into main Oct 21, 2025
7 checks passed
@tracyboehrer tracyboehrer deleted the users/benbro/686 branch October 21, 2025 17:41
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