mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-30 13:51:53 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user