|
|
@@ -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);
|