-
Notifications
You must be signed in to change notification settings - Fork 0
Add Slackbot code #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
smurching
wants to merge
25
commits into
main
Choose a base branch
from
smurching/slackbot
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
…h databricks agent endpoint using authentication on behalf of the user.
…bricks (chat completions and responses).
Update Databricks Client
…y with teams authentication procedure.
Updating appManifest for teams app
Signed-off-by: Sid Murching <[email protected]>
Signed-off-by: Sid Murching <[email protected]>
Signed-off-by: Sid Murching <[email protected]>
Signed-off-by: Sid Murching <[email protected]>
Signed-off-by: Sid Murching <[email protected]>
…r OAuth Major features: - Ephemeral messages: Bot responses appear privately to user with share button - Auto-respond after OAuth: Bot stores pending messages and automatically processes them after authentication - Share to channel: Users can click button to post response publicly in thread - Socket mode: Refactored to use Socket Mode for local development Technical changes: - Added oauth_server.py: Standalone OAuth callback handler with auto-respond logic - Updated app_socket.py: Socket Mode implementation with share button handler - Enhanced message_handler.py: Send ephemeral messages, store pending messages before OAuth - Fixed PKCE issues: Deduplicated event handlers to prevent double processing - Fixed token exchange: Skip unnecessary exchange for direct Databricks OAuth tokens - Fixed WorkspaceClient conflicts: Temporarily unset OAuth env vars 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…buttons Features: - Eyes emoji reaction on message receipt for instant acknowledgment - Public "working on it" status message after authentication - Ephemeral responses with Share to channel button - Public "Generate my own answer" button for other users - Auto-hide buttons after use UX improvements: - Share posts raw content without user attribution prefix - Generate button creates personalized answer for each user - Both buttons hide and show completion status after use 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…utton updates Improvements: - Remove duplicate OAuth success message in channel - Auto-delete "working on it" message after response is sent - Instant button removal on Share click using response_action="update" - Cleaner, less cluttered message flow 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Signed-off-by: Sid Murching <[email protected]>
- Add thread_ts parameter to ephemeral OAuth message - Ensures login button appears in thread view, not main channel - Improves UX by keeping authentication flow in context 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Changes: - Rename "Share to channel" button to "Post in thread" for clarity - Add "Dismiss" button to allow users to dismiss ephemeral messages - Add white_check_mark reaction when posting to thread - Update status message from "Shared to channel" to "Posted in thread" - Add debug logging for button click handlers Note: Ephemeral message dismissal needs further investigation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Changes: - Use respond(delete_original=True) instead of ack(response_action="clear") - Both "Post in thread" and "Dismiss" buttons now properly delete ephemeral messages - Add white_check_mark reaction to original user message when posting - Store message_ts in response_data for reaction targeting - Add extensive logging for debugging button interactions Fixes the issue where ephemeral messages weren't being hidden when buttons were clicked. According to Slack docs, ephemeral messages must be deleted via response_url, not response_action. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Signed-off-by: Sid Murching <[email protected]>
- Remove app.py and http_mode.py (non-socket mode files) - Update README to focus on Socket Mode only - Add PR_DESCRIPTION.md with high-level context - Update environment variables to include SLACK_APP_TOKEN - Simplify setup instructions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Merging main branch history to prepare for PR. - Resolved .gitignore conflict by combining both versions - Added *conf*.json pattern from main to comprehensive .gitignore 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
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.
Add Slack Bot with OAuth Authentication
Overview
This PR introduces a Slack bot that provides personalized, authenticated access to Databricks AI agents. The bot implements a UX featuring ephemeral messages, sharing capabilities, and multi-user support.
Key Features
Architecture
The bot uses Socket Mode for development and consists of:
User Flow
@DatabricksBot helloTechnical Highlights
chat_postEphemeralfor private responsesrespond(delete_original=True)for dismissing ephemeral messagesapp_mentionandmessageevents without duplicationTesting
Run the bot locally:
cd slack-bot python app_socket.pyThe bot will:
Future Enhancements
app.yaml, make the choice of serving endpoint parametrizable, add deployment instructions, etc)Related Documentation
See
slack-bot/README.mdfor: