1.排程管理新增企业微信通知功能

2.可用应用以及智能体显示只显示Chatflow类型应用
This commit is contained in:
hugo committed 2026-05-21 14:01:12 +08:00
1 parent dc8ad4de52
commit 05913f742f
8 files changed
+264 -15

No files matched your search

+4 -2
View File
@@ -20,6 +20,7 @@ def _serialize_agent_row(row) -> dict:
'name': row.name,
'description': row.description,
'icon_url': row.icon_url,
'dify_app_type': (row.extra_config or {}).get('dify_app_type') if hasattr(row, 'extra_config') else None,
}
@@ -35,7 +36,7 @@ def list_user_agents():
# 管理员:返回所有激活的 Agent
if user.role == 'admin':
agent_rows = (
db.session.query(Agent.id, Agent.name, Agent.description, Agent.icon_url)
db.session.query(Agent.id, Agent.name, Agent.description, Agent.icon_url, Agent.extra_config)
.filter(Agent.is_active.is_(True))
.order_by(Agent.id.asc())
.all()
@@ -48,6 +49,7 @@ def list_user_agents():
'name': a.name,
'description': a.description,
'icon_url': a.icon_url,
'extra_config': a.extra_config,
})()
for a in user.agents
if a.is_active
@@ -64,7 +66,7 @@ def list_public_agents():
"""
# 返回所有激活的 Agent,包含基本信息
agent_rows = (
db.session.query(Agent.id, Agent.name, Agent.description, Agent.icon_url)
db.session.query(Agent.id, Agent.name, Agent.description, Agent.icon_url, Agent.extra_config)
.filter(Agent.is_active.is_(True))
.order_by(Agent.id.asc())
.all()