Skip to content

Commit cbbeb96

Browse files
plan chunk inclusion
1 parent 732b325 commit cbbeb96

File tree

7 files changed

+32
-64
lines changed

7 files changed

+32
-64
lines changed

docs/reference/models/blocks/block_elements.html

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4666,7 +4666,7 @@ <h3>Inherited members</h3>
46664666
</dd>
46674667
<dt id="slack_sdk.models.blocks.block_elements.UrlSourceElement"><code class="flex name class">
46684668
<span>class <span class="ident">UrlSourceElement</span></span>
4669-
<span>(</span><span>*, url: str, text: str, icon_url: str | None = None, **others: Dict)</span>
4669+
<span>(</span><span>*, url: str, text: str, **others: Dict)</span>
46704670
</code></dt>
46714671
<dd>
46724672
<details class="source">
@@ -4682,7 +4682,6 @@ <h3>Inherited members</h3>
46824682
{
46834683
&#34;url&#34;,
46844684
&#34;text&#34;,
4685-
&#34;icon_url&#34;,
46864685
}
46874686
)
46884687

@@ -4691,7 +4690,6 @@ <h3>Inherited members</h3>
46914690
*,
46924691
url: str,
46934692
text: str,
4694-
icon_url: Optional[str] = None,
46954693
**others: Dict,
46964694
):
46974695
&#34;&#34;&#34;
@@ -4701,13 +4699,11 @@ <h3>Inherited members</h3>
47014699
Args:
47024700
url (required): The URL type source.
47034701
text (required): Display text for the URL.
4704-
icon_url: Optional icon URL to display with the source.
47054702
&#34;&#34;&#34;
47064703
super().__init__(type=self.type)
47074704
show_unknown_key_warning(self, others)
47084705
self.url = url
4709-
self.text = text
4710-
self.icon_url = icon_url</code></pre>
4706+
self.text = text</code></pre>
47114707
</details>
47124708
<div class="desc"><p>Block Elements are things that exists inside of your Blocks.
47134709
<a href="https://docs.slack.dev/reference/block-kit/block-elements/">https://docs.slack.dev/reference/block-kit/block-elements/</a></p>
@@ -4719,8 +4715,6 @@ <h2 id="args">Args</h2>
47194715
<dd>The URL type source.</dd>
47204716
<dt><strong><code>text</code></strong> :&ensp;<code>required</code></dt>
47214717
<dd>Display text for the URL.</dd>
4722-
<dt><strong><code>icon_url</code></strong></dt>
4723-
<dd>Optional icon URL to display with the source.</dd>
47244718
</dl></div>
47254719
<h3>Ancestors</h3>
47264720
<ul class="hlist">
@@ -4749,7 +4743,6 @@ <h3>Instance variables</h3>
47494743
{
47504744
&#34;url&#34;,
47514745
&#34;text&#34;,
4752-
&#34;icon_url&#34;,
47534746
}
47544747
)</code></pre>
47554748
</details>

docs/reference/models/blocks/blocks.html

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,7 +1329,7 @@ <h3>Inherited members</h3>
13291329
</dd>
13301330
<dt id="slack_sdk.models.blocks.blocks.PlanBlock"><code class="flex name class">
13311331
<span>class <span class="ident">PlanBlock</span></span>
1332-
<span>(</span><span>*,<br>plan_id: str,<br>title: str,<br>tasks: Sequence[Dict | <a title="slack_sdk.models.blocks.blocks.TaskCardBlock" href="#slack_sdk.models.blocks.blocks.TaskCardBlock">TaskCardBlock</a>] | None = None,<br>block_id: str | None = None,<br>**others: dict)</span>
1332+
<span>(</span><span>*,<br>title: str,<br>tasks: Sequence[Dict | <a title="slack_sdk.models.blocks.blocks.TaskCardBlock" href="#slack_sdk.models.blocks.blocks.TaskCardBlock">TaskCardBlock</a>] | None = None,<br>block_id: str | None = None,<br>**others: dict)</span>
13331333
</code></dt>
13341334
<dd>
13351335
<details class="source">
@@ -1343,7 +1343,6 @@ <h3>Inherited members</h3>
13431343
def attributes(self) -&gt; Set[str]: # type: ignore[override]
13441344
return super().attributes.union(
13451345
{
1346-
&#34;plan_id&#34;,
13471346
&#34;title&#34;,
13481347
&#34;tasks&#34;,
13491348
}
@@ -1352,7 +1351,6 @@ <h3>Inherited members</h3>
13521351
def __init__(
13531352
self,
13541353
*,
1355-
plan_id: str,
13561354
title: str,
13571355
tasks: Optional[Sequence[Union[Dict, TaskCardBlock]]] = None,
13581356
block_id: Optional[str] = None,
@@ -1366,15 +1364,12 @@ <h3>Inherited members</h3>
13661364
Maximum length for this field is 255 characters.
13671365
block_id should be unique for each message and each iteration of a message.
13681366
If a message is updated, use a new block_id.
1369-
plan_id (required): ID for the plan (May be removed / made optional, feel free to pass in a random UUID
1370-
for now)
13711367
title (required): Title of the plan in plain text
13721368
tasks: Details of the task in the form of a single &#34;rich_text&#34; entity.
13731369
&#34;&#34;&#34;
13741370
super().__init__(type=self.type, block_id=block_id)
13751371
show_unknown_key_warning(self, others)
13761372

1377-
self.plan_id = plan_id
13781373
self.title = title
13791374
self.tasks = tasks</code></pre>
13801375
</details>
@@ -1390,9 +1385,6 @@ <h2 id="args">Args</h2>
13901385
Maximum length for this field is 255 characters.
13911386
block_id should be unique for each message and each iteration of a message.
13921387
If a message is updated, use a new block_id.</dd>
1393-
<dt><strong><code>plan_id</code></strong> :&ensp;<code>required</code></dt>
1394-
<dd>ID for the plan (May be removed / made optional, feel free to pass in a random UUID
1395-
for now)</dd>
13961388
<dt><strong><code>title</code></strong> :&ensp;<code>required</code></dt>
13971389
<dd>Title of the plan in plain text</dd>
13981390
<dt><strong><code>tasks</code></strong></dt>
@@ -1423,7 +1415,6 @@ <h3>Instance variables</h3>
14231415
def attributes(self) -&gt; Set[str]: # type: ignore[override]
14241416
return super().attributes.union(
14251417
{
1426-
&#34;plan_id&#34;,
14271418
&#34;title&#34;,
14281419
&#34;tasks&#34;,
14291420
}

docs/reference/models/blocks/index.html

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5354,7 +5354,7 @@ <h3>Inherited members</h3>
53545354
</dd>
53555355
<dt id="slack_sdk.models.blocks.PlanBlock"><code class="flex name class">
53565356
<span>class <span class="ident">PlanBlock</span></span>
5357-
<span>(</span><span>*,<br>plan_id: str,<br>title: str,<br>tasks: Sequence[Dict | <a title="slack_sdk.models.blocks.blocks.TaskCardBlock" href="blocks.html#slack_sdk.models.blocks.blocks.TaskCardBlock">TaskCardBlock</a>] | None = None,<br>block_id: str | None = None,<br>**others: dict)</span>
5357+
<span>(</span><span>*,<br>title: str,<br>tasks: Sequence[Dict | <a title="slack_sdk.models.blocks.blocks.TaskCardBlock" href="blocks.html#slack_sdk.models.blocks.blocks.TaskCardBlock">TaskCardBlock</a>] | None = None,<br>block_id: str | None = None,<br>**others: dict)</span>
53585358
</code></dt>
53595359
<dd>
53605360
<details class="source">
@@ -5368,7 +5368,6 @@ <h3>Inherited members</h3>
53685368
def attributes(self) -&gt; Set[str]: # type: ignore[override]
53695369
return super().attributes.union(
53705370
{
5371-
&#34;plan_id&#34;,
53725371
&#34;title&#34;,
53735372
&#34;tasks&#34;,
53745373
}
@@ -5377,7 +5376,6 @@ <h3>Inherited members</h3>
53775376
def __init__(
53785377
self,
53795378
*,
5380-
plan_id: str,
53815379
title: str,
53825380
tasks: Optional[Sequence[Union[Dict, TaskCardBlock]]] = None,
53835381
block_id: Optional[str] = None,
@@ -5391,15 +5389,12 @@ <h3>Inherited members</h3>
53915389
Maximum length for this field is 255 characters.
53925390
block_id should be unique for each message and each iteration of a message.
53935391
If a message is updated, use a new block_id.
5394-
plan_id (required): ID for the plan (May be removed / made optional, feel free to pass in a random UUID
5395-
for now)
53965392
title (required): Title of the plan in plain text
53975393
tasks: Details of the task in the form of a single &#34;rich_text&#34; entity.
53985394
&#34;&#34;&#34;
53995395
super().__init__(type=self.type, block_id=block_id)
54005396
show_unknown_key_warning(self, others)
54015397

5402-
self.plan_id = plan_id
54035398
self.title = title
54045399
self.tasks = tasks</code></pre>
54055400
</details>
@@ -5415,9 +5410,6 @@ <h2 id="args">Args</h2>
54155410
Maximum length for this field is 255 characters.
54165411
block_id should be unique for each message and each iteration of a message.
54175412
If a message is updated, use a new block_id.</dd>
5418-
<dt><strong><code>plan_id</code></strong> :&ensp;<code>required</code></dt>
5419-
<dd>ID for the plan (May be removed / made optional, feel free to pass in a random UUID
5420-
for now)</dd>
54215413
<dt><strong><code>title</code></strong> :&ensp;<code>required</code></dt>
54225414
<dd>Title of the plan in plain text</dd>
54235415
<dt><strong><code>tasks</code></strong></dt>
@@ -5448,7 +5440,6 @@ <h3>Instance variables</h3>
54485440
def attributes(self) -&gt; Set[str]: # type: ignore[override]
54495441
return super().attributes.union(
54505442
{
5451-
&#34;plan_id&#34;,
54525443
&#34;title&#34;,
54535444
&#34;tasks&#34;,
54545445
}
@@ -7863,7 +7854,7 @@ <h3>Inherited members</h3>
78637854
</dd>
78647855
<dt id="slack_sdk.models.blocks.UrlSourceElement"><code class="flex name class">
78657856
<span>class <span class="ident">UrlSourceElement</span></span>
7866-
<span>(</span><span>*, url: str, text: str, icon_url: str | None = None, **others: Dict)</span>
7857+
<span>(</span><span>*, url: str, text: str, **others: Dict)</span>
78677858
</code></dt>
78687859
<dd>
78697860
<details class="source">
@@ -7879,7 +7870,6 @@ <h3>Inherited members</h3>
78797870
{
78807871
&#34;url&#34;,
78817872
&#34;text&#34;,
7882-
&#34;icon_url&#34;,
78837873
}
78847874
)
78857875

@@ -7888,7 +7878,6 @@ <h3>Inherited members</h3>
78887878
*,
78897879
url: str,
78907880
text: str,
7891-
icon_url: Optional[str] = None,
78927881
**others: Dict,
78937882
):
78947883
&#34;&#34;&#34;
@@ -7898,13 +7887,11 @@ <h3>Inherited members</h3>
78987887
Args:
78997888
url (required): The URL type source.
79007889
text (required): Display text for the URL.
7901-
icon_url: Optional icon URL to display with the source.
79027890
&#34;&#34;&#34;
79037891
super().__init__(type=self.type)
79047892
show_unknown_key_warning(self, others)
79057893
self.url = url
7906-
self.text = text
7907-
self.icon_url = icon_url</code></pre>
7894+
self.text = text</code></pre>
79087895
</details>
79097896
<div class="desc"><p>Block Elements are things that exists inside of your Blocks.
79107897
<a href="https://docs.slack.dev/reference/block-kit/block-elements/">https://docs.slack.dev/reference/block-kit/block-elements/</a></p>
@@ -7916,8 +7903,6 @@ <h2 id="args">Args</h2>
79167903
<dd>The URL type source.</dd>
79177904
<dt><strong><code>text</code></strong> :&ensp;<code>required</code></dt>
79187905
<dd>Display text for the URL.</dd>
7919-
<dt><strong><code>icon_url</code></strong></dt>
7920-
<dd>Optional icon URL to display with the source.</dd>
79217906
</dl></div>
79227907
<h3>Ancestors</h3>
79237908
<ul class="hlist">
@@ -7946,7 +7931,6 @@ <h3>Instance variables</h3>
79467931
{
79477932
&#34;url&#34;,
79487933
&#34;text&#34;,
7949-
&#34;icon_url&#34;,
79507934
}
79517935
)</code></pre>
79527936
</details>

docs/reference/web/async_chat_stream.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
123123
is stopped this method cannot be called.
124124

125125
Args:
126-
chunks: An array of streaming chunks. Chunks can be markdown text chunks or task update chunks.
126+
chunks: An array of streaming chunks. Chunks can be markdown text, plan, or task update chunks.
127127
markdown_text: Accepts message text formatted in markdown. Limit this field to 12,000 characters. This text is
128128
what will be appended to the message received so far.
129129
**kwargs: Additional arguments passed to the underlying API calls.
@@ -179,7 +179,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
179179

180180
Args:
181181
blocks: A list of blocks that will be rendered at the bottom of the finalized message.
182-
chunks: An array of streaming chunks. Chunks can be markdown text chunks or task update chunks.
182+
chunks: An array of streaming chunks. Chunks can be markdown text, plan, or task update chunks.
183183
markdown_text: Accepts message text formatted in markdown. Limit this field to 12,000 characters. This text is
184184
what will be appended to the message received so far.
185185
metadata: JSON object with event_type and event_payload fields, presented as a URL-encoded string. Metadata you
@@ -239,17 +239,17 @@ <h2 class="section-title" id="header-classes">Classes</h2>
239239

240240
async def _flush_buffer(self, chunks: Optional[Sequence[Union[Dict, Chunk]]] = None, **kwargs) -&gt; AsyncSlackResponse:
241241
&#34;&#34;&#34;Flush the internal buffer with chunks by making appropriate API calls.&#34;&#34;&#34;
242-
flushings: List[Union[Dict, Chunk]] = []
242+
chunks_to_flush: List[Union[Dict, Chunk]] = []
243243
if len(self._buffer) != 0:
244-
flushings.append(MarkdownTextChunk(text=self._buffer))
244+
chunks_to_flush.append(MarkdownTextChunk(text=self._buffer))
245245
if chunks is not None:
246-
flushings.extend(chunks)
246+
chunks_to_flush.extend(chunks)
247247
if not self._stream_ts:
248248
response = await self._client.chat_startStream(
249249
**self._stream_args,
250250
token=self._token,
251251
**kwargs,
252-
chunks=flushings,
252+
chunks=chunks_to_flush,
253253
)
254254
self._stream_ts = response.get(&#34;ts&#34;)
255255
self._state = &#34;in_progress&#34;
@@ -259,7 +259,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
259259
channel=self._stream_args[&#34;channel&#34;],
260260
ts=self._stream_ts,
261261
**kwargs,
262-
chunks=flushings,
262+
chunks=chunks_to_flush,
263263
)
264264
self._buffer = &#34;&#34;
265265
return response</code></pre>
@@ -317,7 +317,7 @@ <h3>Methods</h3>
317317
is stopped this method cannot be called.
318318

319319
Args:
320-
chunks: An array of streaming chunks. Chunks can be markdown text chunks or task update chunks.
320+
chunks: An array of streaming chunks. Chunks can be markdown text, plan, or task update chunks.
321321
markdown_text: Accepts message text formatted in markdown. Limit this field to 12,000 characters. This text is
322322
what will be appended to the message received so far.
323323
**kwargs: Additional arguments passed to the underlying API calls.
@@ -366,7 +366,7 @@ <h3>Methods</h3>
366366
<h2 id="args">Args</h2>
367367
<dl>
368368
<dt><strong><code>chunks</code></strong></dt>
369-
<dd>An array of streaming chunks. Chunks can be markdown text chunks or task update chunks.</dd>
369+
<dd>An array of streaming chunks. Chunks can be markdown text, plan, or task update chunks.</dd>
370370
<dt><strong><code>markdown_text</code></strong></dt>
371371
<dd>Accepts message text formatted in markdown. Limit this field to 12,000 characters. This text is
372372
what will be appended to the message received so far.</dd>
@@ -413,7 +413,7 @@ <h2 id="example">Example</h2>
413413

414414
Args:
415415
blocks: A list of blocks that will be rendered at the bottom of the finalized message.
416-
chunks: An array of streaming chunks. Chunks can be markdown text chunks or task update chunks.
416+
chunks: An array of streaming chunks. Chunks can be markdown text, plan, or task update chunks.
417417
markdown_text: Accepts message text formatted in markdown. Limit this field to 12,000 characters. This text is
418418
what will be appended to the message received so far.
419419
metadata: JSON object with event_type and event_payload fields, presented as a URL-encoded string. Metadata you
@@ -477,7 +477,7 @@ <h2 id="args">Args</h2>
477477
<dt><strong><code>blocks</code></strong></dt>
478478
<dd>A list of blocks that will be rendered at the bottom of the finalized message.</dd>
479479
<dt><strong><code>chunks</code></strong></dt>
480-
<dd>An array of streaming chunks. Chunks can be markdown text chunks or task update chunks.</dd>
480+
<dd>An array of streaming chunks. Chunks can be markdown text, plan, or task update chunks.</dd>
481481
<dt><strong><code>markdown_text</code></strong></dt>
482482
<dd>Accepts message text formatted in markdown. Limit this field to 12,000 characters. This text is
483483
what will be appended to the message received so far.</dd>

0 commit comments

Comments
 (0)