diff --git a/web/default/src/components/datetime-picker.tsx b/web/default/src/components/datetime-picker.tsx index 8c3a0e53..8dbc6eac 100644 --- a/web/default/src/components/datetime-picker.tsx +++ b/web/default/src/components/datetime-picker.tsx @@ -57,6 +57,7 @@ export function DateTimePicker({ const placeholderText = placeholder ?? t('Select date') const calendarLocale = calendarLocales[i18n.language as keyof typeof calendarLocales] ?? enUS + const currentYear = new Date().getFullYear() const [open, setOpen] = React.useState(false) const [date, setDate] = React.useState(value) const [month, setMonth] = React.useState(value) @@ -134,6 +135,8 @@ export function DateTimePicker({ captionLayout='dropdown' onSelect={handleDateSelect} locale={calendarLocale} + startMonth={new Date(currentYear - 100, 0)} + endMonth={new Date(currentYear + 100, 11)} /> diff --git a/web/default/src/features/channels/components/dialogs/channel-test-dialog.tsx b/web/default/src/features/channels/components/dialogs/channel-test-dialog.tsx index 9a3a6ab3..a7844d2e 100644 --- a/web/default/src/features/channels/components/dialogs/channel-test-dialog.tsx +++ b/web/default/src/features/channels/components/dialogs/channel-test-dialog.tsx @@ -190,6 +190,10 @@ const endpointTypeOptions: Array<{ value: string; label: string }> = [ { value: 'embeddings', label: 'Embeddings (/v1/embeddings)' }, ] +const endpointSelectContentClass = 'w-[460px] max-w-[calc(100vw-2rem)]' +const endpointSelectItemClass = + 'items-start py-2 [&_[data-slot=select-item-text]]:min-w-0 [&_[data-slot=select-item-text]]:shrink [&_[data-slot=select-item-text]]:whitespace-normal' + const STREAM_INCOMPATIBLE_ENDPOINTS = new Set([ 'embeddings', 'image-generation', @@ -927,14 +931,26 @@ function ChannelTestDialogContent({ value={endpointType} onValueChange={handleEndpointTypeChange} > - - + + - + {endpointSelectItems.map((option) => ( - - {option.label} + + + {option.label} + ))}