Merge remote-tracking branch 'origin/master' into ji
# Conflicts: # frontend-web/src/components/workspace/input-box.tsx # offline-backend-20260512/backend/CLAUDE.md
This commit is contained in:
commit
fa70b31873
159 files changed
+15521
-2415
No files matched your search
+3
@@ -195,6 +195,9 @@ class MemoryAgentStore(AgentStore):
|
||||
return owned or favorited
|
||||
if scope == "private":
|
||||
return bool(agent.get("is_private"))
|
||||
if scope == "builtin":
|
||||
# 内置智能体 = user_id IS NULL(仅管理员;路由层 admin 闸门)。
|
||||
return agent.get("user_id") is None
|
||||
return self._is_visible(agent, user_id)
|
||||
|
||||
async def list_paginated(
|
||||
|
||||
@@ -275,6 +275,9 @@ class AgentRepository(AgentStore):
|
||||
return or_(AgentRow.user_id == user_id, AgentRow.id.in_(fav_subq))
|
||||
if scope == "private":
|
||||
return AgentRow.is_private.is_(True)
|
||||
if scope == "builtin":
|
||||
# 内置智能体 = user_id IS NULL。仅管理员可用此 scope(路由层已 admin 闸门)。
|
||||
return AgentRow.user_id.is_(None)
|
||||
return self._listing_filter(user_id)
|
||||
|
||||
@staticmethod
|
||||
|
||||
+2
@@ -59,6 +59,8 @@ class RoundtableChainRepository:
|
||||
# 发布状态 + 是否本人所有(前端据此显示「公共」徽标、决定能否编辑 / 发布)。
|
||||
"is_public": bool(getattr(row, "is_public", False)),
|
||||
"is_mine": (current_user_id is None) or (row.user_id == current_user_id),
|
||||
# 配置者(owner)的 user_id;路由层据此解析成可读用户名(owner_name)。
|
||||
"owner_id": row.user_id,
|
||||
"created_at": row.created_at.isoformat() if isinstance(row.created_at, datetime) else row.created_at,
|
||||
"updated_at": row.updated_at.isoformat() if isinstance(row.updated_at, datetime) else row.updated_at,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user