Commit a93ff7f
feat(azure.ai.agents): align
Fixes B8: `azd ai agent show` returned `monitor --tail 100` on
failed status and a `show` re-check on empty status. Per issue
Azure#7975 lines 208-214 the vocabulary is:
IF status == "active" OR status == "idle":
-> "azd ai agent invoke <agent> 'Hello!'"
IF status == "failed" OR status == "":
-> "azd ai agent monitor --follow"
ELSE:
-> "azd ai agent show <agent>" (transitional re-check)
Three changes:
1. New `AgentVersionIdle = "idle"` constant in error_codes.go.
The verified platform enum (see error_codes.go:64-71 doc)
only emits `active` today, but the issue spec treats `idle`
as a "ready" synonym. We add it defensively so a future API
surface change wouldn't make this branch return the wrong
suggestion. The Active branch's switch case now reads
`case AgentVersionActive, AgentVersionIdle:`.
2. `AgentVersionFailed` switch arm now emits
`azd ai agent monitor --follow` (was `--tail 100`). By the
time `show` surfaces the failure, the interactive user wants
to watch the live tail of the next reconcile attempt, not
capture a fixed 100-line window. The pre-C5 `--tail 100`
behavior is preserved in the *invoke*-failure paths
(resolver.go:291,300; error_codes.go:143) — those are
post-mortem inspections after a 5xx response and have
different intent.
3. Empty status (`AgentStatus == ""`) is now combined with the
Failed arm via `case AgentVersionFailed, "":`. The previous
fall-through to the unknown/transitional `show` re-check
masked the case where the platform genuinely had no status
to report — the live log feed is the most useful next view
when "we don't know yet".
Genuinely unknown statuses (anything not in the AgentVersionStatus
enum and not "") still fall through to the unknown branch, which
emits an `azd ai agent show <svc>` re-check.
Tests:
- resolver_test.go TestResolveAfterShow table: bumped `Failed`
case from `monitor --tail 100` → `monitor --follow`, added
`Idle` row routing to invoke, flipped `empty status` row from
re-check → `monitor --follow`.
- show_test.go TestResolveNextStepFromSource_NonActiveBranches:
bumped the `failed` row from `--tail 100` → `--follow`.
Doc comment on `ResolveAfterShow` now includes the full status
mapping table (single source of truth in the code).
Scope: ~40 LoC + doc/test updates. Independent of C1-C4.
Source of truth: issue Azure#7975 lines 207-214 + P5.1 commit plan C5.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>show non-Active branches with issue Azure#7975 vocabulary (P5.1 C5)1 parent ed57cd8 commit a93ff7f
4 files changed
Lines changed: 51 additions & 6 deletions
File tree
- cli/azd/extensions/azure.ai.agents/internal/cmd
- nextstep
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
| |||
76 | 80 | | |
77 | 81 | | |
78 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
79 | 89 | | |
80 | 90 | | |
81 | 91 | | |
| |||
Lines changed: 36 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
320 | 330 | | |
321 | 331 | | |
322 | 332 | | |
| |||
339 | 349 | | |
340 | 350 | | |
341 | 351 | | |
342 | | - | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
343 | 357 | | |
344 | 358 | | |
345 | 359 | | |
| |||
356 | 370 | | |
357 | 371 | | |
358 | 372 | | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
359 | 379 | | |
360 | | - | |
361 | | - | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
362 | 395 | | |
363 | 396 | | |
364 | 397 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
| 566 | + | |
566 | 567 | | |
567 | | - | |
| 568 | + | |
568 | 569 | | |
569 | 570 | | |
570 | | - | |
| 571 | + | |
571 | 572 | | |
572 | 573 | | |
573 | 574 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
453 | | - | |
| 453 | + | |
| 454 | + | |
454 | 455 | | |
455 | 456 | | |
456 | 457 | | |
| |||
0 commit comments