6ff541284e
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
32 lines
588 B
TypeScript
32 lines
588 B
TypeScript
export interface Config {
|
|
apiKey: string;
|
|
apiBase: string;
|
|
model: string;
|
|
maxTokens: number;
|
|
temperature: number;
|
|
}
|
|
|
|
export interface FileEntry {
|
|
path: string;
|
|
status: string;
|
|
label: string;
|
|
}
|
|
|
|
export interface ProjectContext {
|
|
readme: string | null;
|
|
packageDescription: string | null;
|
|
structure: string | null;
|
|
recentCommits: string[];
|
|
diff: string;
|
|
}
|
|
|
|
export interface PRContext {
|
|
readme: string | null;
|
|
packageDescription: string | null;
|
|
structure: string | null;
|
|
branchName: string;
|
|
baseBranch: string;
|
|
branchCommits: string[];
|
|
diff: string;
|
|
}
|