From 46ff1a64e972bfcb73ecfa06231f0e03f01ce950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Sun, 25 Jan 2026 21:06:21 +0800 Subject: [PATCH] Add action tags to OneBot API schema and update tag name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Included the 'tags' property in the OneBot API schema for both backend and frontend, allowing actions to be categorized. Also updated the action tag from '群扩展' to '群组扩展' in SetGroupSign for consistency. --- packages/napcat-onebot/action/extends/SetGroupSign.ts | 2 +- packages/napcat-webui-backend/src/api/Debug.ts | 1 + packages/napcat-webui-frontend/src/const/ob_api/index.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/napcat-onebot/action/extends/SetGroupSign.ts b/packages/napcat-onebot/action/extends/SetGroupSign.ts index 500c06b1..098cc844 100644 --- a/packages/napcat-onebot/action/extends/SetGroupSign.ts +++ b/packages/napcat-onebot/action/extends/SetGroupSign.ts @@ -16,7 +16,7 @@ class SetGroupSignBase extends GetPacketStatusDepends { override payloadSchema = PayloadSchema; override returnSchema = ReturnSchema; override actionSummary = '设置群签名'; - override actionTags = ['群扩展']; + override actionTags = ['群组扩展']; override payloadExample = { group_id: '123456789' }; diff --git a/packages/napcat-webui-backend/src/api/Debug.ts b/packages/napcat-webui-backend/src/api/Debug.ts index 3a35f9f4..a5d1b1d8 100644 --- a/packages/napcat-webui-backend/src/api/Debug.ts +++ b/packages/napcat-webui-backend/src/api/Debug.ts @@ -44,6 +44,7 @@ router.get('/schemas', async (_req: Request, res: Response) => { payload: action.payloadSchema, response: action.returnSchema, payloadExample: action.payloadExample, + tags: action.actionTags, }; } } diff --git a/packages/napcat-webui-frontend/src/const/ob_api/index.ts b/packages/napcat-webui-frontend/src/const/ob_api/index.ts index 58218c84..8cf0c2b9 100644 --- a/packages/napcat-webui-frontend/src/const/ob_api/index.ts +++ b/packages/napcat-webui-frontend/src/const/ob_api/index.ts @@ -5,6 +5,7 @@ export interface OneBotHttpApiContent { payload: TSchema; response: TSchema; payloadExample?: any; + tags?: string[]; } export type OneBotHttpApi = Record;