Skip to content

[pull] master from BingZi-233:master#7

Open
pull[bot] wants to merge 183 commits intofishxcode:masterfrom
BingZi-233:master
Open

[pull] master from BingZi-233:master#7
pull[bot] wants to merge 183 commits intofishxcode:masterfrom
BingZi-233:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Mar 4, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

BingZi-233 and others added 30 commits November 11, 2025 21:13
- 集成 shadcn/ui 组件库及相关依赖(@lobehub/icons, lucide-react, class-variance-authority 等)
- 实现核心业务逻辑模块:
  • checks.ts: API 健康检查逻辑
  • poller.ts: 自动轮询器,支持自定义刷新间隔
  • status.ts: 状态管理
  • history-store.ts: 历史记录持久化
  • polling-config.ts: 轮询配置管理
- 完善 README 文档,添加功能说明、环境变量配置指南和快速开始步骤
- 更新全局样式,支持明暗主题切换
- 配置数据持久化,将运行时历史数据(data/check-history.json)排除版本控制
- 更新页面元数据和语言设置为中文
- 更新 .gitignore: 排除日志文件和 IDEA 配置,同时保留 .env.example
- 添加 .env.example 提供环境变量配置模板
- 添加 data 目录用于存储运行时数据
- 将检查历史记录从本地 JSON 文件迁移到 Supabase 数据库
- 添加 Supabase 客户端配置和相关依赖(@supabase/supabase-js, @supabase/ssr)
- 更新 history-store.ts 实现数据库读写操作和自动清理过期数据
- 配置 MCP 服务器以支持 Supabase 集成
- 添加 Supabase 环境变量示例配置
- 修复类型断言问题(lib/checks.ts)
- 移除不再需要的本地数据目录
主要改动:
- 集成 @vercel/speed-insights 用于性能监控
- 将 OpenAI、Anthropic、Gemini 的健康检查改为流式响应
- 实现各 AI 服务商的流式响应解析器
- 优化响应时间统计和错误处理

这些改动提升了健康检查的准确性和性能监控能力
- 将所有提供商的 max_tokens 减少到 1
- 简化消息内容以减少请求体积
- OpenAI: 移除不必要的 system 消息
- Gemini: 添加 generationConfig 限制输出 token
之前的实现会删除所有超过 1 小时的数据,导致历史记录丢失。
现在改为每个提供商独立保留最新 60 条记录,确保数据不会被过度清理。
## 数据库改造
- 创建 check_configs 表存储配置,使用 UUID 作为主键
- 重构 check_history 表,添加外键关联,移除冗余字段
- 创建 v_latest_check_results 和 v_check_stats 视图
- 添加索引、约束和自动更新触发器

## 代码重构
- lib/checks.ts: 新增 loadProviderConfigsFromDB() 从数据库加载配置
- lib/history-store.ts: 修改为仅写入必要字段,使用 JOIN 查询
- lib/dashboard-data.ts: 更新为异步加载配置
- lib/poller.ts: 移除环境变量引用

## 文档更新
- 移除 .env 中所有 CHECK_<ID>_* 配置
- 更新 .env.example 添加数据库配置说明
- 更新 README.md 添加完整的数据库配置管理文档

## 优势
- 使用 UUID 作为主键,更加规范和安全
- 支持动态启用/禁用配置,无需重启应用
- 数据结构更清晰,便于后续扩展 Web 管理界面
- 配置与历史记录分离,符合规范化设计
将整体代码按职责重新组织为清晰的分层结构:

- lib/types/: 统一类型定义,包含 provider、check、database、dashboard 类型
- lib/providers/: Provider 检查逻辑,每个 provider 独立文件
- lib/database/: 数据库操作,配置加载和历史记录管理
- lib/utils/: 工具函数,URL 处理、错误处理、className 合并等
- lib/core/: 核心模块,全局状态、轮询器、数据聚合、状态元数据

主要改进:
- 单一职责:每个模块专注单一功能,文件不超过 200 行
- 类型安全:统一的类型导出和明确的类型定义
- 易于扩展:新增 provider 只需添加一个文件
- 清晰边界:providers 负责检查,database 负责存储,core 负责协调

新增 CLAUDE.md 项目文档,记录架构设计和开发约定
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.0 to 4.1.1.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](nodeca/js-yaml@4.1.0...4.1.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
- 提升页面最大宽度从 1152px 到 1600px
- 当卡片数量大于 4 时,超宽屏(xl)自动切换为三列布局
- 改善多配置场景下的空间利用率
- 新增官方状态轮询器,独立于 Provider 检查,定期获取 AI 服务商官方状态
- 实现 OpenAI 官方状态 API 集成,支持获取服务健康度和受影响组件信息
- 在 Dashboard 中展示官方状态,包含正常/降级/故障/未知四种状态
- 新增官方状态类型定义和配置管理(支持环境变量配置检查间隔)
- 提供状态缓存机制,避免频繁请求官方 API
- 预留 Gemini 和 Anthropic 官方状态检查接口

核心文件:
- lib/official-status/: 官方状态检查器实现
- lib/core/official-status-poller.ts: 独立轮询器和缓存管理
- lib/types/official-status.ts: 官方状态类型定义
- lib/core/status.ts: 新增官方状态元数据
- 新增 lib/official-status/anthropic.ts 实现 Claude 官方状态 API 集成
- 调用 https://status.claude.com/api/v2/status.json 获取服务状态
- 支持解析 indicator 字段(none/minor/major/critical)映射到健康状态
- 更新官方状态检查器入口,启用 Anthropic 状态检查
- 完整支持超时、错误处理和状态描述解析

状态映射规则:
- none → operational (所有系统正常)
- minor → degraded (轻微问题/性能降级)
- major/critical → down (重大故障/服务中断)
- 更换 API 端点从 /status.json 到 /summary.json
- 新增组件级状态解析,支持识别受影响的具体服务
- 优化状态判断逻辑,同时考虑整体 indicator 和组件状态
- 增强状态消息,显示受影响组件列表(如"API 平台, claude.ai 受影响")
- 支持更细粒度的组件状态识别:
  * operational: 正常运行
  * degraded_performance: 性能降级
  * partial_outage: 部分中断
  * major_outage: 重大故障
- 与 OpenAI 检查器保持一致的组件解析模式
- 在 README 中添加 docs/ 目录文档索引,便于快速导航
- 为 dashboard-view、provider-icon、status-timeline 等组件添加详细 JSDoc 注释
- 增强 dashboard-data 模块的职责说明与参数文档
- 移除 config-loader 中的调试日志,减少控制台输出
- 新增 docs/ARCHITECTURE.md: 系统架构与模块边界说明
- 新增 docs/OPERATIONS.md: 运维部署与排障手册
- 新增 docs/EXTENDING_PROVIDERS.md: Provider 扩展开发指南
- 新增 supabase/schema.sql: 数据库表结构定义
…-4.1.1

chore(deps): bump js-yaml from 4.1.0 to 4.1.1
BingZi-233 and others added 7 commits January 26, 2026 10:12
将可用性统计的颜色显示从固定阈值 (99%/95%) 改为基于 HSL 色相的平滑渐变,
提供更直观的可用性状态视觉反馈。
Bumps [next](https://github.com/vercel/next.js) from 16.0.10 to 16.1.5.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](vercel/next.js@v16.0.10...v16.1.5)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 16.1.5
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
…6.1.5

chore(deps): bump next from 16.0.10 to 16.1.5
自动识别原生 Gemini API (v1beta/models/:generateContent)
与 OpenAI 兼容格式,通过 endpoint 路径智能判断

(v1.20.11)
@pull pull Bot locked and limited conversation to collaborators Mar 4, 2026
@pull pull Bot added ⤵️ pull merge-conflict Resolve conflicts manually labels Mar 4, 2026
Calderic and others added 17 commits March 6, 2026 11:28
- 在 provider 自定义 fetch 中合并配置 URL 自带的查询参数\n- 无查询参数时保持原请求不变\n- 清理未使用的 ai 导入\n- 版本号升级到 1.21.3
fix: 修复时间线 HoverCard 交替闪烁问题
… mode

In Docker standalone mode, the page is statically generated at build time, so layout.tsx module code never executes at runtime, preventing the poller from initializing. Adding instrumentation.ts fixes this by using Next.js's official server startup hook.
Replace the touch-unfriendly HoverCard popup with a prominent banner
at the top of provider cards when official status is degraded or down.
Remove isCoarsePointer/activeOfficialCardId state tracking that was
only needed for the HoverCard touch workaround.
fix: add instrumentation.ts to initialize poller in Docker standalone mode
Move model name to its own full-width row with responsive font scaling
(base 16px → lg 24px), relocate status badge to metadata row, and use
line-clamp-2 instead of truncate for graceful long name handling.
Increase font size to text-sm, use solid bg-muted background and
font-semibold for provider label, replace opacity stacking with
explicit foreground colors for better contrast.
@h7ml h7ml force-pushed the master branch 3 times, most recently from 55f3492 to 5ba4265 Compare April 30, 2026 03:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

⤵️ pull merge-conflict Resolve conflicts manually

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants