@tryarcanist/cli 0.1.183 → 0.1.184
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +19 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3505,23 +3505,25 @@ async function qaCommand(prUrl, options, command) {
|
|
|
3505
3505
|
}
|
|
3506
3506
|
const sessionId = sessionData.sessionId;
|
|
3507
3507
|
let promptId;
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3508
|
+
if (!sessionData.promptAlreadyEnqueued) {
|
|
3509
|
+
try {
|
|
3510
|
+
const promptData = await apiFetch(config, `/api/sessions/${sessionId}/prompts`, {
|
|
3511
|
+
method: "POST",
|
|
3512
|
+
headers: { "Idempotency-Key": promptIdempotencyKey },
|
|
3513
|
+
body: JSON.stringify({ prompt: QA_PROMPT })
|
|
3514
|
+
});
|
|
3515
|
+
promptId = promptData.prompt?.promptId ?? promptData.prompt?.id;
|
|
3516
|
+
} catch (err) {
|
|
3517
|
+
throw new CliError(
|
|
3518
|
+
err instanceof CliError ? err.code : "server",
|
|
3519
|
+
`QA session created (${sessionId}) but prompt enqueue failed: ${stringifyError(err)}`,
|
|
3520
|
+
{
|
|
3521
|
+
exitCode: err instanceof CliError ? err.exitCode : void 0,
|
|
3522
|
+
hint: `Retry with: arcanist sessions qa ${targetPrUrl} --idempotency-key ${idempotencyKey}`,
|
|
3523
|
+
requestId: err instanceof CliError ? err.requestId : void 0
|
|
3524
|
+
}
|
|
3525
|
+
);
|
|
3526
|
+
}
|
|
3525
3527
|
}
|
|
3526
3528
|
if (options.wait) {
|
|
3527
3529
|
const waitPollIntervalMs = parsePollInterval(options.pollInterval);
|