mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 10:40:07 +08:00
fix(i18n): improve label retrieval for paintings image size options
This commit is contained in:
parent
32a84311aa
commit
11bf50e722
@ -239,7 +239,7 @@ const paintingsImageSizeOptionsKeyMap = {
|
||||
} as const
|
||||
|
||||
export const getPaintingsImageSizeOptionsLabel = (key: string): string => {
|
||||
return getLabel(paintingsImageSizeOptionsKeyMap, key)
|
||||
return paintingsImageSizeOptionsKeyMap[key] ? getLabel(paintingsImageSizeOptionsKeyMap, key) : key
|
||||
}
|
||||
|
||||
const paintingsQualityOptionsKeyMap = {
|
||||
|
||||
@ -131,10 +131,11 @@ const PopupContainer: React.FC<Props> = ({ providerId, resolve }) => {
|
||||
(model: Model) => {
|
||||
if (!isEmpty(model.name)) {
|
||||
if (isNewApiProvider(provider)) {
|
||||
if (model.supported_endpoint_types && model.supported_endpoint_types.length > 0) {
|
||||
const endpointTypes = model.supported_endpoint_types
|
||||
if (endpointTypes && endpointTypes.length > 0) {
|
||||
addModel({
|
||||
...model,
|
||||
endpoint_type: model.supported_endpoint_types[0],
|
||||
endpoint_type: endpointTypes.includes('image-generation') ? 'image-generation' : endpointTypes[0],
|
||||
supported_text_delta: !isNotSupportedTextDelta(model)
|
||||
})
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user