+3

Add support for Artificial Intelligence in generating commit messages

Adhoniran Gomes 6 months ago updated by djaufre 3 months ago 2

This is a meta-issue. When voting, please include your favorite platform (or just upvote other comments for that platform). Also, comment if this process must work locally (which may not be possible with the current LLM technology today).

JetBrains IDE's Git tool is capable of using an AI Assistant to generate commit messages powered by Artificial Intelligence. All changed files are listed and I can select the files to include in the commit message to be generated, as staged changes. After confirming, the AI Assistant analyzes the changes and automatically generates the commit message. This is a useful time saver and boring task killer that I would love to have available in SmartGit features.

Ref.: https://blog.jetbrains.com/idea/2023/06/ai-assistant-in-jetbrains-ides/

Below are some examples of commit messages generated through artificial intelligence:

Refactor handling of config file and enhance port validation regex

This commit updates the handling of a configuration file in the 'circuitid.py' script.
Previously, the file was only opened for writing but now it's also being opened for reading directly after it's written to. This is done to ensure that the configurations are properly loaded.

Furthermore, the regular expression used for port validation was updated. The previous pattern did not limit then length of the port and accepted any string that started with letters followed by numbers. Now, the port requires being 2 to 16 alphanumeric characters long, which helps standardize the port labeling system.

Refactor circuit ID generator for better readability and performance

Updated the circuit ID generator Python script to improve code readability and performance. Major changes include breaking down functionalities into smaller, more manageable functions and translating comments from Portuguese to English to make them accessible to a wider audience. Additionally, the procedural code was refactored to an object-oriented model wherein functions were encapsulated within a class, CircuitIDGenerator. Variable names were also updated for clarity. These changes help improve maintainability of the code and provide a clearer structure for understanding the logic behind circuit ID generation. The script also now checks if it is run as the main program before creating an instance of the CircuitIDGenerator class to start the application.

Commit dialog Improve Git commands

I would live to have it. I use copilot and gpt on daily bases. I would say I'm getting AI dependent even on my steaks effort estimations. Im a very granular committer. Have an AI to give me the right committ messages would be outstanding.

+1

I completely agree.
Moreover, this functionality already exists in Visual Studio code and It's awesome

Image 833