feat(ai): 全站 AI 助手浮窗(参考 FlowStack 右下角浮空设计)
CI / Backend (go vet + test) (push) Canceled after 0s
CI / Frontend (lint + build + test) (push) Canceled after 0s

- POST /ai/chat:多轮对话(messages 透传)+ 页面上下文注入 —— 前端带当前路径,
  后端自动附加该数据源近 15 分钟轻量日志摘要(总量/Top3 应用/告警命中),
  追问「这个报错什么原因」有数据依据;脱敏/每日配额/Pro 闸门与整页分析共用
- AiAssistant 浮球+浮窗挂 Layout:仅 admin+Pro 渲染;消息气泡、Enter 发送、
  上下文随路由自动采集;免费版不显示
This commit is contained in:
opsx committed 2026-10-31 23:46:33 +08:00
1 parent b81b31f322
commit f457d6da09
8 files changed
+249 -1

No files matched your search

+3
View File
@@ -91,4 +91,7 @@ export const aiApi = {
`/ai/runs?page=${page}&pageSize=${pageSize}`,
),
run: (id: number) => http.get<AIRun>(`/ai/runs/${id}`),
chat: (data: { sourceId?: number; history: Array<{ role: 'user' | 'assistant'; content: string }>; page?: string; rangeMinutes?: number }) =>
http.post<{ reply: string }>('/ai/chat', data),
}