yaroslavyaroslav / OpenAI-sublime-text

First class Sublime Text AI assistant with GPT-o1 and ollama support!
MIT License
173 stars 13 forks source link

Unnecessary edit parameter #2

Closed rchl closed 1 year ago

rchl commented 1 year ago

Your code is passing the edit variable around but: a) it's not used anywhere anyway b) it wouldn't be correct anyway to use edit outside of the synchronous TextCommand run call. That would result in view not getting updated correctly.

https://github.com/yaroslavyaroslav/OpenAI-sublime-text/blob/63c909d289e4ad6b65d7894e6ef090c057ee57fe/openai.py#L11

yaroslavyaroslav commented 1 year ago

Thanks for the suggestion, anyway, refactoring of the plug-in beyond of the bugfixing and minor UX improvements isn't in a near plans yet, at least until there's nothing major on the OpenAI side would have happened.

But if you're keen on it, you're more then welcome to provide a PR with the fix.

yaroslavyaroslav commented 1 year ago

Fixed in #10