CodeGPT icon indicating copy to clipboard operation
CodeGPT copied to clipboard

commit messages generated are completely unrelated to current diff

Open GiGurra opened this issue 2 years ago • 8 comments

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

GiGurra avatar Nov 30 '23 10:11 GiGurra

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

carlrobertoh avatar Nov 30 '23 11:11 carlrobertoh

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

image

GiGurra avatar Nov 30 '23 11:11 GiGurra

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 avatar Nov 30 '23 11:11 carlrobertoh

@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

carlrobertoh avatar Dec 04 '23 21:12 carlrobertoh

any news on the bug fix of this issue?

HerrC avatar Jan 03 '24 08:01 HerrC

+1

dguerizec avatar Jan 13 '24 09:01 dguerizec

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)

Glokta0 avatar Feb 09 '24 10:02 Glokta0

The problem occurs for me as well with

  • CodeGPT 2.3.0
  • PyCharm 2023.3.3 Professional
  • Win 10.0.19045

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

The code generation features work in general.

jlatiav avatar Feb 19 '24 10:02 jlatiav

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?

art-shen avatar Oct 13 '24 11:10 art-shen