Generic frontend Gutenberg chat block for WordPress.
extra-chill/chat is a shared chat UI primitive for WordPress.
The goal is to provide a standard, frontend-first, dumb chat block that can power multiple chat experiences cleanly across different plugins and products.
This repo should focus on the best chat experience possible while leaving backend-specific concerns to adapters and consuming plugins.
There are already multiple chat block implementations across different repos, including:
Extra-Chill/extrachill-chatSarai-Chinwag/spawn
Those implementations overlap heavily in UI and runtime behavior, but differ in backend details like:
- authentication
- session management
- billing / credits
- agent transport
- provisioning / availability states
- branding
This repo exists to separate the shared chat experience from the product-specific business logic.
- Build a reusable Gutenberg chat block
- Keep the block frontend-focused and presentation-first
- Support multiple backend implementations through adapters
- Standardize chat UX across Extra Chill projects
- Make it easy for WordPress plugins to become AI-native without rebuilding chat UI every time
- Owning backend AI orchestration
- Owning product-specific business logic
- Owning billing, provisioning, or auth policy
- Becoming a monolithic app plugin
WordPress Plugin
|
| server-rendered wrapper + config
v
Shared Chat Block UI
|
| adapter contract
v
Backend-specific implementation
The shared block should own:
- message list rendering
- composer UX
- loading / error / retry states
- scrolling behavior
- streaming display
- session list UI (when enabled)
- accessibility and keyboard interactions
- mobile and responsive behavior
The consuming plugin should own:
- REST endpoints
- authentication
- pricing / credit logic
- agent lifecycle
- account state
- server availability logic
- branding and product-specific rules
The main abstraction in this repo should be a narrow adapter contract.
Example shape:
interface ChatAdapter {
capabilities: {
sessions: boolean
history: boolean
streaming: boolean
tools: boolean
availabilityStates: boolean
}
loadInitialState?(): Promise<InitialState>
listSessions?(): Promise<Session[]>
loadMessages?(sessionId: string): Promise<Message[]>
createSession?(): Promise<Session>
sendMessage(input: SendMessageInput): Promise<SendMessageResult>
clearSession?(sessionId: string): Promise<void>
}This keeps the UI generic while allowing:
extrachill-chatto use WordPress REST endpointsspawnto use its own gateway / session model- future implementations to plug in without forking the UI
- Define the adapter API and normalized state model
- Build a minimal frontend-only chat block shell
- Support a basic message flow end-to-end
- Add optional session sidebar support
- Port one real consumer first (
extrachill-chatis likely the easiest) - Port
spawnafter the core boundaries are proven
- create core shared block
- define types and adapter interfaces
- implement minimal mount + send + render loop
- adapt
extrachill-chatto use shared UI - validate API shape and message model
- adapt
spawn - support richer session and availability states
- refine styling, streaming, markdown, and extensibility
This repo is currently in the concept / planning stage.
Implementation should start only after the core abstractions are clear enough that we do not just move duplication into a new place.
See GitHub issues for the initial roadmap.