mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-08 13:12:08 +00:00
docs(slack): correct block_kit docstrings to reflect native table blocks
The renderer now emits native Block Kit table blocks; the module and _rich_blocks_enabled docstrings still described the earlier monospace-only approach.
This commit is contained in:
parent
7c7b489813
commit
88c9dfecb2
2 changed files with 8 additions and 7 deletions
|
|
@ -1811,8 +1811,9 @@ class SlackAdapter(BasePlatformAdapter):
|
|||
Opt-in via ``platforms.slack.extra.rich_blocks`` (config.yaml). Default
|
||||
off: messages continue to go out as flat mrkdwn ``text``. Enabling it
|
||||
renders the *final* agent message with real structural primitives
|
||||
(headers, dividers, true nested lists via ``rich_text``); tables are
|
||||
rendered as aligned monospace (Block Kit has no robust table block).
|
||||
(headers, dividers, true nested lists via ``rich_text``, and native
|
||||
Block Kit ``table`` blocks with per-column alignment); over-limit
|
||||
tables fall back to aligned monospace.
|
||||
"""
|
||||
raw = self.config.extra.get("rich_blocks")
|
||||
if raw is None:
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ gives us real structural primitives — section headers, dividers, and true
|
|||
|
||||
Design constraints (why this module is deliberately conservative):
|
||||
|
||||
* **Block Kit has no robust table primitive.** The newer ``table`` block is
|
||||
limited and fragile, so markdown pipe-tables are rendered as monospace
|
||||
``rich_text_preformatted`` — the same thing a human would paste today, just
|
||||
aligned. Proper ``table`` blocks are a future iteration (see the PR's Open
|
||||
Questions), not a v1 gate.
|
||||
* **Markdown pipe-tables render as native ``table`` blocks** — real grid
|
||||
cells with per-column alignment and inline-formatted ``rich_text`` content.
|
||||
A table that exceeds Slack's limits (100 rows / 20 cols / 10k aggregate
|
||||
cell chars) or won't parse falls back to aligned monospace
|
||||
``rich_text_preformatted`` so a large table never breaks the message.
|
||||
* **Slack caps a message at 50 blocks** and a ``section``/text object at 3000
|
||||
characters. :func:`render_blocks` enforces both and, if the content simply
|
||||
cannot be expressed within them, returns ``None`` so the caller falls back
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue