1. 02 Feb, 2026 1 commit
    • bayma888's avatar
      feat(admin): add user balance/concurrency history modal · 606e29d3
      bayma888 authored
      - Add new API endpoint GET /admin/users/:id/balance-history with pagination and type filter
      - Add SumPositiveBalanceByUser for calculating total recharged amount
      - Create UserBalanceHistoryModal component with:
        - User info header (email, username, created_at, current balance, notes, total recharged)
        - Type filter dropdown (all/balance/admin_balance/concurrency/admin_concurrency/subscription)
        - Quick deposit/withdraw buttons
        - Paginated history list with icons and colored values
      - Add instant tooltip on balance column for better UX
      - Add z-index prop to BaseDialog for modal stacking control
      - Update i18n translations (zh/en)
      606e29d3
  2. 28 Jan, 2026 1 commit
  3. 26 Jan, 2026 1 commit
    • shaw's avatar
      feat(auth): 实现 TOTP 双因素认证功能 · 1245f07a
      shaw authored
      新增功能:
      - 支持 Google Authenticator 等应用进行 TOTP 二次验证
      - 用户可在个人设置中启用/禁用 2FA
      - 登录时支持 TOTP 验证流程
      - 管理后台可全局开关 TOTP 功能
      
      安全增强:
      - TOTP 密钥使用 AES-256-GCM 加密存储
      - 添加 TOTP_ENCRYPTION_KEY 配置项,必须手动配置才能启用功能
      - 防止服务重启导致加密密钥变更使用户无法登录
      - 验证失败次数限制,防止暴力破解
      
      配置说明:
      - Docker 部署:在 .env 中设置 TOTP_ENCRYPTION_KEY
      - 非 Docker 部署:在 config.yaml 中设置 totp.encryption_key
      - 生成密钥命令:openssl rand -hex 32
      1245f07a
  4. 24 Jan, 2026 3 commits
    • Ubuntu's avatar
      fix(oauth): 彻底修复 project_id 丢失问题 · 716272a1
      Ubuntu authored
      
      
      根本原因:
      - BuildAccountCredentials 只在 project_id 非空时才添加该字段
      - LoadCodeAssist 失败时返回空字符串 → 新 credentials 不包含 project_id 键
      - 普通合并逻辑只保留新 credentials 中不存在的键,无法覆盖空值
      
      解决方案:
      1. 在合并后特殊处理 project_id:如果新值为空但旧值非空,保留旧值
      2. LoadCodeAssist 失败不再返回错误,只记录警告
      3. Token 刷新成功(access_token 已更新)就不应标记账户为 error
      
      改进效果:
      - 即使 LoadCodeAssist 连续失败,已有的 project_id 也不会丢失
      - 避免因临时网络问题将账户误标记为不可用
      - 允许在下次刷新时自动重试获取 project_id
      Co-Authored-By: default avatarClaude Sonnet 4.5 <noreply@anthropic.com>
      716272a1
    • shaw's avatar
      feat(auth): 密码重置邮件队列化与限流优化 · 9cc83525
      shaw authored
      - 邮件发送改为异步队列处理,避免并发导致发送失败
      - 新增 Email 维度限流(30秒冷却期),防止邮件轰炸
      - Token 验证使用常量时间比较,防止时序攻击
      - 重构代码消除冗余,提取公共验证逻辑
      9cc83525
    • shaw's avatar
      feat(subscription): 订阅过期状态自动更新与服务端排序 · b0aa2354
      shaw authored
      - 新增 SubscriptionExpiryService 定时任务,每分钟更新过期订阅状态
      - 订阅列表支持服务端排序(按过期时间、状态、创建时间)
      - 实时显示正确的过期状态,无需等待定时任务
      - 允许对已过期订阅进行续期操作
      - DataTable 组件支持 serverSideSort 模式
      b0aa2354
  5. 22 Jan, 2026 1 commit
  6. 20 Jan, 2026 1 commit
    • shaw's avatar
      feat(promo-code): complete promo code feature implementation · 192efb84
      shaw authored
      - Add promo_code_enabled field to SystemSettings and PublicSettings DTOs
      - Add promo code validation in registration flow
      - Add admin settings UI for promo code configuration
      - Add i18n translations for promo code feature
      192efb84
  7. 19 Jan, 2026 13 commits
  8. 18 Jan, 2026 2 commits
  9. 16 Jan, 2026 5 commits
  10. 15 Jan, 2026 1 commit
  11. 14 Jan, 2026 11 commits
    • IanShaw027's avatar
      feat(ops): 添加用户信息显示和搜索功能 · 2a6fb1e4
      IanShaw027 authored
      - 在错误日志列表和详情中显示用户邮箱
      - 在 GetErrorLogByID 中关联 users 表获取用户邮箱
      - 在 OpsErrorLogFilter 中添加 UserQuery 字段
      - 在 buildOpsErrorLogsWhere 中添加用户邮箱搜索条件
      - 在 GetErrorLogs handler 中支持 user_query 参数
      2a6fb1e4
    • IanShaw027's avatar
      fix(ops): 优化错误日志查询和详情展示 · 9584af5c
      IanShaw027 authored
      - 新增 GetErrorLogByID 接口用于获取单个错误日志详情
      - 优化 GetErrorLogs 过滤逻辑,简化参数处理
      - 简化前端错误详情模态框代码,提升可维护性
      - 更新相关 API 接口和 i18n 翻译
      9584af5c
    • longgexx's avatar
      fix(admin): 修复使用记录页面趋势图筛选联动和日期选择问题 · 806f402b
      longgexx authored
         修复两个问题:
         1. Token使用趋势图和模型分布图未响应筛选条件
         2. 上午时段选择今天刷新后日期回退到前一天
      
         前端修改:
         - 更新 dashboard API 类型定义,添加 model、account_id、group_id、stream 参数支持
         - 修改 UsageView 趋势图加载逻辑,传递所有筛选参数到后端
         - 修复日期格式化函数,使用本地时区避免 UTC 转换导致的日期偏移
      
         后端修改:
         - Handler 层:接收并解析所有筛选参数(model、account_id、group_id、stream)
         - Service 层:传递完整的筛选参数到 Repository 层
         - Repository 层:SQL 查询动态添加所有过滤条件
         - 更新接口定义和所有调用点以保持一致性
      
         影响范围:
         - /admin/dashboard/trend 端点现支持完整筛选
         - /admin/dashboard/models 端点现支持完整筛选
         - 用户在后台使用记录页面选择任意筛选条件时,趋势图和模型分布图会实时响应
         - 日期选择器在任何时区下都能正确保持今天的选择
      806f402b
    • LLLLLLiulei's avatar
      feat: enhance proxy management · 9bdb45be
      LLLLLLiulei authored
      9bdb45be
    • IanShaw027's avatar
      fix(ops): 优化错误日志过滤和查询逻辑 · 55e469c7
      IanShaw027 authored
      后端改动:
      - 添加 resolved 参数默认值处理(向后兼容,默认显示未解决错误)
      - 新增 status_codes_other 查询参数支持
      - 移除 service 层的高级设置过滤逻辑,简化错误日志查询流程
      
      前端改动:
      - 完善错误日志相关组件的国际化支持
      - 优化 Ops 监控面板和设置对话框的用户体验
      55e469c7
    • 墨颜's avatar
      feat(计费): 支持账号计费倍率快照与统计展示 · fb99ceac
      墨颜 authored
      - 新增 accounts.rate_multiplier(默认 1.0,允许 0)
      - 使用 usage_logs.account_rate_multiplier 记录倍率快照,避免历史回算
      - 统计/导出/管理端展示账号口径费用(total_cost * account_rate_multiplier)
      fb99ceac
    • IanShaw027's avatar
      fix(ops): 修复ops handler逻辑 · 8d076735
      IanShaw027 authored
      8d076735
    • IanShaw027's avatar
      feat(ops): 添加ops handler和路由配置 · 7c4309ea
      IanShaw027 authored
      7c4309ea
    • IanShaw027's avatar
      refactor(ops): 移除duration相关告警指标,简化监控配置 · 18268381
      IanShaw027 authored
      主要改动:
      - 移除 p95_latency_ms 和 p99_latency_ms 告警指标类型
      - 移除配置中的 latency_p99_ms_max 阈值设置
      - 简化健康分数计算(移除latency权重,重新归一化SLA和错误率)
      - 移除duration相关的诊断规则和阈值检查
      - 统一术语:延迟 → 请求时长
      - 保留duration数据展示,但不再用于告警判断
      - 聚焦TTFT作为主要的响应速度告警指标
      
      影响范围:
      - Backend: handler, service, models, tests
      - Frontend: API types, i18n, components
      18268381
    • IanShaw027's avatar
      fix(ops): 修复告警状态验证和错误处理逻辑 · 33f58d58
      IanShaw027 authored
      - 增强告警事件状态验证,添加合法状态值检查
      - 移除重试逻辑中的遗留字段赋值
      - 修正仓库不可用时的错误类型
      - 格式化测试文件代码
      33f58d58
    • IanShaw027's avatar
      feat(handler): 新增ops管理接口和路由 · 659df6e2
      IanShaw027 authored
      - 添加告警静默管理接口
      - 扩展错误日志查询和操作接口
      - 新增重试和解决状态相关端点
      - 完善错误日志记录功能
      659df6e2