Commit ed57cd8
feat(azure.ai.agents): add monitor --follow secondary after invoke --local success (P5.1 C4)
Fixes B7: `azd ai agent invoke --local` success previously emitted
only a single `azd deploy` suggestion. Per issue Azure#7975 lines 168-181,
the natural follow-up loop is "ship to Azure, then watch the live
logs" — surface both commands in one block:
Next: azd deploy -- deploy the agent to Azure
azd ai agent monitor --follow -- view logs after deploying
Rationale: by the time `invoke --local` returns success, the user
has already provisioned (dependencies exist) and the agent itself
works. The next loop is the deploy + verify dance, so the live-log
feed is the right secondary.
Also updates the deploy command's description from the conversational
"the local invoke worked — ship it to Azure" to the spec-aligned
"deploy the agent to Azure" so the description column stays
functional rather than narrative.
Renderer fit: PrintNext (used by invoke.go) caps at 2 lines, which
exactly accommodates the new shape; no callsite change needed. The
existing remote-success path already returned 2 suggestions
(`show <agent>` + `monitor`), so this brings the local- and
remote-success paths into structural parity.
Scope: ~40 LoC + doc/test updates. Independent of C1-C3.
Out of scope (issue Azure#7975 lines 183-191 multi-agent variant):
The multi-agent local-invoke output uses an "After deploying:"
prose subsection with per-agent invoke commands. That requires
threading state into ResolveAfterInvoke (today's call site passes
state=nil — see invoke.go:222 doc) and either a new Suggestion
sub-type for the indented subsection or a layout change to
PrintNext. Deferred to a follow-up commit. The single-agent
project case — by far the common one — is fully covered by this
change.
Tests:
- `TestResolveAfterInvoke_Success` / "local success → deploy +
monitor" updated to assert the 2-Suggestion shape, both command
strings, both descriptions, and that neither is Trailing.
Source of truth: issue Azure#7975 lines 168-181, P5.1 commit plan C4.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 91c87a4 commit ed57cd8
2 files changed
Lines changed: 44 additions & 8 deletions
Lines changed: 21 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
224 | 226 | | |
225 | 227 | | |
226 | 228 | | |
| |||
237 | 239 | | |
238 | 240 | | |
239 | 241 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
245 | 260 | | |
246 | 261 | | |
247 | 262 | | |
| |||
Lines changed: 23 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
466 | | - | |
| 466 | + | |
467 | 467 | | |
468 | 468 | | |
469 | | - | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
470 | 474 | | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
471 | 492 | | |
472 | 493 | | |
473 | 494 | | |
| |||
0 commit comments