Describe the bug
Docstrings containing structured/formatted text (such as tree diagrams or lists) lose their newlines when rendered in --help output. This is because Click's help formatter rewraps text by default, collapsing intentional line breaks into spaces.
See https://click.palletsprojects.com/en/8.1.x/documentation/#preventing-rewrapping
To Reproduce
adk eval --help
Expected behavior
The help output should preserve the newlines and indentation of the tree diagram:
sample_eval_set_file.json:
|....... eval_1
|....... eval_2
|....... eval_3
|....... eval_4
|....... eval_5
Screenshots
Desktop (please complete the following information):
- OS: macOS
- Python version(python -V): Python 3.13.8
- ADK version(pip show google-adk): 1.23.0
Model Information:
- Are you using LiteLLM: -
- Which model is being used: -
Additional context
The fix is straightforward: add \b on a line by itself before the formatted block
|
TEST MODES: |
|
|
|
\b |
|
replay : Verifies agent interactions match previously recorded behaviors |
|
exactly. Compares LLM requests/responses and tool calls/results. |
|
live : Runs evaluation-based verification (not yet implemented) |
|
|
|
DIRECTORY STRUCTURE: |
|
|
|
Test cases must follow this structure: |
|
|
|
\b |
|
category/ |
|
test_name/ |
|
spec.yaml # Test specification |
|
generated-recordings.yaml # Recorded interactions (replay mode) |
|
generated-session.yaml # Session data (replay mode) |
|
|
|
EXAMPLES: |
|
|
|
\b |
|
# Run all tests in current directory's 'tests' folder |
|
adk conformance test |
|
|
|
\b |
|
# Run tests from specific folders |
|
adk conformance test tests/core tests/tools |
|
|
|
\b |
|
# Run a single test case |
|
adk conformance test tests/core/description_001 |
|
|
|
\b |
|
# Run in live mode (when available) |
|
adk conformance test --mode=live tests/core |
Describe the bug
Docstrings containing structured/formatted text (such as tree diagrams or lists) lose their newlines when rendered in
--helpoutput. This is because Click's help formatter rewraps text by default, collapsing intentional line breaks into spaces.See https://click.palletsprojects.com/en/8.1.x/documentation/#preventing-rewrapping
To Reproduce
adk eval --helpExpected behavior
The help output should preserve the newlines and indentation of the tree diagram:
Screenshots
Desktop (please complete the following information):
Model Information:
Additional context
The fix is straightforward: add
\bon a line by itself before the formatted blockadk-python/src/google/adk/cli/cli_tools_click.py
Lines 314 to 348 in 7cf1e44