mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-27 01:11:40 +00:00
Add tool progress notifications for messaging channels
- Introduced a new callback mechanism in the AIAgent class to send tool progress messages during execution, enhancing user feedback in messaging platforms. - Updated the GatewayRunner to support tool progress notifications, allowing users to enable or disable this feature via environment variables. - Enhanced the CLI setup wizard to prompt users for enabling tool progress messages and selecting the notification mode (all or new), improving configuration options. - Updated relevant documentation to reflect the new features and configuration settings for tool progress notifications.
This commit is contained in:
parent
a09b018bd5
commit
e7f0ffbf5d
4 changed files with 141 additions and 4 deletions
|
|
@ -713,6 +713,28 @@ def run_setup_wizard(args):
|
|||
except ValueError:
|
||||
print_warning("Invalid number, keeping current value")
|
||||
|
||||
# Tool progress notifications (for messaging)
|
||||
print_info("")
|
||||
print_info("Tool Progress Notifications (Messaging only)")
|
||||
print_info("Send status messages when the agent uses tools.")
|
||||
print_info("Example: '💻 ls -la...' or '🔍 web_search...'")
|
||||
|
||||
current_progress = get_env_value('HERMES_TOOL_PROGRESS') or 'false'
|
||||
if prompt_yes_no("Enable tool progress messages?", current_progress.lower() in ('1', 'true', 'yes')):
|
||||
save_env_value("HERMES_TOOL_PROGRESS", "true")
|
||||
|
||||
# Progress mode
|
||||
current_mode = get_env_value('HERMES_TOOL_PROGRESS_MODE') or 'new'
|
||||
print_info(" Mode options:")
|
||||
print_info(" 'new' - Only when switching tools (less spam)")
|
||||
print_info(" 'all' - Every tool call")
|
||||
mode = prompt(" Progress mode", current_mode)
|
||||
if mode.lower() in ('all', 'new'):
|
||||
save_env_value("HERMES_TOOL_PROGRESS_MODE", mode.lower())
|
||||
print_success("Tool progress enabled")
|
||||
else:
|
||||
save_env_value("HERMES_TOOL_PROGRESS", "false")
|
||||
|
||||
# =========================================================================
|
||||
# Step 6: Context Compression
|
||||
# =========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue