Skip to content

feat(cli): strip markdown formatting from final replies#12262

Closed
lumenradley wants to merge 1 commit into
NousResearch:mainfrom
lumenradley:feat/markdown-display-modes
Closed

feat(cli): strip markdown formatting from final replies#12262
lumenradley wants to merge 1 commit into
NousResearch:mainfrom
lumenradley:feat/markdown-display-modes

Conversation

@lumenradley

@lumenradley lumenradley commented Apr 18, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Improves plain-text final reply rendering in the CLI by stripping common Markdown markers from model output while preserving useful structure like lists, checkboxes, blockquotes, and tables.

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 final-reply Markdown stripping helpers in cli.py.
  • Added display.final_response_markdown in hermes_cli/config.py.
  • Routed final response panels and strip-mode streaming output through the plain-text cleanup path.
  • Added direct strip-mode coverage in tests/cli/test_cli_markdown_rendering.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_markdown_rendering.py -q.
  3. Start hermes and verify a Markdown-heavy final reply no longer prints markers like ** and _ in the default plain-text path while lists remain readable.

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/markdown-display-modes (5a11329a778a): 29 failed, 12923 passed, 38 skipped.
  • Clean upstream/main baseline on this machine: 34 failed, 12909 passed, 38 skipped.
  • This branch reduces the observed repo-wide failure count by 5 on this machine.

@lumenradley lumenradley force-pushed the feat/markdown-display-modes branch from 4fcc960 to 5a11329 Compare April 18, 2026 20:18
@lumenradley lumenradley changed the title feat(cli): render final replies as markdown with display modes feat(cli): strip markdown formatting from final replies Apr 18, 2026
@lumenradley lumenradley marked this pull request as ready for review April 18, 2026 20:33
teknium1 added a commit that referenced this pull request Apr 20, 2026
…se panels

Follow-up to #12262 — extend final_response_markdown behavior to the other
two final-response Panel render sites (background task completion and /btw
responses) so users see consistent plain-text output everywhere.
teknium1 added a commit that referenced this pull request Apr 20, 2026
…se panels

Follow-up to #12262 — extend final_response_markdown behavior to the other
two final-response Panel render sites (background task completion and /btw
responses) so users see consistent plain-text output everywhere.
teknium1 added a commit that referenced this pull request Apr 20, 2026
…se panels

Follow-up to #12262 — extend final_response_markdown behavior to the other
two final-response Panel render sites (background task completion and /btw
responses) so users see consistent plain-text output everywhere.
@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
ulasbilgen pushed a commit to ulasbilgen/hermes-adhd-agent that referenced this pull request May 1, 2026
…se panels

Follow-up to NousResearch#12262 — extend final_response_markdown behavior to the other
two final-response Panel render sites (background task completion and /btw
responses) so users see consistent plain-text output everywhere.
aj-nt pushed a commit to aj-nt/hermes-agent that referenced this pull request May 1, 2026
…se panels

Follow-up to NousResearch#12262 — extend final_response_markdown behavior to the other
two final-response Panel render sites (background task completion and /btw
responses) so users see consistent plain-text output everywhere.
Luminet2023 pushed a commit to Luminet2023/hermes-agent that referenced this pull request May 1, 2026
…se panels

Follow-up to NousResearch#12262 — extend final_response_markdown behavior to the other
two final-response Panel render sites (background task completion and /btw
responses) so users see consistent plain-text output everywhere.
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…se panels

Follow-up to NousResearch#12262 — extend final_response_markdown behavior to the other
two final-response Panel render sites (background task completion and /btw
responses) so users see consistent plain-text output everywhere.
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…se panels

Follow-up to NousResearch#12262 — extend final_response_markdown behavior to the other
two final-response Panel render sites (background task completion and /btw
responses) so users see consistent plain-text output everywhere.
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
…se panels

Follow-up to NousResearch#12262 — extend final_response_markdown behavior to the other
two final-response Panel render sites (background task completion and /btw
responses) so users see consistent plain-text output everywhere.
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