Skip to content

Commit 8393022

Browse files
committed
Improve Release Notes Prompt and Simplify Prompt Labels
Enhanced the release notes generation prompt to focus on significant, user-facing changes by filtering out trivial commits such as minor typo fixes, internal refactorings with no user impact, routine maintenance tasks, and work-in-progress commits. This ensures release notes highlight only meaningful changes that users care about. Simplified prompt kind display labels by removing redundant words like "Prompt" and "Generation" to make the UI cleaner and more concise. * Release notes prompt filtering logic * Prompt label display strings **Generated by CodeLite** Signed-off-by: Eran Ifrah <eran@codelite.org>
1 parent 8424b17 commit 8393022

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

Plugin/ai/Config.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ inline std::string PromptKindToString(PromptKind kind)
6161
{
6262
switch (kind) {
6363
case llm::PromptKind::kReleaseNotesGenerate:
64-
return "Git Release Notes: Generate";
64+
return "Generate Release Notes";
6565
case llm::PromptKind::kCommentGeneration:
66-
return "Comment Generation Prompt";
66+
return "Generate Comment";
6767
case llm::PromptKind::kGitCommitMessage:
68-
return "Git Commit Message Prompt";
68+
return "Generate Commit Message";
6969
case llm::PromptKind::kGitChangesCodeReview:
70-
return "Code Review Prompt";
70+
return "Code Review";
7171
case llm::PromptKind::kMax:
7272
return "";
7373
}

Plugin/ai/Prompts.cpp

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,31 +68,40 @@ const std::string PROMPT_GIT_RELEASE_NOTES =
6868
Your job:
6969
7070
1. Obtain all git commits from HEAD to the latest tag. Use `git describe --tags --abbrev=0` to find the latest tag, then `git log <tag>..HEAD --oneline` to list the commits.
71-
2. Group the commits into the following sections **only if there is at least one item**:
71+
72+
2. **Filter commits to include only significant, user-facing changes.** Skip commits that are:
73+
- Minor typo fixes or formatting changes
74+
- Internal-only refactorings with no user impact
75+
- Trivial dependency updates or version bumps
76+
- Routine maintenance tasks (e.g., updating .gitignore, minor CI tweaks)
77+
- Work-in-progress or temporary commits
78+
- Commits that merely merge branches without substantive changes
79+
80+
3. Group the **major commits only** into the following sections **only if there is at least one item**:
7281
- **✨ New Features** – new public‑facing functionality.
73-
- **🐛 Bug Fixes** – corrections of defects.
74-
- **🔧 Improvements / Refactorings** – internal enhancements, performance, code cleanup, etc.
75-
- **📝 Documentation** – docs, READMEs, comments, examples, API docs.
82+
- **🐛 Bug Fixes** – corrections of defects that affect users.
83+
- **🔧 Improvements / Refactorings** – significant internal enhancements, performance improvements, or meaningful code cleanup.
84+
- **📝 Documentation** – substantial docs, READMEs, comments, examples, or API documentation updates.
7685
- **⚠️ Breaking Changes** – anything that might require users to change their code or configuration.
77-
- **🚀 Other** – anything that doesn't fit above (e.g., CI/CD updates, test additions, build scripts).
86+
- **🚀 Other** – other noteworthy changes that don't fit above (e.g., significant CI/CD updates, major test additions, important build script changes).
7887
79-
3. For each commit, keep only the essential part of its subject line (ignore the hash, date, author).
88+
4. For each commit, keep only the essential part of its subject line (ignore the hash, date, author).
8089
- If the commit message already contains a conventional prefix (e.g., `feat:`, `fix:`, `docs:`), **use that to decide the section**.
8190
- If no conventional prefix exists, infer the section from the wording, falling back to **Other**.
8291
83-
4. Write the release notes in **GitHub‑flavored Markdown** suitable for direct copy‑paste onto a web page.
92+
5. Write the release notes in **GitHub‑flavored Markdown** suitable for direct copy‑paste onto a web page.
8493
- Use level‑2 headings (`##`) for each section.
8594
- Use bullet points (`-`) for individual items.
8695
- Append a short link to the commit hash that points to GitHub (or your Git remote) using the format `[hash](https://github.com/ORG/REPO/commit/hash)`.
8796
- If a commit references a PR number (e.g., `#123`), turn it into a link `[#123](https://github.com/ORG/REPO/pull/123)`.
8897
89-
5. At the top of the document, add a title line with the release version and date, formatted exactly as:
98+
6. At the top of the document, add a title line with the release version and date, formatted exactly as:
9099
91100
```markdown
92101
# Release {{VERSION}} – {{RELEASE_DATE}}
93102
```
94103
95-
6. End the notes with a short "_Thank you for using our software!_" line.)";
104+
7. End the notes with a short "_Thank you for using our software!_" line.)";
96105

97106
const std::string PROMPT_GIT_CODE_REVIEW =
98107
R"(You are an expert developer performing a code review. Your task is to analyze the provided git diff and offer constructive feedback.

0 commit comments

Comments
 (0)