- {contextMenu}
+ {!hasText ? contextMenu : null}
{hasImages ?
: null}
{!hasImages && hasMedia ? (
@@ -498,18 +497,21 @@ export function MessageBubble({
/>
) : null}
{hasText ? (
-
- {messageText}
-
+
+ {contextMenu}
+
+ {messageText}
+
+
) : null}
{showDeliveryStatus ? (
diff --git a/webui/src/components/thread/ModelFallbackNotice.tsx b/webui/src/components/thread/ModelFallbackNotice.tsx
index c0691a701..d2c6a7b89 100644
--- a/webui/src/components/thread/ModelFallbackNotice.tsx
+++ b/webui/src/components/thread/ModelFallbackNotice.tsx
@@ -16,7 +16,7 @@ export function ModelFallbackNotice({ model, reauthProvider, reauthProviderLabel
return (
Promise;
onDismiss: () => Promise;
+ onOpenSettings?: () => void;
}
-export function RecoveryNotice({ state, onContinue, onDismiss }: RecoveryNoticeProps) {
+export function RecoveryNotice({ state, onContinue, onDismiss, onOpenSettings }: RecoveryNoticeProps) {
const { t } = useTranslation();
const [pending, setPending] = useState<"continue" | "dismiss" | null>(null);
const [error, setError] = useState(null);
@@ -33,14 +35,17 @@ export function RecoveryNotice({ state, onContinue, onDismiss }: RecoveryNoticeP
if (!waiting || hiddenRecoveryId === state.recovery_id) return null;
const contextUnavailable = state.can_continue === false;
- const title = state.status === "failed"
+ const modelFailure = state.reason === "model_request_failed"
+ ? resolveModelRequestFailureCopy({ errorKind: state.failure_error_kind }, t)
+ : null;
+ const title = modelFailure?.title ?? (state.status === "failed"
? t("recovery.failed", { defaultValue: "Task recovery failed" })
- : t("recovery.interrupted", { defaultValue: "Task interrupted" });
- const detail = state.status === "failed" || contextUnavailable
+ : t("recovery.interrupted", { defaultValue: "Task interrupted" }));
+ const detail = contextUnavailable || state.status === "failed"
? t("recovery.failedHelp", {
defaultValue: "The saved task could not be restored safely. Review it before continuing.",
})
- : t("recovery.review", { defaultValue: "Review the task before continuing. Tools will not be replayed automatically." });
+ : modelFailure?.body ?? t("recovery.review", { defaultValue: "Review the task before continuing. Tools will not be replayed automatically." });
const run = (action: "continue" | "dismiss") => {
setPending(action);
setError(null);
@@ -60,13 +65,18 @@ export function RecoveryNotice({ state, onContinue, onDismiss }: RecoveryNoticeP
role="alert"
aria-live="assertive"
data-recovery-status={state.status}
- className="mx-auto mb-2 flex w-full max-w-[49.5rem] items-center gap-3 rounded-control border border-border/70 bg-muted/35 px-3 py-2 text-sm transition-[background-color,border-color,opacity,transform] duration-200 ease-out motion-reduce:transition-none animate-in fade-in-0 slide-in-from-bottom-1 duration-200 motion-reduce:animate-none"
+ className="thread-composer-notice mb-2 flex flex-wrap items-center gap-3 rounded-control border border-border/70 bg-muted/35 px-3 py-2 text-sm transition-[background-color,border-color,opacity,transform] duration-200 ease-out motion-reduce:transition-none animate-in fade-in-0 slide-in-from-bottom-1 duration-200 motion-reduce:animate-none"
>
-
+
{title}
+ {modelFailure && onOpenSettings ? (
+
+ ) : null}
-
+