@friendlyrobot/discord-pi-agent 0.10.2 → 0.10.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 +6 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -132,12 +132,7 @@ async function collectReply(session, prompt, options = {}) {
|
|
|
132
132
|
}, `tool end: [${event.toolName}]`);
|
|
133
133
|
}
|
|
134
134
|
if (event.type === "agent_end") {
|
|
135
|
-
logger3.debug(
|
|
136
|
-
messageCount: event.messages.length,
|
|
137
|
-
model,
|
|
138
|
-
toolCount,
|
|
139
|
-
eventCount
|
|
140
|
-
}, "agent end");
|
|
135
|
+
logger3.debug("agent end");
|
|
141
136
|
}
|
|
142
137
|
});
|
|
143
138
|
try {
|
|
@@ -1000,7 +995,7 @@ async function sendTypingSafe(channel, channelKey) {
|
|
|
1000
995
|
headers: { Authorization: `Bot ${token}` }
|
|
1001
996
|
});
|
|
1002
997
|
if (res.ok) {
|
|
1003
|
-
logger5.debug(
|
|
998
|
+
logger5.debug(`[TYPING] STATUS UPDATED OK: ${await res.text()}`);
|
|
1004
999
|
return;
|
|
1005
1000
|
}
|
|
1006
1001
|
if (res.status === 429) {
|
|
@@ -1033,7 +1028,7 @@ function startTypingForChannel(channel, channelKey) {
|
|
|
1033
1028
|
logger5.debug({ channelKey, refs: existing.refs }, "[TYPING] ref++ (reusing existing interval)");
|
|
1034
1029
|
return;
|
|
1035
1030
|
}
|
|
1036
|
-
logger5.debug(
|
|
1031
|
+
logger5.debug("[TYPING] started new interval");
|
|
1037
1032
|
sendTypingSafe(channel, channelKey);
|
|
1038
1033
|
const interval = setInterval(() => {
|
|
1039
1034
|
sendTypingSafe(channel, channelKey);
|
|
@@ -1050,9 +1045,9 @@ function stopTypingForChannel(channelKey) {
|
|
|
1050
1045
|
if (entry.refs <= 0) {
|
|
1051
1046
|
clearInterval(entry.interval);
|
|
1052
1047
|
typingIntervals.delete(channelKey);
|
|
1053
|
-
logger5.debug(
|
|
1048
|
+
logger5.debug("[TYPING] interval cleared (refs hit 0)");
|
|
1054
1049
|
} else {
|
|
1055
|
-
logger5.debug(
|
|
1050
|
+
logger5.debug("[TYPING] ref-- (interval still active)");
|
|
1056
1051
|
}
|
|
1057
1052
|
}
|
|
1058
1053
|
async function sendReply(message, text) {
|
|
@@ -1124,7 +1119,7 @@ async function startGatewayClient(config, agentService, sessionRegistry, authCon
|
|
|
1124
1119
|
}
|
|
1125
1120
|
async function onMessage(message, config, agentService, sessionRegistry, authConfig) {
|
|
1126
1121
|
if (message.author.bot) {
|
|
1127
|
-
logger5.debug(
|
|
1122
|
+
logger5.debug("ignored bot message");
|
|
1128
1123
|
return;
|
|
1129
1124
|
}
|
|
1130
1125
|
if (message.system) {
|