diff --git a/src/features/ModelIcon/index.tsx b/src/features/ModelIcon/index.tsx index a6a87099..d99a101b 100644 --- a/src/features/ModelIcon/index.tsx +++ b/src/features/ModelIcon/index.tsx @@ -9,13 +9,14 @@ import DefaultIcon from './DefaultIcon'; export interface ModelIconProps { className?: string; model?: string; + shape?: 'circle' | 'square'; size?: number; style?: CSSProperties; type?: 'avatar' | 'mono' | 'color' | 'combine' | 'combine-color'; } const ModelIcon = forwardRef( - ({ model: originModel, size = 12, type = 'avatar', ...rest }, ref) => { + ({ model: originModel, size = 12, type = 'avatar', shape, ...rest }, ref) => { const Render = useMemo(() => { if (!originModel) return; const model = originModel.toLowerCase(); @@ -35,8 +36,8 @@ const ModelIcon = forwardRef( switch (type) { case 'avatar': { - if (!Render?.Icon) return ; - return ; + if (!Render?.Icon) return ; + return ; } case 'mono': { if (!Render?.Icon) return ; diff --git a/src/features/ProviderIcon/index.tsx b/src/features/ProviderIcon/index.tsx index 4493fd07..ce6f3280 100644 --- a/src/features/ProviderIcon/index.tsx +++ b/src/features/ProviderIcon/index.tsx @@ -11,13 +11,14 @@ export interface ProviderIconProps { className?: string; forceMono?: boolean; provider?: ModelProviderKey | string; + shape?: 'circle' | 'square'; size?: number; style?: CSSProperties; type?: 'avatar' | 'mono' | 'color' | 'combine' | 'combine-color'; } const ProviderIcon = forwardRef( - ({ provider: originProvider, size = 12, type = 'avatar', forceMono, ...rest }, ref) => { + ({ provider: originProvider, size = 12, type = 'avatar', forceMono, shape, ...rest }, ref) => { const Render = useMemo(() => { if (!originProvider) return; const provider = originProvider.toLowerCase(); @@ -38,8 +39,8 @@ const ProviderIcon = forwardRef( switch (type) { case 'avatar': { - if (!Render?.Icon) return ; - return ; + if (!Render?.Icon) return ; + return ; } case 'mono': { if (!Render?.Icon) return ;