Commit Graph

351 Commits

Author SHA1 Message Date
shaw
ef4f7483d3 feat: 完善 Gemini 功能与 Claude 保持一致
- 添加 Gemini 账户的 schedulable 字段和调度开关 API
- 实现 Gemini 调度器的模型过滤功能
- 完善 Gemini 数据统计,记录 token 使用量
- 修复 Gemini 流式响应的 SSE 解析和 AbortController 支持
- 在教程页面和 README 中添加 Gemini CLI 环境变量说明
- 修复前端 Gemini 账户调度开关限制

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-04 16:53:11 +08:00
mouyong
15b4efa353 feat: 处理sse传输 2025-08-04 15:52:14 +08:00
mouyong
254fa5aef7 feat: 处理sse传输 2025-08-04 15:48:09 +08:00
mouyong
0e5a49c86f feat: 处理sse传输 2025-08-04 15:46:16 +08:00
github-actions[bot]
7ec1d57288 chore: sync VERSION file with release v1.1.70 [skip ci] 2025-08-04 06:03:15 +00:00
Wesley Liddick
3da3582e61 Merge pull request #167 from qyinter/main
feat: 增强 Gemini 服务支持并添加统一调度器
2025-08-04 14:03:05 +08:00
千羽
9625e7f490 Merge branch 'Wei-Shaw:main' into main 2025-08-04 14:47:32 +09:00
千羽
33837c23aa feat: 增强 Gemini 服务支持并添加统一调度器
- 新增 unifiedGeminiScheduler.js 统一账户调度服务
- 增强 geminiRoutes.js 支持更多 Gemini API 端点
- 优化 geminiAccountService.js 账户管理和 token 刷新机制
- 添加对 v1internal 端点的完整支持(loadCodeAssist、onboardUser、countTokens、generateContent、streamGenerateContent)
- 改进错误处理和流式响应管理

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-04 14:47:03 +09:00
github-actions[bot]
4cc0fec8b2 chore: sync VERSION file with release v1.1.69 [skip ci] 2025-08-04 04:48:39 +00:00
shaw
be98d5c498 fix: 修复账户管理页面移动端布局数据显示问题
- 修复移动端数据路径不一致问题(usage.dailyRequests -> usage.daily.requests)
- 增强移动端会话窗口显示,添加进度百分比、时间窗口和剩余时间
- 改进会话窗口UI,使用卡片样式更清晰展示信息
- 检查确认API Keys页面无类似问题

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-04 12:48:15 +08:00
shaw
53d28adbd3 Merge branch 'main' of github.com:Wei-Shaw/claude-relay-service 2025-08-04 12:02:35 +08:00
shaw
fce6d8e1ac fix: 修复仪表盘和API统计页面的多个问题
- 修复仪表盘天粒度下7天/30天快捷选择无数据的问题
- 修复API Keys页面统计按钮链接路由错误(admin -> admin-next)
- 改进统计页面限制展示,使用3个进度条更直观显示使用情况
- 后端API响应增加当前使用量数据(currentWindowRequests/Tokens/DailyCost)
- 修复教程页面window.location.origin为空的兼容性问题
- 无限制时使用无穷符号(∞)展示,提升用户体验

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-04 11:58:26 +08:00
github-actions[bot]
4413a02964 chore: sync VERSION file with release v1.1.68 [skip ci] 2025-08-04 03:00:19 +00:00
shaw
4e3c826b6c fix: 修复API Keys页面时间窗口进度条和Token数值显示问题
- 修复时间窗口限制的请求次数和Token使用量进度条不更新的问题
  - 在apiKeyService.getAllApiKeys()中添加获取当前窗口统计数据的逻辑
  - 从Redis读取rate_limit:requests和rate_limit:tokens键的值

- 优化Token数值展示,添加K/M单位格式化
  - UsageDetailModal组件中5处Token数值改用formatTokenCount
  - ApiKeysView模型统计中5处Token数值改用formatTokenCount
  - 统一使用K/M单位简化大数字显示

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-04 10:55:17 +08:00
shaw
52718ef608 chore: 更新项目配置文件
- 更新 Docker 配置和构建脚本
- 优化项目文档和部署脚本

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-04 10:32:22 +08:00
shaw
2ceac331dd feat: 优化 API Keys 页面的分组显示和使用统计展示
- 修复分组调度显示,正确展示分组名称
- 重新设计使用统计列,添加进度条显示每日费用和窗口限制
- 创建使用详情弹窗组件,展示完整统计信息
- 优化时间窗口限制显示,支持请求次数和Token双维度进度条
- 改进移动端自适应布局
- 修复 ESLint 警告,提升代码质量

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-04 10:31:59 +08:00
shaw
e95ca78942 merge: 解决dist目录冲突,保持dist目录未跟踪状态 2025-08-04 09:28:01 +08:00
shaw
9ef18a72bd chore: 停止跟踪 web/admin-spa/dist/ 构建文件
- 从 git 中移除 dist 目录的跟踪
- 这些文件由 GitHub Actions 自动构建生成
- 避免本地构建和远程构建之间的冲突

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-04 08:57:19 +08:00
github-actions[bot]
6d27dd7c94 chore: sync VERSION file with release v1.1.67 and rebuild frontend [skip ci] 2025-08-03 16:17:27 +00:00
千羽
a80b36896d feat: 更新 Gemini OAuth 流程支持新的授权方式
- 使用 codeassist.google.com 作为新的回调地址
- 实现 PKCE 认证流程增强安全性
- 更新前端授权流程指引
- 简化授权码输入流程

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-04 00:16:29 +08:00
github-actions[bot]
7b54f187ee chore: sync VERSION file with release v1.1.66 [skip ci] 2025-08-03 15:17:29 +00:00
shaw
29b331c7b4 fix: 修复 manage.sh 脚本软链接创建时的路径问题
- 修复找不到脚本文件 /root/claude-relay-service/app/manage.sh 的错误
- 优先使用项目中的 $APP_DIR/scripts/manage.sh 路径
- 改进 load_config 函数以支持不同的项目目录结构
- 添加 symlink 命令执行前的检查,确保 APP_DIR 已设置
- 增加详细的诊断信息输出,方便调试路径问题

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-03 23:17:05 +08:00
github-actions[bot]
5378cb8910 chore: sync VERSION file with release v1.1.65 and rebuild frontend [skip ci] 2025-08-03 14:49:11 +00:00
shaw
dcf175b366 fix: 修复 web/admin-spa 合并冲突和构建错误
- 恢复 web/admin-spa 目录到 dev 分支状态
- 修复 ApiKeysView.vue 中的重复变量声明问题
- 重新构建前端项目确保正常运行

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-03 22:48:20 +08:00
shaw
a5c7eeaf84 fix: 修复专属账号下拉框,仅显示dedicated类型账号
- 修改CreateApiKeyModal和EditApiKeyModal的过滤逻辑
- 专属账号下拉框只显示accountType='dedicated'的账号
- 移除accountType='group'的账号,这些账号通过分组调度
- 更新标签文字为'专属账号'以更准确描述
2025-08-03 22:34:44 +08:00
shaw
9c9afe1528 feat: 实现账户分组管理功能和优化响应式设计
主要更新:
- 实现账户分组管理功能,支持创建、编辑、删除分组
- 支持将账户添加到分组进行统一调度
- 优化 API Keys 页面响应式设计,解决操作栏被隐藏的问题
- 优化账户管理页面布局,合并平台/类型列,改进操作按钮布局
- 修复代理信息显示溢出问题
- 改进表格列宽分配,充分利用屏幕空间

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-03 22:34:43 +08:00
shaw
329904ba72 fix: 修复仪表盘页面时间筛选功能
- 修复模型使用分布和详细统计数据不响应时间筛选的问题
- 后端/admin/model-stats端点添加startDate和endDate参数支持
- 支持自定义时间范围的模型统计数据聚合
- 前端loadModelStats函数添加时间范围参数传递
- 修复小时粒度和自定义时间筛选不生效的问题

现在时间筛选可以正确控制所有数据展示:
- Token使用趋势图 ✓
- 模型使用分布 ✓
- 详细统计数据 ✓
- API Keys使用趋势 ✓

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-03 22:34:42 +08:00
shaw
495c458e9a fix: 修复API Keys页面的undefined错误
- 修复filteredAndSortedApiKeys未定义错误,改为使用sortedApiKeys
- 添加缺失的分页相关变量定义(currentPage, pageSize, totalPages等)
- 添加paginatedApiKeys计算属性实现分页功能
- 修复CreateApiKeyModal和EditApiKeyModal中localAccounts防御性编程
- 添加筛选条件变化时重置页码的逻辑
- 修复"Cannot read properties of undefined (reading 'length')"错误

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-03 22:34:42 +08:00
shaw
6dd8d0076e fix: 解决Git合并冲突
- 解决ApiKeysView.vue中的合并冲突
- 解决CreateApiKeyModal.vue中的合并冲突
- 解决EditApiKeyModal.vue中的合并冲突
- 保留本地修改版本,包含更完善的功能:
  - Claude OAuth和Console账户分组显示
  - 移动端响应式优化
  - 批量创建API Key功能

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-03 22:34:41 +08:00
shaw
ecfc1050d3 feat: 优化移动端响应式设计
- 优化所有页面的移动端适配(手机、平板、PC)
- 修复AccountsView移动端状态显示和按钮功能问题
- 修复ApiKeysView移动端详情展开显示问题
- 移除ApiKeysView不必要的查看按钮
- 修复Dashboard页面PC版时间筛选按钮布局
- 改进所有组件的响应式设计
- 删除dist目录避免构建文件冲突

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-03 22:34:41 +08:00
github-actions[bot]
f22c8cbfcc chore: sync VERSION file with release v1.1.64 [skip ci] 2025-07-31 08:30:10 +00:00
shaw
8e89311dac feat: 使用API响应头中的准确时间戳修正会话窗口和限流时间
- 从429响应中提取 anthropic-ratelimit-unified-reset 响应头
- 使用准确的重置时间戳设置限流结束时间和会话窗口
- 会话窗口开始时间 = 重置时间戳 - 5小时
- 兼容旧逻辑:无响应头时使用预估的会话窗口时间

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-31 16:29:44 +08:00
github-actions[bot]
2612611795 chore: sync VERSION file with release v1.1.63 [skip ci] 2025-07-31 05:40:34 +00:00
Wesley Liddick
390d01e8b4 Merge pull request #152 from kevinconan/main
fix: 继续修正会话窗口的计算问题,这回应该正确了
2025-07-31 13:40:26 +08:00
KevinLiao
b7f4c2a560 Merge branch 'main' of https://github.com/Wei-Shaw/claude-relay-service 2025-07-31 13:37:23 +08:00
KevinLiao
0e84a979e9 fix: 继续修正会话窗口的计算问题,这回应该正确了 2025-07-31 13:36:24 +08:00
github-actions[bot]
065bd161d7 chore: sync VERSION file with release v1.1.62 [skip ci] 2025-07-31 05:00:40 +00:00
shaw
7ebcdbe72d fix: 优化限流机制,使限流时间与Claude会话窗口保持一致
- 限流结束时间现在基于5小时会话窗口而非硬编码1小时
- 新增 rateLimitEndAt 字段追踪限流结束时间
- 自动解除限流基于会话窗口结束时间
- 保持向后兼容,支持旧数据格式

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-31 13:00:19 +08:00
github-actions[bot]
aef39b10d9 chore: sync VERSION file with release v1.1.61 and rebuild frontend [skip ci] 2025-07-31 03:28:28 +00:00
Wesley Liddick
d04bbfec8b Merge pull request #149 from Alfonsxh/feature/api-keys-pagination
fix: 修复 API Key 统计页面链接指向错误的问题
2025-07-31 11:27:55 +08:00
Alfonsxh
1a620ba0fa fix: 修复 API Key 统计页面链接指向错误的问题
- 将统计页面 URL 从 /admin/api-stats 修正为 /admin-next/api-stats
- 确保链接指向正确的 SPA 路由

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-31 11:23:28 +08:00
github-actions[bot]
ca61807906 chore: sync VERSION file with release v1.1.60 and rebuild frontend [skip ci] 2025-07-31 02:54:24 +00:00
Wesley Liddick
aa253431c5 Merge pull request #148 from Alfonsxh/feature/api-keys-pagination
feat: 添加 API Keys 管理界面分页功能
2025-07-31 10:53:53 +08:00
Alfonsxh
fb23f09723 feat: 添加 API Keys 管理界面分页功能
- 实现表格分页显示,默认每页显示 10 条记录
- 添加每页数量选择器,支持 5/10/20/50/100 条选项
- 实现智能页码导航,包含上一页、下一页和页码按钮
- 优化界面样式,统一下拉框和按钮的视觉效果
- 筛选或排序时自动重置到第一页
- 显示总记录数统计信息

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-31 10:49:20 +08:00
github-actions[bot]
f191a5218c chore: sync VERSION file with release v1.1.59 [skip ci] 2025-07-31 01:31:23 +00:00
Wesley Liddick
7f48934c85 Merge pull request #146 from kevinconan/main
fix: 修复session窗口计算问题
2025-07-31 09:31:11 +08:00
KevinLiao
d93ce8713d fix: 修复session窗口计算问题 2025-07-31 09:15:33 +08:00
github-actions[bot]
0d98467688 chore: sync VERSION file with release v1.1.58 and rebuild frontend [skip ci] 2025-07-30 16:19:43 +00:00
Wesley Liddick
66d481c477 Merge pull request #144 from kevinconan/main
feat: Claude Console账号增强,升级模型支持列表为模型映射表!
2025-07-31 00:19:10 +08:00
KevinLiao
3c797a85e0 feat: Claude Console账号增强,升级模型支持列表为模型映射表! 2025-07-30 23:13:59 +08:00