File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -288,6 +288,10 @@ export class SlackChannel implements Channel {
288288 }
289289 }
290290
291+ trackThreadParticipation ( channelId : string , threadTs : string ) : void {
292+ this . participatedThreads . add ( `${ channelId } :${ threadTs } ` ) ;
293+ }
294+
291295 private registerEventHandlers ( ) : void {
292296 this . app . event ( "app_mention" , async ( { event, client : _client } ) => {
293297 if ( ! this . messageHandler ) return ;
Original file line number Diff line number Diff line change @@ -450,12 +450,16 @@ async function main(): Promise<void> {
450450 if ( progressStream ) {
451451 // Slack: update the progress message with the final response + feedback buttons
452452 await progressStream . finish ( response . text ) ;
453+ if ( slackChannel && slackChannelId && slackThreadTs ) {
454+ slackChannel . trackThreadParticipation ( slackChannelId , slackThreadTs ) ;
455+ }
453456 } else if ( isSlack && slackChannel && slackChannelId && slackThreadTs ) {
454457 // Slack fallback: send direct reply with feedback
455458 const thinkingTs = await slackChannel . postThinking ( slackChannelId , slackThreadTs ) ;
456459 if ( thinkingTs ) {
457460 await slackChannel . updateWithFeedback ( slackChannelId , thinkingTs , response . text ) ;
458461 }
462+ slackChannel . trackThreadParticipation ( slackChannelId , slackThreadTs ) ;
459463 } else {
460464 // All other channels: send via router
461465 await router . send ( msg . channelId , msg . conversationId , {
You can’t perform that action at this time.
0 commit comments