aicommits
aicommits copied to clipboard
feat: Add proxy support 🏢
My workstation is behind a corporate proxy so I implemented proxy support.
For that I had to switch to the request module.
I also added a section about the possible config option which was written almost exclusively by ChatGPT. 😅
We're using the built-in http
to keep the package light:
https://github.com/Nutlope/aicommits/pull/106
Can you remove the request
dependency?
@privatenumber I used the https-proxy-agent module now to not have to reinvent the wheel. 'Import Cost' advertises it with 13.8k witch is indeed much better to the about 750k of 'request'. Yes still a dependency but much smaller.
That's fine. Thank you.
Can you also update it so it's passed in via config instead of the env var?
@privatenumber The proxy agent is now using a config option instead of the environment variable. I also added a section about the config options to the README
Would you mind pulling in the latest develop
? Sorry for the conflicts!
I added tests so we can be more confident about changes.
I guess we also need to support the http_proxy
and https_proxy
env vars:
https://github.com/Nutlope/aicommits/issues/136
Will add tests in a followup PR
😍Thanks using it daily now