@sesamespace/hivemind 0.5.9 → 0.5.11

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.
@@ -1855,7 +1855,12 @@ async function startSesameLoop(config, agent) {
1855
1855
  return;
1856
1856
  }
1857
1857
  const ctxPrefix = response.contextSwitched ? `[switched to ${response.context}] ` : "";
1858
- await sesame.sendMessage(msg.channelId, ctxPrefix + response.content);
1858
+ let content = response.content;
1859
+ const selfPrefix = `[${config.agent.name}]:`;
1860
+ if (content.startsWith(selfPrefix)) {
1861
+ content = content.slice(selfPrefix.length).trimStart();
1862
+ }
1863
+ await sesame.sendMessage(msg.channelId, ctxPrefix + content);
1859
1864
  console.log(`[sesame] ${config.agent.name} (${response.context}): ${response.content.slice(0, 100)}...`);
1860
1865
  sesame.updatePresence("online", { emoji: "\u{1F7E2}" });
1861
1866
  } catch (err) {
@@ -2410,4 +2415,4 @@ smol-toml/dist/index.js:
2410
2415
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2411
2416
  *)
2412
2417
  */
2413
- //# sourceMappingURL=chunk-4U4GKI3X.js.map
2418
+ //# sourceMappingURL=chunk-3O2BF2TT.js.map