fix: add --yes flag to bypass confirmation in /skills install and uninstall#1647
Merged
fix: add --yes flag to bypass confirmation in /skills install and uninstall#1647
Conversation
…nstall Fixes hanging when using /skills install or /skills uninstall from the TUI — bare input() calls hang inside prompt_toolkit's event loop. Changes: - Add skip_confirm parameter to do_install() and do_uninstall() - Separate --yes/-y (confirmation bypass) from --force (scan override) in both argparse and slash command handlers - Update usage hint for /skills uninstall to show [--yes] The original PR (#1595) accidentally deleted the install_from_quarantine() call, which would have broken all installs. That bug is not present here. Based on PR #1595 by 333Alden333.
1 task
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
Salvage of PR #1595 by @333Alden333 onto current main, with critical bug fix and tests.
What this does:
/skills installand/skills uninstalluse bareinput()for confirmation prompts. Inside prompt_toolkit's TUI,input()hangs because prompt_toolkit owns the event loop. Adding--yes/-ybypasses the confirmation prompt so these commands work from the interactive CLI.Changes
do_install()— newskip_confirmparameter; when True, skips the confirmation blockdo_uninstall()— newskip_confirmparameter; wraps theinput()prompt inif not skip_confirm:handle_skills_slash()— separates--yes/-y(confirmation bypass) from--force(scan override)hermes_cli/main.py— splits argparse--force/--yes/-yfrom a single flag into two separate flags with distinct semantics/skills uninstallnow shows[--yes]Critical bug in original PR
The original PR #1595 accidentally deleted the
install_from_quarantine()call and theSKILLS_DIRimport fromdo_install(), which would have completely broken all skill installations with aNameError. That bug is not present in this salvage.Tests
16 new tests across 2 files:
tests/hermes_cli/test_skills_install_flags.py— argparse flag separation (--yes, -y, --force, both, neither)tests/hermes_cli/test_skills_skip_confirm.py— slash command flag parsing, do_install/do_uninstall skip_confirm behavior, input() bypass verificationFull suite: 4821 passed, 8 pre-existing failures (unrelated), 200 skipped.
Credit
Original concept by @333Alden333 (PR #1595).
Closes #1595