feat(cli): add pull request creation with AI-generated messages (#2)

Add a new `gai pr` subcommand that generates pull request titles and descriptions using AI, then creates the PR via GitHub CLI (`gh`) or Gitea CLI (`tea`). This extends the existing commit-generation system by reusing retry logic and prompt infrastructure, and introduces a `callAI` function that returns raw output (instead of pre-cleaned messages) to support structured PR responses.

Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
2026-06-11 00:39:20 +08:00
parent 76a5bac11a
commit 6ff541284e
5 changed files with 585 additions and 11 deletions
+10
View File
@@ -19,3 +19,13 @@ export interface ProjectContext {
recentCommits: string[];
diff: string;
}
export interface PRContext {
readme: string | null;
packageDescription: string | null;
structure: string | null;
branchName: string;
baseBranch: string;
branchCommits: string[];
diff: string;
}