- 新增 web2/ 前端:任务卡看板、风险雷达、决策日志、我的团队、快捷指令 - ChatPanel 增强:风险卡置顶、案卡接入、起诉状向导、语音输入 - 事项看板:点击查看详情弹窗、断点续接(恢复历史对话+matterId) - 保密模式恢复:密码验证后重建内存 session,保留多轮上下文 - 多轮对话:ask/ask-stream/ask-analyze 注入 session 历史,AI 有上下文 - 追问优化:紧扣用户问题,不再偏离主题(社保问社保,工伤问工伤) - 对话区可滚动,输入区固定可见 - 状态机放宽:允许从任意非终态转到 pending_expert - session 存活检查端点,后端重启后自动重建 session - DB migration:风险推送表、案卡表 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
35 lines
809 B
TypeScript
35 lines
809 B
TypeScript
/** 专家头像组件(带 fallback 首字母) */
|
|
import { cn } from '@/lib/utils'
|
|
|
|
interface ExpertAvatarProps {
|
|
name: string
|
|
avatarUrl?: string | null
|
|
size?: number
|
|
className?: string
|
|
}
|
|
|
|
export function ExpertAvatar({ name, avatarUrl, size = 40, className }: ExpertAvatarProps) {
|
|
const initial = name?.[0] || '?'
|
|
if (avatarUrl) {
|
|
return (
|
|
<img
|
|
src={avatarUrl}
|
|
alt={name}
|
|
style={{ width: size, height: size }}
|
|
className={cn('rounded-full object-cover', className)}
|
|
/>
|
|
)
|
|
}
|
|
return (
|
|
<div
|
|
style={{ width: size, height: size, fontSize: size * 0.4 }}
|
|
className={cn(
|
|
'flex items-center justify-center rounded-full bg-primary/10 text-primary font-medium',
|
|
className,
|
|
)}
|
|
>
|
|
{initial}
|
|
</div>
|
|
)
|
|
}
|