Skip to content

refactor: use say_stream helper instead of client.chat_stream#82

Open
zimeg wants to merge 1 commit into
mainfrom
use-say-stream-helper
Open

refactor: use say_stream helper instead of client.chat_stream#82
zimeg wants to merge 1 commit into
mainfrom
use-say-stream-helper

Conversation

@zimeg
Copy link
Copy Markdown
Member

@zimeg zimeg commented May 19, 2026

Summary

Replace manual client.chat_stream() calls with the say_stream context utility, which automatically injects channel, thread_ts, recipient_team_id, and recipient_user_id from the listener context.

This simplifies the message handler by removing the need to manually extract and pass these values from payload and context.

def message(
    logger: Logger,
    message: dict,
    say: Say,
    say_stream: SayStream,
    set_status: SetStatus,
):
    set_status(status="thinking...")
    streamer = say_stream(task_display_mode="plan")
    streamer.append(markdown_text="Hello!")
    streamer.stop()

Requirements

Replace manual client.chat_stream() calls with the say_stream context
utility, which automatically injects channel, thread_ts, recipient IDs.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg zimeg requested a review from a team as a code owner May 19, 2026 04:32
@zimeg zimeg self-assigned this May 19, 2026
@zimeg zimeg added the enhancement New feature or request label May 19, 2026
@zimeg zimeg enabled auto-merge (squash) May 19, 2026 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant