mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-05 02:31:47 +00:00
fix(file_tools): include pagination args in repeated search key
This commit is contained in:
parent
588962d24e
commit
a654bc04f7
2 changed files with 19 additions and 1 deletions
|
|
@ -337,7 +337,17 @@ def search_tool(pattern: str, target: str = "content", path: str = ".",
|
|||
"""Search for content or files."""
|
||||
try:
|
||||
# Track searches to detect *consecutive* repeated search loops.
|
||||
search_key = ("search", pattern, target, str(path), file_glob or "")
|
||||
# Include pagination args so users can page through truncated
|
||||
# results without tripping the repeated-search guard.
|
||||
search_key = (
|
||||
"search",
|
||||
pattern,
|
||||
target,
|
||||
str(path),
|
||||
file_glob or "",
|
||||
limit,
|
||||
offset,
|
||||
)
|
||||
with _read_tracker_lock:
|
||||
task_data = _read_tracker.setdefault(task_id, {
|
||||
"last_key": None, "consecutive": 0, "read_history": set(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue