From acf21542457b287ec9720cfcfac05a56914250e9 Mon Sep 17 00:00:00 2001 From: tbxark Date: Tue, 24 Dec 2024 17:09:43 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=9B=B4=E6=96=B0=20createKeyboard?= =?UTF-8?q?=20=E6=96=B9=E6=B3=95=E7=9A=84=E8=BF=94=E5=9B=9E=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E4=BB=A5=E6=8F=90=E9=AB=98=E7=B1=BB=E5=9E=8B=E5=AE=89?= =?UTF-8?q?=E5=85=A8=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/lib/core/src/telegram/callback_query/system.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/lib/core/src/telegram/callback_query/system.ts b/packages/lib/core/src/telegram/callback_query/system.ts index 796a1f6a..023e6eb3 100644 --- a/packages/lib/core/src/telegram/callback_query/system.ts +++ b/packages/lib/core/src/telegram/callback_query/system.ts @@ -47,7 +47,7 @@ export class AgentListCallbackQueryHandler implements CallbackQueryHandler { return sender.editRawMessage(params); }; - private createKeyboard(names: string[]) { + private createKeyboard(names: string[]): Telegram.InlineKeyboardButton[][] { const keyboards: Telegram.InlineKeyboardButton[][] = []; for (let i = 0; i < names.length; i += 2) { const row: Telegram.InlineKeyboardButton[] = []; @@ -152,7 +152,7 @@ export class ModelListCallbackQueryHandler implements CallbackQueryHandler { return sender.editRawMessage(message); } - private async createKeyboard(models: string[], agent: string, page: number) { + private async createKeyboard(models: string[], agent: string, page: number): Promise { const keyboard: Telegram.InlineKeyboardButton[][] = []; const maxRow = 10; const maxCol = Math.max(1, Math.min(5, ENV.MODEL_LIST_COLUMNS));