Skip to content

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

feat(chat): localize model selector label and update composer border radius

Steven Enamakele4adb2d91d8d
diff --git a/app/src/components/chat/ModelQualityPill.tsx b/app/src/components/chat/ModelQualityPill.tsx
index f336d2709c..3b151e4f08 100644
--- a/app/src/components/chat/ModelQualityPill.tsx
+++ b/app/src/components/chat/ModelQualityPill.tsx
@@ -1,5 +1,6 @@
import { useEffect, useMemo, useState } from 'react';
+import { useT } from '../../lib/i18n/I18nContext';
import { loadAISettings } from '../../services/api/aiSettingsApi';
import { type CloudProvider } from '../settings/panels/ai/aiPanelTypes';
import {
@@ -52,6 +53,7 @@ export default function ModelQualityPill({
value,
onValueChange,
}: ModelQualityPillProps) {
+ const { t } = useT();
const [open, setOpen] = useState(false);
const [providers, setProviders] = useState<CloudProvider[]>([]);
const [loading, setLoading] = useState(false);
@@ -91,8 +93,8 @@ export default function ModelQualityPill({
variant="tertiary"
size="xs"
analyticsId="chat-model-selector"
- aria-label="Select model"
- title="Select model"
+ aria-label={t('composer.modelSelector')}
+ title={t('composer.modelSelector')}
disabled={!onValueChange || loading}
onClick={() => setOpen(true)}
className={`h-7 min-w-0 rounded-md px-2 text-xs text-content-muted hover:bg-surface-hover hover:text-content ${className ?? ''}`}>
diff --git a/app/src/components/chat/__tests__/ChatComposer.test.tsx b/app/src/components/chat/__tests__/ChatComposer.test.tsx
index 5c4cb56c1d..b0b0b29bda 100644
--- a/app/src/components/chat/__tests__/ChatComposer.test.tsx
+++ b/app/src/components/chat/__tests__/ChatComposer.test.tsx
@@ -349,7 +349,7 @@ describe('ChatComposer', () => {
});
const dock = screen.getByTestId('mascot-dock');
- const inputBox = container.querySelector('.rounded-2xl.border');
+ const inputBox = container.querySelector('.rounded-3xl.border');
expect(inputBox).not.toBeNull();
expect(inputBox!.contains(dock)).toBe(true);
expect(inputBox!.contains(screen.getByTestId('header-slot'))).toBe(false);
@@ -369,7 +369,7 @@ describe('ChatComposer', () => {
it('shows the drop overlay while a file drag is over the composer', () => {
renderComposer();
const textarea = screen.getByRole('textbox');
- const box = textarea.closest('div.rounded-2xl') as HTMLElement;
+ const box = textarea.closest('div.rounded-3xl') as HTMLElement;
fireEvent.dragOver(box, { dataTransfer: { types: ['Files'] } });
expect(screen.getByText('chat.attachment.dropToAttach')).toBeInTheDocument();
});
@@ -378,7 +378,7 @@ describe('ChatComposer', () => {
const onAttachFiles = vi.fn().mockResolvedValue(undefined);
renderComposer({ onAttachFiles });
const textarea = screen.getByRole('textbox');
- const box = textarea.closest('div.rounded-2xl') as HTMLElement;
+ const box = textarea.closest('div.rounded-3xl') as HTMLElement;
const file = makeVideoFile();
fireEvent.drop(box, { dataTransfer: { files: [file], types: ['Files'] } });
expect(onAttachFiles).toHaveBeenCalledTimes(1);
@@ -388,7 +388,7 @@ describe('ChatComposer', () => {
const onAttachFiles = vi.fn().mockResolvedValue(undefined);
renderComposer({ onAttachFiles, attachmentsEnabled: false });
const textarea = screen.getByRole('textbox');
- const box = textarea.closest('div.rounded-2xl') as HTMLElement;
+ const box = textarea.closest('div.rounded-3xl') as HTMLElement;
fireEvent.drop(box, { dataTransfer: { files: [makeVideoFile()], types: ['Files'] } });
expect(onAttachFiles).not.toHaveBeenCalled();
});
@@ -397,7 +397,7 @@ describe('ChatComposer', () => {
// fireEvent returns false when the event default was prevented.
renderComposer({ attachmentsEnabled: false });
const textarea = screen.getByRole('textbox');
- const box = textarea.closest('div.rounded-2xl') as HTMLElement;
+ const box = textarea.closest('div.rounded-3xl') as HTMLElement;
const notPrevented = fireEvent.drop(box, {
dataTransfer: { files: [makeVideoFile()], types: ['Files'] },
});