Skip to content

Feature simple chatbot#371

Open
MOONSakura0614 wants to merge 9 commits intoraids-lab:mainfrom
MOONSakura0614:feature_simple_chatbot
Open

Feature simple chatbot#371
MOONSakura0614 wants to merge 9 commits intoraids-lab:mainfrom
MOONSakura0614:feature_simple_chatbot

Conversation

@MOONSakura0614
Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings March 15, 2026 10:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

该 PR 在 Crater 前后端引入一个“简单智能运维/聊天助手(AIOps)”能力:前端新增 AIOps 页面入口与聊天抽屉组件,后端新增健康概览、作业诊断与聊天(含 LLM)相关接口,并补齐多语言文案。

Changes:

  • 前端:新增 /portal/aiops 与 /admin/aiops 路由、侧边栏入口,并在 Portal(及 Admin AIOps)范围挂载聊天助手 Provider
  • 前端:新增 AIOps API client(含 LLM 超时配置)与大量 i18n 文案
  • 后端:新增 AIOps/Diagnostics handler 与 LLM text 调用封装

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
frontend/src/services/client.ts 扩展 apiV1Post 支持传入 ky Options(用于超时等配置)
frontend/src/services/api/aiops.ts 新增 AIOps 相关 API 封装(health/diagnose/chat/llmchat/admin)
frontend/src/routes/portal/route.tsx Portal Layout 中挂载 AIChatAssistantProvider,并新增侧边栏入口
frontend/src/routes/portal/aiops/route.tsx 新增 Portal AIOps 路由保护与 Outlet 容器
frontend/src/routes/portal/aiops/index.tsx 新增 Portal AIOps 首页组件挂载点
frontend/src/routes/admin/route.tsx Admin 侧边栏新增 AIOps 入口
frontend/src/routes/admin/aiops/route.tsx 新增 Admin AIOps 路由保护,并挂载 AIChatAssistantProvider
frontend/src/routes/admin/aiops/index.tsx 新增 Admin AIOps 首页组件挂载点
frontend/src/routeTree.gen.ts 路由树生成文件更新,注册新路由
frontend/src/i18n/locales/zhCN/translation.json 新增 AIOps 文案与 navigation.aiops
frontend/src/i18n/locales/enUS/translation.json 新增 AIOps 文案与 navigation.aiops
frontend/src/i18n/locales/ja/translation.json 新增 AIOps 文案与 navigation.aiops
frontend/src/i18n/locales/ko/translation.json 新增 AIOps 文案与 navigation.aiops
frontend/src/components/aiops/AIChatDrawer.tsx 新增聊天抽屉(提示词、帮助弹窗、Markdown 渲染、诊断卡片等)
frontend/src/components/aiops/AIChatAssistantProvider.tsx 新增浮动按钮 + 抽屉的 Provider 封装
backend/pkg/prompts/client.go 抽取 executeLLMRequest,新增 CallLLMText 支持纯文本返回
backend/internal/handler/diagnostics.go 新增 diagnostics manager(失败类型统计、诊断上下文/日志)
backend/internal/handler/aiops.go 新增 aiops manager(健康概览、规则 chat、LLM chat、作业诊断)

审查统计(按“问题类型”合并计数):

分类 数量 状态建议
核心规范 (MUST) 7 建议修正阻断性问题后再行合入
优化建议 (SHOULD) 2 供参考的改进方向

Comment thread frontend/src/services/api/aiops.ts Outdated
Comment thread frontend/src/components/aiops/AIChatDrawer.tsx Outdated
Comment thread backend/internal/handler/diagnostics.go
Comment thread backend/internal/handler/aiops.go Outdated
Comment thread backend/internal/handler/aiops.go
Comment thread frontend/src/components/aiops/AIChatDrawer.tsx
Comment thread backend/internal/handler/aiops.go
Comment thread backend/internal/handler/aiops.go Outdated
Comment thread backend/internal/handler/aiops.go Outdated
@Jinghao-coding
Copy link
Copy Markdown
Member

暂时先不合入

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants