/** * Content Intelligence Panel - UI для новых AI возможностей * * Панель для отображения результатов Content Intelligence анализа * прямо в AI Chat интерфейсе. */ import { Airplay, Bot, FileVideo, Layers, Settings, Sparkles, Target } from "lucide-react" import { useState } from "react" import { useTranslation } from "react-i18next" import { Badge } from "@/components/ui/badge" import { Button } from "@/components/ui/button" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" import { Progress } from "@/components/ui/progress" import { Separator } from "@/components/ui/separator" import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" import type { PipelineProgress } from "../../ai-content-intelligence/unified-pipeline/unified-content-pipeline" import type { UnifiedContentAnalysis } from "../services/unified-ai-service" interface ContentIntelligencePanelProps { analysis?: UnifiedContentAnalysis[] progress?: PipelineProgress onStartAnalysis?: (config: any) => void onExportResults?: (format: "json" | "csv" | "xml") => void } /** * Content Intelligence Panel компонент */ export function ContentIntelligencePanel({ analysis, progress, onStartAnalysis, onExportResults, }: ContentIntelligencePanelProps) { const { t } = useTranslation() const [selectedTab, setSelectedTab] = useState("overview") // Если есть прогресс pipeline if (progress && progress.status === "running") { return ( Content Intelligence Analysis Анализируем ваш контент с помощью AI...
Текущий этап: {progress.currentStage} {Math.round(progress.progress)}%
Завершено этапов: {progress.completedStages.length} из {progress.totalStages}
) } // Если анализ завершен if (analysis && analysis.length > 0) { return (
Content Intelligence Results Результаты AI анализа {analysis.length} файл(ов) {analysis.map((result, _index) => ( {result.mediaFile.filename}
{result.classification.genre} {result.classification.audience} {result.classification.technicalQuality && ( {result.classification.technicalQuality} )}
Обзор Сцены Платформы Рекомендации
{/* Классификация */}

Классификация

Жанр: {result.classification.genre}
Стиль: {result.classification.style}
Эмоция: {result.classification.emotion}
Аудитория: {result.classification.audience}
{/* Качество */}

Метрики качества

Техническое:
{result.qualityMetrics.technical.overallScore}/10
Повествование:
{result.qualityMetrics.narrative.overallScore}/10
Вовлеченность:
{result.qualityMetrics.engagement.overallScore}/10
Доступность:
{result.qualityMetrics.accessibility.overallScore}/10

Анализ сцен ({result.scenes.length})

{result.scenes.length > 0 ? (
{result.scenes.slice(0, 5).map((scene, _sceneIndex) => (
{scene.type} {scene.startTime}s - {scene.endTime}s

{scene.description}

Уверенность: {Math.round(scene.confidence * 100)}% {scene.keyFrames && scene.keyFrames.length > 0 && ( {scene.keyFrames.length} ключевых кадров )}
))} {result.scenes.length > 5 && (
И еще {result.scenes.length - 5} сцен...
)}
) : (
Сцены не найдены
)}

Адаптация под платформы

{result.platformVariants && result.platformVariants.length > 0 ? (
{result.platformVariants.map((variant, variantIndex) => (
{variant.platform} {variant.seoData && ( SEO оптимизирован )}
{variant.adaptations && variant.adaptations.length > 0 && (
{variant.adaptations.slice(0, 3).map((adaptation: any, adaptIndex: number) => (
{adaptation.type}: {adaptation.reason}
))}
)}
))}
) : (
Адаптации под платформы не созданы
)}
{/* Сильные стороны */} {result.insights.strengths.length > 0 && (

✓ Сильные стороны

    {result.insights.strengths.map((strength, index) => (
  • • {strength}
  • ))}
)} {/* Слабые стороны */} {result.insights.weaknesses.length > 0 && (

⚠ Области для улучшения

    {result.insights.weaknesses.map((weakness, index) => (
  • • {weakness}
  • ))}
)} {/* Рекомендации */} {result.insights.recommendations.length > 0 && (

💡 Рекомендации

{result.insights.recommendations.slice(0, 3).map((rec, index) => (
{rec.title} {rec.priority}

{rec.description}

{rec.estimatedImpact && (
Ожидаемый эффект: {rec.estimatedImpact}
)}
))}
)} {/* Маркетинговые углы */} {result.insights.marketingAngles.length > 0 && (

🎯 Маркетинговые углы

{result.insights.marketingAngles.map((angle, index) => ( {angle} ))}
)}
{/* Действия */}
{result.script && ( )}
))}
) } // Стартовый экран return ( Content Intelligence Комплексный AI анализ видео контента с генерацией сценариев и адаптацией под платформы
Scene Analysis
Детекция сцен, классификация типов
Script Generation
Автоматическая генерация сценариев
Content Classification
Анализ жанра, аудитории, настроения
Platform Adaptation
Оптимизация под YouTube, TikTok, Instagram
Используйте команды вроде: "Проанализируй это видео", "Создай сценарий для TikTok", "Адаптируй под все платформы"
) } export default ContentIntelligencePanel