What's New in 0.4.0
Chat UI 0.4.0 turns the chat into a surface for agents that pause, run for a long time and are used inside a workplace: approvals and questions, reattach after a reload, a Stop that really stops, usage limits, richer uploads, an opt-in portal experience, an embeddable chat, full internationalization and accessibility work. Everything new is additive and opt-in or server-driven: against a server that never pauses, a chat looks and behaves as before (see Migrating to 0.4.0 for the few behaviour changes).
Most of it needs @cognipeer/agent-server 0.3.0 or later. Where the server does not have a route, the feature is simply absent.
Highlights
| Area | What you get | Read |
|---|---|---|
| Approvals and questions | Cards under the assistant message; approve, deny (with a reason), remember for the chat, edit arguments against a JSON Schema, answer questions, deadlines, restored after a reload | Approvals and Questions |
| Runs | A reload mid-turn follows the running turn, a dropped connection is not an error, Stop cancels on the server, notices say why an answer ended | Running Turns and Stop |
| Usage limits | A meter, a "limit reached" notice, raise-and-continue where the host allows it | Usage Limits |
| History | Status badges, keyboard-operable rows, opening a conversation selects its agent, earlier messages on demand | History Sidebar |
| Uploads | Drag and drop, paste, thumbnails, files without text, upload-on-select with progress and retry, per-conversation limits from the agent, expired and unreadable files marked | File Uploads |
| Portal experience | Copy, regenerate, edit, feedback with reasons, rename / pin / bulk delete, starters and welcome, deep links, AI label and legal links, announcements, terms gate, export, background alerts | Portal Experience |
| Embedding | EmbedChat: postMessage handshake, in-memory session, events for the host, host-page tools | Embedding the Chat |
| Internationalization | Any locale with customMessages, nested providers, localized server error codes | Internationalization, Error codes |
| Accessibility | Labelled controls, live log, announced and focused cards, keyboard map, reduced motion | Accessibility |
| Theming | Four status colours with tints; every colour key in themeColors | Theming |
| Per-agent settings | The agent says what it takes: attachments, composer mode, argument editing, budget actions, portal switches | Running Turns |
| Transports | Approvals, runs and uploads on more backends | Transports |
A short tour of the new props
<Chat
baseUrl="/api/portal/support"
// approvals and questions (on by default)
allowArgumentEdit
// usage limits
allowBudgetEdit
// uploads
fileTransport="upload-on-select"
// the portal experience (all opt-in)
messageActions={{ copy: true, regenerate: true, edit: true }}
feedback={{ enabled: true, comments: true }}
historyActions={{ rename: true, pin: true, bulkDelete: true }}
exportMenu={{ enabled: true, formats: ["md", "json", "pdf"] }}
notifications={{ tabBadge: true, desktop: "opt_in" }}
disclosure={{ aiLabel: true, links: { privacy: "https://example.com/privacy" } }}
starters={[{ text: "Summarise my week", label: "Weekly summary" }]}
// another language
locale="tr"
/>New exports
Components: ToolApprovalCard, QuestionCard, MessageActionCards, BudgetBanner, MessageStopNotice, MessageWarnings, InterruptedNotice, TermsGate, AnnouncementBanner, LegalFooter, ChatEmptyState, InfoMarkdown, MessageToolbar, FeedbackSheet, MessageEditor, ExportMenu, NotificationsMenu, EmbedChat, EmbedBridge.
Hooks: useBackgroundAlerts; useChat and useChatHistory returned values grew (see the API pages); useI18n gained has.
Utilities: resolveAgentSettings, resolveExperience, normalizeActions, isQuestionRequired, validateAgainstSchema, localizeError, safeImageSrc, safeFileHref, isImageFile, formatUsd, canContinueAfterRaise, readContinuable, exchangeToken, isAllowedOrigin and the export helpers (conversationToMarkdown, conversationToJson, conversationToPrintHtml).
Types: PendingAction, ActionResolution, UserQuestion, MessageStatus, StopReason, ComposerState, ConversationRuntime, ConversationBudget, AgentCapabilities, FeedbackInput, Announcement, ChatController, ChatMessages, BuiltInLocale, and more. See Types.
0.3.0 in one paragraph
0.3.0 (2026-10-07) introduced the ChatTransport interface and a transport prop on Chat, useChat and useChatHistory, with transports for agent-sdk, OpenAI Chat Completions, the Responses API and A2A, a ThreadStore (memory or localStorage) for backends that keep no conversations, and getHeaders / fetch options. See Transports. If you are coming from 0.2.x, 0.3.0's behaviour changes are small: baseUrl became optional when a transport is given, and the SSE reader accepts event: lines, CRLF and multi-line data:.
Earlier releases
The release notes of every version are in Release Notes.

