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:
Shirone
2026-01-12 20:38:00 +01:00
parent 8b19266c9a
commit 5e4f5f86cd
10 changed files with 162 additions and 42 deletions

View File

@@ -1538,11 +1538,10 @@ function createMockWorktreeAPI(): WorktreeAPI {
},
generateCommitMessage: async (worktreePath: string) => {
console.log('[Mock] Generating commit message:', { worktreePath });
console.log('[Mock] Generating commit message for:', worktreePath);
return {
success: true,
message:
'feat: Add new feature implementation\n\nThis is a mock AI-generated commit message.',
message: 'feat: Add mock commit message generation',
};
},