Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
6bd69f3e
authored
Jun 19, 2026
by
CaIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui): enhance endpoint selection and date picker
parent
5b4839fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
5 deletions
+24
-5
web/default/src/components/datetime-picker.tsx
+3
-0
web/default/src/features/channels/components/dialogs/channel-test-dialog.tsx
+21
-5
No files found.
web/default/src/components/datetime-picker.tsx
View file @
6bd69f3e
...
...
@@ -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
<
Date
|
undefined
>
(
value
)
const
[
month
,
setMonth
]
=
React
.
useState
<
Date
|
undefined
>
(
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
)
}
/>
</
PopoverContent
>
</
Popover
>
...
...
web/default/src/features/channels/components/dialogs/channel-test-dialog.tsx
View file @
6bd69f3e
...
...
@@ -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
}
>
<
SelectTrigger
id=
'endpoint-type'
>
<
SelectValue
placeholder=
{
t
(
'Auto detect (default)'
)
}
/>
<
SelectTrigger
id=
'endpoint-type'
className=
'w-full min-w-0'
>
<
SelectValue
className=
'min-w-0 truncate'
placeholder=
{
t
(
'Auto detect (default)'
)
}
/>
</
SelectTrigger
>
<
SelectContent
alignItemWithTrigger=
{
false
}
>
<
SelectContent
alignItemWithTrigger=
{
false
}
className=
{
endpointSelectContentClass
}
>
<
SelectGroup
>
{
endpointSelectItems
.
map
((
option
)
=>
(
<
SelectItem
key=
{
option
.
value
}
value=
{
option
.
value
}
>
{
option
.
label
}
<
SelectItem
key=
{
option
.
value
}
value=
{
option
.
value
}
className=
{
endpointSelectItemClass
}
>
<
span
className=
'min-w-0 whitespace-normal break-words leading-snug'
>
{
option
.
label
}
</
span
>
</
SelectItem
>
))
}
</
SelectGroup
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment