genui 0.8.0
genui: ^0.8.0 copied to clipboard
Generates and displays generative user interfaces (GenUI) in Flutter using AI.
genui Changelog #
0.8.0 #
- BREAKING: Updated package to align with A2UI v0.9 protocol and introduced extensive architectural changes.
- BREAKING: Updated minimum Dart SDK constraints to
^3.10.0to leverage modern Dart 3+ syntax and features (#772). - BREAKING:
DataModelis now an abstract interface class.InMemoryDataModelprovides the concrete implementation. - BREAKING: Enforce non-null
DataPathinDataModel.update,subscribe, andgetValueoperations (#743). - BREAKING:
DataContext.evaluaterenamed toresolve, returningStream<Object?>. - BREAKING: Made client functions reactive and catalog-based.
SimpleClientFunctionrenamed toSynchronousClientFunctionand itscallmethod toexecuteSync. - BREAKING: Removed global
FunctionRegistry. Functions are now registered to the catalog. RenamedregisterStandardFunctionstoregisterBasicFunctions. - BREAKING: Removed
SurfaceCleanupStrategyfromSurfaceController. - BREAKING:
SurfaceContextandSurfaceDefinitionnow require a non-nullablecatalogId. - BREAKING: Renamed
CoreCatalogtoBasicCatalogand relocated catalog widgets. - Feature: Added
examplesapp with a gallery of pre-designed surfaces allowing editing/previewing A2UI JSON (#761). - Feature: Implemented audio and video basic catalog components (#802).
- Feature: Added client capabilities JSON generation via
A2UiClientCapabilities.fromCatalogs(#773). - Feature: Initial implementation of prompt builder via
PromptBuilderand theConversationfacade (#777). - Feature: Consolidated component name into
CatalogItemconstructor (#757). - Feature: Added descriptions to basic component schemas for standard validation (#756).
- Fix: Filter whitespace-only AI text responses from transport (#759).
- Fix: Resolved
DataModeldouble-dispose crashing issue (#741). - Fix: Fixed memory leaks in
RefCountedValueNotifierand refactored catalog widgets to use lifecycle-safeBoundValue/BoundStringwidgets. - Refactor: Decoupled
ClientFunctionfromDataContextand resolved package cycles (#742). - Refactor: Updated
Modalcomponent to self-contain showing logic. - Internal: Removed legacy events
ToolStartEvent,ToolEndEvent,TokenUsageEvent, andThinkingEventfrom the core genui package.
0.7.0 #
- Fix: Improved error handling for catalog example loading to include context about the invalid item (#653).
- BREAKING: Renamed
ChatMessageWidgettoChatMessageViewandInternalMessageWidgettoInternalMessageView(#661). - Fix: Pass the correct
catalogIdinDebugCatalogViewwidget (#676). - BREAKING: Renamed most classes with
GenUiprefix to remove the prefix or useSurface.GenUiConversation->ConversationGenUiController->SurfaceControllerGenUiSurface->SurfaceGenUiHost->SurfaceHostGenUiContext->SurfaceContextGenUiTransport->TransportGenUiPromptFragments->PromptFragmentsGenUiFunctionDeclaration->ClientFunctionGenUiFallback->FallbackWidgetconfigureGenUiLogging->configureLogging
- Added some dart documentation and an
exampledirectory to improvepackage:genuipub score. - Fix: Make
ContentGeneratorErrorbe anException(#660). - Feature: Define genui parts as extensions of
genai_primitives(#675). - Internal: Enable stricter dynamic-related analysis (#652).
0.6.1 #
- Fix: Corrected
DateTimeInputcatalog item JSON key mapping (#622). - Fix: Added missing
weightproperty toComponentconstructor (#603). - Fix: Defaulted
TextFieldwidthto 1 when nested in aRow(#603).
0.6.0 #
- BREAKING: Renamed
GenUiManagertoA2uiMessageProcessorto better reflect its role. - BREAKING:
A2uiMessageProcessornow accepts anIterable<Catalog>viacatalogsinstead of a singlecatalog. - BREAKING: Removed
GenUiConfigurationandActionsConfig. - BREAKING: Removed
GenUiHost.catalogin favor ofGenUiHost.catalogs. - Improved surface rendering logic to cache components before rendering.
- Updated README sample code to reflect current
FirebaseAiContentGeneratorAPI (addedcatalogparameter and replacedtoolswithadditionalTools). - Feature:
GenUiManagernow supports multiple catalogs by accepting anIterable<Catalog>in its constructor. - Feature:
A2uiMessageProcessornow supports multiple catalogs by accepting anIterable<Catalog>in its constructor. - Feature:
catalogIdproperty added toUiDefinitionto specify which catalog a UI surface should use. - Refactor: Moved
standardCatalogIdconstant frombasic_catalog.darttoprimitives/constants.dartfor better organization and accessibility. - Fix:
MultipleChoicewidget now correctly handlesmaxAllowedSelectionswhen provided as adoublein JSON, preventing type cast errors. - Fix: The
Textcatalog item now respects the ambientDefaultTextStyle, resolving contrast issues where, for example, text inside a dark purple primaryButtonwould be black instead of white.
0.5.1 #
- Homepage URL was updated.
- Deprecated
flutter_markdownpackage was replaced withflutter_markdown_plus.
0.5.0 #
- Initial published release.
0.4.0 #
- BREAKING: Replaced
AiClientinterface withContentGenerator.ContentGeneratoruses a stream-based API (a2uiMessageStream,textResponseStream,errorStream) for asynchronous communication of AI-generated UI commands, text, and errors. - BREAKING:
GenUiConversationnow requires aContentGeneratorinstance instead of anAiClient. - Feature: Introduced
A2uiMessagesealed class (BeginRendering,SurfaceUpdate,DataModelUpdate,SurfaceDeletion) to represent AI-to-UI commands, emitted fromContentGenerator.a2uiMessageStream. - Feature: Added
FakeContentGeneratorfor testing purposes, replacingFakeAiClient. - Feature: Added
configureGenUiLoggingfunction andgenUiLoggerinstance for configurable package logging. - Feature: Added
JsonMaptype alias inprimitives/simple_items.dart. - Feature: Added
DirectCallHostand related utilities infacade/direct_call_integrationfor more direct AI model interactions. - Refactor:
GenUiConversationnow internally subscribes toContentGeneratorstreams and uses callbacks (onSurfaceAdded,onSurfaceUpdated,onSurfaceDeleted,onTextResponse,onError) to notify the application of events. - Fix: Improved error handling and reporting through the
ContentGenerator.errorStreamandContentGeneratorErrorclass.
0.2.0 #
- BREAKING: Replaced
ElevatedButtonwith a more genericButtoncomponent. - BREAKING: Removed
CheckboxGroupandRadioGroupfrom the basic catalog. TheMultipleChoiceorCheckBoxwidgets can be used as replacements. - Feature: Added an
obscuredproperty toTextInputChipto allow for password style inputs. - Feature: Added many new components to the basic catalog:
AudioPlayer(placeholder),Button,Card,CheckBox,DateTimeInput,Divider,Heading,List,Modal,MultipleChoice,Row,Slider,Tabs, andVideo(placeholder). - Fix: Corrected the action key from
actionNametonameinTrailheadandTravelCarousel. - Fix: Corrected the image property from
locationtourlinTravelCarousel.
0.1.0 #
- Initial commit