Skip to content

fix(telegram): exclude row-label column from bullet items in table re…#22610

Merged
ethernet8023 merged 1 commit into
NousResearch:mainfrom
uzunkuyruk:fix/telegram-table-row-label-duplicate-bullet
May 9, 2026
Merged

fix(telegram): exclude row-label column from bullet items in table re…#22610
ethernet8023 merged 1 commit into
NousResearch:mainfrom
uzunkuyruk:fix/telegram-table-row-label-duplicate-bullet

Conversation

@uzunkuyruk

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes a rendering bug in _render_table_block_for_telegram where GFM tables with a row-label column produce a spurious duplicate bullet item.

When a table has a row-label column (first column with no header), the row-label cell was incorrectly included in the bullet zip alongside the data cells. This produced an extra bullet like • 維度: 核心賣點 before the real data rows.

Root cause: The function compared len(cells) against len(headers) and trimmed/padded without accounting for the row-label column, so the row-label cell ended up in both the bold heading and the first bullet.

Fix: Detect the row-label column by checking if the first data row has exactly one more cell than the header row (has_row_label_col = len(first_data_row) == len(headers) + 1). When true, use cells[0] as the heading and zip headers against cells[1:] only.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

References

Fixes #22604

Checklist

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits
  • My PR contains only changes related to this fix

…ndering

When a GFM table has a row-label column (first column with no header),
_render_table_block_for_telegram incorrectly included the row-label cell
in the bullet zip alongside the data cells, producing a spurious bullet
like '• 維度: 核心賣點' before the real data rows.

Detect the row-label column by comparing the first data row cell count
against the header count (has_row_label_col = len(first_data_row) ==
len(headers) + 1). When present, use cells[0] as the heading and
zip headers against cells[1:] only, correctly excluding the row-label
from the bullet list.

Fixes NousResearch#22604
@ethernet8023 ethernet8023 merged commit f1f42a7 into NousResearch:main May 9, 2026
11 of 13 checks passed
JinyuID pushed a commit to JinyuID/hermes-agent that referenced this pull request May 11, 2026
…ble-row-label-duplicate-bullet

fix(telegram): exclude row-label column from bullet items in table re…
jsboige pushed a commit to jsboige/hermes-agent that referenced this pull request May 14, 2026
…ble-row-label-duplicate-bullet

fix(telegram): exclude row-label column from bullet items in table re…
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request May 25, 2026
…ble-row-label-duplicate-bullet

fix(telegram): exclude row-label column from bullet items in table re…
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…ble-row-label-duplicate-bullet

fix(telegram): exclude row-label column from bullet items in table re…
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
…ble-row-label-duplicate-bullet

fix(telegram): exclude row-label column from bullet items in table re…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Telegram table rendering: row-label column header appears as duplicate bullet item

2 participants