@bytesbrains/pi-telegram-bridge 1.1.4 → 1.1.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/package.json +1 -1
- package/src/index.ts +7 -7
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -295,16 +295,16 @@ export default function telegramBridge(pi: ExtensionAPI) {
|
|
|
295
295
|
];
|
|
296
296
|
const timeoutMs = (params.timeoutMinutes ?? 30) * 60000;
|
|
297
297
|
|
|
298
|
-
let message = `🛑
|
|
299
|
-
message +=
|
|
300
|
-
message +=
|
|
298
|
+
let message = `🛑 <b>Supervisor blocked an action</b>\n\n`;
|
|
299
|
+
message += `<b>Command:</b> <code>${params.command.slice(0, 200)}</code>\n`;
|
|
300
|
+
message += `<b>Reason:</b> ${params.reason.slice(0, 300)}\n`;
|
|
301
301
|
if (params.context) {
|
|
302
|
-
message +=
|
|
302
|
+
message += `<b>Context:</b> ${params.context.slice(0, 300)}\n`;
|
|
303
303
|
}
|
|
304
|
-
message += `\
|
|
304
|
+
message += `\n<i>What should I do?</i>`;
|
|
305
305
|
|
|
306
306
|
const kb = opts.map((o: string) => [{ text: o, callback_data: o }]);
|
|
307
|
-
const mid = await sendMsg(message, { inline_keyboard: kb }, "
|
|
307
|
+
const mid = await sendMsg(message, { inline_keyboard: kb }, "HTML");
|
|
308
308
|
const reply = await pollReply(mid, chatId, timeoutMs);
|
|
309
309
|
|
|
310
310
|
if (!reply) {
|
|
@@ -336,7 +336,7 @@ export default function telegramBridge(pi: ExtensionAPI) {
|
|
|
336
336
|
action = "explain";
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
-
await sendMsg(`✅ Choice received:
|
|
339
|
+
await sendMsg(`✅ Choice received: <i>${choice}</i>`, undefined, "HTML");
|
|
340
340
|
|
|
341
341
|
return {
|
|
342
342
|
content: [
|