Commit graph

20 commits

Author SHA1 Message Date
leo
3b18ee0b37
code_style: remove unused code
Signed-off-by: leo <longshuang@msn.cn>
2025-04-08 20:20:20 +08:00
leo
c6747f72f9
feature: auto-select first change in commit details panel and revision/branch compare panel (#1019)
Signed-off-by: leo <longshuang@msn.cn>
2025-02-25 10:53:42 +08:00
leo
c3eca0d7fd
refactor: OpenAI integration (#996)
- Add `OpenAIResponse` to trim the `<think>...</think>` block
- Add an `Enable Streaming` option to fix the issue that some services do not support streaming output

Signed-off-by: leo <longshuang@msn.cn>
2025-02-19 18:01:16 +08:00
GadflyFang
ef2e0a8a56
fix: Ignore the Chain-of-Thought in AI response (#952)
- Improve chat response processing to handle thinking patterns using regular expressions.
- Migrate server value by removing trailing '/chat/completions' path.
2025-02-08 17:30:27 +08:00
leo
1f0dd15192
fix: only o1-mini does not supports system prompt
Signed-off-by: leo <longshuang@msn.cn>
2025-02-08 11:57:10 +08:00
leo
a915708db3
refactor: rewrite OpenAI integration
- use `OpenAI` and `Azure.AI.OpenAI`
- use `developer` role instead of `system` for OpenAI's `o1` series models
- use streaming response
- re-design `AIAssistant`

Signed-off-by: leo <longshuang@msn.cn>
2025-02-08 10:03:11 +08:00
leo
b2e01f0d3e
feature: add tooltip for SHA in commit message presenter (#734)
Signed-off-by: leo <longshuang@msn.cn>
2024-11-24 21:22:04 +08:00
leo
142987f73d
enhance: use user instead of system to supports OpenAI's o1-preview and o1-mini model (#725)
Signed-off-by: leo <longshuang@msn.cn>
2024-11-21 09:31:38 +08:00
leo
b3ebd84af5
enhance: outputs the response body if OpenAI fails
Signed-off-by: leo <longshuang@msn.cn>
2024-11-20 19:44:58 +08:00
leo
a824adf6d3
code_style: run dotnet format
Signed-off-by: leo <longshuang@msn.cn>
2024-11-14 21:15:40 +08:00
leo
e3ffe3ef6c
enhance: supports Azure OpenAI REST API (#695)
Signed-off-by: leo <longshuang@msn.cn>
2024-11-14 14:56:21 +08:00
leo
1044915be1
refactor: OpenAI integration
* supports configure multiple services
* supports select service when generate commit message by OpenAI

Signed-off-by: leo <longshuang@msn.cn>
2024-10-28 11:00:11 +08:00
leo
12bb915bd8
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>
2024-10-24 10:22:06 +08:00
Douglas Cunha
2f68aed817
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.
2024-10-24 09:31:05 +08:00
leo
4b182e6ecd
fix: http System.InvalidOperationException (#476) 2024-09-16 15:41:49 +08:00
leo
fb0120d338
refactor: terminal/shell integration (#471) 2024-09-14 12:09:50 +08:00
leo
817f8919fd
enhance: add Content-Type to OpenAI request headers 2024-09-13 20:50:11 +08:00
leo
ab54ecee42
enhance: API Key is now optional
- Update README.md by adding tips for using OpenAI in this project
2024-09-13 20:46:00 +08:00
leo
886b242b66
enhance: added cancellation logic to the OpenAI chat response API call. 2024-09-13 14:25:38 +08:00
leo
16f8e2fd0b
feature: simple implementation for generating commit message by OpenAI (#456) 2024-09-12 09:42:47 +08:00