Menu

Introducing npm i chat – One codebase, every chat platform - Vercel
📰
0

Introducing npm i chat – One codebase, every chat platform - Vercel

Vercel News·Hayden Bleasel·4 days ago
#NjqB5xsw
#vercel#chat#thread#slack#button#import
Reading 0:00
15s threshold

Building chatbots across multiple platforms traditionally requires maintaining separate codebases and handling individual platform APIs. Today, we're open sourcing the new Chat SDK in public beta. It's a unified TypeScript library that lets teams write bot logic once and deploy it to Slack, Microsoft Teams, Google Chat, Discord, GitHub, and Linear. The event-driven architecture includes type-safe handlers for mentions, messages, reactions, button clicks, and slash commands. Teams can build user interfaces using JSX cards and modals that render natively on each platform. The SDK handles distributed state management using pluggable adapters for Redis, ioredis, and in-memory storage. import { Chat } from "chat" ; import { createSlackAdapter } from "@chat-adapter/slack" ; import { createRedisState } from "@chat-adapter/state-redis" ; const bot = new Chat ( { userName : "mybot" , adapters : { slack : createSlackAdapter ( ) , } , state : createRedisState ( ) , } ) ; bot .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More