Skip to content

Conversation

@zimeg
Copy link
Member

@zimeg zimeg commented Sep 9, 2025

Summary

This PR accepts empty arrays for the assistant class set suggested prompts to improve typescript inference with empty arrays. Fixes #2506.

Preview

The changes of slack-samples/bolt-js-assistant-template#48 showcase this fix:

https://github.com/slack-samples/bolt-js-assistant-template/blob/b9fb90d60797fa71d346391c25ca61a331b6350f/app.js#L61-L70

Reviewers

Changes to a sample app can confirm this behavior! 👾

$ npm pack       # Package Bolt JS
$ slack create asdf -t slack-samples/bolt-js-assistant-template -b zimeg-fix-suggested-prompts-types
$ cd asdf
$ npm run check  # Expect errors
$ npm install /path/to/bolt-js/slack-bolt-4.4.0.tgz  # Use the packaged version
$ npm run check  # Expect no errors!

Notes

This change matches an upstream changes to @slack/web-api in slackapi/node-slack-sdk#2297 🌚 ✨

Requirements

@zimeg zimeg added this to the 4.4.1 milestone Sep 9, 2025
@zimeg zimeg self-assigned this Sep 9, 2025
@zimeg zimeg added bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented semver:patch TypeScript-specific labels Sep 9, 2025
@codecov
Copy link

codecov bot commented Sep 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.37%. Comparing base (150f0bd) to head (d8e6264).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2650   +/-   ##
=======================================
  Coverage   93.37%   93.37%           
=======================================
  Files          37       37           
  Lines        7581     7581           
  Branches      667      667           
=======================================
  Hits         7079     7079           
  Misses        497      497           
  Partials        5        5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@WilliamBergamin WilliamBergamin left a comment

Choose a reason for hiding this comment

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

Sweet thanks for working on this 🚀

@zimeg
Copy link
Member Author

zimeg commented Sep 9, 2025

@WilliamBergamin Likewise thanks for suggesting these changes and for the kind review!

@zimeg zimeg merged commit ba05773 into main Sep 9, 2025
19 checks passed
@zimeg zimeg deleted the zimeg-fix-assistant-suggested-prompts branch September 9, 2025 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented semver:patch TypeScript-specific

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assistant types are difficult to use

3 participants