mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
chore: remove unused imports, dead code, and stale comments
Mechanical cleanup — no behavior changes. Unused imports removed: - model_tools.py: import os - run_agent.py: OPENROUTER_MODELS_URL, get_model_context_length - cli.py: Table, VERSION, RELEASE_DATE, resolve_toolset, get_skill_commands - terminal_tool.py: signal, uuid, tempfile, set_interrupt_event, DANGEROUS_PATTERNS, _load_permanent_allowlist, _detect_dangerous_command Dead code removed: - toolsets.py: print_toolset_tree() (zero callers) - browser_tool.py: _get_session_name() (never called) Stale comments removed: - toolsets.py: duplicated/garbled comment line - web_tools.py: 3 aspirational TODO comments from early development
This commit is contained in:
parent
72a6d7dffe
commit
bfe4baa6ed
7 changed files with 5 additions and 59 deletions
|
|
@ -31,15 +31,12 @@ import json
|
|||
import logging
|
||||
import os
|
||||
import platform
|
||||
import signal
|
||||
import sys
|
||||
import time
|
||||
import threading
|
||||
import atexit
|
||||
import shutil
|
||||
import subprocess
|
||||
import tempfile
|
||||
import uuid
|
||||
from pathlib import Path
|
||||
from typing import Optional, Dict, Any
|
||||
|
||||
|
|
@ -51,7 +48,7 @@ logger = logging.getLogger(__name__)
|
|||
# The terminal tool polls this during command execution so it can kill
|
||||
# long-running subprocesses immediately instead of blocking until timeout.
|
||||
# ---------------------------------------------------------------------------
|
||||
from tools.interrupt import set_interrupt as set_interrupt_event, is_interrupted, _interrupt_event
|
||||
from tools.interrupt import is_interrupted, _interrupt_event
|
||||
|
||||
|
||||
# Add mini-swe-agent to path if not installed. In git worktrees the populated
|
||||
|
|
@ -131,11 +128,8 @@ def set_approval_callback(cb):
|
|||
|
||||
# Dangerous command detection + approval now consolidated in tools/approval.py
|
||||
from tools.approval import (
|
||||
detect_dangerous_command as _detect_dangerous_command,
|
||||
check_dangerous_command as _check_dangerous_command_impl,
|
||||
check_all_command_guards as _check_all_guards_impl,
|
||||
load_permanent_allowlist as _load_permanent_allowlist,
|
||||
DANGEROUS_PATTERNS,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue