Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Branch could not be found. Replacing {branch} with main #281

Open
yidasanqian opened this issue Nov 6, 2024 · 8 comments
Open

Branch could not be found. Replacing {branch} with main #281

yidasanqian opened this issue Nov 6, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@yidasanqian
Copy link

yidasanqian commented Nov 6, 2024

image

Click the button: "AI Commit", and it keeps prompting as follows.

image

current branch is dev
version:2.7.1

why?

@yidasanqian
Copy link
Author

After upgrading to version 2.7.1, my custom prompt and LLM client have been reset!

@Blarc
Copy link
Owner

Blarc commented Nov 6, 2024

Hi @yidasanqian,

regarding the branch; the plugin tries to compute the branch name by finding the git repositories of the files that are staged for commit. If the plugin can't get any repositories for any of the files, it falls back to branch name "main".
Do you have a git repository and do you have any files staged for commit?

Regarding the second statement about custom prompt and LLM client being reset; what exactly do you mean by reset? Were they deleted or just unset? Are they project specific?

Furthermore, from which version did you upgrade to 2.7.1?

@yidasanqian
Copy link
Author

The first issue was resolved by restarting IDEA.
The second issue involved configuring both Azure OpenAI and OpenAI LLM clients, with Azure OpenAI client specified. However, after the upgrade, it was replaced with the OpenAI client.
The third issue pertains to my custom prompt containing emojis, which seem to be lost rather than reset. The emojis in the content input box disappear after clicking "Update" and reopening the prompt.

@yidasanqian
Copy link
Author

I hadn't noticed this before, so it probably isn't due to an upgrade.
When there are emojis in the prompt, after clicking the "Update" button and saving, when you reopen it, the emojis in both the content and preview input fields disappear, leaving just a few scattered emojis behind.

@Blarc
Copy link
Owner

Blarc commented Nov 7, 2024

The second issue might happen because of the upgrade. In the previous version there was a bug and the project specific settings were not saved properly. Please test this with the latest version v2.7.1 and report back if it happens again.

Regarding the issue with emojis; I'll have to test it and see.

@Blarc Blarc added the bug Something isn't working label Nov 19, 2024
@antonio-petricca
Copy link

Same for me with 2.9.0.

@Blarc
Copy link
Owner

Blarc commented Dec 6, 2024

Same for me with 2.9.0.

Hey @antonio-petricca, can you please explain what exactly do you mean? The comments in this issue mention different issues. If it's regarding the branch notification, please check that you have a git repository and files staged for commit.

@antonio-petricca
Copy link

antonio-petricca commented Dec 6, 2024

Hi, sorry, the issue about the not found branch.

Thank you for your great plugin.

Blarc added a commit that referenced this issue Dec 6, 2024
Replace getRepositoryForFileQuick with getRepositoryForFile which is supposed to be more reliable.

Refs: #281
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants