Skip to content

feat(chat): Enable disabling code-fencing for streamed tables per-adapter#349

Merged
dancer merged 2 commits into
vercel:mainfrom
raimondlume:raimond/slack-stream-native-tables
Apr 9, 2026
Merged

feat(chat): Enable disabling code-fencing for streamed tables per-adapter#349
dancer merged 2 commits into
vercel:mainfrom
raimondlume:raimond/slack-stream-native-tables

Conversation

@raimondlume
Copy link
Copy Markdown
Contributor

Summary

As Slack now natively supports markdown tables, the code-fencing for streamed tables is not required and in fact stops them from being rendered natively.

This PR adds an option to configure code-fencing tables per adapter. By default true, false only for Slack

Test plan

  • Tests to validate wrapTablesForAppend behaviour
  • Tables stream in natively in Slack instead of code fencing

Before:
image

After:
image

…pter

As Slack now natively supports markdown tables, the code-fencing for
tables is not required and in fact stops them from being rendered
natively.

This PR adds an option to configure code-fencing tables per adapter.
By default true, false only for Slack.
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 8, 2026

@raimondlume is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

Comment thread packages/chat/src/streaming-markdown.ts Outdated
Removed comment about default behavior for wrapTablesForAppend option.
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat Ready Ready Preview, Comment, Open in v0 Apr 8, 2026 8:28pm
chat-sdk-nextjs-chat Ready Ready Preview, Comment, Open in v0 Apr 8, 2026 8:28pm

@cramforce
Copy link
Copy Markdown
Collaborator

Last time I tested Slack did not support tables in streaming rendering

@raimondlume
Copy link
Copy Markdown
Contributor Author

Last time I tested Slack did not support tables in streaming rendering

@cramforce I believe this was added recently, see video below for example on how this looks in practice

Screen.Recording.2026-04-09.at.00.03.59.mov

@cramforce
Copy link
Copy Markdown
Collaborator

Oh, very nice!

@cramforce
Copy link
Copy Markdown
Collaborator

@dancer Could you give this a quick try and merge?

@dancer dancer merged commit 2700ce8 into vercel:main Apr 9, 2026
9 checks passed
@raimondlume raimondlume deleted the raimond/slack-stream-native-tables branch April 10, 2026 09:23
grundmanise pushed a commit to grundmanise/vercel-chat-sdk that referenced this pull request Apr 22, 2026
…pter (vercel#349)

* feat(chat): Enable disabling code-fencing for streamed tables per-adapter

As Slack now natively supports markdown tables, the code-fencing for
tables is not required and in fact stops them from being rendered
natively.

This PR adds an option to configure code-fencing tables per adapter.
By default true, false only for Slack.

* Update StreamingMarkdownRendererOptions comments

Removed comment about default behavior for wrapTablesForAppend option.
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.

3 participants