feat(cli): Add numbered session list with interactive resume#11461
Closed
zzhan111 wants to merge 8 commits into
Closed
feat(cli): Add numbered session list with interactive resume#11461zzhan111 wants to merge 8 commits into
zzhan111 wants to merge 8 commits into
Conversation
• 在 hermes sessions list 命令输出中增加#列显示会话序号 • 列表显示后提示用户输入序号来恢复对应会话 • /resume 命令无参数时显示带编号的最近会话列表供选择 • 支持输入 1-N 数字快速恢复会话,回车取消 • 无效输入时显示友好错误提示 影响: - 涉及模块:cli.py (HermesCLI._handle_resume_command), hermes_cli/main.py (cmd_sessions) - 增强用户体验,无需复制会话 ID 即可恢复会话 - 向后兼容:仍支持原有的 /resume <session_id> 用法 - 无破坏性变更
c7e0dda to
0e4e4db
Compare
added 7 commits
April 17, 2026 16:15
• Fixed _cprint() calls that were missing required text argument
• Changed _cprint() to _cprint("") for blank lines in /resume command
• Resolves error: _cprint() missing 1 required positional argument: 'text'
• Ctrl+B key binding now only registered when _voice_mode is True • Prevents Ctrl+B from causing exit when voice mode is disabled • Key binding is conditional on voice mode initialization state • Maintains all existing voice functionality when enabled
• Changed from conditional registration to always registering handler • When voice mode disabled, handler silently consumes key without action • Prevents any default terminal behavior (bell, exit) on Ctrl+B • Maintains full voice functionality when mode is enabled
• Added eager=True flag to ensure voice key handler runs first • Prevents Ctrl+B from triggering default behavior when voice mode is disabled • Handler now consumes the key event before any other handlers can process it • Fixes issue where Ctrl+B would exit when input box was empty
• Added explicit event consumption to prevent Ctrl+B from causing exit • Handler now always runs first (eager=True) and consumes the event • Voice recording only activates when voice mode is enabled • Works with both empty and non-empty input boxes
• First handler always consumes Ctrl+B event (no-op) to prevent default behavior • Second handler with filter activates voice recording only when voice mode enabled • This ensures Ctrl+B is always consumed before any default behavior can trigger
• Single handler approach - always consumes Ctrl+B event • When voice mode disabled: consumes event and returns (no action) • When voice mode enabled: performs voice recording toggle • Simplified from dual-handler approach
This was referenced Apr 27, 2026
Contributor
|
Closing as superseded by PR #31709 (merged), which adds numbered Four contributors filed independently-overlapping PRs against this same UX gap — thanks for being one of them. PR #31709 picked @daizhonggeng's version because it was the only one that covered BOTH the CLI and the gateway code paths in one PR. Authorship for the cherry-picked commit is preserved in If your PR included specific behavior that PR #31709 missed, please reopen with a follow-up scoped to that delta. (Bulk-closed during a CLI PR triage sweep.) |
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.
Summary
Add numbered session lists and interactive session resumption for both CLI and slash command interfaces.
Changes
• Added '#' column showing session numbers (1, 2, 3...) in
hermes sessions listoutput• After displaying session list, prompts user to enter a number to resume that session
•
/resumecommand without arguments now shows a numbered list of recent sessions (up to 10)• Users can type a number (1-N) to quickly resume a session, or press Enter to cancel
• Graceful error handling for invalid input with friendly error messages
Example Usage
Terminal Command
Slash Command
Impact
cli.py(HermesCLI._handle_resume_command),hermes_cli/main.py(cmd_sessions)/resume <session_id>usage continues to workFiles Modified
cli.py- 41 lines addedhermes_cli/main.py- 40 lines added