Skip to content

[Feature]: grep line numbers/file grouping; list_dir honors .gitignore #71

Description

@shauryagangrade

Problem

grep output is a raw match dump (no line numbers or file headers), which is
hard for the model and the user to navigate in big codebases. list_dir
also lists build artifacts and __pycache__ instead of the meaningful tree.

Proposed approach

  • grep: prefix matches with path:line: and group by file (respecting a
    reasonable result cap).
  • list_dir: skip __pycache__, .git, and entries matched by .gitignore
    (a lightweight parser, or respect it when a .gitignore exists).

Where to look

  • gcode/tools.py:242-285 (_grep_python), :169-191 (list_dir)

Acceptance criteria

  • grep output includes path:line:content; capped so context isn't blown.
  • list_dir omits ignored/transient entries.

Difficulty

Low — good first issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions