import { AdminMetrics } from '@/components/admin-metrics' import { Button } from '@/components/ui/button' import { Zap, Settings, Activity, TrendingUp } from 'lucide-react' import Link from 'next/link' import { getSystemConfig } from '@/lib/config' export default async function AdminAIPage() { const config = await getSystemConfig() // Determine provider status based on config const openaiKey = config.OPENAI_API_KEY const ollamaUrl = config.OLLAMA_BASE_URL || config.OLLAMA_BASE_URL_TAGS || config.OLLAMA_BASE_URL_EMBEDDING const providers = [ { name: 'OpenAI', status: openaiKey ? 'Connected' : 'Not Configured', requests: 'N/A' // We don't track request counts yet }, { name: 'Ollama', status: ollamaUrl ? 'Available' : 'Not Configured', requests: 'N/A' }, ] // Mock AI metrics - in a real app, these would come from analytics // TODO: Implement real analytics tracking const aiMetrics = [ { title: 'Total Requests', value: '—', trend: { value: 0, isPositive: true }, icon: , }, { title: 'Success Rate', value: '100%', trend: { value: 0, isPositive: true }, icon: , }, { title: 'Avg Response Time', value: '—', trend: { value: 0, isPositive: true }, icon: , }, { title: 'Active Features', value: '6', icon: , }, ] return (

AI Management

Monitor and configure AI features

Active AI Features

{[ 'Title Suggestions', 'Semantic Search', 'Paragraph Reformulation', 'Memory Echo', 'Language Detection', 'Auto Labeling', ].map((feature) => (
{feature} Active
))}

AI Provider Status

{providers.map((provider) => (

{provider.name}

{provider.requests} requests

{provider.status}
))}

Recent AI Requests

Recent AI requests will be displayed here. (Coming Soon)

) }