Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
225 commits
Select commit Hold shift + click to select a range
bd657f3
feat: 支持仪表盘数据自动刷新并完善项目架构
BingZi-233 Nov 11, 2025
01a429d
chore: 完善 .gitignore 配置并添加环境变量示例
BingZi-233 Nov 11, 2025
f1f3986
feat: 集成 Supabase 数据库替代本地文件存储
BingZi-233 Nov 11, 2025
d1b60d4
feat: 集成 Vercel Speed Insights 并优化健康检查为流式响应
BingZi-233 Nov 11, 2025
c46ff9f
perf: 优化健康检查 token 使用量
BingZi-233 Nov 11, 2025
944199a
fix: 修复数据库清理逻辑,按提供商保留最新 60 条记录
BingZi-233 Nov 12, 2025
dc0a7a8
feat: show refresh countdown
BingZi-233 Nov 12, 2025
cb47f97
fix: compute refresh countdown from server checks
BingZi-233 Nov 12, 2025
1c164f2
feat: cache ping results during poll interval
BingZi-233 Nov 12, 2025
8e628f2
chore: 为后台 ping 添加日志
BingZi-233 Nov 12, 2025
6f61988
chore: 丰富后台 ping 日志细节
BingZi-233 Nov 12, 2025
55b6e97
feat: 将 CHECK 配置从环境变量迁移到数据库
BingZi-233 Nov 12, 2025
c444726
refactor: 重构代码结构,采用分层架构设计
BingZi-233 Nov 13, 2025
413b20c
feat: use OpenAI SDK for provider health check
BingZi-233 Nov 13, 2025
8cb5687
chore: reuse OpenAI client via global cache
BingZi-233 Nov 13, 2025
9fdf850
feat: use Anthropic SDK with global client cache
BingZi-233 Nov 13, 2025
d3a2ce2
chore: auto commit
BingZi-233 Nov 13, 2025
9a90f54
feat: add endpoint ping telemetry
BingZi-233 Nov 14, 2025
ad8b4eb
fix: retry aborted provider requests
BingZi-233 Nov 14, 2025
11de674
fix: format dashboard times per timezone
BingZi-233 Nov 14, 2025
94508f8
fix: show version badge and stabilize countdown
BingZi-233 Nov 14, 2025
8a57e5b
feat: update UI
BingZi-233 Nov 14, 2025
10f80df
chore(deps): bump js-yaml from 4.1.0 to 4.1.1
dependabot[bot] Nov 16, 2025
53599e5
feat: 优化宽屏布局
BingZi-233 Nov 18, 2025
53698aa
feat: 新增官方状态监控功能
BingZi-233 Nov 18, 2025
9892f86
feat: 实现 Anthropic 官方状态检查
BingZi-233 Nov 18, 2025
4a1fb1d
refactor: 升级 Anthropic 状态检查使用 summary API
BingZi-233 Nov 18, 2025
8076739
docs: 完善代码注释与文档索引
BingZi-233 Nov 18, 2025
bdc1559
docs: 添加架构文档与数据库 schema
BingZi-233 Nov 18, 2025
9e3a18b
Merge pull request #1 from BingZi-233/dependabot/npm_and_yarn/js-yaml…
BingZi-233 Nov 18, 2025
142d332
docs: 全面重构 README 文档
BingZi-233 Nov 18, 2025
b16e992
feat: add LICENSE
BingZi-233 Nov 18, 2025
a84b60c
feat: enable analytics
BingZi-233 Nov 18, 2025
b4ab421
fix: Defect of premature delivery before retry is completed
BingZi-233 Nov 20, 2025
e091f54
feat: Version number changes
BingZi-233 Nov 20, 2025
47078da
feat: add hover card for official status
BingZi-233 Nov 20, 2025
13a081a
fix: ensure official status refreshes
BingZi-233 Nov 20, 2025
4e49e28
feat: 改进官方状态体验
BingZi-233 Nov 20, 2025
cb4352d
feat: 添加配置维护模式功能
BingZi-233 Nov 21, 2025
5d770f3
fix: 修复 OpenAI 官方状态受影响组件显示问题
BingZi-233 Nov 23, 2025
7ca16d6
refactor: 重构 Gemini 适配器使用 OpenAI 兼容接口
BingZi-233 Nov 23, 2025
e5750b3
chore: 升级版本至 v1.3.1
BingZi-233 Nov 23, 2025
7327010
fix: improve official status hover card on touch
BingZi-233 Nov 23, 2025
093955d
feat: show hover cards on timeline click
BingZi-233 Nov 23, 2025
07953ec
chore: 升级版本至 v1.3.2
BingZi-233 Nov 23, 2025
fe95884
fix: 修复 StatusTimeline 仅显示 55 条记录的问题
BingZi-233 Nov 24, 2025
42f5b88
feat: 添加自定义 User-Agent 配置功能
BingZi-233 Nov 24, 2025
9c3ab1e
feat: auto switch theme by local time
BingZi-233 Nov 25, 2025
08afb7d
feat: 添加首页分组功能
BingZi-233 Nov 25, 2025
a232ec3
fix: 修复分组面板移动端样式问题
BingZi-233 Nov 25, 2025
367d753
chore: 从 git 追踪中移除 .playwright-mcp 和 .mcp.json
BingZi-233 Nov 25, 2025
b067c40
fix: 修复 Next.js 16 中 Script beforeInteractive 策略报错
BingZi-233 Nov 25, 2025
6a5a707
feat: 添加分组详情页功能
BingZi-233 Nov 25, 2025
6c0391c
docs: 同步 README 文档至最新功能
BingZi-233 Nov 25, 2025
e9e3381
refactor: 统一健康快照服务并优化数据库查询性能
BingZi-233 Nov 27, 2025
1135a9d
fix: 修复 Supabase RPC 调用类型错误和 fallback 查询
BingZi-233 Nov 27, 2025
87afa78
feat: 添加可用性百分比统计显示
BingZi-233 Dec 2, 2025
093d710
feat: 添加可用性百分比统计显示
BingZi-233 Dec 2, 2025
764932b
fix: 优化 OpenAI 检查请求的消息结构
BingZi-233 Dec 2, 2025
f01c76b
refactor: 简化 endpoint 路径处理逻辑
BingZi-233 Dec 2, 2025
3d7d563
feat: 添加 OpenAI Responses API 支持并优化环境配置
BingZi-233 Dec 2, 2025
ed523af
fix: 禁用 SDK 客户端的 Next.js fetch 缓存
BingZi-233 Dec 2, 2025
3c9db7f
feat: 升级配置字段支持自定义请求头和请求参数
BingZi-233 Dec 2, 2025
cfb8b62
docs: 更新 README 中的仓库克隆地址
BingZi-233 Dec 2, 2025
481332e
chore: 同步数据库 schema 并简化环境配置
BingZi-233 Dec 2, 2025
56a5835
refactor: 统一客户端缓存管理并增强错误日志脱敏
BingZi-233 Dec 2, 2025
122ce58
docs: 更新 README 反映 v1.8.1 新特性
BingZi-233 Dec 2, 2025
4eac040
feat: 更新README示例
BingZi-233 Dec 3, 2025
315bae3
style: 全面重构 UI 为现代化设计风格
BingZi-233 Dec 3, 2025
d8b89c5
fix: 分离状态摘要中的延迟和异常计数
BingZi-233 Dec 3, 2025
eeb415b
chore: 升级至 v1.8.3,增加 API 超时时间至 30 秒
BingZi-233 Dec 3, 2025
f3e053f
chore: 升级至 v1.8.4,增强超时检测与动态版本号
BingZi-233 Dec 4, 2025
b02032b
feat: 添加 Vercel 和 Cloudflare Workers 部署支持
BingZi-233 Dec 4, 2025
7306f01
chore: 升级至 v1.8.5,优化响应式布局与添加 GitHub 链接
BingZi-233 Dec 4, 2025
44dfd8c
chore(deps): bump next from 16.0.1 to 16.0.7
dependabot[bot] Dec 4, 2025
ceea6f8
Merge pull request #2 from BingZi-233/dependabot/npm_and_yarn/next-16…
BingZi-233 Dec 4, 2025
90d4bd6
feat: 使用 next-themes 重构主题切换功能
BingZi-233 Dec 4, 2025
70a2525
style: 统一代码格式化风格
BingZi-233 Dec 4, 2025
826592d
feat: 添加 group_info 分组信息表
BingZi-233 Dec 4, 2025
a4693ca
feat: 添加 group_info 分组信息表及 RLS 策略
BingZi-233 Dec 4, 2025
2743785
fix: 修复状态徽章背景色类名替换逻辑
BingZi-233 Dec 5, 2025
8f3cfa1
docs: 更新 README 功能特性说明
BingZi-233 Dec 5, 2025
95b0037
feat: 添加 Supabase 管理员客户端绕过 RLS
BingZi-233 Dec 6, 2025
c693e84
fix: 统一延迟计算为首字延迟
BingZi-233 Dec 8, 2025
a11f9ad
feat: v1.12.0 - 添加分组拖拽排序及移动端优化
BingZi-233 Dec 8, 2025
7f63a4a
feat: v1.13.0 - 添加随机数学题验证防止固定回复绕过检测
BingZi-233 Dec 8, 2025
1b38d85
refactor: 重构 schema.sql 结构与格式
BingZi-233 Dec 7, 2025
ead965c
fix: v1.13.1 - 修复验证逻辑并添加对话调试日志
BingZi-233 Dec 8, 2025
b498cc8
fix: v1.13.2 - 优化 validation_failed 状态处理
BingZi-233 Dec 8, 2025
81dc02c
feat: v1.14.0 - 添加系统通知功能
BingZi-233 Dec 8, 2025
83a7601
fix: v1.14.1 - 优化验证失败消息,显示提取的数字而非原文
BingZi-233 Dec 8, 2025
03c8316
refactor: 使用 AI SDK 统一 Provider 检查实现
BingZi-233 Dec 9, 2025
a0de8d7
refactor: 简化 metadata 参数注入方式
BingZi-233 Dec 9, 2025
d717a64
refactor: v1.15.0 - 精简 AI SDK 检查模块代码
BingZi-233 Dec 9, 2025
53a25f9
fix: v1.15.1 - 使用 few-shot prompting 提升数学挑战验证成功率
BingZi-233 Dec 9, 2025
f94f7ed
feat: v1.15.2 - Dashboard 添加 validation_failed 状态统计显示
BingZi-233 Dec 9, 2025
9129110
feat: v1.15.3 - 通知横幅支持多条自动轮播
BingZi-233 Dec 9, 2025
2e52f35
feat: v1.16.0 - 新增状态查询 API 和页面加载进度条
BingZi-233 Dec 9, 2025
93b4720
docs: 更新 README 补充 v1.16.0 功能文档
BingZi-233 Dec 9, 2025
e9e4f97
feat: v1.16.1 - 新增 error 状态区分请求异常与验证失败
BingZi-233 Dec 10, 2025
aee95e6
refactor: 优化 ai-sdk-check 模块代码结构和注释
BingZi-233 Dec 10, 2025
fe9fb94
feat: v1.16.2 - 新增检查并发数控制
BingZi-233 Dec 10, 2025
9b414c0
feat: 品牌定制与文档同步更新
BingZi-233 Dec 11, 2025
7bde652
fix: 修复 favicon.png 不显示问题
BingZi-233 Dec 11, 2025
20f6abb
chore: 升级依赖包版本
BingZi-233 Dec 11, 2025
ffbce80
style: 优化页脚布局与版权信息展示
BingZi-233 Dec 11, 2025
c698f77
chore: 升级依赖包版本
BingZi-233 Dec 12, 2025
8b39630
fix: 修复自定义请求头无法覆盖 SDK 默认值的问题
BingZi-233 Dec 15, 2025
5da0dc2
style: 优化分组页面移动端响应式布局
BingZi-233 Dec 15, 2025
090dfc1
fix: 修复 OpenAI SDK chat 模型调用方式及端点处理逻辑
BingZi-233 Jan 2, 2026
89549d6
chore: 添加 Docker 构建及 compose 配置
BingZi-233 Jan 3, 2026
4cfdd8c
chore: 移除 Cloudflare 部署配置
BingZi-233 Jan 11, 2026
a90be5a
feat: 添加分组搜索功能及 OpenSpec 配置
BingZi-233 Jan 13, 2026
d81bb3f
feat: 扩展历史数据保留功能,新增可用性统计与趋势图
BingZi-233 Jan 13, 2026
de39232
fix: 删除旧版 prune_check_history 函数避免重载冲突
BingZi-233 Jan 13, 2026
46a38c9
refactor: 使用 recharts 重构趋势图组件
BingZi-233 Jan 13, 2026
a381e27
feat: 为维护模式添加专用 UI 展示样式
BingZi-233 Jan 13, 2026
f97cbb7
feat: 添加双层缓存优化 - 前端 SWR + CDN ETag
BingZi-233 Jan 14, 2026
57ac3a2
feat: 优化趋势图密度 - 智能采样保留关键点
BingZi-233 Jan 14, 2026
9e1deba
feat: 添加零停机部署脚本
BingZi-233 Jan 14, 2026
f427eb4
fix: 添加 favicon.png 到 public 目录支持直接访问
BingZi-233 Jan 14, 2026
eb6d309
fix: 修复 React 水合错误 #418 - 时区不一致问题
BingZi-233 Jan 14, 2026
3cb5f41
feat: 推迟首次检测至第一个轮询周期
BingZi-233 Jan 14, 2026
454686f
feat: 减少趋势图最大显示点数至 30
BingZi-233 Jan 14, 2026
7f44d36
fix: 修复 Recharts 图表初始渲染时宽高为 -1 的警告
BingZi-233 Jan 14, 2026
82f4d45
feat: 实现多节点轮询单主选举机制
BingZi-233 Jan 14, 2026
efdec42
feat: 为分组添加标签展示功能
BingZi-233 Jan 14, 2026
70e185a
style: 优化分组标签布局,与标题同行显示
BingZi-233 Jan 14, 2026
21af03e
chore: 从 git 中移除 openspec/changes 目录
BingZi-233 Jan 14, 2026
7c85900
fix: 修复趋势图采样算法在关键点过多时超出限制的问题
BingZi-233 Jan 14, 2026
e1601f8
docs: refresh README and docs
BingZi-233 Jan 15, 2026
e8db197
refactor: 收敛 admin client 类型并清理死代码
BingZi-233 Jan 15, 2026
6e61682
fix: show search icon
BingZi-233 Jan 15, 2026
9bc58c3
fix: 优化缓存命中与刷新并升级版本
BingZi-233 Jan 15, 2026
e375bd5
feat: 添加 GitHub Actions 自动构建 Docker 镜像
BingZi-233 Jan 15, 2026
113d63f
feat: 添加 git-bump 和 git-push 自定义命令
BingZi-233 Jan 16, 2026
9928fb4
refactor: 移除浏览器端 Supabase 客户端,统一使用服务端渲染 (v1.20.1)
BingZi-233 Jan 16, 2026
c6da46b
refactor: CI 仅在发布 tag 时构建镜像,deploy 改为拉取预构建镜像
BingZi-233 Jan 16, 2026
7b74ba6
fix: 移除 arm64 架构构建,解决 QEMU 模拟导致的构建超时问题
BingZi-233 Jan 16, 2026
da06820
style: 调整标签颜色数组顺序
rakuyoMo Jan 17, 2026
8725d41
feat: 添加分组排序功能,支持按标签/名称排序
rakuyoMo Jan 17, 2026
2b7e81d
fix: 修复全局缓存内存泄漏,添加 TTL 和 LRU 清理机制 (v1.20.2)
BingZi-233 Jan 19, 2026
49113cf
Merge pull request #15 from rakuyoMo/feature/group-tag-colors
BingZi-233 Jan 19, 2026
4bed244
Merge pull request #14 from rakuyoMo/feature/sort-providers
BingZi-233 Jan 19, 2026
3bbf708
chore: bump version to 1.20.3
BingZi-233 Jan 19, 2026
a860be7
feat: 非自定义排序模式下,禁用拖拽排序
rakuyoMo Jan 19, 2026
a5f1f46
feat: 仅在自定义模式使用自定义排序数据源
rakuyoMo Jan 19, 2026
4af557a
perf: 优化趋势数据查询性能,从39秒降至4秒 (v1.20.4)
BingZi-233 Jan 19, 2026
985d287
ci: 精简 Docker tags,只保留精确版本号 (v1.20.5)
BingZi-233 Jan 19, 2026
7d67dbd
Merge pull request #16 from rakuyoMo/fix/disable-drag-in-sort-modes
BingZi-233 Jan 20, 2026
0ba30f1
docs: 完善项目文档并重构Dashboard骨架屏 (v1.20.6)
BingZi-233 Jan 20, 2026
f0d93a6
feat: 添加标签分组筛选功能并支持本地持久化
h7ml Jan 21, 2026
c4184af
refactor: 重构Dashboard数据层与前端缓存系统 (v1.20.7)
BingZi-233 Jan 23, 2026
7aff127
refactor: 优化内部API安全性与数据库查询稳定性 (v1.20.8)
BingZi-233 Jan 23, 2026
1d4306a
perf: 优化标签筛选性能并统一标签解析方法
BingZi-233 Jan 23, 2026
ce3ac69
refactor: 移除 includeDetails 参数,简化 Dashboard 数据接口 (v1.20.9)
BingZi-233 Jan 23, 2026
104e875
Merge pull request #1 from BingZi-233/fix/pr17-improvements
h7ml Jan 23, 2026
1bd7a00
Merge branch 'master' of github.com:BingZi-233/check-cx
h7ml Jan 23, 2026
99562fc
Merge pull request #17 from h7ml/master
BingZi-233 Jan 24, 2026
b31a20a
refactor: 优化可用性百分比颜色为渐变色 (v1.20.10)
BingZi-233 Jan 26, 2026
e884794
chore(deps): bump next from 16.0.10 to 16.1.5
dependabot[bot] Jan 27, 2026
3179dd3
Merge pull request #18 from BingZi-233/dependabot/npm_and_yarn/next-1…
BingZi-233 Feb 3, 2026
4d934f5
feat: 添加原生 Gemini RPC 格式支持
BingZi-233 Feb 16, 2026
5ae6192
feat: add typed request templates for check configs
BingZi-233 Mar 4, 2026
993f612
chore: bump dependencies
BingZi-233 Mar 4, 2026
a2ee0c3
fix: tighten Gemini hostname regex and bump version to 1.21.2
BingZi-233 Mar 4, 2026
2e6c7aa
fix: 修复时间线 HoverCard 交替闪烁问题
Calderic Mar 6, 2026
f5de606
fix: 保留检查请求中的 endpoint 查询参数
BingZi-233 Mar 9, 2026
5e8add3
fix: optimize failure logging
BingZi-233 Mar 9, 2026
cc474d4
fix: repair release build
BingZi-233 Mar 9, 2026
f86c8b2
Merge pull request #22 from Calderic/master
BingZi-233 Mar 9, 2026
e88b309
feat(database): extract check models into dedicated table
BingZi-233 Mar 22, 2026
c907996
refactor(database): link templates through models
BingZi-233 Mar 22, 2026
4bb8ca2
chore(release): bump version to v1.21.6
BingZi-233 Mar 22, 2026
a1362fc
chore: upgrade dependencies and bump to v1.21.7
BingZi-233 Mar 22, 2026
3a1ac26
docs: refine README and add project links
BingZi-233 Mar 23, 2026
917a9c5
fix: add instrumentation.ts to initialize poller in Docker standalone…
cyanmst Mar 23, 2026
19192b1
Fix availability stats to include degraded checks
BingZi-233 Mar 25, 2026
1d6f07b
chore: upgrade dependencies
BingZi-233 Apr 9, 2026
7fcf6e8
feat: replace official status HoverCard with inline banner
BingZi-233 Apr 9, 2026
fbb39d1
Merge pull request #26 from cyanmst/fix/docker-standalone-poller-init
BingZi-233 Apr 9, 2026
d0aec8f
feat(ui): improve provider card layout for better model name visibility
BingZi-233 Apr 17, 2026
72b9fde
feat(ui): strengthen provider metadata visibility on card
BingZi-233 Apr 17, 2026
16bccbb
feat: add admin user schema for admin access
BingZi-233 May 12, 2026
1875a24
chore: refresh tooling and dependencies
BingZi-233 May 27, 2026
b256c24
Merge branch 'master' of https://github.com/BingZi-233/check-cx
BingZi-233 May 27, 2026
7936c7d
chore(deps): bump next from 16.2.1 to 16.2.6
dependabot[bot] May 27, 2026
427840c
feat: replace math challenge with language comprehension challenge (v…
BingZi-233 Jun 23, 2026
67dcac1
fix: remove lib/utils.ts that shadowed barrel export
BingZi-233 Jun 23, 2026
c78643a
fix: align badge variant types with Badge component
BingZi-233 Jun 23, 2026
403ed58
chore: bump version to 1.23.2
BingZi-233 Jun 23, 2026
bd094a3
chore: bump deps and replace shadcn skill with symlink
BingZi-233 Jun 24, 2026
52dacb4
Merge pull request #33 from BingZi-233/dependabot/npm_and_yarn/next-1…
BingZi-233 Jun 24, 2026
7cf81ba
docs: add dashboard compact list layout redesign spec
BingZi-233 Jul 20, 2026
9a44304
docs: add dashboard compact list implementation plan
BingZi-233 Jul 20, 2026
f83abd4
chore: ignore local worktrees and superpowers scratch
BingZi-233 Jul 20, 2026
25f3f82
feat: dashboard compact list layout & nier-boot boot component (v1.23.3)
BingZi-233 Jul 21, 2026
a97f2ff
Revert "feat: dashboard compact list layout & nier-boot boot componen…
BingZi-233 Jul 29, 2026
f5c0710
chore: restore version to 1.23.3 after nier revert
BingZi-233 Jul 29, 2026
70c0f79
chore: bump version to 1.23.4
BingZi-233 Jul 29, 2026
23ea5f1
chore: add AI SDK / Next.js skills and update shadcn skill
BingZi-233 Jul 29, 2026
52deaff
chore(deps): 升级 AI SDK v5→v7 并精简错误日志 (v1.23.5)
BingZi-233 Jul 29, 2026
5eddbc9
feat(next): 启用 Cache Components 并升级 next 至 16.2.12
BingZi-233 Jul 29, 2026
1d017b6
perf(layout): 移除未使用的 Geist 字体加载
BingZi-233 Jul 29, 2026
336485e
perf: 优化 Supabase 交互性能 (v1.23.6)
BingZi-233 Jul 29, 2026
06d3d28
chore(docker): add local log driver with rotation
BingZi-233 Jul 29, 2026
4615983
fix(notifications): 修复 Cache Components 下构建期预渲染失败 (v1.23.7)
BingZi-233 Jul 29, 2026
62281a8
docs: UI 重设计 spec(简洁现代风全站改版)
BingZi-233 Jul 29, 2026
ae488c8
docs: UI 重设计实现计划
BingZi-233 Jul 29, 2026
efcac47
feat(theme): 中性色令牌重写,去网格背景,字体 sans/mono 分工
BingZi-233 Jul 29, 2026
bb8d961
feat(status): 状态色统一到 STATUS_META 单一数据源,6 色拉开色相
BingZi-233 Jul 29, 2026
b0a5d53
feat(status): 抽取 StatusSummary 共享组件,两页摘要读 STATUS_META
BingZi-233 Jul 29, 2026
51f4672
feat(card): ProviderCard 单层卡片化,去玻璃拟态与装饰
BingZi-233 Jul 29, 2026
ba7abbf
feat(dashboard): 头部工具栏化,GroupPanel 弱容器化,去装饰元素
BingZi-233 Jul 29, 2026
da9e671
feat(group): 分组详情页头部对齐首页,去装饰元素
BingZi-233 Jul 29, 2026
134acd4
feat(ui): 共享组件与页面容器收尾,可用性色离散档位化
BingZi-233 Jul 29, 2026
1578807
chore: bump version to 1.23.8(UI 重设计)
BingZi-233 Jul 29, 2026
37ad7da
fix(ui): 终审修复——骨架屏对齐新布局、状态灯接 STATUS_META、网格间距统一 gap-4
BingZi-233 Jul 29, 2026
34bcb30
merge: UI 重设计(简洁现代风全站改版)v1.23.8
BingZi-233 Jul 29, 2026
636f8c6
fix(ui): 清理 redesign Minor 遗留
BingZi-233 Jul 30, 2026
4a0200e
chore: 启用 superpowers 插件
BingZi-233 Jul 30, 2026
b9eb3a0
fix(ui): 模型卡片标题对调,时间线展示精简 API 错误信息 (v1.23.9)
BingZi-233 Jul 30, 2026
4cffb40
fix(ui): 修正移动端顶部布局挤压与溢出
BingZi-233 Jul 30, 2026
a914805
feat(ui): 站点图标替换首页 LOGO,新增返回 Linux.do 入口
BingZi-233 Jul 30, 2026
d32d077
chore: bump version to 1.23.10
BingZi-233 Jul 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .agents/skills/ai-sdk/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
name: ai-sdk
description: 'Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat".'
---

## What the AI SDK Is

The AI SDK by Vercel (the `ai` package on npm) is a TypeScript toolkit for building AI applications. It provides a unified API across model providers for text generation, structured output, tool calling, agents, embeddings, and framework UI integrations.

- Repository: https://github.com/vercel/ai
- Documentation: https://ai-sdk.dev/docs

## Critical: Do Not Trust Your Own Memory

Whatever you remember about the AI SDK is likely outdated. The SDK changes frequently across versions - APIs are renamed, removed, and added. Your training data almost certainly contains obsolete APIs, deprecated patterns, and model IDs that no longer exist. UI hooks like `useChat` are among the most frequently changed APIs, so be especially careful with client code.

**Never write AI SDK code from memory.** Always verify every API, option, and pattern against the documentation and source code for the version that is actually installed in the project.

## Use the Bundled, Version-Matched Docs

The `ai` package ships its full documentation and source code inside `node_modules`. These always match the installed version, so trust them over anything you remember.

1. Ensure `ai` is installed. If `node_modules/ai/` does not exist, install **only** the `ai` package using the project's package manager (e.g. `pnpm add ai`). Install provider packages (e.g. `@ai-sdk/openai`) and framework packages (e.g. `@ai-sdk/react`) later, when the task requires them.
2. Read and grep the bundled docs at `node_modules/ai/docs/` and the source at `node_modules/ai/src/`.
3. Provider and framework packages bundle their own docs at `node_modules/@ai-sdk/<name>/docs/`.
4. If something isn't in the bundled docs, search https://ai-sdk.dev/docs. You can append `.md` to any docs page URL to get its markdown, and search via `https://ai-sdk.dev/api/search-docs?q=your_query`.
5. If you cannot find support for an answer in the docs or source, say so explicitly — do not guess.

## AI Gateway: The Fastest Way to Start

The Vercel AI Gateway is the fastest way to get started with the AI SDK. It provides access to models from OpenAI, Anthropic, Google, and other providers through a single API, without installing provider packages or managing multiple API keys.

To set it up:

1. Authenticate with OIDC (for Vercel deployments) or get an AI Gateway API key.
2. Provide it to your app via the `AI_GATEWAY_API_KEY` environment variable.
3. Reference models with `provider/model` strings.

For exact setup, authentication, and usage, read the bundled guide and the AI Gateway docs.

### Choosing a Model

Never use model IDs from memory — models are released and retired frequently. Fetch the current list before writing code that references a model. Do not truncate the list (e.g. with `head`) so you can find the newest models:

```bash
# All available models
curl -s https://ai-gateway.vercel.sh/v1/models | jq -r '.data[].id'

# Filter by provider (e.g. anthropic, openai, google)
curl -s https://ai-gateway.vercel.sh/v1/models | jq -r '[.data[] | select(.id | startswith("anthropic/")) | .id] | reverse | .[]'
```

When multiple versions of a model exist, prefer the one with the highest version number.

## Building and Consuming Agents

Use the SDK's built-in agent abstraction (such as `ToolLoopAgent`) rather than hand-rolling tool-calling loops. For end-to-end type safety, infer the UI message type from your agent definition when consuming it on the client (e.g. with `useChat`). Consuming an agent is framework-specific: check `package.json` to detect the stack, then follow the matching quickstart.

Look up the current agent, tool, and type-safety APIs in the bundled docs (`node_modules/ai/docs/`, especially the agents section) or at https://ai-sdk.dev/docs.

## DevTools

AI SDK DevTools captures your AI SDK calls - requests, responses, tool calls, token usage, and multi-step runs - so you can inspect exactly what your agents do. Use it while developing to debug generations. It is a separate package and is intended for local development only.

For setup instructions, read the bundled DevTools documentation.

## Keep the SDK Current

Outdated installs are the most common source of errors. Compare the installed version against the latest:

- **Installed:** the `version` field in `node_modules/ai/package.json`.
- **Latest:** run `npm view ai version`.

If the installed version is a major version (or more) behind the latest, tell the user they are on an old release, and recommend upgrading before continuing. Migration guides are at https://ai-sdk.dev/docs/migration-guides.

## After Making Changes

Run the project's type checker. Be minimal — only set options that differ from the defaults, checking docs or source for the defaults rather than over-specifying. Most type errors come from remembered, now-changed APIs; re-check the current docs and source when they occur.
108 changes: 108 additions & 0 deletions .agents/skills/migrate-ai-sdk-v6-to-v7/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
---
name: migrate-ai-sdk-v6-to-v7
description: Migrate applications from AI SDK 6.x to AI SDK 7.0. Use when upgrading Vercel AI SDK packages, fixing v7 migration errors, or when the user mentions AI SDK v6, v7, upgrade, migration, breaking changes, system to instructions, fullStream, telemetry, tool context, or finalStep.
---

## AI SDK 6 to 7 Migration

Use `content/docs/08-migration-guides/23-migration-guide-7-0.mdx` from the AI SDK repo as the source of truth. This skill is the working checklist; read the guide for exact examples or when behavior is unclear.

## Migration Workflow

1. Ensure the user has a clean backup or committed baseline before editing.
2. Inspect `package.json` and lockfiles to identify installed `ai`, `@ai-sdk/*`, provider, UI, MCP, and telemetry packages.
3. Upgrade AI SDK packages to latest versions, and add `@ai-sdk/otel` only if the project uses OpenTelemetry spans.
4. Update runtime and module assumptions: Node.js must be `>=22`, and AI SDK packages are ESM-only. Replace `require()` imports with ESM imports and add `"type": "module"` or use `.mjs` where needed.
5. Search for the v6 patterns below, migrate only the code that exists, then run typecheck and targeted tests.

Prefer behavior-preserving changes. When v7 changes semantics, decide whether the app wants the new all-steps behavior or the previous final-step-only behavior.

## Core API Changes

- `experimental_customProvider` -> `customProvider`.
- `experimental_generateImage` -> `generateImage`; `Experimental_GenerateImageResult` -> `GenerateImageResult`.
- `experimental_transcribe` -> `transcribe`; `Experimental_TranscriptionResult` -> `TranscriptionResult`.
- `experimental_generateSpeech` -> `generateSpeech`; `Experimental_SpeechResult` -> `SpeechResult`.
- `experimental_output` option/result -> `output` option/result.
- `CallSettings` -> `LanguageModelCallOptions & Omit<RequestOptions, 'timeout'>`; `prepareCallSettings` -> `prepareLanguageModelCallOptions`.
- `stepCountIs` -> `isStepCount`.

## Prompts and Steps

- Rename top-level `system` to `instructions` for `generateText`, `streamText`, `generateObject`, `streamObject`, and `streamUI`.
- Move `{ role: 'system' }` messages from `prompt` or `messages` into top-level `instructions`. Only use `allowSystemInMessages: true` for trusted persisted messages.
- Rename `experimental_prepareStep` to `prepareStep`.
- In `prepareStep`, rename returned `system` to `instructions`.
- In `experimental_repairToolCall`, use `{ instructions }` instead of `{ system }`.
- Audit `prepareStep` behavior: returned `instructions` and `messages` now carry forward into later steps. If code depended on one-step-only overrides, rebuild from `initialInstructions`, `initialMessages`, and `responseMessages` explicitly.

## Lifecycle Callbacks

- `experimental_onStart` -> `onStart`.
- `experimental_onStepStart` -> `onStepStart`.
- `onFinish` -> `onEnd`.
- `onStepFinish` -> `onStepEnd`.
- For `embed`, `embedMany`, and `rerank`, `experimental_onFinish` -> `onEnd`.
- Callback event fields use `instructions` instead of `system`.

## Usage, Telemetry, and Include Options

- `usage.cachedInputTokens` -> `usage.inputTokenDetails.cacheReadTokens`.
- `usage.reasoningTokens` -> `usage.outputTokenDetails.reasoningTokens`.
- OpenTelemetry moved out of `ai`; install `@ai-sdk/otel` and call `registerTelemetry(new OpenTelemetry(...))` at app startup.
- Telemetry is enabled by default once an integration is registered. Remove redundant `isEnabled: true`; use `isEnabled: false` to opt out per call.
- Move `experimental_telemetry.tracer` into the `OpenTelemetry` constructor.
- `experimental_telemetry` -> `telemetry`.
- Telemetry integration callbacks: `onRerankFinish` -> `onRerankEnd`, `onEmbedFinish` -> `onEmbedEnd`. Update tracing-channel subscribers for the same event type names.
- `experimental_include` -> `include`.
- `includeRawChunks` -> `include.rawChunks`.
- Request and response bodies are excluded by default. If code reads `request.body` or `response.body`, opt in with `include.requestBody` and, for `generateText`, `include.responseBody`.

## Streaming, Messages, and Tools

- `StreamTextResult.fullStream` -> `stream`.
- `streamText` `onChunk` now receives all stream parts, including lifecycle, boundary, finish, abort, and error parts. Guard by `chunk.type` before assuming text/tool/raw content.
- `step.response.messages` is no longer accumulated across previous steps. Use `result.responseMessages` for the full response message history, or flatten `result.steps`.
- Tool execution callbacks: `experimental_onToolCallStart` -> `onToolExecutionStart`, `experimental_onToolCallFinish` -> `onToolExecutionEnd`.
- Tool callback `experimental_context` -> `context`.
- Split shared runtime data from tool-specific data: use top-level `runtimeContext` for orchestration state, declare per-tool `contextSchema`, and pass per-tool values through `toolsContext`.
- Move `needsApproval` from `tool()` / `dynamicTool()` into per-call or agent `toolApproval`.
- `experimental_activeTools` -> `activeTools`.
- `ToolCallOptions` -> `ToolExecutionOptions`.
- `isToolOrDynamicToolUIPart` -> `isToolUIPart`.

## Content Parts and Reasoning

- Tool result `{ type: 'media' }` is removed; use `{ type: 'file-data' }`.
- Migrate `toModelOutput` `image-*`, `file-*`, `file-id`, and `image-file-id` variants to canonical `{ type: 'file', mediaType, data: { type: 'data' | 'url' | 'reference', ... } }`.
- User message `{ type: 'image', image, mediaType? }` is deprecated; use `{ type: 'file', mediaType: 'image' | 'image/*', data }`.
- Add support for the new `reasoning-file` content type in exhaustive switches, renderers, serializers, and validators.
- When adopting top-level `reasoning`, remove overlapping provider-specific reasoning settings from `providerOptions` unless provider-specific settings intentionally take precedence.

## Multi-Step Result Shape

- `result.usage` now includes all steps; `result.totalUsage` is deprecated. Use `result.finalStep.usage` for final-step-only usage.
- Top-level `content`, `toolCalls`, `staticToolCalls`, `dynamicToolCalls`, `toolResults`, `staticToolResults`, `dynamicToolResults`, `files`, `sources`, and `warnings` now include all steps. Use `finalStep` for previous final-step-only behavior.
- Top-level `reasoning`, `reasoningText`, `request`, `response`, and `providerMetadata` are deprecated for final-step data. Use `result.finalStep.*`; for `streamText`, await `result.finalStep`.
- Apply the same result-shape rules to `onEnd` events.

## Stream Response Helpers

The `streamText` result helper methods are deprecated. Replace result methods with top-level stateless helpers:

- `result.toUIMessageStream(...)` -> `toUIMessageStream({ stream: result.stream, ... })`.
- `result.toUIMessageStreamResponse(...)` -> `toUIMessageStream(...)` plus `createUIMessageStreamResponse({ stream })`.
- `result.pipeUIMessageStreamToResponse(response, ...)` -> `toUIMessageStream(...)` plus `pipeUIMessageStreamToResponse({ response, stream })`.
- `result.toTextStreamResponse()` -> `toTextStream({ stream: result.stream })` plus `createTextStreamResponse({ stream })`.
- `result.pipeTextStreamToResponse(response)` -> `toTextStream({ stream: result.stream })` plus `pipeTextStreamToResponse({ response, stream })`.

## Package-Specific Checks

- MCP: `MCPTransportConfig.redirect` now defaults to `'error'`. Only set `redirect: 'follow'` for trusted MCP servers that rely on redirects.
- Vue: `@ai-sdk/vue` `Chat` class is deprecated. Prefer `useChat`, including getter/ref init for reactive chat inputs.
- Anthropic and `@ai-sdk/google-vertex/anthropic`: `providerMetadata.anthropic.cacheCreationInputTokens` was removed. Use `usage.inputTokenDetails.cacheWriteTokens`; raw Anthropic usage remains at `finalStep.providerMetadata?.anthropic?.usage`.
- Google: rename `GoogleGenerativeAI*` types, classes, and functions to `Google*`, e.g. `createGoogleGenerativeAI` -> `createGoogle`. The `google` entry point is unchanged.

## Validation

Run the project typecheck after edits, then the smallest relevant test suite. Also smoke-test streaming, chat UI, tool execution, telemetry, and multi-step flows if the migration touched them. If type errors remain, search the migration guide for the exact removed or renamed symbol before inventing a workaround.
Loading