Skip to content

Conversation

@zimeg
Copy link
Member

@zimeg zimeg commented Sep 16, 2025

Summary

This PR adds streaming_state to the bot_message message event subtype.

Reviewers

Confirm that this field appears in message changed event 🤖

Requirements

@zimeg zimeg requested a review from mwbrooks September 16, 2025 22:00
@zimeg zimeg self-assigned this Sep 16, 2025
@zimeg zimeg added semver:minor enhancement M-T: A feature request for new functionality pkg:types applies to `@slack/types` labels Sep 16, 2025
@zimeg zimeg marked this pull request as ready for review September 16, 2025 22:00
@codecov
Copy link

codecov bot commented Sep 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (ai-apps@11d541c). Learn more about missing BASE report.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             ai-apps    #2371   +/-   ##
==========================================
  Coverage           ?   92.78%           
==========================================
  Files              ?       39           
  Lines              ?    10711           
  Branches           ?      692           
==========================================
  Hits               ?     9938           
  Misses             ?      761           
  Partials           ?       12           
Flag Coverage Δ
cli-hooks 95.23% <ø> (?)
cli-test 94.80% <ø> (?)
oauth 77.39% <ø> (?)
socket-mode 61.87% <ø> (?)
web-api 98.00% <ø> (?)
webhook 96.66% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@mwbrooks mwbrooks left a comment

Choose a reason for hiding this comment

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

✅ Thanks a bunch for adding this event type!

🧪 Confirmed that streaming_state appears as a type for the message event.

❓ Should this belong to more than just the BotMessageEvent? For example, the MessageChangedEvent?

event_ts: string;
channel: string;
channel_type: ChannelTypes;
streaming_state?: 'in_progress' | 'completed' | 'errored';
Copy link
Member

Choose a reason for hiding this comment

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

✅ Matches the schema! 👌🏻

nit: We may want to pull the values out into an enum at the top of the file, similar to ChannelTypes.

Copy link
Member Author

Choose a reason for hiding this comment

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

❓ Should this belong to more than just the BotMessageEvent? For example, the MessageChangedEvent?

nit: We may want to pull the values out into an enum at the top of the file, similar to ChannelTypes.

@mwbrooks I was curious about this as well - at the moment I find a "bot_message" subtype within a "message_changed" event as the message but I'm not sure if it can be found in other events...

export interface MessageChangedEvent {
type: 'message';
subtype: 'message_changed';
event_ts: string;
hidden: true;
channel: string;
channel_type: ChannelTypes;
ts: string;
message: MessageEvent;
previous_message: MessageEvent;
}

Am curious about this and think we could adjust to a separate enum if this is found elsewhere? 👻

Copy link
Member

Choose a reason for hiding this comment

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

note: @zimeg and I chatted offline to make sure that message_changed events from bots will include the streaming_state arg. This arg isn't available on non-bot message changes, so it's looking good.

note: We won't bother turning the values into an enum until we repeat it in 2 places. 👌🏻

@mwbrooks
Copy link
Member

Merge away @zimeg! 🚀

@zimeg
Copy link
Member Author

zimeg commented Sep 18, 2025

@mwbrooks Thanks so much for sharing in these discussions and the kind review! I like what we have for now but am so open to revisiting in a change of events.

@zimeg zimeg merged commit 3cefeea into ai-apps Sep 18, 2025
57 checks passed
@zimeg zimeg deleted the zimeg-feat-types-event-streaming-state branch September 18, 2025 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement M-T: A feature request for new functionality pkg:types applies to `@slack/types` semver:minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants