Stack the azure.ai.agents Next: guidance block with command highlighting#8731
Open
therealjohn wants to merge 3 commits into
Open
Stack the azure.ai.agents Next: guidance block with command highlighting#8731therealjohn wants to merge 3 commits into
Next: guidance block with command highlighting#8731therealjohn wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the azure.ai.agents extension’s Next: guidance rendering to a more readable stacked layout and adds command highlighting for runnable azd ... suggestions, aligning the behavior across deploy notes and the show / init / doctor flows.
Changes:
- Reworked
Next:formatting to render a header line followed by command/description pairs with blank separators. - Added
highlightCommandso runnableazd ...commands are highlighted while non-command pointers remain plain. - Updated deploy-note concatenation and refreshed formatter goldens + added a highlight-routing test.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cli/azd/extensions/azure.ai.agents/internal/project/service_target_agent.go | Adjusts deploy-note concatenation to account for FormatNextForNote now including a leading newline. |
| cli/azd/extensions/azure.ai.agents/internal/cmd/nextstep/format.go | Implements stacked Next: renderer and command highlighting via output.WithHighLightFormat. |
| cli/azd/extensions/azure.ai.agents/internal/cmd/nextstep/format_test.go | Updates golden expectations, suppresses color globally for determinism, and adds highlight-selection coverage. |
Restyle the post-deploy (and show/init/doctor) "Next:" guidance block in the azure.ai.agents extension. Each suggestion now renders as a command line over its description line, indented under a standalone "Next:" header with a blank line between suggestions, replacing the dense right-aligned "cmd -- desc" rows. Runnable azd commands are highlighted blue; "see ..." and "edit agent.yaml: ..." pointers stay plain. - format.go: stacked renderer plus highlightCommand helper; FormatNextForNote emits a leading blank line and drops the 4-space continuation pre-indent. - service_target_agent.go: join the appended Next: block with a single newline since the block now carries its own leading newline. - format_test.go: new layout goldens, TestMain color suppression, and a highlight-routing test.
06130cf to
168fd8a
Compare
trangevi
approved these changes
Jun 19, 2026
Address Copilot PR review: highlightCommand applied color via output.WithHighLightFormat, which only self-gates on NO_COLOR/non-TTY -- not azd's --output json mode. Because FormatNextForNote's result is embedded in an artifact note that azd serializes into `azd deploy --output json`, and the service-target Deploy path has no output-format signal, color could leak ANSI escape codes into JSON. Plumb an explicit colorize signal from call sites: PrintNext/PrintAllNext take a colorize bool (terminal call sites pass true; doctor threads its TTY-derived showNext), while FormatNextForNote always renders plain. Fix the inaccurate doc comment that claimed WithHighLightFormat self-disables for JSON. Add regression tests asserting FormatNextForNote never emits ANSI even with color enabled, and that the terminal path highlights only azd commands.
trangevi
approved these changes
Jun 19, 2026
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.
Fixes #8730
What
Restyles the
Next:guidance block rendered by theazure.ai.agentsextension after a successfulazd ai agentdeploy (and inshow/init/doctor).Before -- dense, right-aligned rows:
After -- stacked layout:
Next:header on its own line; each suggestion is a command line over its description line, indented, with a blank line between suggestions.azdcommands are highlighted;see .../edit agent.yaml: ...pointers stay plain.Next:blocks (deploy note plus theshow/init/doctorflows).Changes
internal/cmd/nextstep/format.go: stacked renderer plus ahighlightCommandhelper;FormatNextForNoteemits a leading blank line and drops the old 4-space continuation pre-indent. Sorting / truncation / trailing-reservation semantics are unchanged.internal/project/service_target_agent.go: append theNext:block with a single newline since the block now carries its own leading newline.internal/cmd/nextstep/format_test.go: updated layout goldens,TestMaincolor suppression, and a highlight-routing test.Validation
go build ./...andgo test ./...pass for the extension.golangci-lint runreports 0 issues;cspellclean; copyright headers present.go.mod/go.sumchanges.