smol-ai / developer

the first library to let you embed a developer agent in your own app!
https://twitter.com/SmolModels
MIT License
11.81k stars 1.03k forks source link

Generalise the directory cleaning rules #39

Closed dazinator closed 1 year ago

dazinator commented 1 year ago

Read the note that there was hardcoded logic not to delete images.

Maybe this could work a bit like a gitignore file where you can put globs for files to ignore when cleaning

smol-ignore

**/*.jpg
**/*.png
swyxio commented 1 year ago

very cool idea! PR welcome, not sure what library to use to do this (maybe its not needed)?

Smit-Parmar commented 1 year ago

@swyxio I can work on this but i'm seeing 3 different function for cleaning and 2 of them have different number of extension to skip. Should we generalize those to single function and add extension to skip in smol-ignore use it ?

or create one constant.py and declare extension to ignore as constant and use it everywhere.

We can define common function like clean_dir() in utils.py