Skip to content

Fix Slack and Discord thinking message replacement - #7

Merged
sadfun merged 2 commits into
mainfrom
fix/slack-discord-thinking-replacement
Aug 22, 2026
Merged

sadfun merged 2 commits into
mainfrom
fix/slack-discord-thinking-replacement

Conversation

@sadfun

@sadfun sadfun commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • show one thinking block while Slack and Discord turns are in progress
  • replace that same message with the complete answer when the turn finishes
  • reuse the original message for the first chunk and post only unavoidable overflow
  • fall back to posting the complete answer when the final edit fails
  • add shared draft-stream regression coverage

Verification

  • bun test
  • bun run check
  • bun run build

Greploop

  • Greptile confidence: 5/5
  • unresolved Greptile comments: 0

@greptile-apps

greptile-apps Bot commented Aug 22, 2026

Copy link
Copy Markdown

Greptile Summary

This PR changes Slack and Discord draft streaming so the thinking message is replaced by the completed answer rather than showing a partial streamed preview.

  • Keeps one progress placeholder until completion.
  • Replaces that placeholder with the first completed-answer chunk and posts overflow chunks separately.
  • Falls back to posting the complete answer when replacement fails.
  • Adds shared regression coverage for replacement, overflow, failure, and empty-answer behavior.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
src/channels/draft-stream.ts Reworks the draft lifecycle to retain a progress placeholder until completion and then replace it with final answer text, resolving the previously reported duplicate streamed-answer failure.
test/draft-stream.test.ts Adds focused coverage for successful replacement, suppressed partial previews, overflow chunking, replacement failure, and completion without an answer.

Reviews (2): Last reviewed commit: "address greptile review feedback (greplo..." | Re-trigger Greptile

Comment thread src/channels/draft-stream.ts
@sadfun

sadfun commented Aug 22, 2026

Copy link
Copy Markdown
Owner Author

@greptile review

@sadfun
sadfun merged commit f67aee2 into main Aug 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant