import { useState } from 'react' import { MessageSquare, Send } from 'lucide-react' import { EmptyState } from '@/components/common/EmptyState' import { Markdown } from '@/components/common/Markdown' import { Card, CardContent } from '@/components/ui/card' import { Button } from '@/components/ui/button' import { Badge } from '@/components/ui/badge' import type { Consultation } from '@/types' import { useWorkbenchData, WorkbenchShell, ReplyDialog, maskPhone } from './shared' /** 专家工作台 - 待回复咨询:用户发起的咨询,专家在此回复 */ export function WorkbenchPending() { const { expert, consultations, loading, error, loadData } = useWorkbenchData() const [replyTarget, setReplyTarget] = useState(null) const pendingConsultations = consultations.filter(c => c.status === 'pending') return ( {pendingConsultations.length === 0 ? ( } /> ) : (
{pendingConsultations.map((c) => (

{c.topic}

待回复

用户:{maskPhone(c.user_phone || '')}

{c.question && (
)} {c.context && (

AI 对话上下文:

)}

创建时间:{c.created_at}

))}
)} setReplyTarget(null)} onSuccess={loadData} />
) }