@locusai/locus-telegram 0.23.0 → 0.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10877,6 +10877,8 @@ var exports_bot = {};
10877
10877
  __export(exports_bot, {
10878
10878
  createBot: () => createBot
10879
10879
  });
10880
+ import { exec as execCb3 } from "node:child_process";
10881
+ import { promisify as promisify3 } from "node:util";
10880
10882
  function createBot(config) {
10881
10883
  const bot = new import_grammy3.Bot(config.botToken);
10882
10884
  bot.use(async (ctx, next) => {
@@ -10981,7 +10983,7 @@ function registerCallbackHandlers(bot) {
10981
10983
  });
10982
10984
  bot.callbackQuery(CB.SHOW_PLAN_DETAILS, async (ctx) => {
10983
10985
  await ctx.answerCallbackQuery();
10984
- await handleLocusCommand(ctx, "plan", ["--show"]);
10986
+ await handleLocusCommand(ctx, "plan", ["list"]);
10985
10987
  });
10986
10988
  bot.callbackQuery(CB.VIEW_LOGS, async (ctx) => {
10987
10989
  await ctx.answerCallbackQuery();
@@ -10997,9 +10999,16 @@ function registerCallbackHandlers(bot) {
10997
10999
  const pr = ctx.match[1];
10998
11000
  await ctx.answerCallbackQuery({ text: "Approving PR..." });
10999
11001
  await ctx.editMessageReplyMarkup({ reply_markup: undefined });
11000
- await ctx.reply(formatSuccess(`Approved PR #${pr}`), {
11001
- parse_mode: "HTML"
11002
- });
11002
+ try {
11003
+ await exec3(`gh pr review ${pr} --approve`, { cwd: process.cwd() });
11004
+ await ctx.reply(formatSuccess(`Approved PR #${pr}`), {
11005
+ parse_mode: "HTML"
11006
+ });
11007
+ } catch (error) {
11008
+ await ctx.reply(formatError(`Failed to approve PR #${pr}`, String(error)), {
11009
+ parse_mode: "HTML"
11010
+ });
11011
+ }
11003
11012
  });
11004
11013
  bot.callbackQuery(/^review:changes:(\d+)$/, async (ctx) => {
11005
11014
  const pr = ctx.match[1];
@@ -11010,7 +11019,7 @@ function registerCallbackHandlers(bot) {
11010
11019
  bot.callbackQuery(/^review:diff:(\d+)$/, async (ctx) => {
11011
11020
  const pr = ctx.match[1];
11012
11021
  await ctx.answerCallbackQuery();
11013
- await handleLocusCommand(ctx, "review", [pr, "--diff"]);
11022
+ await handleLocusCommand(ctx, "review", [pr]);
11014
11023
  });
11015
11024
  bot.callbackQuery(CB.RUN_SPRINT, async (ctx) => {
11016
11025
  await ctx.answerCallbackQuery({ text: "Starting sprint run..." });
@@ -11056,7 +11065,7 @@ function parseArgs(text, command) {
11056
11065
  return [];
11057
11066
  return rest.split(/\s+/);
11058
11067
  }
11059
- var import_grammy3, logger2;
11068
+ var import_grammy3, exec3, logger2;
11060
11069
  var init_bot = __esm(() => {
11061
11070
  init_dist2();
11062
11071
  init_cancel();
@@ -11066,6 +11075,7 @@ var init_bot = __esm(() => {
11066
11075
  init_keyboards();
11067
11076
  init_messages();
11068
11077
  import_grammy3 = __toESM(require_mod(), 1);
11078
+ exec3 = promisify3(execCb3);
11069
11079
  logger2 = createLogger("telegram");
11070
11080
  });
11071
11081
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@locusai/locus-telegram",
3
- "version": "0.23.0",
3
+ "version": "0.23.1",
4
4
  "description": "Remote-control Locus via Telegram with full CLI mapping, git operations, and PM2 management",
5
5
  "type": "module",
6
6
  "bin": {
@@ -27,9 +27,9 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@grammyjs/runner": "^2.0.3",
30
- "@locusai/locus-gateway": "^0.23.0",
31
- "@locusai/locus-pm2": "^0.23.0",
32
- "@locusai/sdk": "^0.23.0",
30
+ "@locusai/locus-gateway": "^0.23.1",
31
+ "@locusai/locus-pm2": "^0.23.1",
32
+ "@locusai/sdk": "^0.23.1",
33
33
  "grammy": "^1.35.0"
34
34
  },
35
35
  "devDependencies": {