mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-27 01:11:40 +00:00
fix(agent): add debug diagnostics for empty model responses
This commit is contained in:
parent
00c3d848d8
commit
38dab6dff4
9 changed files with 53 additions and 13 deletions
|
|
@ -157,6 +157,10 @@ def _check_sensitive_path(filepath: str, task_id: str = "default") -> str | None
|
|||
except (OSError, ValueError):
|
||||
resolved = filepath
|
||||
normalized = os.path.normpath(os.path.expanduser(filepath))
|
||||
# /private/var/folders is the macOS per-user temporary directory tree; it is
|
||||
# safe to write and must not be treated as a sensitive system path.
|
||||
if resolved.startswith("/private/var/folders/"):
|
||||
return None
|
||||
_err = (
|
||||
f"Refusing to write to sensitive system path: {filepath}\n"
|
||||
"Use the terminal tool with sudo if you need to modify system files."
|
||||
|
|
@ -428,7 +432,7 @@ def read_file_tool(path: str, offset: int = 1, limit: int = 500, task_id: str =
|
|||
with _read_tracker_lock:
|
||||
task_data = _read_tracker.setdefault(task_id, {
|
||||
"last_key": None, "consecutive": 0,
|
||||
"read_history": set(), "dedup": {},
|
||||
"read_history": set(), "dedup": {}, "read_timestamps": {},
|
||||
})
|
||||
cached_mtime = task_data.get("dedup", {}).get(dedup_key)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue