Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(assistant-ui): handle missing quote data gracefully

Steven Enamakel7098da0848c6
diff --git a/app/src/components/assistant-ui/quote.tsx b/app/src/components/assistant-ui/quote.tsx
index 7eb0c4d7b5..1848b21e2f 100644
--- a/app/src/components/assistant-ui/quote.tsx
+++ b/app/src/components/assistant-ui/quote.tsx
@@ -1,6 +1,7 @@
'use client';
import { cn } from '@/components/assistant-ui/lib/utils';
+import { useT } from '@/lib/i18n/I18nContext';
import {
ComposerPrimitive,
type QuoteMessagePartComponent,
@@ -89,6 +90,7 @@ function SelectionToolbarQuote({
children,
...props
}: ComponentProps<typeof SelectionToolbarPrimitive.Quote>) {
+ const { t } = useT();
return (
<SelectionToolbarPrimitive.Quote
data-slot="selection-toolbar-quote"
@@ -100,7 +102,7 @@ function SelectionToolbarQuote({
{children ?? (
<>
<QuoteIcon className="size-3.5" />
- Quote
+ {t('quote.label', 'Quote')}
</>
)}
</SelectionToolbarPrimitive.Quote>