1.排程管理新增企业微信通知功能
2.可用应用以及智能体显示只显示Chatflow类型应用
This commit is contained in:
1 parent
dc8ad4de52
commit
05913f742f
8 files changed
+264
-15
No files matched your search
@@ -1887,7 +1887,7 @@ def home():
|
||||
# Get all agents available to user (including public ones)
|
||||
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))
|
||||
.all()
|
||||
)
|
||||
@@ -1898,6 +1898,7 @@ def home():
|
||||
'name': agent.name,
|
||||
'description': agent.description,
|
||||
'icon_url': agent.icon_url,
|
||||
'extra_config': agent.extra_config,
|
||||
} for agent in user.agents]
|
||||
|
||||
favorites = db.session.query(UserFavoriteAgent).filter_by(user_id=user.id).all()
|
||||
@@ -1934,7 +1935,12 @@ def home():
|
||||
'id': a.id if hasattr(a, 'id') else a['id'],
|
||||
'name': a.name if hasattr(a, 'name') else a['name'],
|
||||
'description': a.description if hasattr(a, 'description') else a['description'],
|
||||
'icon_url': a.icon_url if hasattr(a, 'icon_url') else a['icon_url']
|
||||
'icon_url': a.icon_url if hasattr(a, 'icon_url') else a['icon_url'],
|
||||
'dify_app_type': (
|
||||
(a.extra_config or {}).get('dify_app_type')
|
||||
if hasattr(a, 'extra_config')
|
||||
else (a.get('extra_config') or {}).get('dify_app_type')
|
||||
) or 'chatflow'
|
||||
} for a in agent_rows],
|
||||
'favorite_agent_ids': favorite_ids,
|
||||
'quick_questions': [{
|
||||
|
||||
Reference in new issue
Block a user