The Open Standard for Generative UI
@openuidev/react-ui
0.18.1
Patch Changes
#1327
86da07fThanks @shubham-thesys! - Refresh the AgentInterface shell: a collapsed sidebar rail with a History menu and a draggable, remembered width; a pill composer and a shared ~72ch reading column; a centred welcome screen with starter tabs and acardstarter variant;AgentInterface.ThreadHeadergainsstart/center/endslots, the chat title and a Rename/Delete menu; a Rename option in the thread menu; a shared menu style for Select, ModelSwitcher and dropdowns; a mascot loader in place of the dot-matrix loader; an exportedWelcomeMascot(blinks, follows the cursor, squishes on click); anAgentInterface.SidebarFooterslot withAgentInterface.ThemeModeToggle, backed by the newuseThemeModePreferencehook; a redesigned tool call timeline with animated tool glyphs, plain-language labels (toolLabel,ToolLabelsProvider) and a live "Working" row;defaultLabelis deprecated in favour oftoolLabel; and server-rendering support: the saved sidebar and theme preferences are restored just after hydration, before paint, with the interface's contents hidden until then so the first visible frame is already correct.#1394
5186585Thanks @Aditya-thesys! - Update the README for OpenUI Lang 1.0: working snippets and links to the new docs pages.
0.18.0
Minor Changes
#1348
9e76b1dThanks @Aditya-thesys! - Add custom actions:defineAction({ name, description, params })pluscreateLibrary({ actions }). Programs use them like the built-in steps, alone or inAction([...]), for exampleButton("Copy", @CopyToClipboard(order.id)), with positional arguments inparamskey order. On click the step reaches the hostonActionas{ type: name, params }(schema defaults applied), in order with the other steps, and the event is typed from the library soparamsnarrows bytype. Args are validated like library function args, and a step with invalid args is a no-op. Only a real call produces a custom step: a plan read from data (an object literal,$state, an@Eachitem) loses its custom steps, and a legacy action object whose type names a custom action is ignored.library.toJSONSchema()lists actions underactions, the prompt lists them with the built-in action steps, andtoSpec()includes them. The ReactRendererand the server autofix parser pick them up automatically, and the react-uiButtonvalidates its form before a custom action.Types: the exported
ActionStepunion adds{ type: "custom_action"; name; params }, so aswitchoverActionSteptypes needs a case for it.In react-ui,
AgentInterfacetakesonAction, which receives the actions the chat does not handle itself, such as custom actions.The built-in steps (
@Run,@ToAssistant,@OpenUrl,@Set,@Reset) are now defined like custom actions and live in the same call registry, so their prompt lines are generated too (for example@OpenUrl(url: string)).ACTION_NAMESis removed.A defined action has a
.reffor slots that take only some actions, for exampleshare: z.union([copy.ref, steps.OpenUrl.ref]).optional(): the prompt signature printsshare?: @CopyToClipboard | @OpenUrl, and the JSON gets aCopyToClipboard$defsentry{ type: "CopyToClipboard", params }.#1348
9e76b1dThanks @Aditya-thesys! - OpenUI Lang 1.0.- Upgrade
@openuidev/lang-coreand@openuidev/react-langtogether, and together with the server that generates the system prompt. A 1.0 prompt teaches bare action steps (@ToAssistant("Hi")withoutAction([...])), which a 0.x client does not run. - react-ui 0.18 requires react-lang 1.0 (peer
>=1.0.0 <2.0.0); upgrade them together. - browser-bundle 0.2 bundles react-lang 1.0 and react-ui 0.18.
- server 0.3 uses lang-core 1.0 for autofix (parser and system prompt); stay on server 0.2 with a 0.x client. Autofix ignores warnings and accepts a ternary entry, so a program that renders does not start a fix round.
- vue-lang, svelte-lang and angular-lang stay on 0.4 (OpenUI Lang 0.x). Keep
@openuidev/lang-core^0.4 for the prompts they render. - A program whose
rootstatement is written last shows nothing while it streams, until therootline arrives. Writerootfirst, as the system prompt asks. - A cut-off output that never reached its
rootstatement, or any statement calling the root component, now renders blank instead of a partial tree.
- Upgrade
Patch Changes
#1348
9e76b1dThanks @Aditya-thesys! - Action steps are plans. Every step call now evaluates to a one-step plan ({ steps: [step] }), so a single step needs no wrapper:Button("Ask", @ToAssistant("Tell me more")). Several steps still needAction([...]), for exampleButton("Save", Action([@Set($saved, true), @ToAssistant("Saved")])); a plain list of steps stays a plain array. An invalid step evaluates to an empty plan (a no-op) instead of null, andAction([...])flattens nested plans. Legacy{ type, params }action configs are unchanged.New
action()helper (lang-core, re-exported by react-lang), likereactive(): it returns the action prop schema, already taggedActionExpression, so libraries writeaction: action().optional()instead of callingtagSchemaId(..., "ActionExpression")themselves. react-ui's action props use it.Prompt change: for libraries with action props (
ActionExpression), the system prompt teaches one step bare and several steps inAction([...]). The react-ui prompt examples, including the chat library examples, use step calls instead of legacy objects.#1348
9e76b1dThanks @Aditya-thesys! - Stored messages and Cloud responses whose second content line starts mid-line, after a cut-off first attempt, read the second attempt, as before.#1348
9e76b1dThanks @Aditya-thesys! -parseMessagereads a content line that starts mid-line as a new content section, so a regenerated response wins over the cut-off one, also while streaming. react-lang and react-ui drop their own copies of this step, and a Cloud response keeps the second attempt's scripts.#1348
9e76b1dThanks @Aditya-thesys! - OpenUI 1.0 review fixes:- lang-core: the built-in functions prompt no longer uses react-ui's
Colin its@Eachexample, and names Query only when tool calls are on. - lang-core:
JSONSchemaDefaddstypeandanyOf, so the CLI's spec for a library that usesaction()passes togenerateSystemPromptwithout a cast. - react-ui: the chat prompt's button rules name
@ToAssistantand@OpenUrl. - react-ui, a2ui, assistant-ui, devtools, react-email: the
@openuidev/react-langpeer window now covers the version this release publishes.
- lang-core: the built-in functions prompt no longer uses react-ui's
#1348
9e76b1dThanks @Aditya-thesys! - The chat components read and write stored messages withparseMessageandbuildMessagefrom react-lang instead of their own marker parser. Stored bytes are unchanged, and older messages in the<content>/<context>XML envelope still read. A complete message whose content ends in](or any other start of a marker) is no longer cut short, and]]>openui:endtext in the middle of a line stays in the content.#1348
9e76b1dThanks @Aditya-thesys! -@ToAssistant(message, context)passes its context through unchanged as any value (object, array, number, string, including falsy ones). Thecontinue_conversationstep'scontextis now typedunknown, and react-lang forwards it inparams.contextwhenever it is set. The react-ui chat adds it as the third element of the chat context, and card blocks append their item context to it as text, as before. The system prompt documents the context argument.Updated dependencies [
9e76b1d,9e76b1d,9e76b1d,9e76b1d,9e76b1d,9e76b1d,9e76b1d,9e76b1d,9e76b1d,9e76b1d,9e76b1d,9e76b1d,9e76b1d]:
0.17.1
Patch Changes
- #1343
497681eThanks @devin-ai-integration! - Widen the internalreact-langpeer windows to include the 0.4.x line that the Renderer slots release (a minor bump of the lang family) publishes. - Updated dependencies [
f1f66c4]:
0.17.0
Minor Changes
#1248
301d668Thanks @ankit-thesys! - Charts are now drawn with D3 instead of Recharts. Every chart keeps its name and export (AreaChart,AreaChartCondensed,BarChart,BarChartCondensed,HorizontalBarChart,LineChart,LineChartCondensed,PieChart,RadarChart,RadialChart,ScatterChart,SingleStackedBar, the Mini charts and the scatter helpers) and takes the samedata+categoryKey/dataKeyshape; genui-lib's chart components and their props are unchanged. New charts:HeatmapChart,FunnelChart,SegmentedBar(the same component asSingleStackedBar),CalendarHeatmap, plusStackedLegendwithLegendStoreProvider.Changes for direct users:
theme(named palettes) is gone; set colors withcustomPaletteor the ThemeProvider's chart palettes (defaultChartPalette,barChartPalette, …).heightis the whole chart: the x-axis labels and legend fit inside it instead of being added below. Labels take at most half of it and truncate when they don't fit.- Renamed: bar
radius→barRadius; SingleStackedBaranimated→isAnimationActive. - Dropped: line and radar
strokeWidth; HorizontalBarChartshowXAxis; Pie and RadialonMouseEnter/onMouseLeave; scattershape. - Legend and tooltip text is shown as given, no longer capitalized ("iOS" stays "iOS"; a lowercase data key shows lowercase).
rechartsis no longer a dependency.
Patch Changes
#1273
d51a09cThanks @ankit-thesys! - ScrollingBarChart,AreaChartandLineChartlay out long category lists faster: only a label that widens the categories is measured in full, so the layout stays cheap as a long chart streams in. Widened categories are sized to the exact label width.#1269
dd4f450Thanks @i-subham23! - Fixes to the D3 charts from QA:- Area and line charts with
variant="step"step halfway between points, as the Recharts charts did, so the first and last values get a flat run too. - The scrolling
BarChart,AreaChartandLineChartwiden their categories so long x-axis labels show in full, and scroll further. A category grows to at most three times its usual width and at most half the chart; longer labels, and labels in the condensed charts, are truncated with the full text on hover. - The donut
PieChartis a thin band in the slice colors over grey track wedges again, with slices 0.5° apart;paddingAnglesets the pie's gaps only. RadarChartmarks the hovered axis with a dot on each series. The dots glide between axes and fade in and out, like the line and area charts' hover dots.
- Area and line charts with
Updated dependencies []:
0.16.3
Patch Changes
- #1068
a935fcdThanks @iambharathpadhu! - Prevent Enter from submitting either built-in composer while IME composition is active, including browsers that report the keyCode 229 fallback. Enter after composition finishes still submits, and Shift+Enter continues to insert a newline. - Updated dependencies []:
0.16.2
Patch Changes
- #1170
6060bf5Thanks @AbhinRustagi! - Add anAgentInterfaceturn-level tool timeline override, allowing applications to replace the default live tool-activity UI without rebuilding the thread. - Updated dependencies []:
0.16.1
Patch Changes
- #1186
0227ad7Thanks @abhithesys! - Widen the internalreact-headless/react-uipeer windows to include the 0.16.x line, fixing an install-time peer mismatch where these packages required areact-headless/react-uiversion older than the one they ship against. - Updated dependencies []:
0.16.0
Minor Changes
- #1184
5cde7c3Thanks @abhithesys! - Widen peer dependency ranges for@openuidev/react-headlessand@openuidev/react-uito allow0.15.x(>=0.14.0 <0.16.0).
Patch Changes
- Updated dependencies []:
0.15.0
Minor Changes
#1182
b4aa87cThanks @abhithesys! - Add the new card and form components toopenuiLibrary(the base, non-chat library), so they're available outsideAgentInterfacetoo:InlineHeader,EditableTable,Chips/ChipItem,OptionCards/OptionCard,IconButton,EntityList,Text/BoldText,IconText/ImageText/ImageTextLarge,MetricIndicatorInline/MetricIndicatorWithStrikethrough, and theSnippet/Overview/Context/Composite/Visualcard blocks with their items.FormControlnow acceptsChipsandOptionCardsinputs in both libraries, which let the chat library drop itsChatForm/ChatFormControlduplicates and register the baseForm/FormControldirectly.Fixes
IconButton, which was registered but unreachable in the chat library (no union pointed at it) — it can now be placed as aCard/Stackchild in both libraries.#1173
8e0d1c8Thanks @abhithesys! - Add new components toopenuiChatLibrary.New chat components:
InlineHeader,EditableTable,Chips/ChipItem,OptionCards/OptionCard,Icon,IconButton,EntityList,Text,BoldText,IconText,ImageText,ImageTextLarge,MetricIndicatorInline,MetricIndicatorWithStrikethrough, and theSnippet/Overview/Context/Composite/Visualcard blocks with their items. Each ships as a react-ui primitive undercomponents/plus a genui-lib wrapper.Citations: the chat
Cardacceptssources, renders a Sources strip, and[n]markers inTextContentbecome citation chips. NewTextContentWrapper,Citation,Sources,SourceFaviconImage,InlineMarkdownRendererandTooltipWrapperprimitives.Card block clicks attach per-item context (
itemIndex,itemId,itemTitle, ...) to the block action. Chat-only variants ofForm,FormControl,Tabs,Accordion,CarouselandSectionBlockaccept the new blocks as nested content.Prompt: chat examples and rules rewritten to cover cards, forms, citations and actions. The action prop schema now carries the
open_url/continue_conversation/ custom object contract in the generated JSON schema.Breaking:
Tag.iconis now anIconreference instead of a string.TagBlockgainssize,ListBlockgainssize, condensed charts gainheight. Typography map gainsnumber/titleandnumber/title-medium; several components that referenced a non-existentprimaryfont family now usebody.Dependencies: adds
@tanstack/react-tableandunist-util-visit.
Patch Changes
- Updated dependencies [
bad6e49]:
0.14.0
Minor Changes
- #1069
f8d9b92Thanks @abhithesys! - Adopt automated release management via changesets.react-headlessandreact-uinow version together as a fixed group; this release unifies them on a single version line.