Merged
Conversation
* Add Slack messaging provider Implements Slack as a new chat provider following the existing provider pattern (Feishu, QQ, WeChat). Includes Events API webhook handling with HMAC-SHA256 signature verification, message parsing, and chat.postMessage sending with thread support and retry logic. New files: - SlackProviderOptions.cs - Provider configuration - SlackModels.cs - Slack API DTOs (Events API, Block Kit, Web API) - SlackProvider.cs - Main provider implementation Modified files: - ChatServiceExtensions.cs - Register Slack in DI container - ChatEndpoints.cs - Add /api/chat/webhook/slack endpoint - ChatWebhookApiService.cs - Add Slack webhook handler - appsettings.json - Default Slack configuration (disabled) * Fix messaging agent: DeepWiki context, reply routing, and DI issues - Add ChatMultiRepoDocTool for multi-repo documentation queries from messaging providers (ListRepositories, ListDocuments, ReadDoc) - Enhance AgentExecutor to use DeepWiki system prompt and doc tools instead of plain "helpful assistant" with no context - Fix reply destination: respond in channel (ReceiverId) instead of always sending to user DM (SenderId) - Propagate thread metadata (thread_ts) to response messages for proper Slack threading - Fix MessageRouter singleton/scoped DI: use IServiceScopeFactory to resolve scoped services (SessionManager, MessageQueue) - Change all error messages from Chinese to English * Fix duplicate Slack responses and redundant session handling - Filter out message events in channels (only process app_mention) to prevent double processing when Slack sends both event types - Strip session management from MessageRouter.RouteIncomingAsync (was redundant with worker's ProcessIncomingMessageAsync) - Only process DM message events (im/mpim channel types) * Add permission filtering and fix status filter for messaging tools - Only show public repos (IsPublic=true) to Slack users since there's no Slack-to-DeepWiki user identity mapping - Include Processing repos (not just Completed) so partially indexed repos are visible - Add IsPublic check to ListDocuments and ReadDoc tools - Show indexing status in ListRepositories output * Add Slack-to-DeepWiki user identity mapping for permission-aware access Resolve Slack user IDs to DeepWiki users via email matching (Slack users.info API -> email -> Users table). Private repositories are now only visible to users with matching department assignments, while public repos remain accessible to all.
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.
Summary
Adds Slack as a new messaging provider alongside the existing Feishu, QQ, and WeChat providers. This enables users to interact with OpenDeepWiki documentation through Slack DMs and channel @mentions.
What's included
Slack Provider (
Chat/Providers/Slack/)BaseMessageProviderapp_mention(channels) andmessage(DMs) eventsapp_mentionandmessage)User Identity Mapping (
Chat/Execution/ChatUserResolver.cs)users.infoAPI to resolve email, then looks up in Users tableMulti-Repo Documentation Tool (
Agents/Tools/ChatMultiRepoDocTool.cs)ListRepositories,ListDocuments,ReadDocEnhanced Agent Executor
AgentExecutorto use DeepWiki documentation tools and system promptRegistration & Endpoints
POST /api/chat/webhook/slackChatServiceExtensions.csappsettings.jsonSlack App Setup
Required bot event subscriptions:
message.channels,message.groups,message.im,app_mentionRequired OAuth scopes:
chat:write,channels:history,groups:history,im:history,users:read.email