feat(ai): 全站 AI 助手浮窗(参考 FlowStack 右下角浮空设计)
- POST /ai/chat:多轮对话(messages 透传)+ 页面上下文注入 —— 前端带当前路径, 后端自动附加该数据源近 15 分钟轻量日志摘要(总量/Top3 应用/告警命中), 追问「这个报错什么原因」有数据依据;脱敏/每日配额/Pro 闸门与整页分析共用 - AiAssistant 浮球+浮窗挂 Layout:仅 admin+Pro 渲染;消息气泡、Enter 发送、 上下文随路由自动采集;免费版不显示
This commit is contained in:
1 parent
b81b31f322
commit
f457d6da09
8 files changed
+249
-1
No files matched your search
@@ -22,6 +22,7 @@ import { cn } from '@/lib/utils'
|
||||
import { useIsMobile } from '@/hooks/use-mobile'
|
||||
import { menuItems, findRouteMeta, findGroupKey } from '@/router/routes'
|
||||
import { useLicense } from '@/hooks/useLicense'
|
||||
import { AiAssistant } from '@/components/AiAssistant'
|
||||
import { Lock } from 'lucide-react'
|
||||
import { GroupTabs } from './GroupTabs'
|
||||
import { getUser, clearAuth } from '@/lib/auth-storage'
|
||||
@@ -265,9 +266,10 @@ const Layout = memo(function Layout({ children }: { children: React.ReactNode })
|
||||
<main className="flex-1 overflow-auto p-4 md:p-6">
|
||||
<Suspense fallback={<PageSkeleton />}>{children}</Suspense>
|
||||
</main>
|
||||
<AiAssistant />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
|
||||
export default Layout
|
||||
export default Layout
|
||||
Reference in new issue
Block a user