Uh oh!
There was an error while loading. Please reload this page.
feat(slack): ability to have DM channels as destination for slack tools - #2388
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryThis PR adds support for Slack direct messages (DMs) as a destination type alongside channels. The implementation introduces a Key Changes:
Architecture: Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant UI as Slack Block UI
participant Serializer
participant SendAPI as /api/tools/slack/send-message
participant UsersAPI as /api/tools/slack/users
participant Utils as slack/utils.ts
participant Slack as Slack API
Note over User,Slack: DM Channel Selection Flow
User->>UI: Select "Direct Message" destination
UI->>UsersAPI: POST /api/tools/slack/users
UsersAPI->>Slack: GET users.list
Slack-->>UsersAPI: User list
UsersAPI-->>UI: Filtered users (non-bot, non-deleted)
User->>UI: Select user from dropdown
Note over User,Slack: Send DM Flow
User->>UI: Click Send
UI->>Serializer: Serialize block params
Serializer->>Serializer: Evaluate conditions (destinationType=dm)
Serializer->>Serializer: Include dmUserId, exclude channel
Serializer->>SendAPI: POST with userId
SendAPI->>Utils: sendSlackMessage({userId, text})
Utils->>Slack: POST conversations.open
Slack-->>Utils: DM channel ID
Utils->>Slack: POST chat.postMessage
Slack-->>Utils: Message response
Utils-->>SendAPI: Success
SendAPI-->>UI: Message sent
Note over User,Slack: Read DM Flow
User->>SendAPI: Read messages with userId
SendAPI->>Utils: openDMChannel(userId)
Utils->>Slack: POST conversations.open
Slack-->>Utils: DM channel ID
Utils->>Slack: GET conversations.history
Slack-->>Utils: Messages
Utils-->>SendAPI: Messages
SendAPI-->>User: DM messages
|
icecrasher321
commented
Dec 16, 2025
Uh oh!
There was an error while loading. Please reload this page.
Summary
Surface DM channels correctly.
Type of Change
Testing
Tested with @aadamgough
Checklist