-
Notifications
You must be signed in to change notification settings - Fork 665
Add test case for list custom agent #243
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,7 +2,9 @@ | |||||||||
| * Copyright (c) Microsoft Corporation. All rights reserved. | ||||||||||
| *--------------------------------------------------------------------------------------------*/ | ||||||||||
|
|
||||||||||
| using System.ComponentModel; | ||||||||||
| using GitHub.Copilot.SDK.Test.Harness; | ||||||||||
| using Microsoft.Extensions.AI; | ||||||||||
| using Xunit; | ||||||||||
| using Xunit.Abstractions; | ||||||||||
|
|
||||||||||
|
|
@@ -196,6 +198,73 @@ public async Task Should_Handle_Custom_Agent_With_Tools_Configuration() | |||||||||
| await session.DisposeAsync(); | ||||||||||
| } | ||||||||||
|
|
||||||||||
| [Fact] | ||||||||||
| public async Task Should_List_Custom_Agent_In_Session_Response() | ||||||||||
| { | ||||||||||
| var customAgents = new List<CustomAgentConfig> | ||||||||||
| { | ||||||||||
| new CustomAgentConfig | ||||||||||
| { | ||||||||||
| Name = "dd-agent", | ||||||||||
| DisplayName = "dd Agent", | ||||||||||
| Description = "An dd agent", | ||||||||||
| Prompt = "You are an dd agent", | ||||||||||
|
Comment on lines
+210
to
+211
|
||||||||||
| Description = "An dd agent", | |
| Prompt = "You are an dd agent", | |
| Description = "A dd agent", | |
| Prompt = "You are a dd agent", |
Copilot
AI
Jan 28, 2026
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.
The grammatical error "An dd agent" should be corrected to "A dd agent" (assuming "dd" is an acronym or abbreviation). If "dd" stands for something specific, consider spelling it out for clarity in the description.
Copilot
AI
Jan 28, 2026
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.
The grammatical error "You are an dd agent" should be corrected to "You are a dd agent" (assuming "dd" is an acronym or abbreviation). Consider also providing more context about what the "dd" agent is meant to do in the prompt.
patniko marked this conversation as resolved.
Show resolved
Hide resolved
Copilot
AI
Jan 28, 2026
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.
There is significant duplication between this test and Should_Custom_Agent_Availability. Both tests create the same custom agent configuration and perform identical assertions. Consider extracting the common custom agent configuration into a helper method or private field, or consolidate these tests if they're meant to verify the same behavior.
Copilot
AI
Jan 28, 2026
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.
The encrypt_string tool is defined but never invoked in the test. The test only verifies that the custom agent is available, similar to the first test. Consider either: 1) Removing the tool since it's not needed to verify agent availability, or 2) Adding an assertion to verify the tool can be invoked alongside the custom agent (e.g., prompting "Use encrypt_string to encrypt 'hello' and list all custom agents").
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.
The grammatical error "An dd agent" should be corrected to "A dd agent" (assuming "dd" is an acronym or abbreviation). If "dd" stands for something specific like "Data Dump" or similar, consider spelling it out for clarity in the description.