ding113 пре 2 месеци
родитељ
комит
e6cd57565e

+ 3 - 0
.dockerignore

@@ -27,3 +27,6 @@ yarn-error.log*
 # Data directories (PostgreSQL, Redis persistent data)
 data/redis
 data/postgres
+
+# Documentation submodule (not needed in container)
+docs-site

+ 77 - 0
.github/prompts/changelog-update.md

@@ -0,0 +1,77 @@
+# CHANGELOG.md 更新 Prompt
+
+你是 Claude Code Hub 项目的 Changelog 编辑专家。请根据变更报告更新项目的 CHANGELOG.md 文件。
+
+## 变更报告
+
+{{ CHANGES_JSON }}
+
+## 现有 CHANGELOG.md 内容
+
+{{ CURRENT_CHANGELOG }}
+
+---
+
+## 任务要求
+
+### 1. 在正确位置插入新版本条目
+
+新版本条目应插入到文件开头的 `# Changelog` 标题之后,在所有现有版本之前。
+
+### 2. 遵循统一格式
+
+使用以下格式:
+
+```markdown
+## v0.x.x (YYYY-MM-DD)
+
+### 新增
+
+- 功能描述 (#PR)
+- 另一个功能 (#PR) [@contributor]
+
+### 优化
+
+- 优化描述 (#PR)
+
+### 修复
+
+- 修复描述 (#PR)
+
+### 其他
+
+- 其他变更描述
+```
+
+### 3. 格式规则
+
+- **版本号**: 使用 `## v0.x.x (YYYY-MM-DD)` 格式
+- **分类标题**: 使用 `### 新增`、`### 优化`、`### 修复`、`### 其他`
+- **条目格式**: `- 描述 (#PR编号)` 或 `- 描述 (#PR编号) [@贡献者]`
+- **空分类**: 如果某个分类没有条目,跳过该分类(不显示空标题)
+- **PR 链接**: 如果有 PR 编号,添加 `(#123)` 格式
+- **贡献者**: 如果是外部贡献者,添加 `[@username]` 格式
+
+### 4. 破坏性变更处理
+
+如果有破坏性变更,在版本标题下方添加警告:
+
+```markdown
+## v0.x.x (YYYY-MM-DD)
+
+> **破坏性变更**: 本版本包含不兼容的变更,升级前请阅读下方说明。
+
+### 新增
+...
+```
+
+---
+
+## 输出格式
+
+请输出更新后的完整 CHANGELOG.md 内容。确保:
+
+1. 保留文件开头的标题和说明
+2. 新版本条目在正确位置
+3. 保留所有历史版本记录
+4. 格式一致、排版整洁

+ 148 - 0
.github/prompts/docs-update.md

@@ -0,0 +1,148 @@
+# docs-site 文档更新 Prompt
+
+你是 Claude Code Hub 项目的文档维护专家。请根据变更报告更新在线文档站点。
+
+## 变更报告
+
+{{ CHANGES_JSON }}
+
+## 文档站点结构
+
+docs-site 是一个基于 Next.js + Markdoc 的文档站点,目录结构如下:
+
+```
+docs-site/src/app/docs/
+├── getting-started/     # 快速开始
+├── installation/        # 安装指南
+├── docker-deployment/   # Docker 部署
+├── configuration/       # 配置说明
+├── environment-variables/ # 环境变量
+├── providers/           # 供应商管理
+├── users-keys/          # 用户与 API Key
+├── rate-limiting/       # 限流配置
+├── monitoring/          # 监控与日志
+├── api-reference/       # API 参考
+├── troubleshooting/     # 故障排查
+└── changelog/           # 更新日志
+    └── page.md          # Changelog 页面
+```
+
+---
+
+## 任务一:更新 Changelog 页面
+
+### 文件位置
+
+`docs-site/src/app/docs/changelog/page.md`
+
+### Markdoc 格式
+
+Changelog 页面使用 Markdoc 格式,示例:
+
+```markdown
+---
+title: 更新日志
+nextjs:
+  metadata:
+    title: 更新日志
+    description: Claude Code Hub 各版本更新记录
+---
+
+# 更新日志
+
+本页面记录 Claude Code Hub 各版本的更新内容。
+
+---
+
+## v0.3.17 (2024-11-28)
+
+### 新增
+
+- 新增了某某功能 (#231)
+
+### 优化
+
+- 优化了某某体验 (#232) [@contributor]
+
+### 修复
+
+- 修复了某某问题 (#233)
+
+---
+
+## v0.3.16 (2024-11-27)
+...
+```
+
+### 更新规则
+
+1. 在 `---` 分隔线后、第一个现有版本之前插入新版本
+2. 使用与现有格式一致的 Markdoc 语法
+3. 版本之间用 `---` 分隔线隔开
+
+---
+
+## 任务二:更新功能文档(如需)
+
+根据 `docs_updates_needed` 字段判断是否需要更新其他文档章节。
+
+### 更新原则
+
+1. **保持现有风格**: 与现有文档风格保持一致
+2. **增量更新**: 只更新相关部分,不重写整个文档
+3. **标注版本**: 如果是新功能,可以标注 `(v0.x.x 新增)`
+4. **更新目录**: 如果添加了新章节,确保导航结构正确
+
+### 新增章节(如需)
+
+如果是重大新功能,可能需要新增文档章节。新增时:
+
+1. 在 `docs-site/src/app/docs/` 下创建新目录
+2. 创建 `page.md` 文件
+3. 更新 `docs-site/src/lib/navigation.ts` 添加导航项
+
+---
+
+## 输出格式
+
+请输出需要修改的文件列表及其新内容:
+
+```json
+{
+  "files": [
+    {
+      "path": "docs-site/src/app/docs/changelog/page.md",
+      "action": "update",
+      "content": "完整的文件内容..."
+    },
+    {
+      "path": "docs-site/src/app/docs/providers/page.md",
+      "action": "update",
+      "content": "完整的文件内容..."
+    }
+  ]
+}
+```
+
+如果只需要更新 changelog:
+
+```json
+{
+  "files": [
+    {
+      "path": "docs-site/src/app/docs/changelog/page.md",
+      "action": "update",
+      "content": "完整的文件内容..."
+    }
+  ]
+}
+```
+
+---
+
+## 注意事项
+
+1. **Markdoc 语法**: 使用正确的 Markdoc 语法,注意 frontmatter 格式
+2. **链接格式**: PR 链接使用 `(#123)` 格式
+3. **日期格式**: 使用 `YYYY-MM-DD` 格式
+4. **保持完整性**: 输出完整的文件内容,而非 diff

+ 134 - 0
.github/prompts/release-analysis.md

@@ -0,0 +1,134 @@
+# Release 变更分析 Prompt
+
+你是 Claude Code Hub 项目的发布文档专家。请分析以下代码变更并生成结构化的变更报告。
+
+## 版本信息
+
+- 当前版本: {{ NEW_TAG }}
+- 上一版本: {{ PREV_TAG }}
+- 发布日期: {{ DATE }}
+
+## Commit 列表
+
+{{ COMMITS }}
+
+## 代码 Diff (摘要)
+
+{{ DIFF }}
+
+---
+
+## 任务要求
+
+### 1. 深度分析每个变更
+
+请仔细阅读每个 commit 和代码 diff,识别以下类型的变更:
+
+- **用户可感知的功能变更**: 新功能、UI 改进、新 API 端点
+- **破坏性变更**: API 变更、配置项变更、数据库迁移、不兼容的改动
+- **配置/部署变更**: 新环境变量、Docker 配置、部署流程变化
+- **性能/安全改进**: 性能优化、安全加固
+
+### 2. 分类标准
+
+将变更分为以下四类:
+
+| 类型     | 包含内容                                     |
+| -------- | -------------------------------------------- |
+| **新增** | 新功能、新 API、新配置项、新组件             |
+| **优化** | 性能改进、体验改进、功能增强、UI 优化        |
+| **修复** | Bug 修复、问题解决、错误处理改进             |
+| **其他** | 文档更新、构建配置、重构、依赖更新、代码清理 |
+
+### 3. 关联信息提取
+
+- **PR/Issue 编号**: 从 commit message 中提取 `#123` 格式的引用
+- **外部贡献者**: 非 `ding113` 的 commit 作者视为外部贡献者
+
+### 4. 文档更新建议
+
+分析变更是否需要更新在线文档的某个章节。现有文档章节包括:
+
+- `getting-started`: 快速开始、安装部署
+- `installation`: 详细安装指南
+- `docker-deployment`: Docker 部署
+- `configuration`: 配置说明
+- `environment-variables`: 环境变量
+- `providers`: 供应商管理
+- `users-keys`: 用户与 API Key
+- `rate-limiting`: 限流配置
+- `monitoring`: 监控与日志
+- `api-reference`: API 参考
+- `troubleshooting`: 故障排查
+
+---
+
+## 输出格式
+
+请输出以下 JSON 格式的变更报告:
+
+```json
+{
+  "version": "v0.x.x",
+  "date": "YYYY-MM-DD",
+  "summary": "本次发布的一句话摘要",
+  "changes": {
+    "新增": [
+      {
+        "description": "功能描述(简洁但完整)",
+        "pr": "#123",
+        "contributor": null
+      },
+      {
+        "description": "另一个新功能",
+        "pr": "#124",
+        "contributor": "@external-user"
+      }
+    ],
+    "优化": [
+      {
+        "description": "优化描述",
+        "pr": "#125",
+        "contributor": null
+      }
+    ],
+    "修复": [
+      {
+        "description": "修复描述",
+        "pr": "#126",
+        "contributor": null
+      }
+    ],
+    "其他": [
+      {
+        "description": "其他变更描述",
+        "pr": null,
+        "contributor": null
+      }
+    ]
+  },
+  "breaking_changes": [
+    {
+      "description": "破坏性变更描述",
+      "migration_guide": "迁移指南或升级步骤"
+    }
+  ],
+  "docs_updates_needed": [
+    {
+      "section": "providers",
+      "reason": "新增了 XXX 供应商类型,需要更新供应商管理文档"
+    }
+  ],
+  "highlights": ["亮点功能 1", "亮点功能 2"]
+}
+```
+
+---
+
+## 注意事项
+
+1. **描述要简洁但完整**: 用一句话说明变更内容,让用户能快速理解
+2. **避免技术细节**: 除非是面向开发者的 API 变更,否则避免过多代码细节
+3. **突出用户价值**: 强调变更对用户的实际影响
+4. **正确归类**: 确保变更归类准确,不要把 Bug 修复归类为新功能
+5. **破坏性变更必须标注**: 任何可能影响现有用户的不兼容变更都要在 `breaking_changes` 中说明

+ 107 - 0
.github/prompts/release-notes.md

@@ -0,0 +1,107 @@
+# GitHub Release Notes 生成 Prompt
+
+你是 Claude Code Hub 项目的发布说明撰写专家。请根据变更报告生成适合 GitHub Release 的发布说明。
+
+## 变更报告
+
+{{ CHANGES_JSON }}
+
+---
+
+## 任务要求
+
+### 1. 发布说明结构
+
+生成的发布说明应包含以下部分:
+
+1. **开头**: 一句话版本摘要
+2. **亮点**: 突出 2-3 个最重要的变更(如有)
+3. **变更列表**: 分类列出所有变更
+4. **破坏性变更**: 如有,单独列出并提供升级指南
+5. **贡献者致谢**: 感谢外部贡献者
+
+### 2. 格式模板
+
+```markdown
+## Claude Code Hub {{ VERSION }}
+
+{{ SUMMARY }}
+
+{{ HIGHLIGHTS_SECTION }}
+
+### 新增
+
+- 功能描述 (#PR)
+
+### 优化
+
+- 优化描述 (#PR)
+
+### 修复
+
+- 修复描述 (#PR)
+
+### 其他
+
+- 其他变更
+
+{{ BREAKING_CHANGES_SECTION }}
+
+{{ CONTRIBUTORS_SECTION }}
+
+---
+
+**Full Changelog**: https://github.com/ding113/claude-code-hub/compare/{{ PREV_TAG }}...{{ NEW_TAG }}
+```
+
+### 3. 亮点部分(如有重要变更)
+
+```markdown
+### 亮点
+
+- **功能名称**: 简短描述这个功能的价值和用途
+- **另一个亮点**: 描述
+```
+
+### 4. 破坏性变更部分(如有)
+
+```markdown
+### 破坏性变更
+
+本版本包含以下不兼容的变更,升级前请注意:
+
+#### 变更名称
+
+变更描述
+
+**升级步骤**:
+
+1. 步骤 1
+2. 步骤 2
+```
+
+### 5. 贡献者致谢(如有外部贡献者)
+
+```markdown
+### 贡献者
+
+感谢以下贡献者对本版本的贡献:
+
+- @contributor1
+- @contributor2
+```
+
+---
+
+## 风格指南
+
+1. **简洁明了**: 每个条目用一句话说明
+2. **面向用户**: 强调用户价值,而非技术实现
+3. **专业友好**: 保持专业但不失亲和力
+4. **链接完整**: PR 编号使用 `#123` 格式(GitHub 会自动转换为链接)
+
+---
+
+## 输出格式
+
+请直接输出 Markdown 格式的发布说明内容,不需要代码块包裹。

+ 0 - 103
.github/workflows/claude-pr-changelog.yml

@@ -1,103 +0,0 @@
-name: Claude PR Changelog
-
-on:
-  pull_request:
-    types: [closed]
-
-jobs:
-  pr-changelog:
-    # Only run when PR is merged
-    if: github.event.pull_request.merged == true
-    runs-on: ubuntu-latest
-    timeout-minutes: 10
-    permissions:
-      contents: write
-      pull-requests: write
-
-    steps:
-      - name: Checkout repository
-        uses: actions/checkout@v5
-        with:
-          fetch-depth: 0
-          ref: ${{ github.event.pull_request.base.ref }}
-
-      - name: Run Claude Code for Changelog Generation
-        uses: anthropics/claude-code-action@v1
-        env:
-          ANTHROPIC_BASE_URL: ${{ secrets.ANTHROPIC_BASE_URL }}
-        with:
-          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
-          github_token: ${{ secrets.GH_PAT }}
-
-          prompt: |
-            You are a changelog generator for the repository ${{ github.repository }}.
-
-            Task: Update CHANGELOG.md with entry for merged PR #${{ github.event.pull_request.number }}.
-
-            ## Instructions:
-
-            1. **Get PR information**:
-               ```bash
-               gh pr view ${{ github.event.pull_request.number }} --json title,body,labels,author
-               ```
-
-            2. **Read current changelog**:
-               ```bash
-               cat CHANGELOG.md 2>/dev/null || echo "# Changelog"
-               ```
-
-            3. **Determine change category** based on PR labels:
-               - `feature` → **Added**
-               - `enhancement` → **Changed**
-               - `bug` → **Fixed**
-               - `documentation` → **Documentation**
-               - `refactor` → **Refactored**
-               - `breaking-change` → **Breaking Changes**
-               - `chore` → **Maintenance**
-               - Default → **Changed**
-
-            4. **Generate changelog entry**:
-               Format: `- [Category] Brief description (#PR_NUMBER) @author`
-
-            5. **Update CHANGELOG.md**:
-               - If there's an "Unreleased" section, add the entry there
-               - If not, create one at the top
-               - Keep existing entries intact
-
-            6. **Commit the change**:
-               ```bash
-               git config user.name "github-actions[bot]"
-               git config user.email "github-actions[bot]@users.noreply.github.com"
-               git add CHANGELOG.md
-               git commit -m "docs: update changelog for PR #${{ github.event.pull_request.number }}"
-               git push
-               ```
-
-            ## Changelog Format:
-            ```markdown
-            # Changelog
-
-            ## [Unreleased]
-
-            ### Added
-            - New feature description (#123) @username
-
-            ### Changed
-            - Enhancement description (#124) @username
-
-            ### Fixed
-            - Bug fix description (#125) @username
-
-            ## [1.0.0] - 2024-01-01
-            ...
-            ```
-
-            ## Guidelines:
-            - Keep entries concise (one line)
-            - Use present tense ("Add" not "Added")
-            - Include PR number and author
-            - Don't duplicate existing entries
-            - Skip PRs with "skip-changelog" label
-
-          claude_args: "--max-turns 999 --allowedTools Read,Write,Edit,Bash(gh:*),Bash(git:*),Bash(cat:*)"
-          use_commit_signing: false

+ 0 - 114
.github/workflows/claude-release-notes.yml

@@ -1,114 +0,0 @@
-name: Claude Release Notes
-
-on:
-  release:
-    types: [created]
-
-jobs:
-  release-notes:
-    runs-on: ubuntu-latest
-    timeout-minutes: 10
-    permissions:
-      contents: write
-
-    steps:
-      - name: Checkout repository
-        uses: actions/checkout@v5
-        with:
-          fetch-depth: 0
-
-      - name: Run Claude Code for Release Notes
-        uses: anthropics/claude-code-action@v1
-        env:
-          ANTHROPIC_BASE_URL: ${{ secrets.ANTHROPIC_BASE_URL }}
-        with:
-          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
-          github_token: ${{ secrets.GH_PAT }}
-
-          prompt: |
-            You are a release notes generator for the repository ${{ github.repository }}.
-
-            Task: Generate comprehensive release notes for release ${{ github.event.release.tag_name }}.
-
-            ## Instructions:
-
-            1. **Get release information**:
-               ```bash
-               gh release view ${{ github.event.release.tag_name }}
-               ```
-
-            2. **Get commits since last release**:
-               ```bash
-               # Find previous tag
-               git tag --sort=-version:refname | head -n 2
-
-               # Get commits between tags
-               git log PREVIOUS_TAG..${{ github.event.release.tag_name }} --oneline
-               ```
-
-            3. **Get merged PRs since last release**:
-               ```bash
-               gh pr list --state merged --base main --json number,title,labels,author --limit 100
-               ```
-
-            4. **Categorize changes**:
-               - 🚀 **Features**: New functionality
-               - 🐛 **Bug Fixes**: Fixed issues
-               - ⚡ **Performance**: Speed improvements
-               - 🔒 **Security**: Security fixes
-               - 📝 **Documentation**: Doc updates
-               - 🏗️ **Refactoring**: Code improvements
-               - 🔧 **Maintenance**: Chores, dependencies
-
-            5. **Generate release notes**:
-               ```bash
-               gh release edit ${{ github.event.release.tag_name }} --notes "Your notes"
-               ```
-
-            ## Release Notes Format:
-            ```markdown
-            ## What's Changed
-
-            ### 🚀 Features
-            - Feature description (#PR) @author
-
-            ### 🐛 Bug Fixes
-            - Fix description (#PR) @author
-
-            ### ⚡ Performance
-            - Improvement description (#PR) @author
-
-            ### 🔒 Security
-            - Security fix description (#PR) @author
-
-            ### 📝 Documentation
-            - Doc update description (#PR) @author
-
-            ### 🏗️ Refactoring
-            - Refactor description (#PR) @author
-
-            ### 🔧 Maintenance
-            - Chore description (#PR) @author
-
-            ## Breaking Changes
-            - [List any breaking changes with migration guide]
-
-            ## Contributors
-            @user1, @user2, @user3
-
-            ## Upgrade Guide
-            [If applicable, how to upgrade from previous version]
-
-            ---
-            **Full Changelog**: https://github.com/${{ github.repository }}/compare/PREVIOUS_TAG...${{ github.event.release.tag_name }}
-            ```
-
-            ## Guidelines:
-            - Include all significant changes
-            - Credit PR authors
-            - Highlight breaking changes prominently
-            - Include upgrade instructions if needed
-            - Link to relevant PRs and issues
-
-          claude_args: "--max-turns 999 --allowedTools Read,Bash(gh:*),Bash(git:*)"
-          use_commit_signing: false

+ 217 - 0
.github/workflows/claude-unified-docs.yml

@@ -0,0 +1,217 @@
+name: Claude Unified Documentation
+
+on:
+  release:
+    types: [published]
+
+  # 允许手动触发(用于重新生成文档)
+  workflow_dispatch:
+    inputs:
+      tag_name:
+        description: "Release tag name (e.g., v0.3.17)"
+        required: true
+        type: string
+
+concurrency:
+  group: unified-docs-${{ github.event.release.tag_name || github.event.inputs.tag_name }}
+  cancel-in-progress: true
+
+jobs:
+  unified-documentation:
+    runs-on: ubuntu-latest
+    timeout-minutes: 30
+    permissions:
+      contents: write
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v4
+        with:
+          fetch-depth: 0
+          token: ${{ secrets.GH_PAT }}
+          submodules: recursive
+
+      - name: Determine release tag
+        id: release_info
+        run: |
+          if [ -n "${{ github.event.inputs.tag_name }}" ]; then
+            TAG="${{ github.event.inputs.tag_name }}"
+          else
+            TAG="${{ github.event.release.tag_name }}"
+          fi
+          echo "tag=$TAG" >> $GITHUB_OUTPUT
+          echo "date=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
+
+          # 获取上一个 tag
+          PREV_TAG=$(git tag --sort=-version:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | grep -v "^$TAG$" | head -n 1)
+          if [ -z "$PREV_TAG" ]; then
+            PREV_TAG=$(git rev-list --max-parents=0 HEAD | head -n 1)
+          fi
+          echo "prev_tag=$PREV_TAG" >> $GITHUB_OUTPUT
+          echo "Current tag: $TAG"
+          echo "Previous tag: $PREV_TAG"
+
+      - name: Gather release context
+        id: context
+        run: |
+          TAG="${{ steps.release_info.outputs.tag }}"
+          PREV_TAG="${{ steps.release_info.outputs.prev_tag }}"
+
+          # 获取 commits
+          echo "Gathering commits from $PREV_TAG to $TAG..."
+          COMMITS=$(git log $PREV_TAG..$TAG --pretty=format:"- %s (%h) by @%an" 2>/dev/null || echo "Initial release")
+          echo "commits<<EOF" >> $GITHUB_OUTPUT
+          echo "$COMMITS" >> $GITHUB_OUTPUT
+          echo "EOF" >> $GITHUB_OUTPUT
+
+          # 获取 diff 摘要(限制大小以避免 token 超限)
+          echo "Gathering diff summary..."
+          DIFF_STAT=$(git diff $PREV_TAG..$TAG --stat 2>/dev/null | tail -50 || echo "No diff available")
+          echo "diff_stat<<EOF" >> $GITHUB_OUTPUT
+          echo "$DIFF_STAT" >> $GITHUB_OUTPUT
+          echo "EOF" >> $GITHUB_OUTPUT
+
+          # 获取变更的文件列表
+          CHANGED_FILES=$(git diff $PREV_TAG..$TAG --name-only 2>/dev/null | head -100 || echo "")
+          echo "changed_files<<EOF" >> $GITHUB_OUTPUT
+          echo "$CHANGED_FILES" >> $GITHUB_OUTPUT
+          echo "EOF" >> $GITHUB_OUTPUT
+
+      - name: Run Claude for Unified Documentation Update
+        uses: anthropics/claude-code-action@v1
+        env:
+          ANTHROPIC_BASE_URL: ${{ secrets.ANTHROPIC_BASE_URL }}
+        with:
+          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
+          github_token: ${{ secrets.GH_PAT }}
+
+          prompt: |
+            你是 Claude Code Hub 项目的发布文档专家。请执行完整的文档更新流程。
+
+            ## 发布信息
+
+            - **当前版本**: ${{ steps.release_info.outputs.tag }}
+            - **上一版本**: ${{ steps.release_info.outputs.prev_tag }}
+            - **发布日期**: ${{ steps.release_info.outputs.date }}
+
+            ## Commits 列表
+
+            ${{ steps.context.outputs.commits }}
+
+            ## 变更的文件
+
+            ${{ steps.context.outputs.changed_files }}
+
+            ## Diff 统计
+
+            ${{ steps.context.outputs.diff_stat }}
+
+            ---
+
+            ## 任务
+
+            请按以下步骤执行文档更新:
+
+            ### Phase 1: 分析变更
+
+            1. 首先阅读 `.github/prompts/release-analysis.md` 了解分析要求
+            2. 仔细分析上述 commits 和变更文件
+            3. 如有需要,可以读取具体的源代码文件来理解变更
+            4. 生成结构化的变更报告(在心中记录,用于后续步骤)
+
+            变更分类标准:
+            - **新增**: 新功能、新 API、新配置项
+            - **优化**: 性能改进、体验改进、功能增强
+            - **修复**: Bug 修复
+            - **其他**: 文档、构建、重构、依赖更新
+
+            ### Phase 2: 更新三处文档
+
+            #### 2.1 更新 CHANGELOG.md
+
+            1. 读取当前 CHANGELOG.md 文件
+            2. 在文件顶部(标题后)插入新版本条目
+            3. 使用以下格式:
+
+            ```markdown
+            ## ${{ steps.release_info.outputs.tag }} (${{ steps.release_info.outputs.date }})
+
+            ### 新增
+            - 功能描述 (#PR编号)
+
+            ### 优化
+            - 优化描述 (#PR编号) [@贡献者]
+
+            ### 修复
+            - 修复描述 (#PR编号)
+
+            ### 其他
+            - 其他变更描述
+
+            ---
+            ```
+
+            4. 如果某个分类没有内容,跳过该分类
+            5. 保存更新后的 CHANGELOG.md
+
+            #### 2.2 更新 docs-site/src/app/docs/changelog/page.md
+
+            1. 读取当前 docs-site/src/app/docs/changelog/page.md 文件
+            2. 在 `# 更新日志` 标题和第一个 `---` 分隔线后插入新版本条目
+            3. 使用与现有条目相同的 Markdoc 格式
+            4. 保存更新后的文件
+
+            #### 2.3 更新 GitHub Release Notes
+
+            1. 读取 `.github/prompts/release-notes.md` 了解格式要求
+            2. 生成专业的 Release Notes 内容,包含:
+               - 版本摘要
+               - 亮点功能(如有重要变更)
+               - 分类的变更列表
+               - 破坏性变更说明(如有)
+               - 贡献者致谢(如有外部贡献者)
+            3. 使用 `gh release edit` 命令更新 Release Notes:
+               ```bash
+               gh release edit ${{ steps.release_info.outputs.tag }} --notes "生成的内容"
+               ```
+
+            ### Phase 3: 提交变更
+
+            1. 配置 git:
+               ```bash
+               git config user.name "github-actions[bot]"
+               git config user.email "github-actions[bot]@users.noreply.github.com"
+               ```
+
+            2. 提交主仓库的 CHANGELOG.md 变更:
+               ```bash
+               git add CHANGELOG.md
+               git commit -m "docs: update changelog for ${{ steps.release_info.outputs.tag }} [skip ci]"
+               git push origin HEAD:main
+               ```
+
+            3. 提交 docs-site 变更到文档仓库:
+               ```bash
+               cd docs-site
+               git add -A
+               git commit -m "docs: update changelog for ${{ steps.release_info.outputs.tag }}"
+               git push origin HEAD:main
+               cd ..
+               ```
+
+            4. 更新主仓库的 submodule 引用:
+               ```bash
+               git add docs-site
+               git commit -m "chore: update docs-site submodule [skip ci]" || true
+               git push origin HEAD:main || true
+               ```
+
+            ## 重要提示
+
+            - 使用中文分类标题(新增/优化/修复/其他)
+            - 描述要简洁但完整,面向用户
+            - 确保所有文件更新后再提交
+            - 如果某个步骤失败,继续执行其他步骤
+
+          claude_args: "--max-turns 999 --allowedTools Read,Write,Edit,Bash(gh:*),Bash(git:*),Bash(cd:*),Bash(cat:*)"
+          use_commit_signing: false

+ 3 - 31
.github/workflows/release.yml

@@ -196,30 +196,6 @@ jobs:
             git commit -m "chore: sync VERSION file with release ${{ steps.next_version.outputs.new_tag }} [skip ci]"
           fi
 
-      - name: Install git-cliff
-        if: steps.check.outputs.needs_bump == 'true'
-        run: |
-          wget -q https://github.com/orhun/git-cliff/releases/download/v1.4.0/git-cliff-1.4.0-x86_64-unknown-linux-gnu.tar.gz
-          tar -xzf git-cliff-1.4.0-x86_64-unknown-linux-gnu.tar.gz
-          chmod +x git-cliff-1.4.0/git-cliff
-          sudo mv git-cliff-1.4.0/git-cliff /usr/local/bin/
-
-      - name: Generate changelog
-        if: steps.check.outputs.needs_bump == 'true'
-        id: changelog
-        run: |
-          # 获取上一个tag以来的更新日志
-          LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
-          if [ -n "$LATEST_TAG" ]; then
-            # 排除VERSION文件的提交
-            CHANGELOG=$(git-cliff --config .github/cliff.toml $LATEST_TAG..HEAD --strip header | grep -v "bump version" | sed '/^$/d' || echo "- 代码优化和改进")
-          else
-            CHANGELOG=$(git-cliff --config .github/cliff.toml --strip header || echo "- 初始版本发布")
-          fi
-          echo "content<<EOF" >> $GITHUB_OUTPUT
-          echo "$CHANGELOG" >> $GITHUB_OUTPUT
-          echo "EOF" >> $GITHUB_OUTPUT
-
       - name: Create and push tag
         if: steps.check.outputs.needs_bump == 'true'
         run: |
@@ -249,16 +225,12 @@ jobs:
             docker pull ${{ steps.image_names.outputs.ghcr_image }}:latest
             ```
 
-            ## 📦 主要更新
-
-            ${{ steps.changelog.outputs.content }}
-
-            ## 📋 完整更新日志
+            ---
 
-            查看 [所有版本](https://github.com/${{ github.repository }}/releases)
+            📝 详细更新日志将由 Claude 自动生成...
           draft: false
           prerelease: false
-          generate_release_notes: true
+          generate_release_notes: false
 
       # 自动清理旧的tags和releases(保持最近50个)
       - name: Cleanup old tags and releases

+ 5 - 1
.gitignore

@@ -67,4 +67,8 @@ TRANSLATIONS_CHECKLIST.md
 # i18n verification screenshots (temporary)
 /i18n-verification/
 
-/bmad
+/bmad
+
+# docs-site submodule build artifacts
+docs-site/.next/
+docs-site/node_modules/

+ 3 - 0
.gitmodules

@@ -0,0 +1,3 @@
+[submodule "docs-site"]
+	path = docs-site
+	url = https://github.com/ding113/claude-code-hub-docs.git

+ 3 - 0
.prettierignore

@@ -62,3 +62,6 @@ yarn.lock
 coverage
 .vercel
 *.pem
+
+# Documentation submodule
+docs-site

+ 752 - 48
CHANGELOG.md

@@ -1,48 +1,752 @@
-# Changelog
-
-All notable changes to this project will be documented in this file.
-
-## [Unreleased]
-
-### Added
-
-- Add provider availability monitoring dashboard with real-time health status, metrics, and heatmap visualization (#216) @ding113
-- Add smart circuit breaker probing for faster provider recovery with configurable intervals (#216) @ding113
-- Add enhanced provider testing with three-layer validation and preset templates for relay service verification (#216) @ding113
-- Add real-time monitoring big screen dashboard with live metrics, 24h trends, provider slots status, and activity stream (#184) @ding113
-- Add dark mode support with theme switcher in Dashboard and settings pages (#171) @ding113
-- Add MCP (Model Context Protocol) passthrough functionality to forward tool calls to third-party AI services (#193) @ding113
-- Add provider API test improvements with streaming response detection and enhanced error parsing (#199) @ding113
-- Add configurable API test timeout via `API_TEST_TIMEOUT_MS` environment variable (#199) @ding113
-
-### Changed
-
-- Improve provider page performance by fixing N+1 queries and SQL full table scans (#216) @ding113
-- Enhance error parsing with nested error structure support for relay services (#216) @ding113
-- Adjust streaming idle timeout range from 1-120s to 60-600s (0 to disable) (#216) @ding113
-- Add provider-specific User-Agent headers to avoid Cloudflare detection (#210) @ding113
-- Increase provider dialog width to prevent horizontal scrollbar on long model redirect names (#210) @ding113
-- Enhance data dashboard with comprehensive optimizations and improvements (#183) @ding113
-- Update default provider timeout to unlimited for better compatibility (#199) @ding113
-- Adjust streaming silent period timeout from 10s to 300s (#199) @ding113
-- Improve usage records status code color display for better visibility (#199) @ding113
-- Clarify provider response model labeling (#199) @ding113
-
-### Fixed
-
-- Fix API action adapter to pass schema params as positional args instead of object (#232) @ding113
-- Fix availability monitoring Invalid Date error when selecting 15-minute time range (#231) @ding113
-- Fix database migration duplicate enum type creation error (#181) @ding113
-- Fix error handling and status codes in response handler, improve user management page UX (#179) @ding113
-- Fix infinite loop in leaderboard tab switching (#178) @ding113
-- Fix CI failures: Prettier formatting and React Hooks ESLint error in theme-switcher (#173) @ding113
-- Fix Gemini model redirect not working correctly (#199) @ding113
-- Fix model redirect info not being saved to database (#199) @ding113
-- Fix provider multi-tag matching issue (#199) @ding113
-- Fix error rules regex matching and cache refresh issues (#199) @ding113
-- Fix proxy fallback "Body has already been read" error (#199) @ding113
-- Fix ErrorRuleDetector lazy initialization race condition (#199) @ding113
-- Fix Anthropic API test sending duplicate auth headers (#199) @ding113
-- Fix Codex API test request body format (#199) @ding113
-- Fix Pino logger timestamp configuration placement (#199) @ding113
-- Fix data import cross-version compatibility and error prompts (#199) @ding113
+# 更新日志
+
+本页面记录 Claude Code Hub 的所有版本变更,按时间倒序排列。
+
+---
+
+## [v0.3.17](https://github.com/ding113/claude-code-hub/releases/tag/v0.3.17) - 2025-11-29
+
+### 其他
+
+- 修改应用部署端口配置 ([#243](https://github.com/ding113/claude-code-hub/pull/243))
+
+---
+
+## [v0.3.16](https://github.com/ding113/claude-code-hub/releases/tag/v0.3.16) - 2025-11-28
+
+### 新增
+
+- 添加 Overlay 和 Stacked 模式逻辑
+- 添加错误覆盖功能
+
+### 修复
+
+- 优化导航栏翻译,向中文简洁程度看齐
+- 改进 prompt_limit 错误规则的正则匹配 ([#226](https://github.com/ding113/claude-code-hub/pull/226)) ([@sususu98](https://github.com/sususu98))
+- 修复可用性监控 15 分钟时间范围的 Invalid Date 错误 ([#227](https://github.com/ding113/claude-code-hub/issues/227), [#231](https://github.com/ding113/claude-code-hub/pull/231))
+- API action adapter 改用位置参数传递 schema 参数 ([#230](https://github.com/ding113/claude-code-hub/issues/230), [#232](https://github.com/ding113/claude-code-hub/pull/232))
+- 保持多参数 action 的原始行为
+- 处理 bucketSizeMinutes 解析的 NaN 情况
+
+---
+
+## [v0.3.15](https://github.com/ding113/claude-code-hub/releases/tag/v0.3.15) - 2025-11-27
+
+### 修复
+
+- 故障转移后无条件更新 Session 绑定 ([#220](https://github.com/ding113/claude-code-hub/pull/220))
+
+---
+
+## [v0.3.14](https://github.com/ding113/claude-code-hub/releases/tag/v0.3.14) - 2025-11-27
+
+### 修复
+
+- 修复供应商可用性监控页面排序顺序 ([#219](https://github.com/ding113/claude-code-hub/pull/219))
+
+---
+
+## [v0.3.13](https://github.com/ding113/claude-code-hub/releases/tag/v0.3.13) - 2025-11-27
+
+### 新增
+
+- 添加供应商可用性监控模块并简化状态逻辑 ([#216](https://github.com/ding113/claude-code-hub/pull/216))
+
+### 优化
+
+- 优化供应商页面性能 - 修复 N+1 查询和 SQL 全表扫描问题
+- 统一状态标签配色与请求日志一致
+- 使用可选链简化错误提取逻辑
+- 简化内容验证逻辑,直接匹配原始响应体
+- 添加 relay-pulse 项目致谢
+
+### 修复
+
+- 增强错误解析以支持中转服务的嵌套错误结构 ([#212](https://github.com/ding113/claude-code-hub/pull/212)) ([@Silentely](https://github.com/Silentely))
+- 修复响应内容验证失败问题
+- 修复供应商每日用量统计 JSONB 字段名错误
+- 修复流式静默期超时提示与校验规则不一致
+- 修复登录重定向出现双重 locale 前缀问题
+- 补充 zh-TW apiTest 缺失的 8 个翻译键
+- 移除 DialogContent 硬编码的 sm:max-w-lg 宽度限制
+- 修复 PR review 中的多个问题
+
+---
+
+## [v0.3.12](https://github.com/ding113/claude-code-hub/releases/tag/v0.3.12) - 2025-11-26
+
+### 修复
+
+- 调整模型测试免责提醒顺序 ([#208](https://github.com/ding113/claude-code-hub/pull/208)) ([@Silentely](https://github.com/Silentely))
+- 为不同 API 提供商添加特定 User-Agent 以避免 Cloudflare 检测 ([#209](https://github.com/ding113/claude-code-hub/pull/209)) ([@Silentely](https://github.com/Silentely))
+- 同步调整英文和繁体中文版免责提醒顺序
+- 增加服务商弹窗宽度避免模型重定向名称过长时出现横向滚动条
+- 修复模型测试免责提醒显示顺序
+
+---
+
+## [v0.3.11](https://github.com/ding113/claude-code-hub/releases/tag/v0.3.11) - 2025-11-26
+
+### 新增
+
+- 添加计费模型来源配置功能
+
+### 修复
+
+- 修复使用记录时间筛选的时区问题 ([#207](https://github.com/ding113/claude-code-hub/pull/207))
+- 修复 TagInput 组件输入值在失焦时未保存的问题
+- 恢复被误删的迁移文件,修复迁移链一致性
+- 修复数据库迁移冲突,合并 0020-0025 为单一幂等迁移
+- 修复模型重定向显示问题并简化 UI
+- 修复供应商统计归属问题(重试切换后统计错误)
+- Count_tokens 端点错误不计入熔断、不触发供应商切换
+- 修复模型重定向 i18n 翻译键路径错误
+- 优化模型重定向指示器,改为只显示图标
+- 修复模型重定向在供应商切换时未重置的问题
+- 优化 cache_control 错误规则正则以匹配 Anthropic API 格式
+- 补充迁移文件中缺失的 limit_daily_usd 和 daily_reset_time 字段
+
+---
+
+## [v0.3.10](https://github.com/ding113/claude-code-hub/releases/tag/v0.3.10) - 2025-11-25
+
+### 新增
+
+- 实现 MCP 透传功能 ([#157](https://github.com/ding113/claude-code-hub/pull/157), [#193](https://github.com/ding113/claude-code-hub/pull/193)) ([@flintttan](https://github.com/flintttan))
+- 支持 GLM MCP 透传功能及多语言配置
+- 支持解析和处理流式响应数据
+- 增加流式响应信息展示功能
+- 改进供应商 API 测试体验 ([#185](https://github.com/ding113/claude-code-hub/pull/185), [#186](https://github.com/ding113/claude-code-hub/pull/186), [#194](https://github.com/ding113/claude-code-hub/pull/194)) ([@Silentely](https://github.com/Silentely))
+- 添加 API 测试免责声明翻译
+- 增强 API 测试错误解析逻辑
+- 优化使用记录状态码颜色显示 ([#188](https://github.com/ding113/claude-code-hub/issues/188))
+- 调整流式静默期超时默认值从 10 秒改为 300 秒
+- 更新供应商超时配置默认值为不限制
+
+### 修复
+
+- 移除 max_output_tokens 参数以兼容中转服务
+- 调整供应商模型测试提示文本
+- 修复代码审查中发现的关键问题
+- 优化供应商测试和日志系统
+- 解决 Docker 构建失败(排除 Node.js 模块)
+- 添加 webpack externals 处理 Node.js 内置模块
+- 修复 log-time-formatter 的 null 安全问题并添加文档
+- 修复 Gemini 模型重定向无效的问题
+- 增强 MCP 透传的安全性和稳定性
+- 修复供应商 API 测试返回 520 错误的问题
+- 修复代理降级时 Body has already been read 错误
+- Anthropic API 测试同时发送两种认证头
+- 修复 Codex API 测试请求体格式
+- 修正 Pino 日志时间戳配置位置
+- 修复供应商多标签匹配问题 ([#190](https://github.com/ding113/claude-code-hub/issues/190))
+- 修复 Codex 供应商 API 测试失败问题 ([#189](https://github.com/ding113/claude-code-hub/issues/189))
+- 修复模型重定向日志记录问题
+- 修复错误规则正则匹配问题并增强刷新缓存功能
+- 修复 API 测试免责声明翻译键路径错误
+- 修复供应商响应模型标签 ([#197](https://github.com/ding113/claude-code-hub/pull/197)) ([@Silentely](https://github.com/Silentely))
+- 修复数据导入跨版本兼容性和错误提示问题
+- 修复 errorRules.cacheStats i18n 参数不匹配问题
+- 恢复被错误删除的 i18n 字段(descriptionFull/Warning)
+- 修复错误规则版本更新后无法自动同步的问题
+- 修复模型重定向信息未保存到数据库的问题
+- 修复 ErrorRuleDetector 懒初始化的竞态条件
+
+---
+
+## [v0.3.9](https://github.com/ding113/claude-code-hub/releases/tag/v0.3.9) - 2025-11-22
+
+### 新增
+
+- 数据大屏全面优化 ([#183](https://github.com/ding113/claude-code-hub/pull/183), [#184](https://github.com/ding113/claude-code-hub/pull/184))
+
+---
+
+## [v0.3.8](https://github.com/ding113/claude-code-hub/releases/tag/v0.3.8) - 2025-11-22
+
+### 修复
+
+- 用户列表为空时显示添加用户按钮 ([#182](https://github.com/ding113/claude-code-hub/pull/182))
+- 添加缺失的 dailyResetMode 翻译并优化表单布局
+
+---
+
+## [v0.3.7](https://github.com/ding113/claude-code-hub/releases/tag/v0.3.7) - 2025-11-22
+
+### 修复
+
+- 修复数据库迁移枚举类型重复创建错误 ([#181](https://github.com/ding113/claude-code-hub/pull/181))
+
+---
+
+## [v0.3.6](https://github.com/ding113/claude-code-hub/releases/tag/v0.3.6) - 2025-11-22
+
+### 优化
+
+- 优化用户管理页面用户体验
+
+### 修复
+
+- 在数据库存在字段时循环报错 ([#174](https://github.com/ding113/claude-code-hub/pull/174)) ([@Silentely](https://github.com/Silentely))
+- 保持 Schema 和数据库定义的一致性
+- 修复排行榜 Tab 切换无限循环问题 ([#177](https://github.com/ding113/claude-code-hub/issues/177), [#178](https://github.com/ding113/claude-code-hub/pull/178))
+- 修复 Gemini 供应商请求透传 ([#179](https://github.com/ding113/claude-code-hub/pull/179))
+- 改进响应处理器错误处理和状态码
+- 使用 502 Bad Gateway 替代 524 处理上游响应失败
+
+---
+
+## [v0.3.5](https://github.com/ding113/claude-code-hub/releases/tag/v0.3.5) - 2025-11-21
+
+### 新增
+
+- 添加深色模式支持 ([#171](https://github.com/ding113/claude-code-hub/pull/171))
+
+### 优化
+
+- 供应商限额管理页面重构为列表布局 ([#170](https://github.com/ding113/claude-code-hub/pull/170))
+
+### 修复
+
+- 移除 usage-doc 页面重复的语言切换器
+- 解决 PR #170 审阅意见
+- 改进限额 UI 和完成 i18n 翻译
+- 解决深色模式 PR 中的所有评审问题
+- 自动修复 PR 构建检查中的 CI 失败 ([#173](https://github.com/ding113/claude-code-hub/pull/173))
+- 修复供应商限额页面圆环对齐问题
+
+---
+
+## [v0.3.4](https://github.com/ding113/claude-code-hub/releases/tag/v0.3.4) - 2025-11-21
+
+### 新增
+
+- 供应商页面增加排行榜入口 ([#115](https://github.com/ding113/claude-code-hub/issues/115), [#168](https://github.com/ding113/claude-code-hub/pull/168))
+
+### 优化
+
+- 同步密钥表单为双栏布局设计
+
+### 修复
+
+- 在 action-adapter 中强制认证并添加 SSRF 防护
+- 禁用 Claude 工作流中的提交签名以解决 OIDC 认证错误
+- 处理 Gemini Code Assist 审阅反馈
+
+---
+
+## [v0.3.3](https://github.com/ding113/claude-code-hub/releases/tag/v0.3.3) - 2025-11-21
+
+### 新增
+
+- 添加每日成本限额支持,可配置每日重置时间 ([#145](https://github.com/ding113/claude-code-hub/pull/145), [#161](https://github.com/ding113/claude-code-hub/pull/161)) ([@Silentely](https://github.com/Silentely))
+- 添加每日限额重置模式支持(固定时间与滚动窗口)
+- 改进错误响应格式,提供更详细的限流和熔断错误信息
+- 优化供应商错误处理和限流信息展示
+- 添加 dailyResetMode 选择器到编辑密钥表单和配额对话框
+- 细化 review workflows 的提示词为专业评审标准
+
+### 优化
+
+- 为每日限额查询添加部分索引
+- 添加全面的 Redis 键命名文档
+
+### 修复
+
+- 修复每日成本限制重置时间显示问题
+- 修复 provider 选择器中的空指针异常
+- 修复非 Claude 模型请求时的供应商格式错配问题 ([#148](https://github.com/ding113/claude-code-hub/pull/148)) ([@sususu98](https://github.com/sususu98))
+- 移除复制按钮的 hover 透明度效果,修复移动端无法显示的问题 ([#146](https://github.com/ding113/claude-code-hub/issues/146), [#149](https://github.com/ding113/claude-code-hub/pull/149))
+- 修复供应商类型选择器显示错误的模型类型名称
+- 修复 Gemini 和 OpenAI Chat Completions 流式响应的 usage 解析问题 ([#153](https://github.com/ding113/claude-code-hub/pull/153)) ([@sususu98](https://github.com/sususu98))
+- 重新排序数据库迁移文件避免与上游冲突
+- 修复 ErrorRuleDetector 在迁移前启动时的竞态条件问题
+- 添加 limitDailyUsd 验证和 dailyResetMode 参数支持
+- 用 i18n 翻译替换硬编码错误原因
+- 修复 OpenAI Responses API 供应商模型测试 400 问题及优化显示格式 ([#154](https://github.com/ding113/claude-code-hub/pull/154)) ([@Silentely](https://github.com/Silentely))
+- 增强隐私保护,扩展请求头黑名单过滤范围 ([#158](https://github.com/ding113/claude-code-hub/pull/158)) ([@Silentely](https://github.com/Silentely))
+
+---
+
+## [v0.3.2](https://github.com/ding113/claude-code-hub/releases/tag/v0.3.2) - 2025-11-21
+
+### 修复
+
+- 改进使用记录表格布局和 i18n ([#155](https://github.com/ding113/claude-code-hub/pull/155)) ([@miraserver](https://github.com/miraserver))
+
+---
+
+## [v0.3.1](https://github.com/ding113/claude-code-hub/releases/tag/v0.3.1) - 2025-11-20
+
+### 新增
+
+- 完整的 Gemini 支持 ([#142](https://github.com/ding113/claude-code-hub/pull/142))
+- 供应商新增首字节/流式静默/非流式总超时配置 ([#108](https://github.com/ding113/claude-code-hub/pull/108), [#126](https://github.com/ding113/claude-code-hub/pull/126)) ([@sususu98](https://github.com/sususu98))
+- 前端可修改不重试的客户端错误规则
+- 独立的用户管理页面
+- 用户新增 5 小时/周/月美元上限和并发 Session 上限字段 ([#141](https://github.com/ding113/claude-code-hub/pull/141)) ([@sususu98](https://github.com/sususu98))
+- 为系统内达到限额的请求返回 429 响应
+- 可自定义供应商端点路径
+- 供应商 API 连通性测试(Anthropic/OpenAI/OpenAI Responses)([#132](https://github.com/ding113/claude-code-hub/pull/132), [#134](https://github.com/ding113/claude-code-hub/pull/134)) ([@Silentely](https://github.com/Silentely))
+- 支持用户导入/导出功能
+- 实现分组管理的可视化标签输入功能
+- 添加 Gemini CLI 使用指南
+- Gemini 供应商支持及 i18n 和模型过滤
+- 端点优先格式检测 + 智能 URL 拼接预览
+- 添加开发环境 Dockerfile.dev ([#143](https://github.com/ding113/claude-code-hub/pull/143)) ([@sususu98](https://github.com/sususu98))
+
+### 优化
+
+- 模型重定向体验 ([#135](https://github.com/ding113/claude-code-hub/pull/135))
+- 若干 i18n 优化
+- 从 pnpm 迁移到 Bun 1.3.2
+- 价格表导入和同步提示优化
+- 限额编辑对话框滚动布局和双栏网格优化
+- URL 预览组件优化
+- 用户创建弹框 UI 布局优化
+
+### 修复
+
+- 改进 ProxyForwarder 超时问题的错误日志
+- 添加新的 thinking 格式错误模式
+- 导入导出用户翻译修复
+- 修复多个组件中 useCallback 依赖数组缺失 t 和其他函数的问题
+- 将 undici 从 devDependencies 移到 dependencies
+- 移除 API 测试按钮组件中不必要的最大宽度限制
+- 将 require() 替换为 ES6 imports 解决构建错误
+- 解决 Next.js 构建中 File is not defined 错误
+- 应用启动时初始化默认错误规则
+- 添加错误规则设置缺失的 i18n 键
+- 修复流式请求错误处理时的 orphan records 问题 ([#137](https://github.com/ding113/claude-code-hub/pull/137)) ([@sususu98](https://github.com/sususu98))
+- 解决所有 PR 审阅问题 - 安全、UX 和代码质量 ([#136](https://github.com/ding113/claude-code-hub/pull/136))
+- 修复 HTTP 访问时无法复制密钥的问题
+- 添加缺失的 'gemini' 供应商类型到验证 schema
+- 添加 Gemini API 认证支持 (x-goog-api-key)
+- Gemini 模型名称检测
+- 修正 Gemini CLI URL 构造以包含 /models/{model} 路径
+- 完成 Gemini 集成 - 支持消息解析和 token 使用量提取
+- 增强 CCR 提供商代理模型匹配能力
+- 修复 Gemini adapter 类型错误并删除未使用的翻译
+- 修复 notifications i18n 翻译问题
+- 修复模型重定向标记不显示的 bug 并在决策链中记录重定向信息
+
+---
+
+## [v0.2.41](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.41) - 2025-11-18
+
+### 修复
+
+- 移除网络地址检测的日志输出
+
+---
+
+## [v0.2.40](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.40) - 2025-11-18
+
+### 新增
+
+- 添加 Linux/macOS/Windows 一键部署脚本
+
+---
+
+## [v0.2.39](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.39) - 2025-11-17
+
+### 其他
+
+- 版本发布
+
+---
+
+## [v0.2.38](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.38) - 2025-11-15
+
+### 新增
+
+- 添加供应商组件多语言支持
+
+### 修复
+
+- 添加新的 thinking 格式错误模式 ([#124](https://github.com/ding113/claude-code-hub/pull/124)) ([@sususu98](https://github.com/sususu98))
+- 修复中止的代理流终结问题 ([#125](https://github.com/ding113/claude-code-hub/pull/125)) ([@JillVernus](https://github.com/JillVernus))
+
+---
+
+## [v0.2.37](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.37) - 2025-11-11
+
+### 新增
+
+- 引入可配置的 Guard Pipeline 系统 ([#105](https://github.com/ding113/claude-code-hub/pull/105), [#106](https://github.com/ding113/claude-code-hub/pull/106))
+
+### 修复
+
+- 修正供应商类型翻译命名空间
+
+---
+
+## [v0.2.36](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.36) - 2025-11-11
+
+### 新增
+
+- 重构应用为完整 i18n 多语言支持 ([#103](https://github.com/ding113/claude-code-hub/issues/103))
+- 实现 3 语言支持:英语、简体中文、繁体中文
+- 智能 Markdown 渲染改进
+- 表单改进和增强验证
+- 添加 Codex 供应商支持
+
+### 优化
+
+- 为提供商表单添加带占位符的清晰端点 URL 预览
+- 删除未使用的仪表板组件和设置文件
+- 用翻译项替换硬编码导航项
+
+### 修复
+
+- 改进 locale 类型处理和更新 link 组件
+- 自动修复 PR 构建检查中的 CI 失败
+- 用翻译键替换 users.ts 中的硬编码中文字符串
+- 修正设置导航中的翻译键不匹配
+- 修正 provider-form-temp.json 中的 JSON 语法错误
+- 更新用户操作中的错误日志消息
+- 添加所有 locale 的缺失 provider-chain 翻译键
+- 在所有 locale 索引文件中注册 provider-chain 命名空间
+- 为所有错误返回添加 errorCode 并修复硬编码 locale
+- 重构 data.guide 翻译为嵌套格式
+- 用 'all' 值替换端点过滤 SelectItem 中的空字符串
+
+---
+
+## [v0.2.34](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.34) - 2025-11-09
+
+### 新增
+
+- 扩展不可重试的客户端错误定义和模式
+
+### 修复
+
+- 修复流式响应中的 usage tokens 提取 ([#82](https://github.com/ding113/claude-code-hub/issues/82))
+- 修复 CircuitBreaker 请求计数器竞态条件 ([#81](https://github.com/ding113/claude-code-hub/pull/81))
+
+---
+
+## [v0.2.33](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.33) - 2025-11-07
+
+### 优化
+
+- 将版本 badge 移到卡片内部
+- 将供应商自定义端点字段宽度增加到 sm:w-[350px]
+- 添加 Codex 供应商类型及预览支持
+
+---
+
+## [v0.2.32](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.32) - 2025-11-07
+
+### 新增
+
+- 添加 Codex 供应商类型支持
+
+---
+
+## [v0.2.31](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.31) - 2025-11-06
+
+### 优化
+
+- 设置更保守的默认流式超时
+- 优化状态验证逻辑
+- 移除连续失败重置逻辑(由成功计数器处理)
+- 修正失败计数器递增时机
+- 统一状态转换日志格式
+
+### 修复
+
+- 修复熔断器在熔断状态下的错误分类问题
+- 修复 providerId 在日志中丢失的问题
+- 修复错误引用导致的 lint 警告
+
+---
+
+## [v0.2.30](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.30) - 2025-11-06
+
+### 修复
+
+- 修复使用记录页面供应商列显示问题
+- 修复请求统计供应商正则模式
+- 修正重试状态值以匹配 OpenAI 响应格式
+- 在 ProxyForwarder 中引入非流式响应超时处理
+
+---
+
+## [v0.2.29](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.29) - 2025-11-04
+
+### 新增
+
+- 实现供应商级别 token 限制功能 ([#62](https://github.com/ding113/claude-code-hub/pull/62))
+- 每日 session 限制改进
+
+### 优化
+
+- 添加精细限额用量查询
+- 优化用户页面,用 sheet 替代跳转显示活跃 sessions 详情
+- 为活跃会话添加刷新按钮
+
+### 修复
+
+- 修复创建供应商时 tags 字段保存失败的问题
+
+---
+
+## [v0.2.28](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.28) - 2025-11-02
+
+### 新增
+
+- 添加 user_id 过滤并实现更多 session 清理方法
+
+---
+
+## [v0.2.27](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.27) - 2025-11-02
+
+### 新增
+
+- 添加使用记录筛选功能 ([#57](https://github.com/ding113/claude-code-hub/issues/57))
+
+### 修复
+
+- 修复 usage-logs-table 构建错误
+
+---
+
+## [v0.2.26](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.26) - 2025-11-02
+
+### 新增
+
+- 添加全局用户限额预警支持 ([#55](https://github.com/ding113/claude-code-hub/pull/55))
+
+---
+
+## [v0.2.25](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.25) - 2025-11-02
+
+### 新增
+
+- 供应商选择偏好设置增强 ([#49](https://github.com/ding113/claude-code-hub/pull/49))
+
+### 修复
+
+- 修复使用 Drizzle schema 替代 Redis sessions 查询后消失的 logout 功能
+
+---
+
+## [v0.2.24](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.24) - 2025-11-02
+
+### 新增
+
+- 支持模型重定向 ([#46](https://github.com/ding113/claude-code-hub/issues/46))
+
+### 修复
+
+- 修复对话 token 不计入用户使用统计的问题
+- 修复使用 Drizzle schema 替代 Redis sessions 后 logout 功能失效
+
+---
+
+## [v0.2.23](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.23) - 2025-11-01
+
+### 新增
+
+- 添加自定义端点 URL 后缀支持 ([#41](https://github.com/ding113/claude-code-hub/issues/41))
+- 支持 OpenAI Response API ([#41](https://github.com/ding113/claude-code-hub/issues/41))
+
+---
+
+## [v0.2.22](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.22) - 2025-11-01
+
+### 新增
+
+- 添加模型定价管理 ([#39](https://github.com/ding113/claude-code-hub/pull/39))
+- 添加供应商标签路由功能 ([#40](https://github.com/ding113/claude-code-hub/issues/40))
+
+---
+
+## [v0.2.13](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.13) - 2025-10-31
+
+### 优化
+
+- 改进 UI 布局
+
+---
+
+## [v0.2.12](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.12) - 2025-10-30
+
+### 新增
+
+- 供应商详情显示增强
+
+### 修复
+
+- 修复 updateSession 在 strict mode 下错误
+- 修复重复 session 导致的问题
+- 修复对话持久化问题
+
+---
+
+## [v0.2.11](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.11) - 2025-10-29
+
+### 新增
+
+- 添加对话记录功能
+
+### 修复
+
+- 修复 session 更新
+
+---
+
+## [v0.2.10](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.10) - 2025-10-29
+
+### 新增
+
+- 用户供应商偏好设置 ([#30](https://github.com/ding113/claude-code-hub/pull/30))
+- 添加用户级别限额支持
+
+---
+
+## [v0.2.6](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.6) - 2025-10-27
+
+### 新增
+
+- 支持 Batch API ([#25](https://github.com/ding113/claude-code-hub/pull/25))
+- 添加 OpenAI 兼容 API
+
+### 优化
+
+- 优化首页展示
+- 美化 error page
+
+---
+
+## [v0.2.5](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.5) - 2025-10-27
+
+### 优化
+
+- 优化 dashboard stats
+
+---
+
+## [v0.2.4](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.4) - 2025-10-27
+
+### 优化
+
+- 根据审查意见改进代码
+
+---
+
+## [v0.2.3](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.3) - 2025-10-27
+
+### 修复
+
+- 修正接口前缀错误
+
+---
+
+## [v0.2.2](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.2) - 2025-10-27
+
+### 新增
+
+- 支持按分钟统计 ([#21](https://github.com/ding113/claude-code-hub/issues/21))
+
+---
+
+## [v0.2.1](https://github.com/ding113/claude-code-hub/releases/tag/v0.2.1) - 2025-10-27
+
+### 新增
+
+- 添加熔断器机制
+
+---
+
+## [v0.1.52](https://github.com/ding113/claude-code-hub/releases/tag/v0.1.52) - 2025-10-25
+
+### 新增
+
+- 添加密钥管理功能
+
+### 修复
+
+- 修复 SSE 处理问题
+
+---
+
+## [v0.1.51](https://github.com/ding113/claude-code-hub/releases/tag/v0.1.51) - 2025-10-25
+
+### 新增
+
+- 核心代理功能
+- 供应商管理
+- 用户认证
+
+---
+
+## 如何升级
+
+### Docker Compose 升级
+
+```bash
+# 拉取最新镜像并重启
+docker compose pull && docker compose up -d
+
+# 查看更新后的日志
+docker compose logs -f app
+```
+
+### 一键部署脚本升级
+
+重新运行部署脚本,会自动检测并升级:
+
+```bash
+./deploy.sh
+```
+
+{% callout type="warning" title="升级前备份" %}
+建议在升级前备份数据库:
+```bash
+docker compose exec postgres pg_dump -U postgres claude_code_hub > backup.sql
+```
+{% /callout %}
+
+---
+
+## 版本兼容性
+
+### 数据库迁移
+
+- 升级时会自动执行数据库迁移(`AUTO_MIGRATE=true`)
+- 生产环境建议手动检查迁移内容后执行
+- 迁移脚本位于 `drizzle/` 目录
+
+### 配置变更
+
+新版本可能引入新的环境变量或变更默认值:
+
+- 查看 `.env.example` 了解新增配置
+- 查看 CHANGELOG 中的 **优化** 部分了解行为变更
+
+### API 兼容性
+
+- 次版本升级保持 API 向后兼容
+- 主版本升级可能包含不兼容变更,请查看 **Breaking Changes**
+
+---
+
+## 反馈与贡献
+
+- **发现 Bug**:[提交 Issue](https://github.com/ding113/claude-code-hub/issues/new)
+- **功能建议**:[参与讨论](https://github.com/ding113/claude-code-hub/discussions)
+- **贡献代码**:[阅读贡献指南](https://github.com/ding113/claude-code-hub/blob/main/CONTRIBUTING.md)
+
+---
+
+## 贡献者
+
+感谢所有外部贡献者的付出:
+
+- [@Silentely](https://github.com/Silentely)
+- [@sususu98](https://github.com/sususu98)
+- [@flintttan](https://github.com/flintttan)
+- [@JillVernus](https://github.com/JillVernus)
+- [@miraserver](https://github.com/miraserver)

+ 1 - 1
tsconfig.json

@@ -24,5 +24,5 @@
     }
   },
   "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
-  "exclude": ["node_modules", "src/components/ui/**", "tests/**"]
+  "exclude": ["node_modules", "src/components/ui/**", "tests/**", "docs-site"]
 }