refactor: update tool progress environment variable defaults and improve setup wizard prompts

- Changed default value for HERMES_TOOL_PROGRESS from "false" to "true" to enable tool progress notifications by default.
- Updated default value for HERMES_TOOL_PROGRESS_MODE from "new" to "all" to provide more comprehensive progress updates.
- Enhanced the setup wizard prompts for enabling tool progress messages and context compression, improving user guidance and experience.
This commit is contained in:
Teknium
2026-02-23 23:31:07 +00:00
parent cefe038a87
commit 0edfc7fa49
2 changed files with 19 additions and 24 deletions

View File

@@ -1161,8 +1161,8 @@ class GatewayRunner:
enabled_toolsets = [default_toolset]
# Check if tool progress notifications are enabled
tool_progress_enabled = os.getenv("HERMES_TOOL_PROGRESS", "").lower() in ("1", "true", "yes")
progress_mode = os.getenv("HERMES_TOOL_PROGRESS_MODE", "new") # "all" or "new" (only new tools)
tool_progress_enabled = os.getenv("HERMES_TOOL_PROGRESS", "true").lower() in ("1", "true", "yes")
progress_mode = os.getenv("HERMES_TOOL_PROGRESS_MODE", "all") # "all" or "new" (only new tools)
# Queue for progress messages (thread-safe)
progress_queue = queue.Queue() if tool_progress_enabled else None

View File

@@ -166,8 +166,8 @@ def prompt_checklist(title: str, items: list, pre_selected: list = None) -> list
menu_items = [f" {item}" for item in items] + [" Continue →"]
# Build preselected indices string (e.g. "0,2,4")
preselected = [str(i) for i in pre_selected]
# Map pre-selected indices to the actual menu entry strings
preselected = [menu_items[i] for i in pre_selected if i < len(menu_items)]
terminal_menu = TerminalMenu(
menu_items,
@@ -999,12 +999,12 @@ def run_setup_wizard(args):
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'
current_progress = get_env_value('HERMES_TOOL_PROGRESS') or 'true'
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'
current_mode = get_env_value('HERMES_TOOL_PROGRESS_MODE') or 'all'
print_info(" Mode options:")
print_info(" 'new' - Only when switching tools (less spam)")
print_info(" 'all' - Every tool call")
@@ -1019,26 +1019,21 @@ def run_setup_wizard(args):
# Step 6: Context Compression
# =========================================================================
print_header("Context Compression")
print_info("Automatically summarize old messages when context gets too long.")
print_info("Automatically summarizes old messages when context gets too long.")
print_info("Higher threshold = compress later (use more context). Lower = compress sooner.")
compression = config.get('compression', {})
current_enabled = compression.get('enabled', True)
config.setdefault('compression', {})['enabled'] = True
if prompt_yes_no(f"Enable context compression?", current_enabled):
config.setdefault('compression', {})['enabled'] = True
current_threshold = compression.get('threshold', 0.85)
threshold_str = prompt(f"Compression threshold (0.5-0.95)", str(current_threshold))
try:
threshold = float(threshold_str)
if 0.5 <= threshold <= 0.95:
config['compression']['threshold'] = threshold
except ValueError:
pass
print_success("Context compression enabled")
else:
config.setdefault('compression', {})['enabled'] = False
current_threshold = config.get('compression', {}).get('threshold', 0.85)
threshold_str = prompt("Compression threshold (0.5-0.95)", str(current_threshold))
try:
threshold = float(threshold_str)
if 0.5 <= threshold <= 0.95:
config['compression']['threshold'] = threshold
except ValueError:
pass
print_success(f"Context compression threshold set to {config['compression'].get('threshold', 0.85)}")
# =========================================================================
# Step 7: Messaging Platforms (Optional)