Add result and job management APIs

This commit is contained in:
syntaxbullet
2026-06-17 14:19:30 +02:00
parent 99569d2cf3
commit b23d401a41
7 changed files with 176 additions and 5 deletions

View File

@@ -873,6 +873,7 @@
renderLlmProgress(job);
statusEl.textContent = job.statusMessage || "Die Einschätzung wird erstellt. Das kann einen Moment dauern.";
if (job.status === "done") return job;
if (job.status === "cancelled") throw new Error("Job wurde abgebrochen");
if (job.status === "error") throw new Error(job.errors?.join("\\n") || "Die Auswertung ist fehlgeschlagen.");
await new Promise((resolve) => setTimeout(resolve, POLL_DELAY_MS));
}