From 1485ab12abfc6e515f42372ab3afa3b8427475d4 Mon Sep 17 00:00:00 2001 From: Tom Date: Thu, 28 Nov 2024 15:52:40 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20package.json=20=E5=A4=9A=E4=BD=99=20?= =?UTF-8?q?&&?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c3f8b20e..73dea081 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "build:dockerx": "docker buildx build --platform linux/amd64,linux/arm64 -t chatgpt-telegram-workers:latest .", "build:dist": "pnpm run version && pnpm run build:workers && cp -r packages/apps/workers/dist/index.js dist/", "deploy:dist": "pnpm run build:dist && wrangler deploy", - "deploy:workers": "pnpm run build:workers && && TOML_PATH=$INIT_CWD/wrangler.toml pnpm run --filter @chatgpt-telegram-workers/workers deploy", + "deploy:workers": "pnpm run build:workers && TOML_PATH=$INIT_CWD/wrangler.toml pnpm run --filter @chatgpt-telegram-workers/workers deploy", "deploy:workersnext": "pnpm run build:workersnext && TOML_PATH=$INIT_CWD/wrangler.toml pnpm run --filter @chatgpt-telegram-workers/workers-next deploy", "deploy:vercel": "pnpm run build:vercel && vercel --prod", "start:local": "pnpm run build:local && CONFIG_PATH=$INIT_CWD/config.json TOML_PATH=$INIT_CWD/wrangler.toml pnpm run --filter @chatgpt-telegram-workers/local start", From 3d5f1e7b4b199d7417e5c4acf74e75247d4d3271 Mon Sep 17 00:00:00 2001 From: Tom Date: Thu, 28 Nov 2024 15:52:57 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E6=A8=A1=E5=9E=8B=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=BC=BA=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/lib/core/src/telegram/callback_query/system.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/lib/core/src/telegram/callback_query/system.ts b/packages/lib/core/src/telegram/callback_query/system.ts index 5c18051b..8d84f18f 100644 --- a/packages/lib/core/src/telegram/callback_query/system.ts +++ b/packages/lib/core/src/telegram/callback_query/system.ts @@ -71,6 +71,10 @@ export class ModelListCallbackQueryHandler implements CallbackQueryHandler { let currentRow: Telegram.InlineKeyboardButton[] = []; for (let i = page * maxRow * maxCol; i < models.length; i++) { + currentRow.push({ + text: models[i], + callback_data: `cm:${JSON.stringify([agent, models[i]])}`, + }); if (i % maxCol === 0) { keyboard.push(currentRow); currentRow = []; @@ -78,10 +82,6 @@ export class ModelListCallbackQueryHandler implements CallbackQueryHandler { if (keyboard.length >= maxRow) { break; } - currentRow.push({ - text: models[i], - callback_data: `cm:${JSON.stringify([agent, models[i]])}`, - }); } if (currentRow.length > 0) { keyboard.push(currentRow);