carlrobertoh / CodeGPT

The leading open-source AI copilot for JetBrains. Connect to any model in any environment, and customize your coding experience in any way you like.
https://codegpt.ee
Apache License 2.0
1.05k stars 221 forks source link

commit messages generated are completely unrelated to current diff #300

Open GiGurra opened 10 months ago

GiGurra commented 10 months ago

What happened?

I'm not sure what I'm doing wrong, but it doesn't matter what my pending changes/diff looks like. When I try to generate a commit message with codegpt and gpt4turbo, all I get is totally unrelated things.

Most of the time it just generates the static message "Fix NullPointerException in user authentication flow" or "Fix typo in Readme.MD" (my code has no authentication flow or readme changes pending) or just says "no diff provided".

I'm not sure what I'm doing wrong here

Relevant log output or stack trace

No response

Steps to reproduce

I dont know what I'm doing wrong, but it happens in all my projects and code bases.

The chat function of codegpt works perfectly, so I don't know what is going on with the commit message generation :D

CodeGPT version

2.2.4

Operating System

Linux

carlrobertoh commented 10 months ago

Hi, please upgrade the plugin to the latest version. Related issue: https://github.com/carlrobertoh/CodeGPT/issues/285

GiGurra commented 10 months ago

In the latest version (2.2.7) the button is just greyed out

image

carlrobertoh commented 10 months ago

Hmm, that's weird. The only reason I can see for this to happen is if you don't have the OpenAI key set or if no files are selected. https://github.com/carlrobertoh/CodeGPT/blob/master/src/main/java/ee/carlrobert/codegpt/actions/GenerateGitCommitMessageAction.java#L58C13-L58C13

carlrobertoh commented 10 months ago

@GiGurra The issue is that the plugin cannot find any files in the sidebar tool window's checkbox tree. The temporary solution is to switch to the dialog view.

Screenshot 2023-12-04 at 23 00 05
HerrC commented 9 months ago

any news on the bug fix of this issue?

dguerizec commented 9 months ago

+1

Glokta0 commented 8 months ago

Unfortunately, this seems to persist. In the latest Rider version, "Switch to Commit Dialog" seems to not be available. image

The Generate Message button is also greyed out for me. (on latest Rider + CodeGPT 2.2.12)

jlatiav commented 8 months ago

The problem occurs for me as well with

The mouse over for the icon displays "Credentials not provided". I'm using Azure as a service.

The code generation features work in general.

amal commented 1 week ago

Clearly, CodeGPT uses the entire GIT diff of all unrelated changelists and commit-excluded files. This makes the generate commit feature completely useless.

Can you please fix it?