Skip to content

[Bug] 精确文本搜索工具 src/workspace/tools/exact_search_tool.py 偶尔会搜索 .venv、.git 等文件的二进制文件 / Exact text search tool src/workspace/tools/exact_search_tool.py sometimes searches binary files inside .venv, .git and similar directories #154

@SunYanbox

Description

@SunYanbox
  • 该工具在遍历目录时,未默认排除常见的版本控制目录(如 .git)和虚拟环境目录(如 .venv, venv, env),导致对这些目录下的二进制文件进行不必要的文本搜索。
    The tool does not exclude common version control directories (e.g., .git) or virtual environment directories (e.g., .venv, venv, env) by default when traversing directories, causing unnecessary text searches on binary files inside them.

  • 即使搜索目标是文本内容,工具仍可能打开并读取 .git/objects 等路径下的二进制文件,造成性能下降、控制台输出乱码或偶尔的编码异常。
    Even when the search target is text content, the tool may still open and read binary files under paths like .git/objects, leading to performance degradation, garbled console output, or occasional encoding exceptions.

  • 期望行为:默认跳过 .git.venvnode_modules__pycache__.mypy_cache.pytest_cache 等常见无关目录,或提供可配置的排除列表(includes/excludes)。
    Expected behavior: skip common irrelevant directories such as .git, .venv, node_modules, __pycache__, .mypy_cache, .pytest_cache by default, or provide a configurable exclude list (includes/excludes).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions