feat: Read .gooseignore to Restrict access to files or Directories
Description
This aims to implement the feature described in issue #1065, enabling Goose's developer tool to read a .gooseignore file, which can be defined globally or locally (similar to how the .goosehints file is read). The tool will prevent text_editor or bash from opening any files or directories specified in .gooseignore. The naming conventions for .gooseignore align with those defined in Gitignore documentation.
testing
- unit tests and tested with
cargo test - tested on Goose CLI
------------------screenshots for the 3rd round of review
goose can take case-insensitive scenarios into account:
------------------screenshots for the second round of review
the bash tool ignoring feature still works as expected:
and if we remove all ignore files, things will behave normal:
------------------screenshots for initial commit
and here is my
.gooseignore file used for testing:
@wendytang Hey Wendy, thanks a lot for the review! I've updated the code - would you mind taking a look again? Thank you!
@wendytang Hey Wendy, I am going to merge this, but if you spot anything that we need to address, feel free to let me know. I am happy to take a look! :)