Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Dec 24, 2024
1 parent cb93429 commit 0675a9b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const useStyles = createStyles(({ css, responsive, token }) => ({
}));

const List = memo(() => {
const { styles, theme } = useStyles();
const { styles } = useStyles();
const enabledList = useUserStore(modelProviderSelectors.enabledModelProviderList, isEqual);
const disabledList = useUserStore(modelProviderSelectors.disabledModelProviderList, isEqual);

Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/settings/provider/ProviderMenu/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const ProviderItem = memo<ModelProviderCard>(({ id, name }) => {
href={`/settings/provider/${id}`}
>
<Flexbox gap={8} horizontal>
<ProviderIcon provider={id} size={24} style={{ borderRadius: 6 }} />
<ProviderIcon provider={id} size={24} style={{ borderRadius: 6 }} type={'avatar'} />
{name}
</Flexbox>

Expand Down
14 changes: 10 additions & 4 deletions src/store/user/slices/modelList/selectors/modelProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ const modelProviderListForModelSelect = (s: UserStore): ModelProviderCard[] =>
chatModels: provider.chatModels.filter((model) => model.enabled),
}));

const enabledModelProviderList = (s: UserStore): ModelProviderCard[] =>
modelProviderList(s).filter((s) => s.enabled);
const disabledModelProviderList = (s: UserStore): ModelProviderCard[] =>
modelProviderList(s).filter((s) => !s.enabled);

const getModelCardById = (id: string) => (s: UserStore) => {
const list = modelProviderList(s);

Expand All @@ -122,26 +127,27 @@ const modelMaxToken = (id: string) => (s: UserStore) => getModelCardById(id)(s)?

export const modelProviderSelectors = {
defaultModelProviderList,
disabledModelProviderList,
enabledModelProviderList,

getDefaultEnabledModelsById,
getDefaultModelCardById,

getEnableModelsById,
getModelCardById,

getModelCardsById,
isModelEnabledFiles,
isModelEnabledFunctionCall,
isModelEnabledUpload,

isModelEnabledVision,
isModelHasMaxToken,

isModelHasMaxToken,
isProviderEnabled,

modelMaxToken,
modelProviderList,

modelProviderListForModelSelect,

remoteProviderModelCards,
serverProviderModelCards,
};

0 comments on commit 0675a9b

Please sign in to comment.