fix/discord numeric channel id 26139#26164
Conversation
3bdd722 to
ca70631
Compare
Additional Comments (2)
There's a missing space between ⚽ and 🎳 in the error message string. The validation array on line 382 is correct, but the user-facing error message has them joined together as Prompt To Fix With AIThis is a comment left during a code review.
Path: src/agents/tools/telegram-actions.ts
Line: 383
Comment:
**Missing space in error message**
There's a missing space between ⚽ and 🎳 in the error message string. The validation array on line 382 is correct, but the user-facing error message has them joined together as `⚽🎳` instead of `⚽ 🎳`.
```suggestion
throw new Error(`Invalid dice emoji: ${emoji}. Must be one of: 🎲 🎯 🏀 ⚽ 🎳 🎰`);
```
How can I resolve this? If you propose a fix, please make it concise.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! Prompt To Fix With AIThis is a comment left during a code review.
Path: src/gateway/server-startup.ts
Line: 43-44
Comment:
**Redundant dynamic imports of `path` and `fs`**
`path` is already imported statically at the top of this file (line 1), so the dynamic `await import("node:path")` on line 44 is redundant — it just shadows the outer binding. Similarly, `fs` could be a static import since this module already has top-level imports and isn't lazy-loaded. Consider using static imports to keep the code consistent with the rest of the file.
```suggestion
const fs = await import("node:fs");
```
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
Superseded by #33142 which consolidates the fixes from this PR. Closing this in favor of that PR. |
Greptile Summary
This PR bundles several distinct changes: a Discord bug fix for numeric channel ID parsing, a Telegram
sendDicefeature, a provider handler registry refactoring inextra-params.ts, a fix to preserve thinking blocks in the latest assistant message during compaction (Anthropic API requirement), and orphan transcript cleanup on gateway startup.guild/channelinput are numeric IDs, the parser now correctly returnschannelIdinstead of treating the channel as a name to search — fixing resolution failures for numeric Discord channel IDs.sendDiceaction across the full stack: Telegram API send function, action handler, channel plugin adapter, config gating, and tests. Minor typo in the error message for invalid emojis (missing space).Map<string, ProviderHandler[]>pattern. Behavior is preserved via Map insertion order, though thezai/z-aihandlers remain duplicated.dropThinkingBlocksnow preserves thinking blocks in the latest assistant message, preventing Anthropic API 400 errors during session compaction.cleanupOrphanTranscriptsto archive session transcript files not referenced in the session store on startup, with a safety threshold of 10 files.Confidence Score: 4/5
src/agents/pi-embedded-runner/extra-params.tsdeserves careful review since the refactoring to a registry pattern changes the control flow structure, though behavior should be equivalent.src/gateway/server-startup.tsintroduces file archival logic that runs on every gateway startup.Last reviewed commit: ca70631
Context used:
dashboard- CLAUDE.md (source)