mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-06 21:35:52 +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
|
} as const
|
||||||
|
|
||||||
export const getPaintingsImageSizeOptionsLabel = (key: string): string => {
|
export const getPaintingsImageSizeOptionsLabel = (key: string): string => {
|
||||||
return getLabel(paintingsImageSizeOptionsKeyMap, key)
|
return paintingsImageSizeOptionsKeyMap[key] ? getLabel(paintingsImageSizeOptionsKeyMap, key) : key
|
||||||
}
|
}
|
||||||
|
|
||||||
const paintingsQualityOptionsKeyMap = {
|
const paintingsQualityOptionsKeyMap = {
|
||||||
|
|||||||
@ -131,10 +131,11 @@ const PopupContainer: React.FC<Props> = ({ providerId, resolve }) => {
|
|||||||
(model: Model) => {
|
(model: Model) => {
|
||||||
if (!isEmpty(model.name)) {
|
if (!isEmpty(model.name)) {
|
||||||
if (isNewApiProvider(provider)) {
|
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({
|
addModel({
|
||||||
...model,
|
...model,
|
||||||
endpoint_type: model.supported_endpoint_types[0],
|
endpoint_type: endpointTypes.includes('image-generation') ? 'image-generation' : endpointTypes[0],
|
||||||
supported_text_delta: !isNotSupportedTextDelta(model)
|
supported_text_delta: !isNotSupportedTextDelta(model)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user