Add optional context to PR description generation (#270)

* types: add optional context parameter to generatePullRequestDescription signature

* api: update gitApi to pass optional context to PR description generation

* http: include trimmed context in PR description API request body

* ui: add additional context input for PR generation with desktop disclosure and mobile sheet

* desktop: pass optional context to Tauri generate_pr_description command

* tauri: add optional context parameter and inject into PR description prompt

* server: read optional context from request and inject into PR description prompt

* vscode: update type signature for context parameter (compatibility only)

* fix(vscode): drop context from pr-description payload

Remove context field from PR description payload
Send only base and head to the bridge API for PR descriptions
Clarify payload compatibility across web/desktop environments
This commit is contained in:
Nelson Pires
2026-02-03 13:05:19 +02:00
committed by GitHub
parent 392cd888a8
commit aeec68d224
7 changed files with 139 additions and 19 deletions
+1 -1
View File
@@ -106,7 +106,7 @@ export async function generateCommitMessage(
export async function generatePullRequestDescription(
directory: string,
payload: { base: string; head: string }
payload: { base: string; head: string; context?: string }
): Promise<import('./api/types').GeneratedPullRequestDescription> {
const runtime = getRuntimeGit();
if (runtime?.generatePullRequestDescription) {