@friendlyrobot/discord-pi-agent 0.19.11 → 0.19.13

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.
Files changed (2) hide show
  1. package/dist/index.js +7 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1449,6 +1449,11 @@ function normalizeContextValue(value) {
1449
1449
 
1450
1450
  // src/discord-message-handler.ts
1451
1451
  var logger11 = createModuleLogger("discord-message-handler");
1452
+ function codeFence(text) {
1453
+ return `\`\`\`
1454
+ ${text}
1455
+ \`\`\``;
1456
+ }
1452
1457
  function buildDiscordPromptContent(message, scope, content, config) {
1453
1458
  const isThread = scope.startsWith("thread:") && message.channel.isThread();
1454
1459
  return buildDiscordMessageContextPrompt(content, {
@@ -1538,7 +1543,7 @@ ${attachment.content}`;
1538
1543
  logger11.info({ scope }, "archiving thread");
1539
1544
  const archiveChannel = message.channel;
1540
1545
  if (archiveChannel.isSendable()) {
1541
- await archiveChannel.send(commandResult.response ?? "Archiving...");
1546
+ await archiveChannel.send(codeFence(commandResult.response ?? "Archiving..."));
1542
1547
  }
1543
1548
  try {
1544
1549
  if (archiveChannel.isThread()) {
@@ -1556,7 +1561,7 @@ ${attachment.content}`;
1556
1561
  hasResponse: Boolean(commandResult.response)
1557
1562
  }, `command handled: ${content}`);
1558
1563
  if (commandResult.response) {
1559
- await sendReply(message, commandResult.response);
1564
+ await sendReply(message, codeFence(commandResult.response));
1560
1565
  }
1561
1566
  return;
1562
1567
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@friendlyrobot/discord-pi-agent",
3
- "version": "0.19.11",
3
+ "version": "0.19.13",
4
4
  "description": "Reusable Discord gateway for persistent pi agent sessions",
5
5
  "license": "MIT",
6
6
  "type": "module",