refactor: update installed app component to handle missing params and improve type safety (#27331)

This commit is contained in:
GuanMu
2025-10-27 14:38:58 +08:00
committed by GitHub
parent f06025a342
commit 43bcf40f80
49 changed files with 531 additions and 302 deletions

View File

@@ -5,6 +5,7 @@ import type {
Model,
ModelItem,
} from '../declarations'
import type { ModelFeatureEnum } from '../declarations'
import { useCurrentProviderAndModel } from '../hooks'
import ModelTrigger from './model-trigger'
import EmptyTrigger from './empty-trigger'
@@ -24,7 +25,7 @@ type ModelSelectorProps = {
popupClassName?: string
onSelect?: (model: DefaultModel) => void
readonly?: boolean
scopeFeatures?: string[]
scopeFeatures?: ModelFeatureEnum[]
deprecatedClassName?: string
showDeprecatedWarnIcon?: boolean
}

View File

@@ -22,7 +22,7 @@ type PopupProps = {
defaultModel?: DefaultModel
modelList: Model[]
onSelect: (provider: string, model: ModelItem) => void
scopeFeatures?: string[]
scopeFeatures?: ModelFeatureEnum[]
onHide: () => void
}
const Popup: FC<PopupProps> = ({