Commit a648819
committed
refactor(status-line): omit Errors/Warnings/Info tags when the count is zero
The happy-path status line always carried `| Errors: 0 | Warnings: 0
| Info: 0 |` even for a clean command with nothing to report. Those
nine tokens per call paid for zero information — if the AI needed to
know "was there an error", the status icon (✓ vs ✗) already answered
that. The tags only earn their keep when the count is > 0.
Match the discipline the same format already uses for `| Pipeline:
...` (which is omitted when the pipeline summary is empty): each of
the three counters is now only emitted when its value is positive.
Before (happy path):
✓ Pipeline executed successfully | Window: #12345 Cat | Status: Ready | Pipeline: Get-Date | Duration: 0.20s | Errors: 0 | Warnings: 0 | Info: 0 | Location [FileSystem]: C:\...
After (happy path):
✓ Pipeline executed successfully | Window: #12345 Cat | Status: Ready | Pipeline: Get-Date | Duration: 0.20s | Location [FileSystem]: C:\...
Before (1 error, 0 warnings, 0 info):
✗ ... | Duration: 0.20s | Errors: 1 | Warnings: 0 | Info: 0 | Location ...
After (1 error, 0 warnings, 0 info):
✗ ... | Duration: 0.20s | Errors: 1 | Location ...
Before (0 errors, 1 warning, 3 info):
✓ ... | Duration: 0.20s | Errors: 0 | Warnings: 1 | Info: 3 | Location ...
After (0 errors, 1 warning, 3 info):
✓ ... | Duration: 0.20s | Warnings: 1 | Info: 3 | Location ...
Parser impact: consumers that currently pattern-match `Errors: N` are
unaffected (the pattern still matches when N > 0, and the case that
was silently satisfied by "Errors: 0" is now silently satisfied by
tag absence — which any sensible parser was already treating as 0).
No tests in the repo asserted literal `Errors: 0` / `Warnings: 0` /
`Info: 0` on a status line, so the existing 251-test suite needs no
changes.1 parent df839ff commit a648819
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
354 | | - | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
355 | 365 | | |
356 | 366 | | |
357 | 367 | | |
| |||
0 commit comments