Skip to content

[Agents extension] Prompt user for protocols during "from code" flow#7464

Merged
rajeshkamal5050 merged 2 commits intomainfrom
trangevi/low-hanging-fruit
Apr 3, 2026
Merged

[Agents extension] Prompt user for protocols during "from code" flow#7464
rajeshkamal5050 merged 2 commits intomainfrom
trangevi/low-hanging-fruit

Conversation

@trangevi
Copy link
Copy Markdown
Member

@trangevi trangevi commented Apr 2, 2026

When using local code, prompt the user as to what kind of protocol they want to use.

Signed-off-by: trangevi <trangevi@microsoft.com>
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 updates the azd ai agent init “from code” flow in the azure.ai.agents extension to let users choose which agent protocols to declare in the generated agent.yaml, instead of always defaulting to responses/v1.

Changes:

  • Added a --protocol flag to allow specifying supported protocols non-interactively.
  • Added an interactive multi-select prompt during “init from code” to choose supported protocols (defaulting to responses).
  • Added unit tests covering flag-driven and --no-prompt protocol selection behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
cli/azd/extensions/azure.ai.agents/internal/cmd/init.go Adds --protocol flag wiring into init flags.
cli/azd/extensions/azure.ai.agents/internal/cmd/init_from_code.go Prompts (or uses flags) to populate protocols when generating agent.yaml.
cli/azd/extensions/azure.ai.agents/internal/cmd/init_from_code_test.go Adds tests for protocol selection helper logic (flags + no-prompt default).

@trangevi trangevi linked an issue Apr 2, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Member

@jongio jongio left a comment

Choose a reason for hiding this comment

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

Issues to address:

  • init_from_code.go:822 - --protocol responses --protocol responses produces duplicate entries in agent.yaml; needs dedup
  • init_from_code.go:877 - multi-select response values aren't validated against the known map; silent empty version on unexpected values

Signed-off-by: trangevi <trangevi@microsoft.com>
@rajeshkamal5050 rajeshkamal5050 merged commit 11ecf8c into main Apr 3, 2026
17 checks passed
@trangevi trangevi deleted the trangevi/low-hanging-fruit branch April 3, 2026 21:29
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.

specify supported protocols when generating agent.yaml

5 participants