slack-go / slack

Slack API in Go, originally by @nlopes; Maintainers needed, contact @parsley42
https://pkg.go.dev/github.com/slack-go/slack
BSD 2-Clause "Simplified" License
4.7k stars 1.14k forks source link

feat: Slack AI & Assistants Compatibility #1331

Closed MattDavisRV closed 3 weeks ago

MattDavisRV commented 1 month ago

Added new function for Slack AI & Assistants, information can be found here: https://api.slack.com/docs/apps/ai

New Events: https://api.slack.com/events/assistant_thread_started https://api.slack.com/events/assistant_thread_context_changed

New API Calls: https://api.slack.com/methods/assistant.threads.setStatus https://api.slack.com/methods/assistant.threads.setSuggestedPrompts https://api.slack.com/methods/assistant.threads.setTitle

Tests have been added and pass all checks via make pr-prep.

MattDavisRV commented 1 month ago

This PR resolves issue 1326.

MattDavisRV commented 1 month ago

@lorenzoaiello, sorry about the initially cluttered PR, I didn't look at the changed files and I'm unsure how all of the additional changes were added in. I've cleaned up the PR to only be my changes.

I've also added in an additional change for the Section Block that was added due to the AI changes. I was going to submit an additional PR with it, but I decided to add it in here.

lorenzoaiello commented 1 month ago

@MattDavisRV , can you please resolve the conflicts?

MattDavisRV commented 1 month ago

@lorenzoaiello all set, I refactored my tests, it looks like i can't use a handler function with form variables, I noticed other tests were using the standard "ok handler", so I switched to that. All tests are passing now.

MattDavisRV commented 3 weeks ago

Hey @lorenzoaiello, anything else I need to do here to get this merged in?