import React, { useState } from 'react'; import { ArrowLeft, Bot, Users, Play, Pause, Download, CheckCircle, ChevronRight, MessageSquare, Send, Star, AlertCircle, FileText, Settings, Lightbulb, Zap, Check, X, Minus, } from 'lucide-react'; import { useTheme } from '@/contexts/ThemeContext'; import { PageType } from '@/components/Sidebar'; interface TaskConsultProps { onNavigate: (page: PageType) => void; } // 模拟参与智能体 const participants = [ { id: 'goal', name: 'GoalAgent', role: '目标分析专家', color: 'blue', status: 'idle' as const, lastOpinion: '建议聚焦提升品牌认知度这一核心目标', }, { id: 'audience', name: 'AudienceAgent', role: '受众分析专家', color: 'cyan', status: 'speaking' as const, lastOpinion: '核心受众应为18-25岁基层青年群体', }, { id: 'narrative', name: 'NarrativeAgent', role: '叙事策略专家', color: 'purple', status: 'idle' as const, lastOpinion: '应采用真实、有态度的青年故事叙事', }, { id: 'risk', name: 'RiskAgent', role: '风险评估专家', color: 'red', status: 'idle' as const, lastOpinion: '需注意UGC质量不稳定和话题热度维持的风险', }, ]; // 模拟讨论记录 const discussionRecords = [ { id: 1, agentId: 'goal', agentName: 'GoalAgent', agentRole: '目标分析专家', color: 'blue', content: `从目标分析角度看,这次五四青年节宣传活动应聚焦以下核心目标: **主目标**:提升品牌在Z世代用户中的认知度 **量化指标建议**: - 曝光量:500万+ - 互动率:5%+ - UGC数量:1000+ **优先级判断**: 建议优先聚焦品牌认知度提升,短期内不追求直接转化。这样可以更好地与目标受众建立情感连接。`, time: '14:30', tags: ['核心目标', '品牌认知'], markedAs: null as string | null, }, { id: 2, agentId: 'audience', agentName: 'AudienceAgent', agentRole: '受众分析专家', color: 'cyan', content: `基于受众分析,我建议: **核心受众画像**: - 年龄:18-25岁 - 身份:学生、基层青年工作者 - 地域:一二线城市为主 **关键洞察**: 这部分群体是社交媒体重度用户,注重"真实感"和"态度感",反感过度营销。需要用平等对话的方式,而非说教式传播。 **内容偏好**: 真实故事 > 精致包装 态度表达 > 信息堆砌 参与互动 > 被动观看`, time: '14:32', tags: ['受众画像', '内容偏好'], markedAs: 'valuable' as string | null, }, { id: 3, agentId: 'narrative', agentName: 'NarrativeAgent', agentRole: '叙事策略专家', color: 'purple', content: `从叙事策略角度,我建议采用以下框架: **叙事主题**:真实、有态度的青年故事 **叙事结构**: 1. 讲述真实的人物故事 2. 引发情感共鸣 3. 传递品牌价值观 4. 激发用户参与 **关键要素**: - 真实感 > 精致感 - 态度感 > 说教感 - 参与感 > 观看感 **内容类型建议**: - 人物专访型:真实青年故事 - 事件记录型:青年节活动现场 - 观点表达型:青年态度宣言`, time: '14:35', tags: ['叙事框架', '内容类型'], markedAs: null as string | null, }, { id: 4, agentId: 'risk', agentName: 'RiskAgent', agentRole: '风险评估专家', color: 'red', content: `我需要提醒以下风险: **高风险项**: 1. 内容质量不稳定 - 风险:UGC质量参差不齐 - 对策:建立内容审核机制 **中风险项**: 2. 预算控制难度大 - 风险:投放效果不可控 - 对策:分阶段预算分配 3. 青年群体注意力分散 - 风险:话题热度难维持 - 对策:多波次内容规划 **建议**:重点关注内容质量风险,建立审核机制。`, time: '14:38', tags: ['风险识别', '应对建议'], markedAs: 'pending' as string | null, }, ]; const TaskConsult: React.FC = ({ onNavigate }) => { const { theme } = useTheme(); const isDark = theme === 'dark'; const [isPaused, setIsPaused] = useState(false); const [currentRound, setCurrentRound] = useState(2); const [currentTopic, setCurrentTopic] = useState('宣传策略方向选择'); const [humanInput, setHumanInput] = useState(''); const [consensusPoints] = useState([ '核心受众应聚焦18-25岁基层青年', '内容应以真实、有态度为核心', ]); const [disputedPoints] = useState([ '叙事角度:事件叙事 vs 人物叙事', '传播渠道:短视频平台 vs 社交媒体', ]); const [humanNotes, setHumanNotes] = useState(''); const getColorClasses = (color: string) => { const colors: Record = { blue: { bg: isDark ? 'bg-blue-500/20' : 'bg-blue-50', border: isDark ? 'border-blue-500/50' : 'border-blue-200', text: isDark ? 'text-blue-400' : 'text-blue-600' }, cyan: { bg: isDark ? 'bg-cyan-500/20' : 'bg-cyan-50', border: isDark ? 'border-cyan-500/50' : 'border-cyan-200', text: isDark ? 'text-cyan-400' : 'text-cyan-600' }, green: { bg: isDark ? 'bg-green-500/20' : 'bg-green-50', border: isDark ? 'border-green-500/50' : 'border-green-200', text: isDark ? 'text-green-400' : 'text-green-600' }, yellow: { bg: isDark ? 'bg-yellow-500/20' : 'bg-yellow-50', border: isDark ? 'border-yellow-500/50' : 'border-yellow-200', text: isDark ? 'text-yellow-400' : 'text-yellow-600' }, purple: { bg: isDark ? 'bg-purple-500/20' : 'bg-purple-50', border: isDark ? 'border-purple-500/50' : 'border-purple-200', text: isDark ? 'text-purple-400' : 'text-purple-600' }, red: { bg: isDark ? 'bg-red-500/20' : 'bg-red-50', border: isDark ? 'border-red-500/50' : 'border-red-200', text: isDark ? 'text-red-400' : 'text-red-600' }, }; return colors[color] || colors.blue; }; const getStatusConfig = (status: string) => { switch (status) { case 'speaking': return { label: '发言中', color: isDark ? 'bg-green-500/20 text-green-400' : 'bg-green-100 text-green-700', dot: isDark ? 'bg-green-400' : 'bg-green-500' }; case 'completed': return { label: '已完成', color: isDark ? 'bg-slate-500/20 text-slate-400' : 'bg-gray-100 text-gray-600', dot: isDark ? 'bg-slate-400' : 'bg-gray-400' }; default: return { label: '待发言', color: isDark ? 'bg-slate-500/20 text-slate-400' : 'bg-gray-100 text-gray-600', dot: isDark ? 'bg-slate-400' : 'bg-gray-400' }; } }; const handleNextRound = () => { setCurrentRound(currentRound + 1); }; const handleFinishConsult = () => { onNavigate('task-consult-result'); }; // 主题颜色类 const cardBg = isDark ? 'bg-slate-800/30' : 'bg-white'; const cardBorder = isDark ? 'border-blue-800/30' : 'border-red-200'; const textPrimary = isDark ? 'text-white' : 'text-gray-900'; const textSecondary = isDark ? 'text-slate-400' : 'text-gray-600'; const textMuted = isDark ? 'text-slate-500' : 'text-gray-500'; const btnSecondary = isDark ? 'bg-slate-700/50 hover:bg-slate-600/50 border-blue-800/30 text-slate-300' : 'bg-gray-100 hover:bg-gray-200 border-gray-300 text-gray-700'; const btnPrimary = isDark ? 'bg-blue-600 hover:bg-blue-500' : 'bg-red-600 hover:bg-red-500'; const inputBg = isDark ? 'bg-slate-900/50' : 'bg-gray-50'; const inputBorder = isDark ? 'border-blue-800/30' : 'border-gray-300'; return (
{/* 顶部信息栏 */}

五四青年节宣传策略会商

多智能体会商任务 · 第 {currentRound} 轮

模式:受控交叉讨论 参与:{participants.length} 个智能体 创建:2026-03-19 14:30
{/* 三栏主体区域 */}
{/* 左栏:参与智能体与议题导航 */}
{/* 参与智能体 */}

参与智能体

{participants.map((agent) => { const colors = getColorClasses(agent.color); const statusConfig = getStatusConfig(agent.status); return (

{agent.name}

{agent.role}

{statusConfig.label}
{agent.lastOpinion && (

{agent.lastOpinion}

)}
); })}
{/* 会商议题导航 */}

会商议题

当前议题

{currentTopic}

待讨论

渠道策略选择

预算分配方案

已讨论

受众定位

目标设定

{/* 中栏:会商讨论区 */}
{/* 当前议题卡 */}

当前议题

{currentTopic}

受控交叉讨论模式 第 {currentRound} 轮
{/* 讨论流 */}

讨论记录

{discussionRecords.map((record) => { const colors = getColorClasses(record.color); return (

{record.agentName}

{record.markedAs === 'valuable' && ( 有价值 )} {record.markedAs === 'pending' && ( 待验证 )}

{record.agentRole} · {record.time}

{record.content}
{record.tags.map((tag) => ( {tag} ))}
); })}
{/* 人工发言区 */}