-
Notifications
You must be signed in to change notification settings - Fork 67
AdaptiveCards search/execute improvements #514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 pull request improves the AdaptiveCards search and execute functionality by enhancing error handling, refactoring validation logic, and expanding test coverage.
- Refactored validation logic into reusable methods (
TryValidateSearchInvokeValueandTryValidateActionInvokeValue) - Improved error handling for malformed or incomplete invoke actions and search requests
- Added comprehensive test coverage for error scenarios including null actions, unexpected action types, missing search fields
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| AdaptiveCardsTests.cs | Renamed tests for clarity, added new test cases for error scenarios (null actions, unexpected action types, missing search value/kind/queryText) |
| AdaptiveCardSearchInvokeValue.cs | New file extracting the inner class to a top-level class for better organization |
| AdaptiveCardInvokeResponseFactory.cs | Added SearchResponse factory method and two validation methods for search and action invoke values with proper error handling |
| AdaptiveCard.cs | Refactored route handlers to use new validation methods, improved error response handling, simplified null checks |
| CopilotStudioAgentConnector.zip | Binary file update (sample connector) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...ries/Builder/Microsoft.Agents.Builder/App/AdaptiveCards/AdaptiveCardInvokeResponseFactory.cs
Outdated
Show resolved
Hide resolved
...ries/Builder/Microsoft.Agents.Builder/App/AdaptiveCards/AdaptiveCardInvokeResponseFactory.cs
Outdated
Show resolved
Hide resolved
src/libraries/Builder/Microsoft.Agents.Builder/App/AdaptiveCards/AdaptiveCard.cs
Show resolved
Hide resolved
src/libraries/Builder/Microsoft.Agents.Builder/App/AdaptiveCards/AdaptiveCard.cs
Show resolved
Hide resolved
src/libraries/Builder/Microsoft.Agents.Builder/App/AdaptiveCards/AdaptiveCard.cs
Outdated
Show resolved
Hide resolved
...ries/Builder/Microsoft.Agents.Builder/App/AdaptiveCards/AdaptiveCardInvokeResponseFactory.cs
Show resolved
Hide resolved
# Conflicts: # src/libraries/Builder/Microsoft.Agents.Builder/App/AdaptiveCards/AdaptiveCard.cs
There was a problem hiding this 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 4 out of 5 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fixes #307