mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-22 05:22:09 +00:00
/clear, /new, /reset, and /undo now ask the user to confirm before discarding conversation state — three-option prompt routed through the existing tools.slash_confirm primitive. Native yes/no buttons render on Telegram, Discord, and Slack (their adapters already implement send_slash_confirm); other platforms get a text-fallback prompt and reply with /approve, /always, or /cancel. The classic prompt_toolkit CLI uses the same three-option flow via the established _prompt_text_input pattern (see _confirm_and_reload_mcp). TUI keeps its existing modal overlay (#12312). Gated by new config key approvals.destructive_slash_confirm (default true). Picking 'Always Approve' flips the gate to false so subsequent destructive commands run silently — matches the established mcp_reload_confirm UX. Out of scope: /cron remove (separate domain — scheduled jobs, not session history). Existing TUI overlay env-var (HERMES_TUI_NO_CONFIRM) left unchanged; cosmetic unification can come later. Closes #4069.
This commit is contained in:
parent
0cafe7d50d
commit
b9c001116e
9 changed files with 730 additions and 3 deletions
|
|
@ -1204,6 +1204,15 @@ DEFAULT_CONFIG = {
|
|||
# "Always Approve" to silence the prompt permanently; that flips
|
||||
# this key to false.
|
||||
"mcp_reload_confirm": True,
|
||||
# When true, destructive session slash commands (/clear, /new, /reset,
|
||||
# /undo) ask the user to confirm before discarding conversation state.
|
||||
# Three-option prompt (Approve Once / Always Approve / Cancel) routed
|
||||
# through tools.slash_confirm — native yes/no buttons on Telegram,
|
||||
# Discord, and Slack; text fallback elsewhere. Users click "Always
|
||||
# Approve" to silence the prompt permanently; that flips this key to
|
||||
# false. TUI has its own modal overlay (HERMES_TUI_NO_CONFIRM=1 to
|
||||
# opt out there).
|
||||
"destructive_slash_confirm": True,
|
||||
},
|
||||
|
||||
# Permanently allowed dangerous command patterns (added via "always" approval)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue