carlrobertoh / CodeGPT

JetBrains extension providing access to state-of-the-art LLMs, such as GPT-4, Claude 3, Code Llama, and others, all for free
https://codegpt.ee
Apache License 2.0
912 stars 186 forks source link

fix: add optional Git4Idea dependency to plugin.xml #526

Closed PhilKes closed 2 months ago

PhilKes commented 2 months ago

This PR fixes #522 and fixes #523

Tested with: Ubuntu 22.04 Pycharm Community 2023.3.5

Without the fix: https://github.com/carlrobertoh/CodeGPT/blob/6d6e0a3ccb739ff9a08a35ce06a7d342cf2510a4/src/main/kotlin/ee/carlrobert/codegpt/settings/configuration/Placeholder.kt#L29 Throws when trying to generate a commit message:

Caused by: java.lang.ClassNotFoundException: git4idea.GitUtil PluginClassLoader(plugin=PluginDescriptor(name=CodeGPT, id=ee.carlrobert.chatgpt, descriptorPath=plugin.xml, path=~/IdeaProjects/git/CodeGPT/build/idea-sandbox/plugins/CodeGPT, version=2.6.3-233, package=null, isBundled=false), packagePrefix=null, state=active)