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", 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);