You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit add2c58
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/channels/slack.md
+51Lines changed: 51 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1509,6 +1509,57 @@ Native argument menus render as one of the following, in priority order:
1509
1509
1510
1510
Slash sessions use isolated keys like `agent:<agentId>:slack:slash:<userId>` and still route command executions to the target conversation session using `CommandTargetSessionKey`.
1511
1511
1512
+
## Native charts
1513
+
1514
+
Slack's public [`data_visualization` Block Kit block](https://docs.slack.dev/reference/block-kit/blocks/data-visualization-block/)
1515
+
renders line, bar, area, and pie charts in messages. OpenClaw maps the portable
1516
+
`presentation``chart` block to that native shape; no additional OAuth scope,
1517
+
file upload, image renderer, or Slack configuration is required beyond normal
@@ -276,6 +324,7 @@ type ChannelPresentationCapabilities = {
276
324
selects?:boolean;
277
325
context?:boolean;
278
326
divider?:boolean;
327
+
charts?:boolean;
279
328
limits?: {
280
329
actions?: {
281
330
maxActions?:number;
@@ -311,19 +360,24 @@ visible fallback.
311
360
312
361
## Core render flow
313
362
314
-
When a `ReplyPayload` or message action includes `presentation`, core:
363
+
On the canonical outbound path used by CLI and standard message actions, core:
315
364
316
365
1. Normalizes the presentation payload.
317
366
2. Resolves the target channel's outbound adapter.
318
367
3. Reads `presentationCapabilities`.
319
368
4. Applies generic capability limits such as action count, label length, and
320
-
select option count when the adapter advertises them.
369
+
select option count when the adapter advertises them. Chart blocks become
370
+
deterministic text unless the adapter explicitly advertises `charts: true`.
321
371
5. Calls `renderPresentation` when the adapter can render the payload.
322
372
6. Falls back to conservative text when the adapter is absent or cannot render.
323
373
7. Sends the resulting payload through the normal channel delivery path.
324
374
8. Applies delivery metadata such as `delivery.pin` after the first successful
325
375
sent message.
326
376
377
+
Channel-local reply or preview funnels that consume `ReplyPayload` directly
378
+
must either enter that canonical path or materialize the same presentation
379
+
fallback before projecting the payload down to plain text/media.
380
+
327
381
Core owns fallback behavior so producers can stay channel-agnostic. Channel
328
382
plugins own native rendering and interaction handling.
329
383
@@ -339,6 +393,7 @@ Fallback text includes:
339
393
-`divider` blocks as a visual separator
340
394
- button labels, including URLs for link buttons
341
395
- select option labels
396
+
- chart title, type, axes, categories, series, and values
342
397
343
398
### Button value fallback visibility
344
399
@@ -365,6 +420,7 @@ Examples:
365
420
366
421
- Telegram with inline buttons disabled sends text fallback.
367
422
- A channel without select support lists select options as text.
423
+
- A channel without native chart support lists the chart data as text.
368
424
- A URL-only button becomes either a native link button or a fallback URL line.
369
425
- Optional pin failures do not fail the delivered message.
370
426
@@ -382,7 +438,7 @@ Current bundled renderers:
382
438
| Matrix | Text fallback plus structured event field | Buttons/selects advertise as supported, but every block currently renders as `renderMessagePresentationFallbackText` output carried in a `com.openclaw.presentation` event field, not native interactive widgets. |
383
439
| Mattermost | Text plus interactive props | Selects and dividers are not supported; those blocks degrade to text. |
384
440
| Microsoft Teams | Adaptive Cards | Plain `message` text is included with the card when both are provided. Selects, styles, and disabled state are not supported. |
385
-
| Slack | Block Kit |Preserves legacy `channelData.slack.blocks` for existing provider-native payload producers, but new shared sends should use `presentation`.|
441
+
| Slack | Block Kit |Renders `chart` as native `data_visualization`; preserves legacy `channelData.slack.blocks`, but new shared sends should use `presentation`. |
386
442
| Telegram | Text plus inline keyboards | Buttons/selects require inline button capability for the target surface; otherwise text fallback is used. |
387
443
| Plain channels | Text fallback | Channels without a renderer still get readable output. |
388
444
@@ -404,6 +460,7 @@ helpers. It supports:
404
460
- tone
405
461
- context
406
462
- divider
463
+
- chart
407
464
- URL-only buttons
408
465
- generic delivery metadata through `ReplyPayload.delivery`
409
466
@@ -421,6 +478,7 @@ import {
421
478
presentationPageSize,
422
479
presentationToInteractiveControlsReply,
423
480
presentationToInteractiveReply,
481
+
renderMessagePresentationChartFallbackText,
424
482
renderMessagePresentationFallbackText,
425
483
resolveMessagePresentationActionValue,
426
484
resolveMessagePresentationControlValue,
@@ -505,8 +563,8 @@ messages where the provider supports those operations.
505
563
- Declare generic capability limits on `presentationCapabilities.limits` when
506
564
they are known.
507
565
- Preserve final platform limits in the renderer and tests.
0 commit comments