feat: improve commit message generation with AI prompts (#596)

- Refactor the commit message generation process to utilize default prompts and enhance clarity while eliminating redundancy.
- Added new properties for subject and summary prompts, while improving cancellation support in async task handling.
- feat: add AI prompts for commit message generation.
- Updated the formatting of the package reference for consistency in the project file.
- Add properties for managing OpenAI subject and summary prompts in the Preference view model.
- Refactor layout and add new input fields for AI subject and summary prompts in the preferences view.
This commit is contained in:
Douglas Cunha 2024-10-23 22:31:05 -03:00 committed by GitHub
parent 547c28adb8
commit 2f68aed817
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 141 additions and 38 deletions

View file

@ -315,6 +315,32 @@ namespace SourceGit.ViewModels
}
}
public string OpenAISubjectPrompt
{
get => Models.OpenAI.SubjectPrompt;
set
{
if (value != Models.OpenAI.SubjectPrompt)
{
Models.OpenAI.SubjectPrompt = value;
OnPropertyChanged();
}
}
}
public string OpenAISummaryPrompt
{
get => Models.OpenAI.SummaryPrompt;
set
{
if (value != Models.OpenAI.SummaryPrompt)
{
Models.OpenAI.SummaryPrompt = value;
OnPropertyChanged();
}
}
}
public uint StatisticsSampleColor
{
get => _statisticsSampleColor;