Skip to content

feat(slack): added slack oauth for sim bot & maintained old custom bot, fixed markdown rendering - #445

Merged
waleedlatif1 merged 10 commits into
mainfrom
feat/slack
Jun 2, 2025
Merged

feat(slack): added slack oauth for sim bot & maintained old custom bot, fixed markdown rendering#445
waleedlatif1 merged 10 commits into
mainfrom
feat/slack

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator
  • fix formatting of contributors chart
  • added slack oauth, removed hardcoded localhosts and use NEXT_PUBLIC_APP_URL instead
  • remove conditional rendering of subblocks for tools in an agent blcok

Description

Added slack oauth for sim bot & maintained old custom bot

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Tested many times manually and ensured that we are able to either provide the bot token or the credential selector. Also tested oauth token refresh

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally and in CI (bun run test)
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • I have updated version numbers as needed (if needed)
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Security Considerations:

  • My changes do not introduce any new security vulnerabilities
  • I have considered the security implications of my changes

@vercel

vercel Bot commented Jun 1, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sim ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 2, 2025 3:31am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Skipped (Inspect) Jun 2, 2025 3:31am

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR implements Slack OAuth integration while maintaining custom bot token functionality, along with improvements to URL handling and markdown rendering. The changes span across multiple components and services to provide a cohesive Slack integration experience.

  • Added new /api/tools/slack/channels endpoint with support for both OAuth and bot token authentication
  • Implemented ChannelSelectorInput component with credential-aware channel fetching and selection
  • Replaced hardcoded localhost URLs with dynamic NEXT_PUBLIC_APP_URL environment variable usage
  • Enhanced Slack message tool to support both authentication methods and improved markdown handling
  • Added proper OAuth scope management and token refresh handling for Slack integration

21 file(s) reviewed, 26 comment(s)
Edit PR Review Bot Settings | Greptile

Comment thread apps/sim/app/api/tools/slack/channels/route.ts
Comment thread apps/sim/app/api/tools/slack/channels/route.ts Outdated
Comment thread apps/sim/app/api/tools/slack/channels/route.ts
Comment thread apps/sim/app/api/chat/route.ts Outdated
Comment thread apps/sim/app/api/chat/route.ts
Comment thread apps/sim/next.config.ts Outdated
Comment thread apps/sim/tools/slack/message.ts
Comment thread apps/sim/tools/slack/message.ts
Comment thread apps/sim/tools/slack/types.ts Outdated
Comment thread apps/sim/tools/slack/types.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant