@iletai/nzb 1.2.3 → 1.2.5

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.
@@ -415,6 +415,13 @@ export async function sendToOrchestrator(prompt, source, callback, onToolEvent,
415
415
  catch {
416
416
  /* best-effort */
417
417
  }
418
+ // Auto-continue: if the response was cut short by timeout, automatically
419
+ // send a follow-up "Continue" message so the user doesn't have to
420
+ if (finalContent.includes("⏱ Response was cut short (timeout)")) {
421
+ console.log("[nzb] Auto-continuing after timeout…");
422
+ await sleep(1000);
423
+ void sendToOrchestrator("Continue from where you left off. Do not repeat what was already said.", source, callback, onToolEvent, onUsage);
424
+ }
418
425
  return;
419
426
  }
420
427
  catch (err) {
@@ -375,7 +375,14 @@ export function createBot() {
375
375
  const onUsage = (usage) => {
376
376
  usageInfo = usage;
377
377
  };
378
- sendToOrchestrator(ctx.message.text, { type: "telegram", chatId, messageId: userMessageId }, (text, done) => {
378
+ // If user replies to a message, include that message's text as context
379
+ let userPrompt = ctx.message.text;
380
+ const replyMsg = ctx.message.reply_to_message;
381
+ if (replyMsg && "text" in replyMsg && replyMsg.text) {
382
+ const quoted = replyMsg.text.length > 500 ? replyMsg.text.slice(0, 500) + "…" : replyMsg.text;
383
+ userPrompt = `[Replying to: "${quoted}"]\n\n${userPrompt}`;
384
+ }
385
+ sendToOrchestrator(userPrompt, { type: "telegram", chatId, messageId: userMessageId }, (text, done) => {
379
386
  if (done) {
380
387
  finalized = true;
381
388
  stopTyping();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iletai/nzb",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "NZB — a personal AI assistant for developers, built on the GitHub Copilot SDK",
5
5
  "bin": {
6
6
  "nzb": "dist/cli.js"