Skip to content

Apply structured output formatter to agent mode#5

Merged
DylanBlakemore merged 3 commits intomainfrom
apply-formatter-to-setup-execution
Apr 3, 2026
Merged

Apply structured output formatter to agent mode#5
DylanBlakemore merged 3 commits intomainfrom
apply-formatter-to-setup-execution

Conversation

@DylanBlakemore
Copy link
Copy Markdown
Collaborator

Summary

  • Add agent-mode formatting methods to the output Formatter (header, round separator, explanation, action list, action results)
  • Wire formatter into agent mode in cmd/setup.go, replacing raw fmt.Println calls
  • Add 15 tests covering all new formatter methods in plain and fancy modes

Details

This completes section 2.3 of the agent setup improvements plan. When the agent enters diagnosis mode after a setup failure, users now see structured, visually clear output instead of raw text dumps.

In TTY environments, the output uses box-drawing characters and color-coded danger badges ([safe], [caution], [dangerous]). The agent header shows which phase and step failed, each round gets a visual separator, the diagnosis explanation is displayed in an indented quoted block, and proposed actions appear as a numbered list. After execution, results are shown inline with check/cross marks.

Non-TTY environments get a clean plain-text fallback with ===, --, > prefixes, and [ok]/[FAIL] markers — no ANSI codes or box-drawing characters.

@DylanBlakemore DylanBlakemore merged commit 2adc921 into main Apr 3, 2026
7 checks passed
@DylanBlakemore DylanBlakemore deleted the apply-formatter-to-setup-execution branch April 3, 2026 13:40
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.

1 participant