diff --git a/src/Commands/GenerateCommitMessage.cs b/src/Commands/GenerateCommitMessage.cs index 9b6fc4ff4..940aebf16 100644 --- a/src/Commands/GenerateCommitMessage.cs +++ b/src/Commands/GenerateCommitMessage.cs @@ -39,7 +39,7 @@ public async Task ExecAsync() { try { - _onResponse?.Invoke("Waiting for pre-file analyzing to completed...\n\n"); + _onResponse?.Invoke("Waiting for pre-file analysis to complete...\n\n"); var responseBuilder = new StringBuilder(); var summaryBuilder = new StringBuilder(); @@ -63,7 +63,7 @@ await _service.ChatAsync( responseBuilder.Append(update); summaryBuilder.Append(update); - _onResponse?.Invoke($"Waiting for pre-file analyzing to completed...\n\n{responseBuilder}"); + _onResponse?.Invoke($"Waiting for pre-file analysis to complete...\n\n{responseBuilder}"); }); } @@ -80,7 +80,7 @@ await _service.ChatAsync( var subjectBuilder = new StringBuilder(); await _service.ChatAsync( _service.GenerateSubjectPrompt, - $"Here are the summaries changes:\n{summaryBuilder}", + $"Here are the summarized changes:\n{summaryBuilder}", _cancelToken, update => { diff --git a/src/Models/OpenAI.cs b/src/Models/OpenAI.cs index 9ca3506ed..4cf3f11e2 100644 --- a/src/Models/OpenAI.cs +++ b/src/Models/OpenAI.cs @@ -144,33 +144,33 @@ public string GenerateSubjectPrompt public OpenAIService() { AnalyzeDiffPrompt = """ - You are an expert developer specialist in creating commits. - Provide a super concise one sentence overall changes summary of the user `git diff` output following strictly the next rules: - - Do not use any code snippets, imports, file routes or bullets points. - - Do not mention the route of file that has been change. - - Write clear, concise, and descriptive messages that explain the MAIN GOAL made of the changes. - - Use the present tense and active voice in the message, for example, "Fix bug" instead of "Fixed bug.". - - Use the imperative mood, which gives the message a sense of command, e.g. "Add feature" instead of "Added feature". - - Avoid using general terms like "update" or "change", be specific about what was updated or changed. - - Avoid using terms like "The main goal of", just output directly the summary in plain text + You are an expert developer specializing in writing commit messages. + Provide a super concise, one-sentence summary of the user's git diff output, strictly following these rules: + - Do not use code snippets, imports, file paths, or bullet points. + - Do not mention the path of any changed file. + - Write clear, concise, and descriptive messages that explain the main goal of the changes. + - Use the present tense and active voice in the message (for example, "Fix bug" instead of "Fixed bug"). + - Use the imperative mood, which gives the message a sense of command (e.g., "Add feature" instead of "Added feature"). + - Avoid using general terms like "update" or "change"; be specific about what was updated or changed. + - Avoid using terms like "The main goal of"; just output the summary directly in plain text. """; GenerateSubjectPrompt = """ - You are an expert developer specialist in creating commits messages. - Your only goal is to retrieve a single commit message. - Based on the provided user changes, combine them in ONE SINGLE commit message retrieving the global idea, following strictly the next rules: - - Assign the commit {type} according to the next conditions: + You are an expert developer specializing in writing commit messages. + Your sole goal is to retrieve a single commit message. + Based on the provided user changes, combine them into one single commit message, capturing the global idea, and strictly following these rules: + - Assign the commit {type} according to these conditions: feat: Only when adding a new feature. fix: When fixing a bug. docs: When updating documentation. - style: When changing elements styles or design and/or making changes to the code style (formatting, missing semicolons, etc.) without changing the code logic. + style: When changing element styles or design, and/or making changes to the code style (formatting, missing semicolons, etc.) without altering the code logic. test: When adding or updating tests. chore: When making changes to the build process or auxiliary tools and libraries. revert: When undoing a previous commit. - refactor: When restructuring code without changing its external behavior, or is any of the other refactor types. - - Do not add any issues numeration, explain your output nor introduce your answer. - - Output directly only one commit message in plain text with the next format: {type}: {commit_message}. - - Be as concise as possible, keep the message under 50 characters. + refactor: When restructuring code without changing its external behavior, or when it falls under any other refactor type. + - Do not add any issue numbers, explain your output, or introduce your answer. + - Output directly only one commit message in plain text with the format: {type}: {commit_message}. + - Be as concise as possible, keeping the message under 50 characters. """; }