@hoverlover/cc-discord 0.5.2 → 0.5.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/package.json +1 -1
- package/server/trace-thread.ts +3 -2
package/package.json
CHANGED
package/server/trace-thread.ts
CHANGED
|
@@ -251,11 +251,12 @@ async function flushTraceEvents(client: Client) {
|
|
|
251
251
|
|
|
252
252
|
// Group by channel
|
|
253
253
|
const byChannel = new Map<string, TraceEvent[]>();
|
|
254
|
+
const skippedIds: number[] = [];
|
|
254
255
|
for (const evt of events) {
|
|
255
256
|
const ch = evt.channel_id || "unknown";
|
|
256
257
|
// Skip non-snowflake channel IDs (e.g. "claude" from legacy agent routing)
|
|
257
258
|
if (ch !== "unknown" && !/^\d{15,22}$/.test(ch)) {
|
|
258
|
-
|
|
259
|
+
skippedIds.push(evt.id);
|
|
259
260
|
continue;
|
|
260
261
|
}
|
|
261
262
|
const arr = byChannel.get(ch) || [];
|
|
@@ -263,7 +264,7 @@ async function flushTraceEvents(client: Client) {
|
|
|
263
264
|
byChannel.set(ch, arr);
|
|
264
265
|
}
|
|
265
266
|
|
|
266
|
-
const postedIds: number[] = [];
|
|
267
|
+
const postedIds: number[] = [...skippedIds];
|
|
267
268
|
|
|
268
269
|
for (const [channelId, channelEvents] of byChannel) {
|
|
269
270
|
if (channelId === "unknown") {
|