mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 12:15:00 +00: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:
parent
547c28adb8
commit
2f68aed817
6 changed files with 141 additions and 38 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue