@hoverlover/cc-discord 0.5.1 → 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 +7 -1
package/package.json
CHANGED
package/server/trace-thread.ts
CHANGED
|
@@ -251,14 +251,20 @@ 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";
|
|
257
|
+
// Skip non-snowflake channel IDs (e.g. "claude" from legacy agent routing)
|
|
258
|
+
if (ch !== "unknown" && !/^\d{15,22}$/.test(ch)) {
|
|
259
|
+
skippedIds.push(evt.id);
|
|
260
|
+
continue;
|
|
261
|
+
}
|
|
256
262
|
const arr = byChannel.get(ch) || [];
|
|
257
263
|
arr.push(evt);
|
|
258
264
|
byChannel.set(ch, arr);
|
|
259
265
|
}
|
|
260
266
|
|
|
261
|
-
const postedIds: number[] = [];
|
|
267
|
+
const postedIds: number[] = [...skippedIds];
|
|
262
268
|
|
|
263
269
|
for (const [channelId, channelEvents] of byChannel) {
|
|
264
270
|
if (channelId === "unknown") {
|