Skip to content

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 ​

AreaWhat you getRead
Approvals and questionsCards 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 reloadApprovals and Questions
RunsA reload mid-turn follows the running turn, a dropped connection is not an error, Stop cancels on the server, notices say why an answer endedRunning Turns and Stop
Usage limitsA meter, a "limit reached" notice, raise-and-continue where the host allows itUsage Limits
HistoryStatus badges, keyboard-operable rows, opening a conversation selects its agent, earlier messages on demandHistory Sidebar
UploadsDrag and drop, paste, thumbnails, files without text, upload-on-select with progress and retry, per-conversation limits from the agent, expired and unreadable files markedFile Uploads
Portal experienceCopy, regenerate, edit, feedback with reasons, rename / pin / bulk delete, starters and welcome, deep links, AI label and legal links, announcements, terms gate, export, background alertsPortal Experience
EmbeddingEmbedChat: postMessage handshake, in-memory session, events for the host, host-page toolsEmbedding the Chat
InternationalizationAny locale with customMessages, nested providers, localized server error codesInternationalization, Error codes
AccessibilityLabelled controls, live log, announced and focused cards, keyboard map, reduced motionAccessibility
ThemingFour status colours with tints; every colour key in themeColorsTheming
Per-agent settingsThe agent says what it takes: attachments, composer mode, argument editing, budget actions, portal switchesRunning Turns
TransportsApprovals, runs and uploads on more backendsTransports

A short tour of the new props ​

tsx
<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.

Next steps ​

Studio · Pulse · Console · Agent SDK and more — the Cognipeer documentation hub