- generation_errors: every failed attempt (model, attempt, outcome, duration); admin Hibanapló page and GET /v1/admin/errors; kept 90 days - The waiting page counts from when the text was asked for (requested_at), not from the page load, so a reload no longer restarts it - It says when an attempt failed and is retried, and when a failed text's unit was given back; admins see the error Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
29 lines
925 B
TypeScript
29 lines
925 B
TypeScript
/**
|
|
* Shown while a text is being written again after a failed attempt: it is
|
|
* retried on its own, nothing to do. Admins also see the error.
|
|
*/
|
|
export function RetryNotice({
|
|
status,
|
|
error,
|
|
nextAttemptAt,
|
|
isAdmin = false,
|
|
}: {
|
|
status: string;
|
|
error?: string | null;
|
|
nextAttemptAt?: string;
|
|
isAdmin?: boolean;
|
|
}) {
|
|
if (!error || (status !== "pending" && status !== "running")) return null;
|
|
const wait = nextAttemptAt ? Math.round((Date.parse(nextAttemptAt) - Date.now()) / 60_000) : 0;
|
|
return (
|
|
<div className="msg retry-notice" role="status">
|
|
<p>
|
|
Az előző próbálkozás nem sikerült, ezért automatikusan újrapróbáljuk. Nem kell újra kérned, és nem kerül
|
|
többe.
|
|
{status === "pending" && wait >= 1 ? ` A következő próbálkozás kb. ${wait} perc múlva indul.` : ""}
|
|
</p>
|
|
{isAdmin && <p className="hint">Hiba: {error}</p>}
|
|
</div>
|
|
);
|
|
}
|