feat(cli): add option to hide the startup banner - #74281
Conversation
teknium1
left a comment
There was a problem hiding this comment.
Thanks for carrying forward #23679 and adding the shared default that its discussion identified as missing. The feature premise remains valid on current main: cli.py:7051-7081 always renders the startup banner, and the prompt-toolkit /clear redraw independently renders one at cli.py:9639-9659.
Problems
cli-config.yaml.example:1264and PRcli.py:4165say the option applies on/new. On current main,/newonly callsnew_session()(cli.py:9744-9757);/clearis the command that clears and redraws the banner (cli.py:9614-9674). This should be documented as/clear.
Suggested changes
- Replace
/newwith/clearin those two new comments. The implementation correctly gates both the ordinaryshow_banner()path and the separate prompt-toolkit/clearpath, while retaining the diagnostic code after the visual-banner guard.
Automated hermes-sweeper review.
| @@ -1261,6 +1261,14 @@ display: | |||
| # false: Full ASCII banner with tool/skill summary (default) | |||
| compact: false | |||
|
|
|||
| # Show the welcome banner at startup and on /new. | |||
There was a problem hiding this comment.
/new only rotates the session; it does not redraw a banner. The redraw path this option gates is /clear (cli.py:9614-9674 on current main), so please name /clear here.
|
Thanks for the review. Addressed in this push:
Validation: |
37f275a to
48c5807
Compare
48c5807 to
9b5292b
Compare
|
Rebased onto current Focused CLI tests passed (13 passed); changed-file Ruff and Windows-footgun checks passed. The bounded full suite was started but did not return a usable completion record in this environment. The 5-file, 456-line diff remains the original feature scope: the 209-line new test file was pre-existing PR content, and the extra |
What changed and why
display.show_banneroption for the classic CLI. Setdisplay.show_banner: falseto clear the screen without rendering the startup or/clearbanner; diagnostic warnings continue to appear.display.show_banner: trueto the sharedDEFAULT_CONFIG, so fresh, setup, and reset configurations resolve the documented default consistently./clear, and the shared config default.How to test
pytest tests/cli/test_cli_show_banner_option.py tests/cli/test_cli_context_warning.py -q -x --timeout=60.pytest tests/ -q -x --timeout=60.display.show_banner: falseand run/clear; the screen clears without the banner while warnings are still rendered.What platforms tested on
Fixes #23487