feat(discord): include channel name in message metadata#1466
Closed
darrenzeng2025 wants to merge 1 commit intosipeed:mainfrom
Closed
feat(discord): include channel name in message metadata#1466darrenzeng2025 wants to merge 1 commit intosipeed:mainfrom
darrenzeng2025 wants to merge 1 commit intosipeed:mainfrom
Conversation
Add Discord channel name to metadata map when processing messages. This provides better context for the agent by including the human-readable channel name alongside the numeric channel ID. The channel name is retrieved from Discord's state cache (zero-cost lookup in common case) with graceful handling if not available. Fixes sipeed#1451
xuwei-xy
pushed a commit
to xuwei-xy/picoclaw
that referenced
this pull request
Mar 14, 2026
|
@darrenzeng2025 Hi! This PR has had no activity for over 2 weeks, so I'm closing it for now to keep things tidy. If it's still relevant, feel free to reopen it anytime and we'll pick it back up. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add Discord channel name to message metadata for better agent context.
Currently, the dynamic context shows only the numeric Discord channel ID which provides no semantic context to the LLM. This change adds the human-readable channel name so the agent knows whether it's talking in #general, #support, or #off-topic.
Changes
Type of Change
AI Code Generation
🤖 Fully AI-generated - AI wrote the code; contributor reviewed and validated it
Related Issue
Fixes #1451
Technical Context
Per the issue description, the channel name is retrieved using
s.State.Channel(m.ChannelID)which is populated on connect and is a zero-cost lookup in the common case.The metadata flows through
bus.InboundMessage.Metadatato the agent loop where it can be used for context building.Test Environment
Checklist