feat: add loading messages to assistant threads set status#1523
Conversation
zimeg
left a comment
There was a problem hiding this comment.
📬 A note on testing for the wonderful reviewers!
There was a problem hiding this comment.
👾 note: This file has a complete sample app that might be useful in testing! Setup of events and scopes is required - IIRC:
messages.imassistant_thread_started
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1523 +/- ##
============================================
- Coverage 72.91% 72.87% -0.05%
- Complexity 4402 4403 +1
============================================
Files 476 476
Lines 14036 14045 +9
Branches 1471 1472 +1
============================================
Hits 10235 10235
- Misses 2930 2937 +7
- Partials 871 873 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
zimeg
left a comment
There was a problem hiding this comment.
💌 Leaving another note with most recent findings!
| * [`setTitle`](https://docs.slack.dev/tools/bolt-python/reference/#slack_bolt.SetTitle) | ||
| * [`setStatus`](https://docs.slack.dev/tools/bolt-python/reference/#slack_bolt.SetStatus) | ||
|
|
||
| - [`say`](<https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/bolt/sdkLatestVersion/bolt-sdkLatestVersion-javadoc.jar/!/com/slack/api/bolt/context/builtin/EventContext.html#say(com.slack.api.bolt.util.BuilderConfigurator)>) |
There was a problem hiding this comment.
📚 note: AFAICT The sdkLatestVersion is swapped as part of the publishing process, so this should link to a page like this:
|
👁️🗨️ Following from kind findings in #1516 IIRC! |
| ctx.setStatus("is downloading the files..."); | ||
| Thread.sleep(500L); | ||
| ctx.setStatus("is still checking the files..."); | ||
| ctx.setStatus("is analyzing the files...", Arrays.asList("Reading bytes...", "Confirming hashes...")); |
| .loadingMessages(loadingMessages) | ||
| ); | ||
| } else { | ||
| throw new IllegalStateException("This utility is only available for Assistant feature enabled app!"); |
| /** | ||
| * The list of messages to rotate through as a loading indicator. | ||
| */ | ||
| private List<String> loadingMessages; |
|
@WilliamBergamin Kind thanks for the review - I am looking forward to loading messages soon... 🤖 |
This PR adds
loading_messagesto theassistant.threads.setStatusmethod alongside the assistant helper:Category
Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.