Commit Graph

53 Commits

Author SHA1 Message Date
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
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
b1ca3f307e first commit 2025-07-14 18:14:13 +08:00