fix(webui): simplify retry status copy
This commit is contained in:
1 parent
164ddadd8e
commit
4cd277f65d
13 files changed
+115
-51
No files matched your search
@@ -337,24 +337,25 @@ function FoldedAgentActivity({
|
||||
: retryStatus?.error_kind === "server"
|
||||
? t("message.retryServer", { defaultValue: "Model unavailable" })
|
||||
: t("message.retryUnknown", { defaultValue: "Model request failed" });
|
||||
const retryAttempt = retryStatus?.max_attempts
|
||||
? `${retryStatus.attempt}/${retryStatus.max_attempts}`
|
||||
: String(retryStatus?.attempt ?? "");
|
||||
const retrySeconds = retryStatus?.next_retry_at === undefined
|
||||
? 0
|
||||
: Math.max(0, Math.ceil(retryStatus.next_retry_at - now / 1000));
|
||||
const activityLabel = retryStatus?.state === "exhausted"
|
||||
? t("message.retryExhausted", {
|
||||
error: retryError,
|
||||
defaultValue: "{{error}}. Ending turn.",
|
||||
defaultValue: "{{error}} Ending turn",
|
||||
})
|
||||
: retryStatus?.state === "waiting"
|
||||
? t("message.retryWaiting", {
|
||||
error: retryError,
|
||||
seconds: retrySeconds,
|
||||
attempt: retryAttempt,
|
||||
defaultValue: "{{error}}. Retrying in {{seconds}}s (attempt {{attempt}}).",
|
||||
})
|
||||
? retrySeconds > 0
|
||||
? t("message.retryWaiting", {
|
||||
error: retryError,
|
||||
seconds: retrySeconds,
|
||||
defaultValue: "{{error}} Retrying in {{seconds}}s",
|
||||
})
|
||||
: t("message.retrying", {
|
||||
error: retryError,
|
||||
defaultValue: "{{error}} Retrying",
|
||||
})
|
||||
: isTurnStreaming
|
||||
? t("message.activityWorkingFor", {
|
||||
duration: activityDuration,
|
||||
|
||||
Reference in new issue
Block a user