mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-01 09:24:58 +00:00
code_review: PR #596
- Add `ViewModels.Preference.PrepareOpenAIPrompt()` method to generate default prompt instead of a const fallback value. Therefore, it is more convenient for us to modify the default value in the Preference dialog. - Modify the default prompts. Rename `SubjectPrompt` to `GenerateSubjectPrompt`. Rename `SummaryPrompt` to `AnalyzeDiffPrompt`. - Rewrite the way to build OpenAI user content for subject generation Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
2f68aed817
commit
12bb915bd8
5 changed files with 75 additions and 94 deletions
|
@ -499,31 +499,27 @@
|
|||
Text="{Binding OpenAIApiKey, Mode=TwoWay}"/>
|
||||
|
||||
<TextBlock Grid.Row="3" Grid.Column="0"
|
||||
Text="{DynamicResource Text.Preference.AI.SubjectPrompt}"
|
||||
Text="{DynamicResource Text.Preference.AI.AnalyzeDiffPrompt}"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="0,0,16,0"/>
|
||||
|
||||
<TextBox Grid.Row="3" Grid.Column="1"
|
||||
Height="120"
|
||||
CornerRadius="3"
|
||||
VerticalContentAlignment="Top"
|
||||
Text="{Binding OpenAISubjectPrompt, Mode=TwoWay}"
|
||||
Text="{Binding OpenAIAnalyzeDiffPrompt, Mode=TwoWay}"
|
||||
AcceptsReturn="true"
|
||||
Watermark="{DynamicResource Text.Preference.AI.SubjectPromptHint}"
|
||||
TextWrapping="Wrap"/>
|
||||
|
||||
<TextBlock Grid.Row="4" Grid.Column="0"
|
||||
Text="{DynamicResource Text.Preference.AI.SummaryPrompt}"
|
||||
Text="{DynamicResource Text.Preference.AI.GenerateSubjectPrompt}"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="0,0,16,0"/>
|
||||
|
||||
<TextBox Grid.Row="4" Grid.Column="1"
|
||||
Height="120"
|
||||
CornerRadius="3"
|
||||
VerticalContentAlignment="Top"
|
||||
Text="{Binding OpenAISummaryPrompt, Mode=TwoWay}"
|
||||
Text="{Binding OpenAIGenerateSubjectPrompt, Mode=TwoWay}"
|
||||
AcceptsReturn="true"
|
||||
Watermark="{DynamicResource Text.Preference.AI.SummaryPromptHint}"
|
||||
TextWrapping="Wrap"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue