import React from 'react'; import { classNames } from '~/utils/classNames'; import type { ModelInfo } from '~/lib/modules/llm/types'; import type { ProviderInfo } from '~/types/model'; interface SmartAIToggleProps { enabled: boolean; onToggle: (enabled: boolean) => void; provider?: ProviderInfo; model?: string; modelList: ModelInfo[]; } export const SmartAiToggle: React.FC = ({ enabled, onToggle, provider, model, modelList }) => { // Check if current model supports SmartAI const currentModel = modelList.find((m) => m.name === model); const isSupported = currentModel?.supportsSmartAI && (provider?.name === 'Anthropic' || provider?.name === 'OpenAI'); if (!isSupported) { return null; } return ( ); };