chat@4.34.0
Minor Changes
-
1721fa0: Add support for Slack's Agent messaging experience (
agent_view).- New core event
onAppContextChangedwith a normalizedAppContextEntity[]describing the user's active view (channel / canvas / list / message / unknown). AppHomeOpenedEventnow carries the folded active-view context asentitiesand the openedtab(Slack:"home"/"messages"), so handlers can tell a Home-tab open from the DM-open signal underagent_view.- Slack adapter: new
agentViewconfig flag (underagent_view,app_home_openedis the DM-open signal regardless of tab and folded context is surfaced), routing for theapp_context_changedevent, and agetAppContext(message)helper to read the folded context on DM messages. setSuggestedPromptsnow accepts an optional thread reference (agent_view lets prompts sit at the top of the agent conversation).- Under
agentView, DM (Messages-tab) messages are threaded per new Slack's model — each user message is a thread root (thread_ts ?? ts). Conversation-scoped threads returned byopenDM()keep working: when that thread is subscribed, incoming top-level DM messages route to it. createSlackAdapterenv auth fallback (SLACK_BOT_TOKEN/SLACK_CLIENT_ID/SLACK_CLIENT_SECRET) is now disabled only when an auth or verification field (botToken,clientId,clientSecret,installationProvider,signingSecret,webhookVerifier) is passed explicitly, instead of by any config object — socreateSlackAdapter({ agentView: true })still picks up env credentials, while explicit-secret configs stay immune to ambient env vars.- Bumped
@slack/web-apito^7.18.0(adds the optionalthread_tstyping forsetSuggestedPrompts).
- New core event
-
4717a38: Add chart support and richer table rendering, with native Slack data table and data visualization blocks.
- New core
ChartElementandChart()builder (JSX supported) with pie, bar, area, and line charts, mirroring Slack's data visualization model: pie charts takesegments, series charts take namedseriesplotted against sharedcategorieswith optionalxLabel/yLabel. TableElement/Table()gain optionalcaption(accessible table description) andpageSize(rows per page) fields.- Charts degrade gracefully on platforms without native chart support: the underlying data renders as a text table via the shared card fallback (new
chartElementToFallbackTexthelper). - Slack adapter: card tables now render as data table blocks by default — paginated and sortable — instead of plain table blocks. Header-only tables keep the plain table block; tables exceeding Slack limits (100 data rows, 20 columns, 10,000 characters) fall back to ASCII as before.
- Slack adapter: card charts render as data visualization blocks. Charts violating Slack constraints (50-character title, 12 segments/series, 20 categories, 20-character labels, one data point per category, max 2 charts per message) fall back to a text rendering instead of being rejected by the API.
- The
@chat-adapter/slack/blockssubpath gets the same treatment:SlackChartElementtypes,chartcard children, data table rendering, and matching limits. postMessagenow surfaces Slack's per-block validation details when the API rejects blocks (invalid_blocks), instead of the bare "An API error occurred" message.
- New core
-
6714efc: Support AI SDK v7 as a peer dependency.
chatnow acceptsai@^6.0.182 || ^7.0.0(chat/aitools work with both majors).@chat-adapter/webnow acceptsai@^6 || ^7,@ai-sdk/react@^3 || ^4,@ai-sdk/svelte@^4 || ^5, and@ai-sdk/vue@^3 || ^4.- The
chat/aitool factories now declare explicitTool<Input, Output>return types instead of relying on inference, so the published declarations no longer depend onaiinternals that changed in v7. The public type surface is unchanged.
Patch Changes
- 5c926f1: Preserve markdown structural whitespace when extracting normalized message text.
- 2531a42: Fix
detectMention(and the Telegram adapter'sisBotMentioned) falsely matching@botwhen@bot-devis mentioned.\b(word boundary) matches between a word character and a hyphen, so/@bot\b/incorrectly matches@bot-dev. Replaced with(?![\w-])to exclude hyphens.