hermes-agent/website/docs/reference
teknium1 0fa5e41c86 feat(diff): cross-surface /diff with staged/all/session modes
Widen the cherry-picked /diff base (#4839 by @SHL0MS) into one
cross-surface implementation, folding in the review feedback and the
best ideas from the two sibling PRs (#22703, #53527):

- tools/working_diff.py: shared git collection layer — unstaged
  (default), staged, and all (vs HEAD) modes; untracked files folded in
  via `git diff --no-index` so new files appear as additions (Codex
  /diff parity); shlex-split arguments preserve quoted paths.
- CLI: handler moved to hermes_cli/cli_commands_mixin.py per the
  current god-file decomposition (dispatch stays in cli.py), renders
  through the rich console with a 400-line terminal-flood guard.
- Gateway: _handle_diff_command in gateway/slash_commands.py + dispatch
  in gateway/run.py; fenced ```diff output truncated to 60 lines /
  3000 chars before the platform senders apply their own per-platform
  message clamps (tool-progress-style layered truncation). Localized
  strings in all 17 locale catalogs.
- /diff session (from #53527): cumulative checkpoint-baseline diff of
  everything Hermes changed, via new CheckpointManager.session_diff();
  docstring records the retained-baseline approximation caveat from
  review. Works on both surfaces; degrades with an actionable message
  when checkpoints are off.
- Slack: /diff routed via /hermes diff (50-slash cap; keeps
  telegram-parity test green and /version native).
- Registry: cross-surface CommandDef with staged|all|session
  subcommands; docs: slash-commands reference (CLI + gateway tables +
  both-surfaces list) and hermes-agent skill reference.
- Tests: tests/tools/test_working_diff.py (real git repos),
  tests/hermes_cli/test_diff_command.py (real git + stubbed checkpoint
  manager), tests/gateway/test_diff_command.py (end-to-end handler,
  real checkpoint store), TestSessionDiff in
  tests/tools/test_checkpoint_manager.py.

Salvaged from the /diff PR cluster #4839 + #22703 + #53527.

Co-authored-by: Ninso112 <ninso112@proton.me>
Co-authored-by: Harshkamdar67 <harshkamdar67@gmail.com>
2026-07-26 18:28:20 -07:00
..
_category_.json feat: add documentation website (Docusaurus) 2026-03-05 05:24:55 -08:00
automation-blueprints-catalog.mdx docs: finish Automation Blueprints terminology rebrand (#44470) 2026-06-11 17:22:22 -04:00
cli-commands.md feat(cli): hermes import-agent — import Claude Code and Codex CLI setups 2026-07-26 17:47:07 -07:00
environment-variables.md feat: raise default tool-calling iteration limit from 90 to 500 2026-07-26 12:54:45 -07:00
faq.md docs: warn that mid-session model switches break prompt caching (#58747) 2026-07-05 04:34:05 -07:00
mcp-config-reference.md chore: docs table entry + AUTHOR_MAP for preflight cluster salvage 2026-07-05 21:36:19 -07:00
model-catalog.md feat(model-switch): excluded_providers config to hide providers from /model picker 2026-07-20 03:06:02 -07:00
optional-skills-catalog.md docs(skills): update pages, catalogs, sidebar for skill dir renames 2026-07-24 07:53:54 -07:00
profile-commands.md fix(profile): make clone-from a full source selector 2026-06-13 07:33:58 -07:00
skills-catalog.md docs(skills): update pages, catalogs, sidebar for skill dir renames 2026-07-24 07:53:54 -07:00
slash-commands.md feat(diff): cross-surface /diff with staged/all/session modes 2026-07-26 18:28:20 -07:00
tools-reference.md docs(xai): clarify x_search vs xurl routing without schema cross-refs 2026-07-23 21:06:47 -07:00
toolsets-reference.md docs(xai): clarify x_search vs xurl routing without schema cross-refs 2026-07-23 21:06:47 -07:00