Commit Graph

23 Commits

Author SHA1 Message Date
shaw
fbf942a5fd feat: 支持手动添加 Claude 账户 Access Token
- 添加 OAuth 和手动输入两种账户添加方式
- 支持直接输入 Access Token 和 Refresh Token
- 新增账户编辑功能,可更新 Token 和代理设置
- 优化 Token 刷新失败时的回退机制
- 改进用户体验,支持手动维护长期有效的 Token

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 19:28:14 +08:00
shaw
8f7d3fcadf fix: 修复管理员会话键名冲突问题
- 恢复管理员会话管理的原始键名格式 session:${sessionId}
- 更改sticky会话映射使用独立前缀 sticky_session:${sessionHash}
- 避免sticky会话功能与管理后台会话冲突
- 添加sticky_session:*到cleanup清理模式
- 确保向后兼容性,管理后台功能正常

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 18:43:32 +08:00
shaw
db8964d0f7 Merge remote-tracking branch 'origin/main' into dev 2025-07-15 18:18:11 +08:00
shaw
b2b8d8c719 feat: 添加智能sticky会话保持功能
- 新增 sessionHelper.js 实现会话哈希生成,基于Anthropic的prompt caching机制
- 扩展 claudeAccountService.selectAvailableAccount 支持会话绑定
- 更新 claudeRelayService 集成会话保持功能
- 添加 Redis 会话映射存储,支持1小时过期
- 支持故障转移:绑定账户不可用时自动重新选择
- 三级fallback策略:cacheable内容 → system内容 → 第一条消息
- 完全向后兼容,自动启用无需配置

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 18:15:53 +08:00
Wesley Liddick
1b2f6454c5 Merge pull request #4 from Alfonsxh/bugfix/oauth-serialization
fix: 改进 OAuth 会话管理对象序列化
2025-07-15 18:14:50 +08:00
shaw
2257b42527 Modify the default timeout period 2025-07-15 18:00:52 +08:00
Alfonsxh
4946968577 fix: 改进 OAuth 会话管理对象序列化
- 在 setOAuthSession 中添加复杂对象序列化逻辑
- 在 getOAuthSession 中添加 proxy 字段反序列化
- 增强对 proxy 配置等复杂对象的存储支持
- 添加错误处理,解析失败时将 proxy 设为 null

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 17:52:51 +08:00
shaw
f2af099e7d update readme 2025-07-15 11:09:43 +08:00
shaw
1bbad561bb update readme 2025-07-15 11:06:54 +08:00
shaw
beb0734fae update readme 2025-07-15 11:04:14 +08:00
shaw
34a7a020a3 update readme 2025-07-15 11:03:09 +08:00
shaw
4c28f41878 add preview 2025-07-15 09:57:37 +08:00
shaw
fb06d71a3b update README 2025-07-14 18:58:26 +08:00
shaw
d3f50607a3 update README 2025-07-14 18:46:58 +08:00
shaw
e89d89e3ef update README 2025-07-14 18:45:30 +08:00
shaw
f224c63ed4 update README 2025-07-14 18:38:54 +08:00
shaw
2333cbb952 update README 2025-07-14 18:35:33 +08:00
shaw
baa0a58844 update README 2025-07-14 18:34:32 +08:00
shaw
69d4f8455c add: LICENSE 2025-07-14 18:32:47 +08:00
shaw
4168a4182f update README 2025-07-14 18:30:37 +08:00
shaw
2c4847f3f0 update README 2025-07-14 18:17:06 +08:00
shaw
b1ca3f307e first commit 2025-07-14 18:14:13 +08:00
Wesley Liddick
a96a372011 Initial commit 2025-07-14 18:11:32 +08:00