@friendlyrobot/discord-pi-agent 0.7.1 → 0.7.3
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/index.js +10 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -102,7 +102,8 @@ async function collectReply(session, prompt, options = {}) {
|
|
|
102
102
|
let sawAgentEnd = false;
|
|
103
103
|
logger3.debug({
|
|
104
104
|
logPrefix,
|
|
105
|
-
promptLength: prompt.length
|
|
105
|
+
promptLength: prompt.length,
|
|
106
|
+
prompt
|
|
106
107
|
}, "prompt start");
|
|
107
108
|
const unsubscribe = session.subscribe((event) => {
|
|
108
109
|
eventCount += 1;
|
|
@@ -1011,13 +1012,6 @@ async function startGatewayClient(config, agentService, sessionRegistry, authCon
|
|
|
1011
1012
|
}
|
|
1012
1013
|
});
|
|
1013
1014
|
client.on(Events.MessageCreate, async (message) => {
|
|
1014
|
-
logger5.info({
|
|
1015
|
-
direction: "IN",
|
|
1016
|
-
messageId: message.id,
|
|
1017
|
-
authorId: message.author.id,
|
|
1018
|
-
channelType: message.channel.type,
|
|
1019
|
-
content: message.content
|
|
1020
|
-
}, "message received");
|
|
1021
1015
|
try {
|
|
1022
1016
|
await onMessage(message, config, agentService, sessionRegistry, authConfig);
|
|
1023
1017
|
} catch (error) {
|
|
@@ -1063,6 +1057,14 @@ async function onMessage(message, config, agentService, sessionRegistry, authCon
|
|
|
1063
1057
|
logger5.debug({ messageId: message.id }, "ignored empty message");
|
|
1064
1058
|
return;
|
|
1065
1059
|
}
|
|
1060
|
+
logger5.info({
|
|
1061
|
+
direction: "IN",
|
|
1062
|
+
scope,
|
|
1063
|
+
messageId: message.id,
|
|
1064
|
+
authorId: message.author.id,
|
|
1065
|
+
channelType: message.channel.type,
|
|
1066
|
+
content
|
|
1067
|
+
}, "message received");
|
|
1066
1068
|
const { entry, created } = await sessionRegistry.getOrCreate(scope);
|
|
1067
1069
|
const { session, promptQueue } = entry;
|
|
1068
1070
|
if (created && scope.startsWith("thread:") && message.channel.isThread()) {
|