fix(chat): unify OpenCode notice styling

This commit is contained in:
Bohdan Triapitsyn
2026-08-23 19:13:14 +03:00
parent 264ea02ee1
commit 1af8b14bbb
2 changed files with 5 additions and 24 deletions
@@ -432,7 +432,6 @@ interface MessageBodyProps {
onRevert?: () => void;
onFork?: () => void;
errorMessage?: string;
errorVariant?: 'error' | 'info';
userActionsMode?: 'inline' | 'external-content' | 'external-actions';
stickyUserHeaderEnabled?: boolean;
reviewTransferDirection?: ReviewTransferDirection | null;
@@ -1094,7 +1093,6 @@ const AssistantMessageBody = React.memo(({
showReasoningTraces = false,
turnGroupingContext,
errorMessage,
errorVariant = 'error',
reviewTransferDirection = null,
contextPinned,
contextPinPending,
@@ -1704,7 +1702,6 @@ const AssistantMessageBody = React.memo(({
const shouldDeferSortedInlineText = isSortedRenderMode && !hasStopFinish;
const showErrorMessage = Boolean(errorMessage);
const errorIconName = errorVariant === 'info' ? 'information' : 'error-warning';
const isPeekSurface = chatSurfaceMode === 'peek';
const shouldShowMessageActions = hasCopyableText && !isPeekSurface;
const shouldShowTurnFooter = isLastAssistantInTurn && hasTextContent && (hasStopFinish || Boolean(errorMessage)) && !isPeekSurface;
@@ -2217,17 +2214,9 @@ const AssistantMessageBody = React.memo(({
{renderedParts}
{showErrorMessage && (
<FadeInOnReveal key="assistant-error">
<div className={cn(
'group/assistant-text relative mt-3 p-3 rounded-lg border break-words max-w-full',
errorVariant === 'info'
? 'bg-[var(--status-info-background)] border-[var(--status-info-border)]'
: 'bg-[var(--status-error-background)] border-[var(--status-error-border)]',
)}>
<div className="flex items-center gap-2">
<Icon name={errorIconName} className={cn(
'h-4 w-4 shrink-0',
errorVariant === 'info' ? 'text-[var(--status-info)]' : 'text-[var(--status-error)]',
)} />
<div className="group/assistant-text relative mt-3 max-w-full break-words rounded-2xl border border-[var(--status-info-border)] bg-[var(--status-info-background)] px-4 py-3 text-base leading-relaxed">
<div className="flex items-center gap-3">
<Icon name="information" className="size-4 shrink-0 text-[var(--status-info)]" />
<div className="min-w-0 flex-1 break-words">
<SimpleMarkdownRenderer
content={errorMessage ?? ''}