Feature simple chatbot#371
Open
MOONSakura0614 wants to merge 9 commits intoraids-lab:mainfrom
Open
Conversation
Contributor
There was a problem hiding this comment.
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 | 供参考的改进方向 |
Member
|
暂时先不合入 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.