feat(prompts): implement customizable commit message prompts

- Added a new section in the UI for customizing commit message prompts.
- Integrated a system prompt for AI-generated commit messages, allowing users to define their own instructions.
- Updated the backend to merge custom prompts with default settings for commit message generation.
- Enhanced the commit message generation logic to utilize the effective system prompt based on user settings.
This commit is contained in:
Shirone
2026-01-12 20:48:08 +01:00
parent 5e4f5f86cd
commit 0261ec2892
6 changed files with 111 additions and 1 deletions

View File

@@ -98,11 +98,13 @@ export type {
AgentPrompts,
BacklogPlanPrompts,
EnhancementPrompts,
CommitMessagePrompts,
PromptCustomization,
ResolvedAutoModePrompts,
ResolvedAgentPrompts,
ResolvedBacklogPlanPrompts,
ResolvedEnhancementPrompts,
ResolvedCommitMessagePrompts,
} from './prompts.js';
export { DEFAULT_PROMPT_CUSTOMIZATION } from './prompts.js';

View File

@@ -94,6 +94,16 @@ export interface EnhancementPrompts {
uxReviewerSystemPrompt?: CustomPrompt;
}
/**
* CommitMessagePrompts - Customizable prompts for AI commit message generation
*
* Controls how the AI generates git commit messages from diffs.
*/
export interface CommitMessagePrompts {
/** System prompt for generating commit messages */
systemPrompt?: CustomPrompt;
}
/**
* PromptCustomization - Complete set of customizable prompts
*
@@ -112,6 +122,9 @@ export interface PromptCustomization {
/** Enhancement prompts (feature description improvement) */
enhancement?: EnhancementPrompts;
/** Commit message prompts (AI-generated commit messages) */
commitMessage?: CommitMessagePrompts;
}
/**
@@ -122,6 +135,7 @@ export const DEFAULT_PROMPT_CUSTOMIZATION: PromptCustomization = {
agent: {},
backlogPlan: {},
enhancement: {},
commitMessage: {},
};
/**
@@ -155,3 +169,7 @@ export interface ResolvedEnhancementPrompts {
acceptanceSystemPrompt: string;
uxReviewerSystemPrompt: string;
}
export interface ResolvedCommitMessagePrompts {
systemPrompt: string;
}