Skip to content

Commit f1fb7bf

Browse files
zimegsrtaalejlukegalbraithrussell
authored
docs: add thinking steps release notes (#2510)
Co-authored-by: Maria Alejandra <104795114+srtaalej@users.noreply.github.com> Co-authored-by: Luke Russell <31357343+lukegalbraithrussell@users.noreply.github.com>
1 parent 1fbce32 commit f1fb7bf

2 files changed

Lines changed: 66 additions & 48 deletions

File tree

.changeset/thinking-steps-feature.md

Lines changed: 21 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@
22
"@slack/web-api": minor
33
---
44

5-
feat: add thinking steps
5+
feat: add thinking steps support to streaming methods
66

7-
This release introduces new Thinking Steps features:
7+
`chat.appendStream`, `chat.startStream`, and `chat.stopStream` now accept a `chunks` parameter for streaming structured content including markdown text, plan updates, and task updates.
88

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.
9+
Related PRs:
1010

11-
- **Task and Plan Blocks**: `chat.postMessage` and related methods now support `plan` blocks containing `task_card` elements for displaying task progress and status.
11+
- [#2467](https://github.com/slackapi/node-slack-sdk/pull/2467) - accept chunks as arguments to chat.{start,append,stop}Stream methods
12+
- [#2470](https://github.com/slackapi/node-slack-sdk/pull/2470) - accept chunks as arguments to chat stream helper
13+
- [#2479](https://github.com/slackapi/node-slack-sdk/pull/2479) - add task display mode option to start of chat streams
14+
- [#2481](https://github.com/slackapi/node-slack-sdk/pull/2481) - export the chat streamer and related options from the package
1215

13-
### Streaming with Chunks
16+
### Example
1417

1518
```js
1619
const stream = new ChatStreamer(client, client.logger, {
@@ -21,64 +24,34 @@ const stream = new ChatStreamer(client, client.logger, {
2124
await stream.append({
2225
chunks: [
2326
{
24-
type: 'markdown_text',
25-
text: '**Hello!** I am starting to process your request...\n\n'
26-
}
27-
]
27+
type: "markdown_text",
28+
text: "**Hello!** I am starting to process your request...\n\n",
29+
},
30+
],
2831
});
2932

3033
await stream.append({
3134
chunks: [
3235
{
33-
type: 'plan_update',
34-
title: 'Processing tasks...',
36+
type: "plan_update",
37+
title: "Processing tasks...",
3538
},
3639
{
37-
type: 'task_update',
38-
id: 'task-1',
39-
title: 'Fetching data from API',
40-
status: 'complete',
41-
output: 'Successfully retrieved 42 records',
40+
type: "task_update",
41+
id: "task-1",
42+
title: "Fetching data from API",
43+
status: "complete",
44+
output: "Successfully retrieved 42 records",
4245
},
4346
],
4447
});
4548

4649
await stream.stop({
4750
chunks: [
4851
{
49-
type: 'markdown_text',
50-
text: '\n\n---\n\n✅ **All tasks completed successfully!**\n',
52+
type: "markdown_text",
53+
text: "\n\n---\n\n✅ **All tasks completed successfully!**\n",
5154
},
5255
],
5356
});
5457
```
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-
```

.changeset/thinking-steps-types.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
"@slack/types": minor
3+
---
4+
5+
feat: add thinking steps types
6+
7+
Added types for Thinking Steps features:
8+
9+
- **Block types**: `PlanBlock` and `TaskCard` for displaying task progress in messages
10+
- **Chunk types**: `MarkdownTextChunk`, `PlanUpdateChunk`, `TaskUpdateChunk` for streaming
11+
- **Source types**: `UrlSourceElements` for displaying sources within task cards
12+
13+
Related PRs:
14+
15+
- [#2471](https://github.com/slackapi/node-slack-sdk/pull/2471) - add task_card and plan blocks
16+
17+
### Example
18+
19+
```js
20+
await client.chat.postMessage({
21+
channel: CHANNEL_ID,
22+
text: "Task progress update",
23+
blocks: [
24+
{
25+
type: "plan",
26+
plan_id: "plan-123",
27+
title: "My Task",
28+
tasks: [
29+
{
30+
type: "task_card",
31+
task_id: "task-124",
32+
title: "Task 1",
33+
status: "complete",
34+
},
35+
{
36+
type: "task_card",
37+
task_id: "task-125",
38+
title: "Task 2",
39+
status: "pending",
40+
},
41+
],
42+
},
43+
],
44+
});
45+
```

0 commit comments

Comments
 (0)