-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplan.py
More file actions
67 lines (64 loc) · 2.18 KB
/
plan.py
File metadata and controls
67 lines (64 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
from slack_sdk.models.blocks import PlanBlock, RichTextBlock, TaskCardBlock
from slack_sdk.models.blocks.block_elements import (
RichTextElementParts,
RichTextSectionElement,
)
def example01() -> PlanBlock:
"""
Displays a collection of related tasks.
https://docs.slack.dev/reference/block-kit/blocks/plan-block/
A plan block with multiple task cards in various states.
"""
block = PlanBlock(
title="Thinking completed",
tasks=[
TaskCardBlock(
task_id="call_001",
title="Fetched user profile information",
status="in_progress",
details=RichTextBlock(
block_id="viMWO",
elements=[
RichTextSectionElement(
elements=[
RichTextElementParts.Text(text="Searched database...")
]
)
],
),
output=RichTextBlock(
block_id="viMWO",
elements=[
RichTextSectionElement(
elements=[
RichTextElementParts.Text(text="Profile data loaded")
]
)
],
),
),
TaskCardBlock(
task_id="call_002",
title="Checked user permissions",
status="pending",
),
TaskCardBlock(
task_id="call_003",
title="Generated comprehensive user report",
status="complete",
output=RichTextBlock(
block_id="crsk",
elements=[
RichTextSectionElement(
elements=[
RichTextElementParts.Text(
text="15 data points compiled"
)
]
)
],
),
),
],
)
return block