"frontend/src/views/vscode:/vscode.git/clone" did not exist on "06093d4f79a6bf4968693b370ae40211764d88fc"
  1. 04 Mar, 2026 3 commits
  2. 03 Mar, 2026 2 commits
    • shaw's avatar
      feat: apikey支持5h/1d/7d速率控制 · a80ec5d8
      shaw authored
      a80ec5d8
    • erio's avatar
      fix(frontend): admin custom menu items not showing in sidebar · 5ba71cd2
      erio authored
      The public settings API filters out menu items with visibility='admin',
      so customMenuItemsForAdmin was always empty when reading from
      cachedPublicSettings. Fix by loading custom menu items from the admin
      settings API (via adminSettingsStore) which returns all items unfiltered.
      
      Changes:
      - adminSettings store: store custom_menu_items from admin settings API
      - AppSidebar: read admin menu items from adminSettingsStore instead of
        cachedPublicSettings
      - CustomPageView: merge public and admin menu items so admin users can
        access admin-only custom pages
      5ba71cd2
  3. 02 Mar, 2026 2 commits
    • erio's avatar
      fix: custom menu security hardening and code quality improvements · bf6fe5e9
      erio authored
      
      
      - Add admin menu permission check in CustomPageView (visibility + role)
      - Sanitize SVG content with DOMPurify before v-html rendering (XSS prevention)
      - Decouple router.go from dto package using anonymous struct
      - Consolidate duplicate parseCustomMenuItems into dto.ParseCustomMenuItems
      - Enhance menu item validation (count, length, ID uniqueness limits)
      - Add audit logging for purchase_subscription and custom_menu_items changes
      - Update API contract test to include custom_menu_items field
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      bf6fe5e9
    • erio's avatar
      feat: custom menu pages with iframe embedding and CSP injection · 067810fa
      erio authored
      
      
      Add configurable custom menu items that appear in sidebar, each rendering
      an iframe-embedded external page. Includes shared URL builder with
      src_host/src_url tracking, CSP frame-src multi-origin deduplication,
      admin settings UI, and i18n support.
      
      chore: bump version to 0.1.87.19
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      067810fa
  4. 28 Feb, 2026 3 commits
  5. 22 Feb, 2026 1 commit
  6. 17 Feb, 2026 1 commit
  7. 14 Feb, 2026 1 commit
    • shaw's avatar
      feat: 区分 Anthropic 5m/1h 缓存创建 token 的差异化计费 · a817cafe
      shaw authored
      Anthropic API 的 cache_creation 对象区分了 ephemeral_5m 和 ephemeral_1h
      两种缓存创建 token,1h 单价远高于 5m(如 claude-3-5-haiku: 5m=$1/MTok,
      1h=$6/MTok)。此前系统统一按 5m 单价计费,导致计费偏低。
      
      后端:
      - pricing_service: 加载 LiteLLM 的 cache_creation_input_token_cost_above_1hr
      - billing_service: GetModelPricing 启用分类计费(安全守卫 1h>5m),
        CalculateCost 按 5m/1h 分别计费,无明细时回退到 5m 单价
      - gateway_service: parseSSEUsage/handleNonStreamingResponse 用 gjson
        提取嵌套 cache_creation 对象的 ephemeral_5m/1h_input_tokens
      - antigravity_gateway_service: extractSSEUsage/extractClaudeUsage 同步提取
      - usage_log: 修复 GORM column tag 确保写入正确的数据库列
      - 新增迁移 054: 删除 GORM 自动生成的重复列
      
      前端:
      - 使用记录 tooltip 展示 5m/1h 缓存创建明细(带彩色 badge 区分)
      - 表格单元格缓存写入数值旁显示 1h 标识
      a817cafe
  8. 12 Feb, 2026 1 commit
    • yangjianbo's avatar
      feat(openai): 支持自动透传开关并透传 User-Agent · 9c910c20
      yangjianbo authored
      - OpenAI OAuth/API Key 统一支持自动透传开关,编辑页可开关\n- 透传模式仅替换认证并保留计费/并发/审计,修复 API Key responses 端点拼接\n- Usage 页面显示原始 User-Agent 且不截断,补充回归测试与清单
      9c910c20
  9. 05 Feb, 2026 1 commit
  10. 03 Feb, 2026 2 commits
    • bayma888's avatar
      feat(api-key): add independent quota and expiration support · 6146be14
      bayma888 authored
      This feature allows API Keys to have their own quota limits and expiration
      times, independent of the user's balance.
      
      Backend:
      - Add quota, quota_used, expires_at fields to api_key schema
      - Implement IsExpired() and IsQuotaExhausted() checks in middleware
      - Add ResetQuota and ClearExpiration API endpoints
      - Integrate quota billing in gateway handlers (OpenAI, Anthropic, Gemini)
      - Include quota/expiration fields in auth cache for performance
      - Expiration check returns 403, quota exhausted returns 429
      
      Frontend:
      - Add quota and expiration inputs to key create/edit dialog
      - Add quick-select buttons for expiration (+7, +30, +90 days)
      - Add reset quota confirmation dialog
      - Add expires_at column to keys list
      - Add i18n translations for new features (en/zh)
      
      Migration:
      - Add 045_add_api_key_quota.sql for new columns
      6146be14
    • ducky's avatar
      feat(usage): add reasoning effort column · 53ee6383
      ducky authored
      53ee6383
  11. 02 Feb, 2026 3 commits
    • song's avatar
      merge upstream main · 0170d19f
      song authored
      0170d19f
    • 小北's avatar
      feat: 向用户显示管理员调整余额的备注 · ae18397c
      小北 authored
      - 为RedeemCode DTO添加notes字段(仅用于admin_balance/admin_concurrency类型)
      - 更新mapper使其有条件地包含备注信息
      - 在用户兑换历史UI中显示备注
      - 备注以斜体显示,悬停时显示完整内容
      
      用户现在可以看到管理员调整其余额的原因说明。
      
      Changes:
      - backend/internal/handler/dto/types.go: RedeemCode添加notes字段
      - backend/internal/handler/dto/mappers.go: 条件性填充notes
      - frontend/src/api/redeem.ts: TypeScript接口添加notes
      - frontend/src/views/user/RedeemView.vue: UI显示备注信息
      ae18397c
    • shaw's avatar
      feat: 重新设计公告系统为Header铃铛通知 · bbdc8663
      shaw authored
      - 新增 AnnouncementBell 组件,支持 Modal 弹窗和 Markdown 渲染
      - 移除 Dashboard 横幅和独立公告页面
      - 铃铛位置在 Header 文档按钮左侧,显示未读红点
      - 支持点击查看详情、标记已读、全部已读等操作
      - 完善国际化,移除所有硬编码中文
      - 修复 AnnouncementTargetingEditor watch 循环问题
      bbdc8663
  12. 30 Jan, 2026 1 commit
    • ducky's avatar
      feat(announcements): add admin/user announcement system · b7f69844
      ducky authored
      Implements announcements end-to-end (admin CRUD + read status, user list + mark read) with OR-of-AND targeting. Also breaks the ent<->service import cycle by moving schema-facing constants/targeting into a new domain package.
      b7f69844
  13. 29 Jan, 2026 1 commit
    • yangjianbo's avatar
      feat(sora): 新增 Sora 平台支持并修复高危安全和性能问题 · 13262a56
      yangjianbo authored
      
      
      新增功能:
      - 新增 Sora 账号管理和 OAuth 认证
      - 新增 Sora 视频/图片生成 API 网关
      - 新增 Sora 任务调度和缓存机制
      - 新增 Sora 使用统计和计费支持
      - 前端增加 Sora 平台配置界面
      
      安全修复(代码审核):
      - [SEC-001] 限制媒体下载响应体大小(图片 20MB、视频 200MB),防止 DoS 攻击
      - [SEC-002] 限制 SDK API 响应大小(1MB),防止内存耗尽
      - [SEC-003] 修复 SSRF 风险,添加 URL 验证并强制使用代理配置
      
      BUG 修复(代码审核):
      - [BUG-001] 修复 for 循环内 defer 累积导致的资源泄漏
      - [BUG-002] 修复图片并发槽位获取失败时已持有锁未释放的永久泄漏
      
      性能优化(代码审核):
      - [PERF-001] 添加 Sentinel Token 缓存(3 分钟有效期),减少 PoW 计算开销
      
      技术细节:
      - 使用 io.LimitReader 限制所有外部输入的大小
      - 添加 urlvalidator 验证防止 SSRF 攻击
      - 使用 sync.Map 实现线程安全的包级缓存
      - 优化并发槽位管理,添加 releaseAll 模式防止泄漏
      
      影响范围:
      - 后端:新增 Sora 相关数据模型、服务、网关和管理接口
      - 前端:新增 Sora 平台配置、账号管理和监控界面
      - 配置:新增 Sora 相关配置项和环境变量
      Co-Authored-By: default avatarClaude Sonnet 4.5 <noreply@anthropic.com>
      13262a56
  14. 28 Jan, 2026 1 commit
  15. 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
  16. 19 Jan, 2026 1 commit
  17. 09 Jan, 2026 2 commits
    • Edric.Li's avatar
      feat(api-key): 添加 IP 白名单/黑名单限制功能 (#221) · 0a4641c2
      Edric.Li authored
      * feat(api-key): add IP whitelist/blacklist restriction and usage log IP tracking
      
      - Add IP restriction feature for API keys (whitelist/blacklist with CIDR support)
      - Add IP address logging to usage logs (admin-only visibility)
      - Remove billing_type column from usage logs UI (redundant)
      - Use generic "Access denied" error message for security
      
      Backend:
      - New ip package with IP/CIDR validation and matching utilities
      - Database migrations for ip_whitelist, ip_blacklist (api_keys) and ip_address (usage_logs)
      - Middleware IP restriction check after API key validation
      - Input validation for IP/CIDR patterns on create/update
      
      Frontend:
      - API key form with enable toggle for IP restriction
      - Shield icon indicator in table for keys with IP restriction
      - Removed billing_type filter and column from usage views
      
      * fix: update API contract tests for ip_whitelist/ip_blacklist fields
      
      Add ip_whitelist and ip_blacklist fields to expected JSON responses
      in API contract tests to match the new API key schema.
      0a4641c2
    • Edric Li's avatar
      feat(api-key): add IP whitelist/blacklist restriction and usage log IP tracking · 90798f14
      Edric Li authored
      - Add IP restriction feature for API keys (whitelist/blacklist with CIDR support)
      - Add IP address logging to usage logs (admin-only visibility)
      - Remove billing_type column from usage logs UI (redundant)
      - Use generic "Access denied" error message for security
      
      Backend:
      - New ip package with IP/CIDR validation and matching utilities
      - Database migrations for ip_whitelist, ip_blacklist (api_keys) and ip_address (usage_logs)
      - Middleware IP restriction check after API key validation
      - Input validation for IP/CIDR patterns on create/update
      
      Frontend:
      - API key form with enable toggle for IP restriction
      - Shield icon indicator in table for keys with IP restriction
      - Removed billing_type filter and column from usage views
      90798f14
  18. 08 Jan, 2026 1 commit
    • Edric Li's avatar
      feat(usage): add User-Agent column to usage logs · 70fcbd70
      Edric Li authored
      - Add user_agent field to UsageLog DTO and mapper
      - Display User-Agent column in admin and user usage tables
      - Add formatUserAgent helper to show friendly client names
      - Include user_agent in Excel export
      - Remove request_id column from admin usage table
      70fcbd70
  19. 07 Jan, 2026 1 commit
    • shaw's avatar
      fix(admin/usage): 恢复成本 Tooltip 明细并优化账号筛选 · d5ba7b80
      shaw authored
      问题修复:
      - 恢复 Cost Tooltip 的成本分项明细 (input_cost, output_cost, cache 成本)
      - 修复 Token Tooltip 双分隔线显示问题
      - 修复 Tooltip 翻译键缺失问题,新增 costDetails/tokenDetails
      - 恢复 Excel 导出格式化 (aoa_to_sheet + 翻译列头)
      
      功能优化:
      - 账号筛选从前端搜索改为后端搜索,避免一次加载 1000 条数据
      - 行为与用户/API Key 筛选保持一致 (debounce + 后端分页)
      d5ba7b80
  20. 06 Jan, 2026 1 commit
    • yangjianbo's avatar
      fix(前端): 修复 ESLint 代码规范问题 · 4790aced
      yangjianbo authored
      - 修复 AccountTableFilters.vue 中的 vue/no-mutating-props 错误,使用 emit 模式替代直接修改 props
      - 修复 TypeScript 类型错误,支持 Select 组件的 null 值类型
      - 为所有空 catch 块添加错误日志,提升代码可维护性和调试能力
      - 涉及文件:AccountTableFilters.vue, UserAllowedGroupsModal.vue, UserApiKeysModal.vue, UserBalanceModal.vue, AccountsView.vue, UsageView.vue, DashboardView.vue, ProfileView.vue
      
      🤖 Generated with [Claude Code](https://claude.com/claude-code
      
      )
      Co-Authored-By: default avatarClaude Opus 4.5 <noreply@anthropic.com>
      4790aced
  21. 05 Jan, 2026 4 commits
    • IanShaw027's avatar
      refactor(frontend): 完成所有组件的内联SVG统一替换为Icon组件 · 4251a5a4
      IanShaw027 authored
      - 扩展 Icon.vue 组件,新增 60+ 图标路径
        - 导航类: arrowRight, arrowLeft, arrowUp, arrowDown, chevronUp, externalLink
        - 状态类: checkCircle, xCircle, exclamationCircle, exclamationTriangle, infoCircle
        - 用户类: user, userCircle, userPlus, users
        - 文档类: document, clipboard, copy, inbox
        - 操作类: download, upload, filter, sort
        - 安全类: key, lock, shield
        - UI类: menu, calendar, home, terminal, gift, creditCard, mail
        - 数据类: chartBar, trendingUp, database, cube
        - 其他: bolt, sparkles, cloud, server, sun, moon, book 等
      
      - 重构 56 个 Vue 组件,用 Icon 组件替换内联 SVG
        - 净减少约 2200 行代码
        - 提升代码可维护性和一致性
        - 统一图标样式和尺寸管理
      4251a5a4
    • song's avatar
      feat: 图片生成计费功能 · d4c2b723
      song authored
      - 新增 Group 图片价格配置(image_price_1k/2k/4k)
      - BillingService 新增 CalculateImageCost 方法
      - AntigravityGatewayService 支持识别图片生成模型并按次计费
      - UsageLog 新增 image_count 和 image_size 字段
      - 前端分组管理支持配置图片价格(antigravity 和 gemini 平台)
      - 图片计费复用通用计费能力(余额检查、扣费、倍率、订阅限额)
      d4c2b723
    • ianshaw's avatar
      fix(frontend): 修复重构时遗漏的 SVG 图标,创建统一图标管理组件 · 471b1c3e
      ianshaw authored
      - 创建 Icon.vue 统一管理 SVG 图标(20+ 常用图标)
      - 修复 AccountActionMenu 中被错误替换为 emoji 的图标
      - 修复 ProfileView 和 GroupsView 中的 emoji 图标
      - 图标支持 size/strokeWidth 属性,便于复用
      471b1c3e
    • ianshaw's avatar
      fix(frontend): 完善表单校验并添加错误提示 · 85f53ef2
      ianshaw authored
      - UserEditModal: 添加 email 必填和 concurrency 最小值校验
      - UserAttributesConfigModal: 添加 key/name 必填和 options 非空校验
      - GroupsView: 添加 name 必填校验
      - ProxiesView: 添加 name/host 必填和 port 范围校验
      - UserBalanceModal: 添加 amount 有效性和余额充足性校验
      - RedeemView: 添加空兑换码错误提示
      - i18n: 添加所有新增校验的中英文翻译
      85f53ef2
  22. 04 Jan, 2026 5 commits
    • IanShaw027's avatar
      fix(frontend): 修复前端重构后的样式一致性和功能完整性 · 64b52c43
      IanShaw027 authored
      ## 修复内容
      
      ### 1. AccountsView 功能恢复
      - 恢复3个缺失的模态框组件:
        - ReAuthAccountModal.vue - 重新授权功能
        - AccountTestModal.vue - 测试连接功能
        - AccountStatsModal.vue - 查看统计功能
      - 恢复 handleTest/handleViewStats/handleReAuth 调用模态框
      - 修复 UpdateAccountRequest 类型定义(添加 schedulable 字段)
      
      ### 2. DashboardView 修复
      - 恢复 formatBalance 函数(支持千位分隔符显示)
      - 为 UserDashboardStats 添加完整 Props 类型定义
      - 为 UserDashboardRecentUsage 添加完整 Props 类型定义
      - 优化格式化函数到共享 utils/format.ts
      
      ### 3. 类型安全增强
      - 修复 UserAttributeOption 索引签名兼容性
      - 移除未使用的类型导入
      - 所有组件 Props 类型完整
      
      ## 验证结果
      -  TypeScript 类型检查通过(0 errors)
      -  vue-tsc 检查通过(0 errors)
      -  所有样式与重构前100%一致
      -  所有功能完整恢复
      
      ## 影响范围
      - AccountsView: 代码行数从974行优化到189行(提升80.6%可维护性)
      - DashboardView: 保持组件化同时恢复所有原有功能
      - 深色模式支持完整
      - 所有颜色方案和 SVG 图标保持一致
      
      Closes #149
      64b52c43
    • IanShaw027's avatar
      refactor(frontend): final component split and comprehensive type safety fixes · d4d21d5e
      IanShaw027 authored
      - Completed modular refactoring of KeysView.vue and SettingsView.vue.
      - Resolved remaining TypeScript errors in new components.
      - Standardized prop types and event emitters for sub-components.
      - Optimized bundle size by eliminating redundant template code and unused script variables.
      - Verified system stability with final type checking.
      d4d21d5e
    • IanShaw027's avatar
      refactor(frontend): comprehensive split of large view files into modular components · e99063e1
      IanShaw027 authored
      - Split UsersView.vue into UserCreateModal, UserEditModal, UserApiKeysModal, etc.
      - Split UsageView.vue into UsageStatsCards, UsageFilters, UsageTable, etc.
      - Split DashboardView.vue into UserDashboardStats, UserDashboardCharts, etc.
      - Split AccountsView.vue into AccountTableActions, AccountTableFilters, etc.
      - Standardized TypeScript types across new components to resolve implicit 'any' and 'never[]' errors.
      - Improved overall frontend maintainability and code clarity.
      e99063e1
    • 墨颜's avatar
      refactor(keys): 优化分组选项显示与代码复用 · 6708f400
      墨颜 authored
      - 删除冗余的 vite.config.js,统一使用 TypeScript 配置
      - 创建 GroupOptionItem 组件封装分组选项 UI 逻辑(GroupBadge + 描述 + 勾选状态)
      - 在密钥页面的分组选择器中显示分组描述文字
      - 添加选中状态的勾选图标,提升交互体验
      - 优化描述文字左对齐和截断显示效果
      - 消除代码重复,简化维护成本
      6708f400
    • IanShaw027's avatar
  23. 03 Jan, 2026 1 commit
    • ianshaw's avatar
      feat(frontend): 增强用户界面和使用教程 · ff3f514f
      ianshaw authored
      主要改进:
      - 扩展 UseKeyModal 支持 Antigravity/Gemini 平台教程
      - 添加 CCS (Claude Code Settings) 导入说明
      - 添加混合渠道风险警告提示
      - 优化登录/注册页面样式
      - 更新 Antigravity 混合调度选项文案
      - 完善中英文国际化文案
      ff3f514f