cc 1 неделя назад
Родитель
Сommit
366d5f6a76

+ 1 - 1
ai-server/src/main/java/com/zsjz/ai/module/agent/service/AgentService.java

@@ -146,7 +146,7 @@ public class AgentService extends ServiceImpl<AgentMapper, AgentEntity> {
     public HarnessAgent getOrCreateAgent(Long workspaceId, Long agentRowId, Long modelId) {
         // 池 key 必须带 userId:工作区与用户级技能目录都按登录用户解析,
         // 少了这一维就会把 A 用户建的 agent(含其技能与工作区上下文)复用给 B 用户。
-        Long userId = StpUtil.getLoginIdAsLong();
+        long userId = StpUtil.getLoginIdAsLong();
         String key = "w" + workspaceId + "-a" + agentRowId + "-m" + modelId + "-u" + userId;
         return agentPool.computeIfAbsent(key, k -> {
             AgentEntity entry = getById(agentRowId);