intelligent_ui library
The Open Intelligent UI component library (a port of
thesysdev/open-intelligent-ui at 9df2e64): components, @functions,
@CopyToClipboard, the chat and dashboard prompts, and demo data tools.
Classes
Enums
- IuiComponent
- The Open Intelligent UI components, in the reference library's order. Builders switch over this enum, so a component without one does not compile.
Constants
- chatPrompt → const PromptOptions
-
The chat prompt: no tools,
$variablesand functions. -
optionalIuiComponents
→ const Set<
IuiComponent> - Components a renderer may leave out: they need a map, a web view or a TeX renderer.
Properties
- copyToClipboard → ActionSpec
-
@CopyToClipboard(text): the host copies the text.final - formatMoney → FunctionSpec
-
@FormatMoney(amount): an exactMoneyamount as text, in the session's locale. Add it withlibrary.extend(LibraryExtension(addFunctions: [formatMoney])).final - intelligentUi → OpenUiLibrary
-
The Open Intelligent UI library: about 55 components the model arranges
itself, 59
@functions, and@CopyToClipboard. Root isCol.final
Functions
-
chatPromptFor(
OpenUiLibrary library) → PromptOptions -
chatPrompt for
library: rules and examples that name a component or@calllibrarylacks are left out, and the "Pick the medium" rule names only media it has. For intelligentUi this is chatPrompt itself. -
dashboardPrompt(
{List< OpenUiTool> ? tools, OpenUiLibrary? library}) → PromptOptions -
The dashboard prompt over
tools(the demo data tools by default). Rules and examples are filtered as in chatPromptFor. -
demoTools(
{DateTime now()?}) → List< OpenUiTool> -
Demo data tools for Query-backed dashboards: a store's orders, support
tickets and website traffic for the days up to today. A day's rows depend
only on its date.
nowdefaults to the current time. -
formatDecimal(
num value, {required int minFraction, required int maxFraction}) → String -
en-US
Intl.NumberFormat, astoLocaleString("en-US", options)formats for@Formatand@Plural. -
formatMoneyWith(
{bool boundOnly = false, bool trimZeroFraction = false}) → FunctionSpec -
@FormatMoneywith options.boundOnlytakes the amount only from a host-bound record ($order.total), never one the model wrote.trimZeroFractionwrites₹1,23,456for₹1,23,456.00. -
intelligentUiWithout(
Set< IuiComponent> omit) → OpenUiLibrary -
intelligentUi without
omit. Map and MapMarker go together. With nothing to omit this is intelligentUi itself.