diff --git a/AGENTS.md b/AGENTS.md index a7318fd33..1721009ff 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -185,6 +185,8 @@ Key components: - `agent/skill_commands.py` - Scans skills and builds invocation messages (shared with gateway) - `load_cli_config()` - Loads config, sets environment variables for terminal - `build_welcome_banner()` - Displays ASCII art logo, tools, and skills summary +- `_preload_resumed_session()` - Loads session history early (before banner) for immediate display on resume +- `_display_resumed_history()` - Renders a compact conversation recap in a Rich Panel on session resume CLI UX notes: - Thinking spinner (during LLM API call) shows animated kawaii face + verb (`(⌐■_■) deliberating...`) @@ -194,6 +196,7 @@ CLI UX notes: - The prompt shows `⚕ ❯` when the agent is working, `❯` when idle - Pasting 5+ lines auto-saves to `~/.hermes/pastes/` and collapses to a reference - Multi-line input via Alt+Enter or Ctrl+J +- When resuming a session (`--continue`/`--resume`), a "Previous Conversation" panel shows previous messages before the input prompt (configurable via `display.resume_display`) - `/commands` - Process user commands like `/help`, `/clear`, `/personality`, etc. - `/skill-name` - Invoke installed skills directly (e.g., `/axolotl`, `/gif-search`) diff --git a/website/docs/user-guide/cli.md b/website/docs/user-guide/cli.md index 314fc326e..aeeba5f07 100644 --- a/website/docs/user-guide/cli.md +++ b/website/docs/user-guide/cli.md @@ -65,6 +65,10 @@ hermes -w -q "Fix issue #123" # Single query in worktree The welcome banner shows your model, terminal backend, working directory, available tools, and installed skills at a glance. +### Session Resume Display + +When resuming a previous session (`hermes -c` or `hermes --resume `), a "Previous Conversation" panel appears between the banner and the input prompt, showing a compact recap of the conversation history. See [Sessions — Conversation Recap on Resume](sessions.md#conversation-recap-on-resume) for details and configuration. + ## Keybindings | Key | Action | diff --git a/website/docs/user-guide/configuration.md b/website/docs/user-guide/configuration.md index 07096a189..e1698f7cb 100644 --- a/website/docs/user-guide/configuration.md +++ b/website/docs/user-guide/configuration.md @@ -468,6 +468,7 @@ display: tool_progress: all # off | new | all | verbose personality: "kawaii" # Default personality for the CLI compact: false # Compact output mode (less whitespace) + resume_display: full # full (show previous messages on resume) | minimal (one-liner only) ``` | Mode | What you see | diff --git a/website/docs/user-guide/sessions.md b/website/docs/user-guide/sessions.md index e99a725d4..f468e632c 100644 --- a/website/docs/user-guide/sessions.md +++ b/website/docs/user-guide/sessions.md @@ -84,6 +84,35 @@ hermes chat --resume 20250305_091523_a1b2c3d4 Session IDs are shown when you exit a CLI session, and can be found with `hermes sessions list`. +### Conversation Recap on Resume + +When you resume a session, Hermes displays a compact recap of the previous conversation in a styled panel before the input prompt: + +```text +╭─────────────────────────── Previous Conversation ────────────────────────────╮ +│ ● You: What is Python? │ +│ ◆ Hermes: Python is a high-level programming language. │ +│ ● You: How do I install it? │ +│ ◆ Hermes: [3 tool calls: web_search, web_extract, terminal] │ +│ ◆ Hermes: You can download Python from python.org... │ +╰──────────────────────────────────────────────────────────────────────────────╯ +``` + +The recap: +- Shows **user messages** (gold `●`) and **assistant responses** (green `◆`) +- **Truncates** long messages (300 chars for user, 200 chars / 3 lines for assistant) +- **Collapses tool calls** to a count with tool names (e.g., `[3 tool calls: terminal, web_search]`) +- **Hides** system messages, tool results, and internal reasoning +- **Caps** at the last 10 exchanges with a "... N earlier messages ..." indicator +- Uses **dim styling** to distinguish from the active conversation + +To disable the recap and keep the minimal one-liner behavior, set in `~/.hermes/config.yaml`: + +```yaml +display: + resume_display: minimal # default: full +``` + :::tip Session IDs follow the format `YYYYMMDD_HHMMSS_<8-char-hex>`, e.g. `20250305_091523_a1b2c3d4`. You can resume by ID or by title — both work with `-c` and `-r`. :::