Skip to content

feat(cli): improve multiline previews#12269

Closed
lumenradley wants to merge 1 commit into
NousResearch:mainfrom
lumenradley:feat/multiline-preview
Closed

feat(cli): improve multiline previews#12269
lumenradley wants to merge 1 commit into
NousResearch:mainfrom
lumenradley:feat/multiline-preview

Conversation

@lumenradley

Copy link
Copy Markdown
Contributor

What does this PR do?

Improves multiline user-message previews in the CLI so submitted prompts are echoed back compactly instead of dumping the entire pasted block into scrollback.

Related Issue

Fixes #TBD

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • Added preview-formatting helpers in cli.py.
  • Added display.user_message_preview defaults in hermes_cli/config.py.
  • Set preview defaults to first 2 lines and last 2 lines.
  • Added direct preview coverage in tests/cli/test_cli_user_message_preview.py.
  • Added config coverage in tests/hermes_cli/test_config.py.

How to Test

  1. Run source /Volumes/Shared/turbo/hermes-agent/venv/bin/activate && scripts/run_tests.sh.
  2. Run scripts/run_tests.sh tests/cli/test_cli_user_message_preview.py tests/hermes_cli/test_config.py -q.
  3. Start hermes, paste a 6+ line block, and verify the echo shows the first 2 lines, an omission marker, and the last 2 lines.

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS 15

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Screenshots / Logs

  • Full suite on branch feat/multiline-preview (974953530261): 29 failed, 12918 passed, 38 skipped.
  • Clean upstream/main baseline on this machine: 34 failed, 12909 passed, 38 skipped.
  • This preview-only split reduced the observed repo-wide failure count by 5 on this machine.

@teknium1

Copy link
Copy Markdown
Contributor

Merged via PR #12934 — your commit was cherry-picked onto current main with authorship preserved (see git log --author=lumenradley). Thanks for the contribution!

@teknium1 teknium1 closed this Apr 20, 2026
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.

2 participants