Fix Cursor SDK invocation to use static Agent.prompt API.

Use cloud repo config with Gitea URL and head ref, parse RunResult output correctly, and log cursor run IDs for debugging.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Daan Schouteden
2026-06-03 10:42:54 +02:00
parent e9aafdf8c4
commit 376c499c81
2 changed files with 61 additions and 43 deletions
+6 -1
View File
@@ -102,7 +102,12 @@ export async function runReview(input: {
apiKey: input.env.CURSOR_API_KEY,
prompt,
timeoutMs: input.env.REVIEW_TIMEOUT_MS,
model: repoConfig.model
model: repoConfig.model,
giteaBaseUrl: input.env.GITEA_BASE_URL,
owner,
repo,
headRef: pull.head.ref,
correlationId: input.correlationId
}),
retries: 2,
initialDelayMs: 500,