Your Name bbc8a4f641 feat: 添加 AI 服务状态监控和警告功能
- AI 配置页面添加服务健康状态显示(正常/降级/异常)
- 服务异常时显示红色警告卡片,展示错误信息和队列任务数
- 侧边栏 AI 配置入口添加红点警告徽章支持
- DesktopLayout 支持传递 aiServiceError 状态

AI 调用风险处理方案:
- 自动重试 3 次
- 失败后加入队列,后台定时重试
- 页面显示服务状态警告

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 19:37:20 +08:00

31 lines
788 B
TypeScript

'use client'
import { Sidebar } from '../navigation/Sidebar'
interface DesktopLayoutProps {
children: React.ReactNode
role?: 'creator' | 'agency' | 'brand'
className?: string
aiServiceError?: boolean // AI 服务异常状态(仅品牌方使用)
}
export function DesktopLayout({
children,
role = 'creator',
className = '',
aiServiceError = false,
}: DesktopLayoutProps) {
return (
<div className={`h-screen bg-bg-page flex overflow-hidden ${className}`}>
<Sidebar role={role} aiServiceError={role === 'brand' ? aiServiceError : false} />
<main className="flex-1 ml-[260px] p-8 overflow-y-auto overflow-x-hidden">
<div className="min-h-full">
{children}
</div>
</main>
</div>
)
}
export default DesktopLayout