feat: Ctrl+G external editor for input + /keys command#4774
Open
iRonin wants to merge 3 commits intoNousResearch:mainfrom
Open
feat: Ctrl+G external editor for input + /keys command#4774iRonin wants to merge 3 commits intoNousResearch:mainfrom
iRonin wants to merge 3 commits intoNousResearch:mainfrom
Conversation
14a7f25 to
2bfefde
Compare
Adds two features to the Hermes CLI: Ctrl+G — External Editor: - Opens current input in $VISUAL / $EDITOR / VS Code / Cursor / vi - Smart paste detection: if input contains a collapsed paste reference [Pasted text #N → path], opens that file directly for editing - Uses run_in_terminal() for clean TUI suspend/resume - Updates input buffer and paste line count on editor close /keys (/shortcuts) — Keyboard Shortcuts Display: - Categorized list of all keybindings (Input, Session, Drafting, Voice) - Reads voice key from config for accurate display - Registered in CommandDef with tab completion
…icators Adds a Claude Code-style input stash to the Hermes CLI: - Ctrl+S stashes current input (text + attached images) and clears the field - Ctrl+S on empty input pops the stash back - Stashed input auto-restores after the agent finishes responding - Placeholder shows stash preview when idle, hint when agent is running - Status bar shows a pinned indicator when a stash is active - Uses (text, [images]) tuple so dragged/pasted images are preserved Alternative to NousResearch#4259 with additional features: auto-restore after response (the key UX from Claude Code), image stashing, placeholder preview, status bar indicator, and proper buf.reset() cleanup. Closes NousResearch#4255
Input starting with / is only routed to the command handler when the
first word matches a known command (via resolve_command). Bare paths
like /Users/ironin/file.md:45-46 now pass through as regular input
to the agent instead of triggering 'Unknown command'.
Fixes both the process_loop routing and the handle_enter interrupt
bypass — both had the same startswith('/') assumption.
2bfefde to
4b39220
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: Ctrl+G external editor for input + /keys command
Two quality-of-life features for the Hermes CLI.
Ctrl+G — External Editor
Press Ctrl+G to open your current input in an external editor. Edit freely with full editor capabilities, save, close — the content flows back into the Hermes input.
Smart paste detection: If the input contains a collapsed paste reference (
[Pasted text #1: 42 lines → ~/.hermes/pastes/paste_1_083045.txt]), Ctrl+G opens that paste file directly instead of creating a new temp file. The paste reference's line count updates automatically after editing.Editor resolution:
$VISUAL→$EDITOR→code --wait→cursor --wait→viThis matches Claude Code's Ctrl+G behavior — essential for composing long, structured prompts that are painful to edit in a single-line input area.
/keys (/shortcuts) — Keyboard Shortcuts Display
Type
/keysor/shortcutsto see all available keyboard shortcuts, organized by category:Reads the voice record key from config for accurate display.
Changes
cli.py_show_keyboard_shortcuts()method,/keyscommand routinghermes_cli/commands.pyCommandDef("keys", ...)with/shortcutsaliasThis PR also includes the Ctrl+S stash feature from #4771 (cherry-picked) so both features work together.