chore: trim nonessential admin routes

This commit is contained in:
2026-06-12 11:37:29 +08:00
parent 7e3a2587a7
commit 86b44bad10
10 changed files with 15 additions and 93 deletions
+4 -7
View File
@@ -17,7 +17,7 @@ from core.menu.schema import MenuCreate, MenuUpdate
menu_cache = CacheManager(prefix="menu:")
# 缓存key
AI_AGENT_ADMIN_MENU_CACHE_VERSION = "v9"
AI_AGENT_ADMIN_MENU_CACHE_VERSION = "v10"
MENU_TREE_CACHE_KEY = f"tree:ai_agent_admin:{AI_AGENT_ADMIN_MENU_CACHE_VERSION}"
USER_ROUTE_CACHE_PREFIX = f"user_route:ai_agent_admin:{AI_AGENT_ADMIN_MENU_CACHE_VERSION}:"
@@ -29,14 +29,11 @@ AI_AGENT_ADMIN_MENU_NAMES = {
"AIWorkflow",
"AIWorkflowRuns",
"KnowledgeBase",
"Codex",
"SystemManagement",
"SystemPermission",
"UserManagement",
"SystemMenu",
"SystemRole",
"Message",
"MessageList",
"AnnouncementList",
"AnnouncementManage",
}
@@ -51,10 +48,10 @@ def _filter_ai_agent_admin_menus(menus: List[Menu]) -> List[Menu]:
def _normalize_ai_agent_admin_menu(menu: Menu) -> None:
"""Route the retained control center to the original rendered dashboard."""
"""Route the retained control center to the AI agent workspace."""
if menu.name == "ControlCenter":
menu.path = "/page-render/main_home"
menu.component = "online-dev/page-render/index"
menu.path = "/ai-platform/agent"
menu.component = "ai-platform/agent/index"
menu.query = None