From f702b8596a76e8f22dcfce1c9f392e5857bcf7cd Mon Sep 17 00:00:00 2001 From: jingrow Date: Fri, 21 Nov 2025 23:08:54 +0800 Subject: [PATCH] feat: Add "My Published Tools" page in Development menu - Add MyPublishedTools component aligned with MyPublishedApps functionality - Add backend API endpoints: - GET /jingrow/my-published-tools (list published tools with search, pagination, sorting) - POST /jingrow/delete-published-tool (delete published tool) - Add route configuration for my-published-tools page - Add menu item "My Published Tools" under Development group - Add Chinese translations for all tool-related text - Remove uppercase transformation for tool_name display in list The new page provides the same functionality as "My Published Apps": - Search and filter tools - Sort by various criteria - Pagination support - View tool details - Delete published tools - Publish new tool button --- apps/jingrow/frontend/src/app/router/index.ts | 6 + apps/jingrow/frontend/src/locales/zh-CN.json | 6 + .../frontend/src/shared/stores/menu.ts | 1 + .../src/views/dev/MyPublishedTools.vue | 687 ++++++++++++++++++ .../local_ai_node_list_actions.vue | 115 ++- apps/jingrow/jingrow/api/tools.py | 90 ++- 6 files changed, 869 insertions(+), 36 deletions(-) create mode 100644 apps/jingrow/frontend/src/views/dev/MyPublishedTools.vue diff --git a/apps/jingrow/frontend/src/app/router/index.ts b/apps/jingrow/frontend/src/app/router/index.ts index fead67c..e78be77 100644 --- a/apps/jingrow/frontend/src/app/router/index.ts +++ b/apps/jingrow/frontend/src/app/router/index.ts @@ -185,6 +185,12 @@ const router = createRouter({ name: 'MyPublishedAgents', component: () => import('../../views/dev/MyPublishedAgents.vue'), meta: { requiresAuth: true } + }, + { + path: 'my-published-tools', + name: 'MyPublishedTools', + component: () => import('../../views/dev/MyPublishedTools.vue'), + meta: { requiresAuth: true } } ] } diff --git a/apps/jingrow/frontend/src/locales/zh-CN.json b/apps/jingrow/frontend/src/locales/zh-CN.json index 7503b84..abe131c 100644 --- a/apps/jingrow/frontend/src/locales/zh-CN.json +++ b/apps/jingrow/frontend/src/locales/zh-CN.json @@ -1048,14 +1048,20 @@ "My Published Nodes": "已发布节点", "My Published Agents": "已发布智能体", + "My Published Tools": "已发布工具", "Manage your published nodes in the marketplace": "管理您在市场中发布的节点", "Manage your published agents in the marketplace": "管理您在市场中发布的智能体", + "Manage your published tools in the marketplace": "管理您在工具市场中发布的工具", "Node name does not exist": "节点名称不存在", "Agent name does not exist": "智能体名称不存在", "Are you sure you want to delete node \"{0}\"? This action cannot be undone.": "确定要删除节点 \"{0}\" 吗?此操作不可恢复。", "Are you sure you want to delete agent \"{0}\"? This action cannot be undone.": "确定要删除智能体 \"{0}\" 吗?此操作不可恢复。", "Node deleted successfully": "节点删除成功", "Agent deleted successfully": "智能体删除成功", + "Tool name does not exist": "工具名称不存在", + "Tool deleted successfully": "工具删除成功", + "Are you sure you want to delete tool \"{0}\"? This action cannot be undone.": "确定要删除工具 \"{0}\" 吗?此操作不可恢复。", + "Publish Your First Tool": "发布您的第一个工具", "Tools": "工具", "Add Tool": "添加工具", diff --git a/apps/jingrow/frontend/src/shared/stores/menu.ts b/apps/jingrow/frontend/src/shared/stores/menu.ts index b0a2488..0a3217f 100644 --- a/apps/jingrow/frontend/src/shared/stores/menu.ts +++ b/apps/jingrow/frontend/src/shared/stores/menu.ts @@ -65,6 +65,7 @@ function getDefaultMenus(): AppMenuItem[] { { id: 'my-published-apps', key: 'MyPublishedApps', label: 'My Published Apps', icon: 'tabler:cloud-upload', type: 'route', routeName: 'MyPublishedApps', parentId: 'dev-group', order: 7 }, { id: 'my-published-nodes', key: 'MyPublishedNodes', label: 'My Published Nodes', icon: 'carbon:add-child-node', type: 'route', routeName: 'MyPublishedNodes', parentId: 'dev-group', order: 7.1 }, { id: 'my-published-agents', key: 'MyPublishedAgents', label: 'My Published Agents', icon: 'hugeicons:robotic', type: 'route', routeName: 'MyPublishedAgents', parentId: 'dev-group', order: 7.2 }, + { id: 'my-published-tools', key: 'MyPublishedTools', label: 'My Published Tools', icon: 'tabler:tool', type: 'route', routeName: 'MyPublishedTools', parentId: 'dev-group', order: 7.3 }, { id: 'app-marketplace', key: 'AppMarketplace', label: 'App Marketplace', icon: 'tabler:shopping-cart', type: 'route', routeName: 'AppMarketplace', parentId: 'dev-group', order: 7.5 }, { id: 'node-marketplace', key: 'NodeMarketplace', label: 'Node Marketplace', icon: 'carbon:add-child-node', type: 'route', routeName: 'NodeMarketplace', parentId: 'dev-group', order: 8 }, { id: 'agent-marketplace', key: 'AgentMarketplace', label: 'Agent Marketplace', icon: 'hugeicons:robotic', type: 'route', routeName: 'AgentMarketplace', parentId: 'dev-group', order: 8.5 }, diff --git a/apps/jingrow/frontend/src/views/dev/MyPublishedTools.vue b/apps/jingrow/frontend/src/views/dev/MyPublishedTools.vue new file mode 100644 index 0000000..ff452d0 --- /dev/null +++ b/apps/jingrow/frontend/src/views/dev/MyPublishedTools.vue @@ -0,0 +1,687 @@ + + + + + + diff --git a/apps/jingrow/frontend/src/views/pagetype/local_ai_node/local_ai_node_list_actions.vue b/apps/jingrow/frontend/src/views/pagetype/local_ai_node/local_ai_node_list_actions.vue index b3bba89..757471e 100644 --- a/apps/jingrow/frontend/src/views/pagetype/local_ai_node/local_ai_node_list_actions.vue +++ b/apps/jingrow/frontend/src/views/pagetype/local_ai_node/local_ai_node_list_actions.vue @@ -2,37 +2,37 @@
- - - + + + + +
- - - - -