[Agents Extension] Update show and monitor commands to not require parameters#7181
Merged
[Agents Extension] Update show and monitor commands to not require parameters#7181
Conversation
Signed-off-by: trangevi <trangevi@microsoft.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Azure AI Agents extension show and monitor commands to resolve agent name/version from the azure.yaml service configuration and current azd environment, making these commands consistent with other extension commands and removing the need for explicit --name/--version parameters.
Changes:
- Update
showandmonitorto accept an optional positional[service]argument and resolve agent details viaazdproject/environment APIs. - Remove required
--name/--versionflags (and related account/project flags) from both commands and refresh help/examples accordingly. - Adjust unit tests to reflect the new positional-arg behavior and removed required flags.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| cli/azd/extensions/azure.ai.agents/internal/cmd/show.go | Switch show to [service] positional arg and resolve agent name/version from azd project + environment. |
| cli/azd/extensions/azure.ai.agents/internal/cmd/show_test.go | Update tests to validate new arg behavior and removal of required flags. |
| cli/azd/extensions/azure.ai.agents/internal/cmd/monitor.go | Switch monitor to [service] positional arg and resolve agent name/version from azd project + environment; adjust session resolution call site. |
| cli/azd/extensions/azure.ai.agents/internal/cmd/monitor_test.go | Update tests to validate new arg behavior and removal of required flags. |
Comments suppressed due to low confidence (1)
cli/azd/extensions/azure.ai.agents/internal/cmd/monitor.go:121
- newMonitorCommand creates an AzdClient (azdext.NewAzdClient) and later resolveMonitorSession() creates a second AzdClient internally. Since monitor now always needs an AzdClient to resolve the service, consider passing the existing client into resolveMonitorSession (or refactoring resolveMonitorSession to accept the already-loaded env/config path) to avoid redundant gRPC connection setup on every run.
// When vnext is enabled, resolve session ID for session-based logstream.
if flags.sessionID == "" {
sessionID, vnext := resolveMonitorSession(ctx, info.AgentName)
if vnext {
if sessionID == "" {
return exterrors.Validation(
exterrors.CodeInvalidSessionId,
"VNext agents are currently enabled and require a session ID for log streaming.",
"Specify the session ID using --session, or run `azd ai agent invoke` first to create one",
)
}
flags.sessionID = sessionID
}
You can also share your feedback on Copilot code review. Take the survey.
vhvb1989
approved these changes
Mar 18, 2026
JeffreyCA
reviewed
Mar 18, 2026
Signed-off-by: trangevi <trangevi@microsoft.com>
JeffreyCA
approved these changes
Mar 18, 2026
4 tasks
Copilot AI
added a commit
that referenced
this pull request
Mar 18, 2026
Co-authored-by: rajeshkamal5050 <11532743+rajeshkamal5050@users.noreply.github.com>
rajeshkamal5050
added a commit
that referenced
this pull request
Mar 18, 2026
* Initial plan * Prepare azure.ai.agents 0.1.16-preview patch release (#7141, #7175, #7181) Co-authored-by: rajeshkamal5050 <11532743+rajeshkamal5050@users.noreply.github.com> * Remove registry.json changes - to be updated after builds are generated Co-authored-by: rajeshkamal5050 <11532743+rajeshkamal5050@users.noreply.github.com> * Add Breaking Changes section in CHANGELOG.md and move #7181 under it Co-authored-by: rajeshkamal5050 <11532743+rajeshkamal5050@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rajeshkamal5050 <11532743+rajeshkamal5050@users.noreply.github.com>
github-actions bot
added a commit
to weikanglim/azure-dev
that referenced
this pull request
Mar 18, 2026
- Add 1.24.0-beta.1 unreleased section to cli/azd/CHANGELOG.md with entries for configurable deploy timeout (Azure#7045), git dirty check and workflow consent for azd init agent mode (Azure#7162), cobra command tree fix (Azure#7171), and input validation improvements (Azure#7175) - Bump cli/version.txt to 1.24.0-beta.1 - Add 0.1.16-preview section to agents CHANGELOG with entries for file operations (Azure#7141), input validation (Azure#7175), and breaking change for show/monitor commands (Azure#7181) - Bump agents version.txt and extension.yaml to 0.1.16-preview Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
wbreza
pushed a commit
to wbreza/azure-dev
that referenced
this pull request
Mar 18, 2026
* Initial plan * Prepare azure.ai.agents 0.1.16-preview patch release (Azure#7141, Azure#7175, Azure#7181) Co-authored-by: rajeshkamal5050 <11532743+rajeshkamal5050@users.noreply.github.com> * Remove registry.json changes - to be updated after builds are generated Co-authored-by: rajeshkamal5050 <11532743+rajeshkamal5050@users.noreply.github.com> * Add Breaking Changes section in CHANGELOG.md and move Azure#7181 under it Co-authored-by: rajeshkamal5050 <11532743+rajeshkamal5050@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rajeshkamal5050 <11532743+rajeshkamal5050@users.noreply.github.com>
wbreza
pushed a commit
to wbreza/azure-dev
that referenced
this pull request
Mar 18, 2026
* Initial plan * Prepare azure.ai.agents 0.1.16-preview patch release (Azure#7141, Azure#7175, Azure#7181) Co-authored-by: rajeshkamal5050 <11532743+rajeshkamal5050@users.noreply.github.com> * Remove registry.json changes - to be updated after builds are generated Co-authored-by: rajeshkamal5050 <11532743+rajeshkamal5050@users.noreply.github.com> * Add Breaking Changes section in CHANGELOG.md and move Azure#7181 under it Co-authored-by: rajeshkamal5050 <11532743+rajeshkamal5050@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rajeshkamal5050 <11532743+rajeshkamal5050@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Other commands rely on the azd service entry to get name/version/etc. details. This PR brings
showandmonitorin line with the rest