-
Notifications
You must be signed in to change notification settings - Fork 419
Open
Labels
auto-triage-skipPrevent this issue from being closed due to lack of activityPrevent this issue from being closed due to lack of activityenhancementM-T: A feature request for new functionalityM-T: A feature request for new functionalityserver-side-issue
Description
Summary
Add API support for editing previously streamed content, enabling Slack bots to update live status indicators, TODO lists, and other dynamic content while streaming. Currently, chatStream() only supports appending new content - there's no way to modify what was already sent.
Use Case
Scenario: Live TODO List Updates
When an AI agent is working through a multi-step task:
- Show TODO list at the top of the message
- Stream tool outputs below
- Update TODO items in real-time as agent completes them:
- β
Analyze requirements - π Generate code
- βΈοΈ Run tests
- βΈοΈ Deploy
- β
Current limitation: Must append new content, creating messy repeated lists:
TODO:
- Step 1
- Step 2
- Step 3
[agent output...]
TODO:
- β
Step 1
- Step 2
- Step 3
[more output...]
TODO:
- β
Step 1
- β
Step 2
- Step 3
Proposed API
Option 1: Named content sections
const streamer = client.chatStream({
channel: CHANNEL,
thread_ts: thread,
recipient_team_id: team,
recipient_user_id: USER,
sections: {
header: "**TODO List**\n- βΈοΈ Step 1\n- βΈοΈ Step 2\n- βΈοΈ Step 3",
content: ""
}
});
// Update header section (replaces previous content)
await streamer.update({
section: "header",
markdown_text: "**TODO List**\n- β
~~Step 1~~\n- π Step 2\n- βΈοΈ Step 3"
});
// Append to content section (existing behavior)
await streamer.append({
section: "content",
markdown_text: "\n\nStep 1 complete: Generated code"
});Option 2: Full content replacement with diff
const streamer = client.chatStream({
channel: CHANNEL,
thread_ts: thread,
recipient_team_id: team,
recipient_user_id: USER,
markdown_text: "Initial content"
});
// Replace entire message content
await streamer.replace({
markdown_text: "Updated content",
preserve_scroll: true // Don't jump to top
});Real-World Examples
1. Progress Indicator
π Processing (2/5 steps)
ββββββββββββββββββββ 40%
[agent output below]
2. Live Metrics
π Analysis Status
- Files analyzed: 42
- Issues found: 3
- Time elapsed: 12s
[detailed findings below]
3. Dynamic Summary
π‘ Summary: Analyzing codebase...
β Found authentication bug in auth.ts:42
[full analysis below]
Expected Behavior
When content is updated (not appended):
- Slack replaces the specified section in-place
- Scroll position is preserved (user isn't jumped around)
- New content smoothly transitions in
- Bot receives confirmation of update
Current Workaround
Currently, bots must:
- Use separate messages for status (splits context)
- Post new message after stream completes (delayed feedback)
None of these approaches provide real-time, in-place updates.
Environment
@slack/bolt: 4.5.0@slack/web-api: 7.11.0- Platform: Slack Desktop App (macOS) / Slack Web
Implementation Considerations
Potential challenges:
- Message edit history/versioning
- Race conditions with concurrent updates
- Scroll position preservation
- Performance with frequent updates
Suggested limits:
- Max update frequency: 2-3 per second
- Max section size: reasonable limit to prevent abuse
- Clear documentation on when to use update vs append
Benefits
- Better UX: Users see live progress without scrolling
- Context preservation: Status stays at top, outputs below
- Reduced clutter: No repeated TODO lists or status lines
- Professional appearance: Clean, polished streaming experience
- Competitive parity: Other chat AI tools (ChatGPT, Claude) support this
Related Patterns
Similar update patterns in:
- ChatGPT's web interface (streaming with live status)
- Claude's web interface (thinking blocks that update)
- VS Code Live Share (real-time collaborative editing)
- Google Docs (operational transform for concurrent edits)
Metadata
Metadata
Assignees
Labels
auto-triage-skipPrevent this issue from being closed due to lack of activityPrevent this issue from being closed due to lack of activityenhancementM-T: A feature request for new functionalityM-T: A feature request for new functionalityserver-side-issue