Skip to content

Commit 1fbce32

Browse files
authored
docs: add thinking steps changeset entries (#2508)
1 parent c7dd4aa commit 1fbce32

1 file changed

Lines changed: 84 additions & 0 deletions

File tree

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
"@slack/web-api": minor
3+
---
4+
5+
feat: add thinking steps
6+
7+
This release introduces new Thinking Steps features:
8+
9+
- **Chunks in streaming methods**: `chat.appendStream`, `chat.startStream`, and `chat.stopStream` now support a `chunks` parameter for streaming structured content including markdown text, plan updates, and task updates with sources.
10+
11+
- **Task and Plan Blocks**: `chat.postMessage` and related methods now support `plan` blocks containing `task_card` elements for displaying task progress and status.
12+
13+
### Streaming with Chunks
14+
15+
```js
16+
const stream = new ChatStreamer(client, client.logger, {
17+
channel: CHANNEL_ID,
18+
thread_ts: threadTs,
19+
});
20+
21+
await stream.append({
22+
chunks: [
23+
{
24+
type: 'markdown_text',
25+
text: '**Hello!** I am starting to process your request...\n\n'
26+
}
27+
]
28+
});
29+
30+
await stream.append({
31+
chunks: [
32+
{
33+
type: 'plan_update',
34+
title: 'Processing tasks...',
35+
},
36+
{
37+
type: 'task_update',
38+
id: 'task-1',
39+
title: 'Fetching data from API',
40+
status: 'complete',
41+
output: 'Successfully retrieved 42 records',
42+
},
43+
],
44+
});
45+
46+
await stream.stop({
47+
chunks: [
48+
{
49+
type: 'markdown_text',
50+
text: '\n\n---\n\n✅ **All tasks completed successfully!**\n',
51+
},
52+
],
53+
});
54+
```
55+
56+
### Task and Plan Blocks
57+
58+
```js
59+
await client.chat.postMessage({
60+
channel: CHANNEL_ID,
61+
text: 'Task progress update',
62+
blocks: [
63+
{
64+
type: 'plan',
65+
plan_id: 'plan-123',
66+
title: 'My Task',
67+
tasks: [
68+
{
69+
type: 'task_card',
70+
task_id: 'task-124',
71+
title: 'Task 1',
72+
status: 'complete'
73+
},
74+
{
75+
type: 'task_card',
76+
task_id: 'task-125',
77+
title: 'Task 2',
78+
status: 'pending'
79+
},
80+
]
81+
}
82+
]
83+
});
84+
```

0 commit comments

Comments
 (0)