feat: 添加项目配置和依赖更新

配置更新:
1. 前端配置
   - 添加 hook-fetch 依赖用于 HTTP 请求
   - 更新 vite.config.mts 配置
   - 添加 .npmrc 配置文件

2. 后端配置
   - 更新 application.yml 和 application-dev.yml 配置
   - 更新 docker-compose.yml 配置

3. 代码优化
   - OSS 客户端优化
   - SSE 管理器优化
   - 聊天服务和向量存储策略优化

4. 项目文档
   - 添加 CLAUDE.md 项目指南

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
大壮
2026-04-02 09:44:56 +00:00
parent ac8e6ca088
commit 2f25a943b8
14 changed files with 584 additions and 98 deletions

View File

@@ -93,6 +93,24 @@ public class SseEmitterManager {
return emitter;
}
/**
* 获取已存在的 SSE 连接(不创建新连接)
*
* @param userId 用户的唯一标识符
* @param token 用户的唯一令牌
* @return 返回已存在的 SseEmitter 实例,如果不存在则返回 null
*/
public SseEmitter getEmitter(Long userId, String token) {
if (userId == null || token == null) {
return null;
}
Map<String, SseEmitter> emitters = USER_TOKEN_EMITTERS.get(userId);
if (MapUtil.isNotEmpty(emitters)) {
return emitters.get(token);
}
return null;
}
/**
* 断开指定用户的 SSE 连接
*