feat: Add AI-generated commit messages

Integrate Claude Haiku to automatically generate commit messages when
committing worktree changes. Shows a sparkle animation while generating
and auto-populates the commit message field.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
anonymous
2026-01-10 21:10:33 -08:00
committed by Shirone
parent d2c7a9e05d
commit e56db2362c
7 changed files with 265 additions and 7 deletions

View File

@@ -1537,6 +1537,15 @@ function createMockWorktreeAPI(): WorktreeAPI {
};
},
generateCommitMessage: async (worktreePath: string) => {
console.log('[Mock] Generating commit message:', { worktreePath });
return {
success: true,
message:
'feat: Add new feature implementation\n\nThis is a mock AI-generated commit message.',
};
},
push: async (worktreePath: string, force?: boolean) => {
console.log('[Mock] Pushing worktree:', { worktreePath, force });
return {

View File

@@ -1681,6 +1681,8 @@ export class HttpApiClient implements ElectronAPI {
}),
commit: (worktreePath: string, message: string) =>
this.post('/api/worktree/commit', { worktreePath, message }),
generateCommitMessage: (worktreePath: string) =>
this.post('/api/worktree/generate-commit-message', { worktreePath }),
push: (worktreePath: string, force?: boolean) =>
this.post('/api/worktree/push', { worktreePath, force }),
createPR: (worktreePath: string, options?: any) =>