@iletai/nzb 1.2.4 → 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.
- package/dist/telegram/bot.js +8 -1
- package/package.json +1 -1
package/dist/telegram/bot.js
CHANGED
|
@@ -375,7 +375,14 @@ export function createBot() {
|
|
|
375
375
|
const onUsage = (usage) => {
|
|
376
376
|
usageInfo = usage;
|
|
377
377
|
};
|
|
378
|
-
|
|
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();
|