mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 06:12:03 +00:00
feat(worktree): add AI commit message generation feature
- Implemented a new endpoint to generate commit messages based on git diffs. - Updated worktree routes to include the AI commit message generation functionality. - Enhanced the UI to support automatic generation of commit messages when the commit dialog opens, based on user settings. - Added settings for enabling/disabling AI-generated commit messages and configuring the model used for generation.
This commit is contained in:
@@ -157,6 +157,10 @@ export interface PhaseModelConfig {
|
||||
// Memory tasks - for learning extraction and memory operations
|
||||
/** Model for extracting learnings from completed agent sessions */
|
||||
memoryExtractionModel: PhaseModelEntry;
|
||||
|
||||
// Quick tasks - commit messages
|
||||
/** Model for generating git commit messages from diffs */
|
||||
commitMessageModel: PhaseModelEntry;
|
||||
}
|
||||
|
||||
/** Keys of PhaseModelConfig for type-safe access */
|
||||
@@ -398,6 +402,10 @@ export interface GlobalSettings {
|
||||
/** Priority for ntfy notifications (1-5, default: 3) */
|
||||
ntfyPriority: 1 | 2 | 3 | 4 | 5;
|
||||
|
||||
// AI Commit Message Generation
|
||||
/** Enable AI-generated commit messages when opening commit dialog (default: true) */
|
||||
enableAiCommitMessages: boolean;
|
||||
|
||||
// AI Model Selection (per-phase configuration)
|
||||
/** Phase-specific AI model configuration */
|
||||
phaseModels: PhaseModelConfig;
|
||||
@@ -669,6 +677,9 @@ export const DEFAULT_PHASE_MODELS: PhaseModelConfig = {
|
||||
|
||||
// Memory - use fast model for learning extraction (cost-effective)
|
||||
memoryExtractionModel: { model: 'haiku' },
|
||||
|
||||
// Commit messages - use fast model for speed
|
||||
commitMessageModel: { model: 'haiku' },
|
||||
};
|
||||
|
||||
/** Current version of the global settings schema */
|
||||
@@ -724,6 +735,7 @@ export const DEFAULT_GLOBAL_SETTINGS: GlobalSettings = {
|
||||
ntfyTopic: '',
|
||||
ntfyAuthToken: undefined,
|
||||
ntfyPriority: 3,
|
||||
enableAiCommitMessages: true,
|
||||
phaseModels: DEFAULT_PHASE_MODELS,
|
||||
enhancementModel: 'sonnet',
|
||||
validationModel: 'opus',
|
||||
|
||||
Reference in New Issue
Block a user