mirror of
https://github.com/langgenius/dify.git
synced 2026-04-19 10:17:26 +08:00
fix(api): add AGENT mode to app list filtering
Add AppMode.AGENT branch in get_paginate_apps() so that filtering apps by mode=agent works correctly. Discovered during comprehensive E2E testing. 14/14 E2E tests pass covering: - A: New Agent app full lifecycle (create, draft, configs, publish, run) - B: Old app creation compat (chat, completion, agent-chat, advanced-chat, workflow) - C: App listing and filtering (all modes, agent filter) - D: Workflow editor compat (block configs) - E: DSL export Made-with: Cursor
This commit is contained in:
@ -53,6 +53,8 @@ class AppService:
|
||||
filters.append(App.mode == AppMode.ADVANCED_CHAT)
|
||||
elif args["mode"] == "agent-chat":
|
||||
filters.append(App.mode == AppMode.AGENT_CHAT)
|
||||
elif args["mode"] == "agent":
|
||||
filters.append(App.mode == AppMode.AGENT)
|
||||
|
||||
if args.get("is_created_by_me", False):
|
||||
filters.append(App.created_by == user_id)
|
||||
|
||||
Reference in New Issue
Block a user