The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
fix(assistantUiMessages): suppress guardrail error text to avoid duplicate rendering
Steven Enamakel7a5d027c18f0
diff --git a/app/src/providers/assistantUiMessages.ts b/app/src/providers/assistantUiMessages.tsindex b9dc3d15d7..659cb092c7 100644--- a/app/src/providers/assistantUiMessages.ts+++ b/app/src/providers/assistantUiMessages.ts@@ -805,12 +805,22 @@ export function toThreadMessageLike(toolCallCount: effectiveTimeline.length,}: undefined;+ // A `chat_error{error_type:"guardrail"}` turn (wire-contract.md). Its plain+ // text is suppressed here — `ChatErrorNotice` (`features/conversations/aui/`)+ // renders the vendored `GuardrailNotice` card from this same+ // `extraMetadata` (surfaced unchanged on `metadata.custom.extraMetadata`+ // below) instead, so the turn is not shown twice.+ const isGuardrailError =+ msg.sender === 'agent' &&+ (msg.extraMetadata?.[CHAT_ERROR_METADATA_KEY] as { errorType?: string } | undefined)+ ?.errorType === 'guardrail';const converted: ThreadMessageLike = {id: msg.id,role: msg.sender === 'agent' ? 'assistant' : 'user',- content:- msg.sender === 'agent'+ content: isGuardrailError+ ? []+ : msg.sender === 'agent'? assistantParts(text, effectiveTimeline, transcript, messageCitations(msg)): userParts(msg),createdAt: new Date(msg.createdAt),