@vinaverse/react-native 0.1.0-alpha.11 → 0.1.0-alpha.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +16 -3
  2. package/dist/ask.cjs +10 -5
  3. package/dist/ask.d.cts +35 -5
  4. package/dist/ask.d.ts +35 -5
  5. package/dist/ask.js +3 -2
  6. package/dist/chat.cjs +69 -69
  7. package/dist/chat.d.cts +44 -8
  8. package/dist/chat.d.ts +44 -8
  9. package/dist/chat.js +3 -3
  10. package/dist/{chunk-XAG2P447.cjs → chunk-272ACDLI.cjs} +248 -104
  11. package/dist/chunk-272ACDLI.cjs.map +1 -0
  12. package/dist/{chunk-EFEXTVIT.js → chunk-35A77CNF.js} +11 -3
  13. package/dist/chunk-35A77CNF.js.map +1 -0
  14. package/dist/{chunk-NMKJ7LIJ.cjs → chunk-35T5QPMT.cjs} +31 -7
  15. package/dist/chunk-35T5QPMT.cjs.map +1 -0
  16. package/dist/{chunk-7KPCO443.js → chunk-GFD4T3IA.js} +28 -4
  17. package/dist/chunk-GFD4T3IA.js.map +1 -0
  18. package/dist/{chunk-2J2LIJLW.js → chunk-MCVW6TZD.js} +113 -33
  19. package/dist/chunk-MCVW6TZD.js.map +1 -0
  20. package/dist/{chunk-KSHDF3MG.js → chunk-QSMMC4RZ.js} +216 -74
  21. package/dist/chunk-QSMMC4RZ.js.map +1 -0
  22. package/dist/{chunk-POJP52GE.js → chunk-TY4TISCR.js} +4 -4
  23. package/dist/chunk-TY4TISCR.js.map +1 -0
  24. package/dist/{chunk-6QYDPGRS.cjs → chunk-UMCOOQT6.cjs} +11 -3
  25. package/dist/chunk-UMCOOQT6.cjs.map +1 -0
  26. package/dist/{chunk-MG32E4JI.cjs → chunk-VWAAUCE3.cjs} +11 -11
  27. package/dist/chunk-VWAAUCE3.cjs.map +1 -0
  28. package/dist/{chunk-4PXQ7DEY.cjs → chunk-YVCMKSJG.cjs} +140 -60
  29. package/dist/chunk-YVCMKSJG.cjs.map +1 -0
  30. package/dist/{context-gHCLFsJh.d.ts → context-B4ctXjm5.d.cts} +22 -1
  31. package/dist/{context-gHCLFsJh.d.cts → context-B4ctXjm5.d.ts} +22 -1
  32. package/dist/history.cjs +52 -48
  33. package/dist/history.cjs.map +1 -1
  34. package/dist/history.d.cts +12 -3
  35. package/dist/history.d.ts +12 -3
  36. package/dist/history.js +13 -9
  37. package/dist/history.js.map +1 -1
  38. package/dist/index.cjs +83 -78
  39. package/dist/index.cjs.map +1 -1
  40. package/dist/index.d.cts +3 -3
  41. package/dist/index.d.ts +3 -3
  42. package/dist/index.js +6 -5
  43. package/dist/index.js.map +1 -1
  44. package/dist/launcher.cjs +10 -10
  45. package/dist/launcher.js +2 -2
  46. package/package.json +7 -7
  47. package/dist/chunk-2J2LIJLW.js.map +0 -1
  48. package/dist/chunk-4PXQ7DEY.cjs.map +0 -1
  49. package/dist/chunk-6QYDPGRS.cjs.map +0 -1
  50. package/dist/chunk-7KPCO443.js.map +0 -1
  51. package/dist/chunk-EFEXTVIT.js.map +0 -1
  52. package/dist/chunk-KSHDF3MG.js.map +0 -1
  53. package/dist/chunk-MG32E4JI.cjs.map +0 -1
  54. package/dist/chunk-NMKJ7LIJ.cjs.map +0 -1
  55. package/dist/chunk-POJP52GE.js.map +0 -1
  56. package/dist/chunk-XAG2P447.cjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Composer.tsx","../src/components/StatusBanner.tsx","../src/components/VinaverseChat.tsx","../src/components/AgentChat.tsx"],"names":["useCopy","useTheme","useState","codePoints","MAX_TEXT","jsxs","View","jsx","TextInput","Button","memo","Composer","useChat","useConversationSelector","useCallback","motion","StatusBanner","useMemo","useEffect","FailureSlot","FailureActionButton","Text","useRef","useNativeLifecycle","themeProblems","bannedWordsIn","CopyProvider","ThemeProvider","ChatContextProvider","Platform","KeyboardAvoidingView","ChatHeader","DisclosureBar","MessageList","useAgentRuntime","useAgent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O,IAAA,GAAO,KAAA,CAAM,MAAA,mBACpCC,cAAAA,CAACc,gBAAAA,EAAA,EAAK,KAAA,EAAO,OAAQ,QAAA,EAAA,CAAA,CAAE,eAAe,GAAE,CAAA,mBAExChB,gBAAAuC,mBAAA,EAAA,EACE,QAAA,EAAA;AAAA,0BAAArC,eAACc,gBAAAA,EAAA,EAAK,OAAO,KAAA,EAAQ,QAAA,EAAA,CAAA,CAAE,SAAS,CAAA,EAAE,CAAA;AAAA,0BAClCd,cAAAA;AAAA,YAACE,wBAAA;AAAA,YAAA;AAAA,cACC,KAAA,EAAO,EAAE,YAAY,CAAA;AAAA,cACrB,OAAA,EAAQ,MAAA;AAAA,cACR,OAAA,EAAS,MAAM,KAAA,CAAM,MAAA,CAAO,IAAI;AAAA;AAAA,WAClC;AAAA,0BACAF,cAAAA;AAAA,YAACE,wBAAA;AAAA,YAAA;AAAA,cACC,KAAA,EAAO,EAAE,WAAW,CAAA;AAAA,cACpB,OAAA,EAAQ,MAAA;AAAA,cACR,OAAA,EAAS,MAAM,KAAA,CAAM,MAAA,CAAO,MAAM;AAAA;AAAA;AACpC,SAAA,EACF,CAAA;AAAA,QAED,KAAA,CAAM,gCACLF,cAAAA;AAAA,UAACE,wBAAA;AAAA,UAAA;AAAA,YACC,KAAA,EAAO,EAAE,SAAS,CAAA;AAAA,YAClB,OAAA,EAAQ,MAAA;AAAA,YACR,IAAA,EAAK,MAAA;AAAA,YACL,SAAS,KAAA,CAAM;AAAA;AAAA,SACjB,GACE;AAAA;AAAA;AAAA,GACN;AAEJ","file":"chunk-YVCMKSJG.cjs","sourcesContent":["// Where the person types. Its text is its own state, so typing renders nothing else. Enabled from the first frame:\n// a message typed before the session is ready is held and sent once it is. Stop replaces Send while the agent\n// replies and nothing is typed.\nimport { codePoints, MAX_TEXT } from '@vinaverse/client/conversation';\nimport { useConversationSelector, useCopy } from '@vinaverse/react';\nimport { memo, useCallback, useState } from 'react';\nimport { TextInput, View } from 'react-native';\nimport { useChat } from '../context.js';\nimport { useTheme } from '../theme.js';\nimport { Button } from './Button.js';\nimport type { ComposerProps } from './types.js';\n\nexport function DefaultComposer(props: Omit<ComposerProps, 'Default'>) {\n const { t, direction } = useCopy();\n const { colors, radius, space, font, size } = useTheme();\n const [text, setText] = useState('');\n const length = codePoints(text);\n const canSend = text.trim().length > 0 && length <= MAX_TEXT;\n const send = () => {\n if (!canSend) return;\n props.onSend(text);\n setText('');\n };\n return (\n <View\n style={{\n flexDirection: 'row',\n alignItems: 'flex-end',\n gap: space.sm,\n paddingHorizontal: space.lg,\n paddingVertical: space.sm,\n borderTopWidth: 1,\n borderTopColor: colors.divider,\n backgroundColor: colors.background,\n }}\n >\n <TextInput\n value={text}\n onChangeText={setText}\n placeholder={props.placeholder}\n placeholderTextColor={colors.textMuted}\n accessibilityLabel={props.placeholder}\n multiline\n maxLength={MAX_TEXT * 2}\n testID=\"vinaverse-composer-input\"\n style={{\n flex: 1,\n minHeight: size.touchTarget,\n maxHeight: 140,\n paddingHorizontal: space.md,\n paddingVertical: space.sm,\n borderRadius: radius.lg,\n borderWidth: 1,\n borderColor: colors.border,\n color: colors.text,\n backgroundColor: colors.surface,\n fontSize: font.size.md,\n textAlign: direction === 'rtl' ? 'right' : 'left',\n writingDirection: direction,\n ...(font.family ? { fontFamily: font.family } : {}),\n }}\n />\n {props.responding && !text ? (\n <Button\n label={t('stop')}\n onPress={props.onStop}\n testID=\"vinaverse-stop\"\n />\n ) : (\n <Button\n label={t('send')}\n variant=\"primary\"\n disabled={!canSend}\n onPress={send}\n testID=\"vinaverse-send\"\n />\n )}\n </View>\n );\n}\n\nexport const Composer = /* @__PURE__ */ memo(function Composer(props: {\n readonly onError?: (error: unknown) => void;\n}) {\n const { store, slots } = useChat();\n const { t } = useCopy();\n const takeover = useConversationSelector(store, (v) => v.takeover);\n const name = useConversationSelector(store, (v) => v.agent.name);\n const responding = useConversationSelector(store, (v) => v.responding);\n const { onError } = props;\n const onSend = useCallback(\n (text: string) => {\n try {\n store.send(text);\n } catch (error) {\n onError?.(error);\n }\n },\n [store, onError],\n );\n const onStop = useCallback(() => store.cancel(), [store]);\n const placeholder = takeover\n ? t('composerPlaceholderTakeover', {\n by: takeover.by || t('staffFallbackRole'),\n })\n : t('composerPlaceholder', { agent: name ?? t('agentFallbackName') });\n const Slot = slots.Composer;\n const own = { placeholder, responding, onSend, onStop };\n return Slot ? (\n <Slot {...own} Default={DefaultComposer} />\n ) : (\n <DefaultComposer {...own} />\n );\n});\n","// What the connection means for the person, in words, with the one action that helps: continue here, or try again;\n// on \"couldn't connect\", also the tenant's way out (`Failure.tsx`), or the tenant's own part in its place.\n// \"Connecting…\" waits 600 ms, so a quick connection never flashes a banner.\nimport { useConversationSelector, useCopy } from '@vinaverse/react';\nimport { motion } from '@vinaverse/tokens';\nimport { memo, type ReactNode, useEffect, useMemo, useState } from 'react';\nimport { Text, View } from 'react-native';\nimport { useChat } from '../context.js';\nimport { useTheme } from '../theme.js';\nimport { Button } from './Button.js';\nimport { FailureActionButton, FailureSlot } from './Failure.js';\nimport type { FailureState } from './types.js';\n\n/** How long \"Connecting…\" waits, shared with the Angular kit (`motion.bannerDelay`). */\nexport const CONNECTING_DELAY = motion.bannerDelay;\n\nexport const StatusBanner = /* @__PURE__ */ memo(function StatusBanner() {\n const { store, slots } = useChat();\n const { t } = useCopy();\n const banner = useConversationSelector(store, (v) => v.banner);\n const status = useConversationSelector(store, (v) => v.status);\n const conversationId = useConversationSelector(\n store,\n (v) => v.conversationId,\n );\n const unavailable = useMemo<FailureState>(\n () => ({\n kind: 'unavailable',\n reason: status,\n retry: () => store.start(),\n conversationId,\n }),\n [store, status, conversationId],\n );\n const [late, setLate] = useState(false);\n useEffect(() => {\n setLate(false);\n if (banner !== 'connecting') return;\n const timer = setTimeout(() => setLate(true), CONNECTING_DELAY);\n return () => clearTimeout(timer);\n }, [banner]);\n if (banner === null || (banner === 'connecting' && !late)) return null;\n if (banner === 'unavailable')\n return (\n <FailureSlot\n slot={slots.Unavailable}\n state={unavailable}\n Default={DefaultUnavailable}\n />\n );\n const text = {\n connecting: t('bannerConnecting'),\n reconnecting: t('bannerReconnecting'),\n offline: t('bannerOffline'),\n continued_elsewhere: t('bannerContinuedElsewhere'),\n }[banner];\n const action =\n banner === 'continued_elsewhere' ? (\n <Button\n label={t('continueHere')}\n variant=\"text\"\n onPress={() => void store.continueHere()}\n />\n ) : banner === 'offline' ? (\n <Button\n label={t('tryAgain')}\n variant=\"text\"\n onPress={() => store.start()}\n />\n ) : null;\n return <Banner text={text}>{action}</Banner>;\n});\n\n/** The kit's own \"Couldn't connect.\" banner: try again, and the tenant's failure action when there is one. */\nexport function DefaultUnavailable(props: {\n readonly state: FailureState;\n}): ReactNode {\n const { t } = useCopy();\n const { retry } = props.state;\n return (\n <Banner text={t('bannerUnavailable')}>\n {retry ? (\n <Button label={t('tryAgain')} variant=\"text\" onPress={retry} />\n ) : null}\n <FailureActionButton state={props.state} />\n </Banner>\n );\n}\n\nfunction Banner(props: {\n readonly text: string;\n readonly children?: ReactNode;\n}): ReactNode {\n const { colors, space, font } = useTheme();\n return (\n <View\n accessibilityLiveRegion=\"polite\"\n accessibilityRole=\"alert\"\n style={{\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: space.sm,\n paddingHorizontal: space.lg,\n paddingVertical: space.xs,\n backgroundColor: colors.surface,\n borderBottomWidth: 1,\n borderBottomColor: colors.divider,\n }}\n >\n <Text\n style={{ color: colors.text, fontSize: font.size.sm, flexShrink: 1 }}\n >\n {props.text}\n </Text>\n {props.children}\n </View>\n );\n}\n","// The whole conversation, ready to drop into a screen: header, the AI disclosure, the connection's banner, the\n// messages and cards, the composer. Everything visual is replaceable through `theme`, `copy` and `components`; the\n// disclosure, who-wrote-what and the proposal wiring are the kit's and stay.\nimport type { ConversationStore } from '@vinaverse/client/conversation';\nimport {\n bannedWordsIn,\n type CopyOverrides,\n CopyProvider,\n useCopy,\n} from '@vinaverse/react';\nimport {\n type ReactElement,\n type ReactNode,\n useEffect,\n useMemo,\n useRef,\n} from 'react';\nimport {\n KeyboardAvoidingView,\n Platform,\n type StyleProp,\n View,\n type ViewStyle,\n} from 'react-native';\nimport {\n ChatContextProvider,\n type ChatHandlers,\n type ChatSlots,\n type ChatWarning,\n type Chip,\n type ImagePolicy,\n useChat,\n} from '../context.js';\nimport { useNativeLifecycle } from '../platform.js';\nimport {\n type ColorSchemeSetting,\n type ThemeOverrides,\n ThemeProvider,\n themeProblems,\n useTheme,\n} from '../theme.js';\nimport { Button } from './Button.js';\nimport { ChatHeader } from './ChatHeader.js';\nimport { Composer } from './Composer.js';\nimport { DisclosureBar } from './DisclosureBar.js';\nimport { MessageList } from './MessageList.js';\nimport { StatusBanner } from './StatusBanner.js';\n\nexport interface VinaverseChatProps extends ChatHandlers {\n /** The conversation (`createConversation`), created where it can outlive the screen. */\n readonly conversation: ConversationStore;\n /** The person's locale: the copy, dates, money and text direction (pass the same one to `getSession`). */\n readonly locale?: string;\n /** For dates and times on cards; default: the device's. */\n readonly timeZone?: string;\n readonly copy?: CopyOverrides;\n readonly theme?: ThemeOverrides;\n readonly colorScheme?: ColorSchemeSetting;\n /** Parts to replace. Keep the object stable (module level, or memoized). */\n readonly components?: ChatSlots;\n /** The agent's picture, until the session carries one. */\n readonly agentAvatar?: string;\n /** Hide the header (a screen that draws its own); the disclosure stays. */\n readonly hideHeader?: boolean;\n /** iOS: the height above the keyboard that is not this view's (a navigation header). */\n readonly keyboardVerticalOffset?: number;\n /**\n * How the composer stays above the keyboard. Default: `padding` on iOS, none on Android (the window resizes). An\n * edge-to-edge Android app whose window does not resize passes `padding`; one that manages the keyboard itself\n * (react-native-keyboard-controller) passes `none`.\n */\n readonly keyboardBehavior?: 'padding' | 'height' | 'position' | 'none';\n readonly style?: StyleProp<ViewStyle>;\n /**\n * The AI disclosure the app already holds for this conversation (its cache, or the open's answer): drawn from the\n * first frame until the session's own arrives, in the same bar. Default: the kit's line.\n */\n readonly disclosure?: string;\n /** Chips for an empty conversation when the session brings no welcome (`Session.welcome` comes first). Keep stable. */\n readonly starters?: readonly Chip[];\n /** False: the welcome's chips and the starters give way, its text stays (`AgentChat`: a question about an object leads). */\n readonly welcomeChips?: boolean;\n /** Which card photos are drawn, their frame, and what stands in for one that is not. Keep stable. */\n readonly imagePolicy?: ImagePolicy;\n /** One chip above the composer: a question about where the person now is (`AgentChat` offers it when they moved). */\n readonly suggestion?: Chip | null;\n /** The suggestion chip's test id. Default `vinaverse-suggestion`. */\n readonly suggestionTestID?: string;\n /** Drawn under the composer, inside the kit's providers (`AgentChat`'s thumbs and footer). */\n readonly footer?: ReactNode;\n /**\n * When each message was sent: its time over the first message and over one after `gapMinutes` (default 10) of quiet,\n * and the exact date and time in every message's screen-reader label, in `locale` and `timeZone`. `false` draws none.\n * The line is the `MessageTime` slot. Default on.\n */\n readonly messageTimes?: boolean | { readonly gapMinutes?: number };\n /**\n * Drawn as the conversation's first row, scrolling with it (`AgentChat`: the object asked about, until its verified\n * card takes the same place). Keep it stable.\n */\n readonly listHeader?: ReactElement | null;\n}\n\n/** The providers alone, for a tenant composing its own layout from the exported parts. */\nexport function VinaverseChatProvider(\n props: Omit<\n VinaverseChatProps,\n | 'hideHeader'\n | 'keyboardVerticalOffset'\n | 'keyboardBehavior'\n | 'style'\n | 'suggestion'\n | 'suggestionTestID'\n | 'footer'\n > & {\n readonly children?: ReactNode;\n },\n): ReactNode {\n const {\n conversation,\n components,\n agentAvatar,\n timeZone,\n starters,\n imagePolicy,\n welcomeChips,\n listHeader,\n disclosure,\n } = props;\n const times = props.messageTimes ?? true;\n const messageTimes =\n times === false ? null : times === true ? 10 : (times.gapMinutes ?? 10);\n const handlers = useRef<ChatHandlers>(props);\n handlers.current = props;\n const slots = useStableSlots(components);\n const hasAction = props.failureAction !== undefined;\n const actionLabel = props.failureAction?.label;\n const failureAction = useMemo(\n () => (hasAction ? { label: actionLabel } : null),\n [hasAction, actionLabel],\n );\n const value = useMemo(\n () => ({\n store: conversation,\n handlers,\n slots,\n agentAvatar,\n timeZone,\n failureAction,\n starters,\n imagePolicy,\n messageTimes,\n welcomeChips: welcomeChips !== false,\n listHeader,\n disclosure,\n }),\n [\n conversation,\n slots,\n agentAvatar,\n timeZone,\n failureAction,\n starters,\n imagePolicy,\n messageTimes,\n welcomeChips,\n listHeader,\n disclosure,\n ],\n );\n useNativeLifecycle(conversation);\n useEffect(() => {\n conversation.start(); // early: a client secret opens its first connection within two minutes\n }, [conversation]);\n const { onWarning, theme, copy } = props;\n useEffect(() => {\n if (!onWarning) return;\n for (const problem of themeProblems(theme))\n onWarning(`Vinaverse theme: ${problem}`, { code: 'theme' });\n for (const key of bannedWordsIn(copy ?? {}))\n onWarning(\n `Vinaverse copy: \"${key}\" says assistant, bot or crew; the copy says agent.`,\n { code: 'copy' },\n );\n }, [onWarning, theme, copy]);\n return (\n <CopyProvider locale={props.locale} copy={props.copy}>\n <ThemeProvider theme={props.theme} colorScheme={props.colorScheme}>\n <ChatContextProvider value={value}>\n {props.children}\n </ChatContextProvider>\n </ThemeProvider>\n </CopyProvider>\n );\n}\n\nexport function VinaverseChat(props: VinaverseChatProps): ReactNode {\n return (\n <VinaverseChatProvider {...props}>\n <ChatBody {...props} />\n </VinaverseChatProvider>\n );\n}\n\n/** The chat's layout, inside providers given above it (`AgentChat` keeps one root across its states). */\nexport function ChatBody(props: VinaverseChatProps): ReactNode {\n return (\n <Layout\n hideHeader={props.hideHeader === true}\n keyboardVerticalOffset={props.keyboardVerticalOffset ?? 0}\n keyboardBehavior={\n props.keyboardBehavior ?? (Platform.OS === 'ios' ? 'padding' : 'none')\n }\n style={props.style}\n onError={props.onWarning}\n suggestion={props.suggestion ?? null}\n suggestionTestID={props.suggestionTestID ?? 'vinaverse-suggestion'}\n footer={props.footer}\n />\n );\n}\n\nfunction Layout(props: {\n readonly hideHeader: boolean;\n readonly keyboardVerticalOffset: number;\n readonly keyboardBehavior: 'padding' | 'height' | 'position' | 'none';\n readonly style: StyleProp<ViewStyle> | undefined;\n readonly onError:\n | ((message: string, warning: ChatWarning) => void)\n | undefined;\n readonly suggestion: Chip | null;\n readonly suggestionTestID: string;\n readonly footer: ReactNode;\n}) {\n const { colors } = useTheme();\n const { direction } = useCopy();\n const { onError } = props;\n const reportError = useMemo(\n () =>\n onError\n ? (e: unknown) => onError(String(e), { code: 'send_failed' })\n : undefined,\n [onError],\n );\n return (\n <KeyboardAvoidingView\n {...(props.keyboardBehavior === 'none'\n ? { enabled: false }\n : { behavior: props.keyboardBehavior })}\n keyboardVerticalOffset={props.keyboardVerticalOffset}\n style={[\n { flex: 1, backgroundColor: colors.background, direction },\n props.style,\n ]}\n >\n {props.hideHeader ? null : <ChatHeader />}\n <DisclosureBar />\n <StatusBanner />\n <View style={{ flex: 1 }}>\n <MessageList />\n </View>\n {props.suggestion ? (\n <Suggestion chip={props.suggestion} testID={props.suggestionTestID} />\n ) : null}\n <Composer {...(reportError ? { onError: reportError } : {})} />\n {props.footer}\n </KeyboardAvoidingView>\n );\n}\n\n/** One chip above the composer; a tap sends its message as the person's own text. */\nfunction Suggestion(props: { readonly chip: Chip; readonly testID: string }) {\n const { store, handlers } = useChat();\n const { space } = useTheme();\n return (\n <View style={{ paddingHorizontal: space.lg, alignItems: 'flex-start' }}>\n <Button\n label={props.chip.label}\n testID={props.testID}\n onPress={() => {\n store.send(props.chip.message);\n handlers.current?.onChip?.(props.chip);\n }}\n />\n </View>\n );\n}\n\n/** The slots object, kept the same while its parts are the same, so an inline `components={{…}}` re-renders nothing. */\nfunction useStableSlots(slots: ChatSlots | undefined): ChatSlots {\n const held = useRef<ChatSlots>({});\n const next = slots ?? {};\n if (!sameSlots(held.current, next)) held.current = next;\n return held.current;\n}\n\nfunction sameSlots(a: ChatSlots, b: ChatSlots): boolean {\n const keys = new Set([...Object.keys(a), ...Object.keys(b)]) as Set<\n keyof ChatSlots\n >;\n for (const key of keys) {\n if (key === 'cards') {\n const ca = a.cards ?? {};\n const cb = b.cards ?? {};\n const kinds = new Set([...Object.keys(ca), ...Object.keys(cb)]);\n for (const kind of kinds) if (ca[kind] !== cb[kind]) return false;\n } else if (a[key] !== b[key]) return false;\n }\n return true;\n}\n","// The agent's conversation for a key, on the runtime: the chat itself (`VinaverseChat`), and around it what an app used\n// to build by hand: a conversation that ended (start a new one), the backend out of reach (try again), a person when\n// there is no agent, the session's welcome or the app's starters, a question about where the person now is, thumbs on\n// the newest whole reply, and a footer. Built only on the public hooks; every part is a slot.\nimport type {\n AgentAnchorRef,\n AgentEntry,\n AgentEntryPoint,\n AgentFailureReason,\n AgentKey,\n AgentPlace,\n AgentPlacePreview,\n AgentRating,\n} from '@vinaverse/client/agent';\nimport { useConversationSelector, useCopy } from '@vinaverse/react';\nimport {\n useAgentConversation,\n useAgentName,\n useAgentRuntime,\n} from '@vinaverse/react/agent';\nimport {\n type ComponentType,\n createContext,\n type ReactNode,\n useContext,\n useMemo,\n} from 'react';\nimport { Image, Text, View } from 'react-native';\nimport { allowedImage, Body, CardFrame, Title } from '../cards/CardFrame.js';\nimport { type ChatSlots, type Chip, useChat } from '../context.js';\nimport { useAgentSweep } from '../platform.js';\nimport { useTheme } from '../theme.js';\nimport { Button } from './Button.js';\nimport {\n ChatBody,\n type VinaverseChatProps,\n VinaverseChatProvider,\n} from './VinaverseChat.js';\n\n/**\n * The full-screen states (`Ended`, `Unreachable`, `UnavailableScreen`) are slots: each gets everything its screen\n * needs (why, the actions, a person to contact) and the kit's own part as `Default`, so an app replaces the layout and\n * the words entirely, or only the words through `copy`.\n */\nexport interface AgentEndedProps {\n readonly onStartNew: () => void;\n /** Why: `ended`, `not_found`, `expired`, `mismatch`, `completed`. */\n readonly reason: AgentFailureReason | null;\n /** The API's code (`conversation_not_found`, `conversation_expired`), when it gave one. */\n readonly code: string | null;\n /** A person instead (the chat's `onContact`); absent when the app gave none. */\n readonly onContact: (() => void) | undefined;\n}\n/** No agent here: switched off for this tenant, mode or person, or the backend refused the session. */\nexport interface AgentUnavailableScreenProps {\n /** Why: `off`, `auth`, `invalid_session`, … */\n readonly reason: AgentFailureReason | null;\n readonly code: string | null;\n /** A person instead (the chat's `onContact`); absent when the app gave none. */\n readonly onContact: (() => void) | undefined;\n /** Ask again (after a sign-in, or the agent switched back on). */\n readonly onRetry: () => void;\n}\nexport interface AgentUnreachableProps {\n readonly onRetry: () => void;\n /** Why: `network`, `server`, `rate_limited`, … */\n readonly reason: AgentFailureReason | null;\n /** A person instead (the chat's `onContact`); absent when the app gave none. */\n readonly onContact: (() => void) | undefined;\n}\n\n/** A slot gets the kit's own part as `Default`, to wrap rather than rewrite. */\ntype Slot<P> = ComponentType<P & { readonly Default: ComponentType<P> }>;\nexport interface AgentFooterProps {\n /** The newest whole reply's turn, to rate; null when there is none or it was restored from before. */\n readonly turnId: string | null;\n readonly rating: AgentRating | undefined;\n readonly onRate: (rating: AgentRating) => void;\n readonly onOpenPrivacy: (() => void) | undefined;\n}\n\nexport interface AgentChatSlots extends ChatSlots {\n readonly Ended?: Slot<AgentEndedProps>;\n readonly Unreachable?: Slot<AgentUnreachableProps>;\n /**\n * The whole screen when there is no agent (off, or the session refused). Not `Unavailable`: that is the chat's own\n * \"couldn't connect\" banner, still drawn for a session that drops.\n */\n readonly UnavailableScreen?: Slot<AgentUnavailableScreenProps>;\n /** Under the composer; null hides it. Default: thumbs on the newest whole reply, and the privacy link. */\n readonly Footer?: Slot<AgentFooterProps> | null;\n}\n\nexport interface AgentChatProps\n extends Omit<\n VinaverseChatProps,\n | 'conversation'\n | 'components'\n | 'suggestion'\n | 'suggestionTestID'\n | 'footer'\n | 'listHeader'\n | 'welcomeChips'\n > {\n /** Whose conversation: one per person, mode, business and thread. */\n readonly agentKey: AgentKey;\n /**\n * Where the person asks from, told to the agent as a session opens. Its `preview` (from `AskAboutRow`) is drawn as the\n * conversation's first row, in a card's frame, until the agent's verified card of that object (an `anchor` card)\n * arrives and takes its place; never sent.\n */\n readonly place?:\n | (AgentPlace & { readonly preview?: AgentPlacePreview })\n | null;\n /** How the person came in: `launcher` and `ask` from the kit's parts, `deep_link`, or the app's own words. */\n readonly entryPoint?: AgentEntryPoint | null;\n /** How the person came in, in the contract's words (`ask_about`); sent only with the runtime's `sendAnchor`. */\n readonly entry?: AgentEntry | null;\n /** The object the conversation is about (contracts#86); sent only with the runtime's `sendAnchor`. */\n readonly anchor?: AgentAnchorRef | null;\n /**\n * The question about this place. At an object (`place.entity`), before the person says anything, it leads: a chip\n * above the composer, the welcome's own chips giving way. Elsewhere it is offered when the session was told another\n * place (`moved`).\n */\n readonly askAbout?: string | null;\n /** A person: offered on a failed turn, \"couldn't connect\" and no agent. */\n readonly onContact?: () => void;\n readonly onOpenPrivacy?: () => void;\n /** The agent's name until the session or the status gives one. */\n readonly agentName?: string;\n /**\n * A first question for a flow that asks for itself (setting a business up): a chip the person taps, offered until they\n * say anything. Never sent in their name: what the transcript shows as theirs, they typed or tapped.\n */\n readonly opener?: Chip | null;\n /** The opener chip's test id. Default `vinaverse-opener`. */\n readonly openerTestID?: string;\n readonly components?: AgentChatSlots;\n}\n\nexport function AgentChat(props: AgentChatProps): ReactNode {\n const {\n agentKey,\n place,\n entryPoint,\n entry,\n anchor,\n askAbout,\n onContact,\n onOpenPrivacy,\n components,\n agentName,\n opener,\n openerTestID,\n ...chat\n } = props;\n const runtime = useAgentRuntime();\n useAgentSweep(runtime);\n const { preview, ...told } = place ?? {};\n const { conversation, state, startNew } = useAgentConversation(agentKey, {\n place: place ? (told as AgentPlace) : null,\n entryPoint: entryPoint ?? null,\n anchor: anchor ?? null,\n entry: entry ?? null,\n });\n const store = conversation.store;\n const spoke = useConversationSelector(store, (v) =>\n v.items.some((i) => i.type === 'message' && i.role === 'person'),\n );\n // The agent's verified card of this object gives the preview way: an `anchor` card of its type. A conversation is\n // about one object (the gateway refuses a resume about another), and the gateway's card carries no `ref`.\n const aboutType = anchor?.type ?? place?.entity?.type;\n const verified = useConversationSelector(store, (v) =>\n v.items.some(\n (i) =>\n i.type === 'card' &&\n i.card.kind === 'anchor' &&\n (i.card.card as { anchor?: { anchor_type?: string } }).anchor\n ?.anchor_type === aboutType,\n ),\n );\n const { Ended, Unreachable, UnavailableScreen, Footer, ...slots } =\n components ?? {};\n const copy = useMemo(\n () =>\n agentName ? { ...props.copy, agentFallbackName: agentName } : props.copy,\n [agentName, props.copy],\n );\n const events = {\n onOpenTarget: chat.onOpenTarget\n ? (\n target: Parameters<NonNullable<typeof chat.onOpenTarget>>[0],\n card: Parameters<NonNullable<typeof chat.onOpenTarget>>[1],\n ) => {\n runtime.emit({\n type: 'target_opened',\n key: conversation.key,\n cardId: card.id,\n kind: target.type,\n });\n chat.onOpenTarget?.(target, card);\n }\n : undefined,\n onOpenLink: chat.onOpenLink\n ? (\n link: string,\n card: Parameters<NonNullable<typeof chat.onOpenLink>>[1],\n ) => {\n runtime.emit({\n type: 'link_opened',\n key: conversation.key,\n cardId: card.id,\n kind: card.kind,\n });\n chat.onOpenLink?.(link, card);\n }\n : undefined,\n onChip: (chip: Parameters<NonNullable<typeof chat.onChip>>[0]) => {\n runtime.emit({ type: 'chip_tapped', key: conversation.key });\n chat.onChip?.(chip);\n },\n };\n const shared = {\n ...chat,\n ...(events.onOpenTarget ? { onOpenTarget: events.onOpenTarget } : {}),\n ...(events.onOpenLink ? { onOpenLink: events.onOpenLink } : {}),\n onChip: events.onChip,\n ...(copy ? { copy } : {}),\n ...(onContact && !chat.failureAction\n ? { failureAction: { onPress: () => onContact() } }\n : {}),\n conversation: store,\n components: slots,\n };\n // One root whatever the state: the providers stay mounted, and only what is inside them changes.\n let screen: ReactNode = null;\n if (state.failure === 'ended') {\n const own: AgentEndedProps = {\n onStartNew: startNew,\n reason: state.reason,\n code: state.code,\n onContact,\n };\n screen = Ended ? (\n <Ended {...own} Default={DefaultEnded} />\n ) : (\n <DefaultEnded {...own} />\n );\n } else if (state.failure === 'unreachable') {\n const own: AgentUnreachableProps = {\n onRetry: conversation.retry,\n reason: state.reason,\n onContact,\n };\n screen = Unreachable ? (\n <Unreachable {...own} Default={DefaultUnreachable} />\n ) : (\n <DefaultUnreachable {...own} />\n );\n } else if (state.failure === 'unavailable') {\n const own: AgentUnavailableScreenProps = {\n reason: state.reason,\n code: state.code,\n onContact,\n onRetry: conversation.retry,\n };\n screen = UnavailableScreen ? (\n <UnavailableScreen {...own} Default={DefaultUnavailableScreen} />\n ) : (\n <DefaultUnavailableScreen {...own} />\n );\n }\n const offered = opener && !spoke ? opener : null;\n // One element while the preview and its verified card are the same, so the chat's context keeps its identity.\n const shownTitle = preview && !verified ? preview.title : null;\n const shownPhoto = preview?.image_url;\n const header = useMemo(\n () =>\n shownTitle === null ? null : (\n <Provisional\n preview={{\n title: shownTitle,\n ...(shownPhoto ? { image_url: shownPhoto } : {}),\n }}\n />\n ),\n [shownTitle, shownPhoto],\n );\n // At an object, the question about it leads until the person says anything; the welcome's chips give way.\n const leads = !offered && !spoke && !!askAbout && !!place?.entity;\n return (\n <VinaverseChatProvider\n {...shared}\n welcomeChips={!leads}\n listHeader={header}\n >\n {screen ? (\n <Centered>\n <ScreenMode.Provider value={agentKey.mode}>\n {screen}\n </ScreenMode.Provider>\n </Centered>\n ) : (\n <ChatBody\n {...shared}\n suggestion={\n offered ??\n ((leads || state.moved) && askAbout\n ? { label: askAbout, message: askAbout }\n : null)\n }\n {...(offered\n ? { suggestionTestID: openerTestID ?? 'vinaverse-opener' }\n : {})}\n footer={\n Footer === null ? null : (\n <FooterFor\n store={store}\n state={state}\n rate={conversation.rate}\n canRate={conversation.canRate}\n Footer={Footer}\n onOpenPrivacy={onOpenPrivacy}\n />\n )\n }\n />\n )}\n </VinaverseChatProvider>\n );\n}\n\nfunction FooterFor(props: {\n readonly store: Parameters<typeof useConversationSelector>[0];\n readonly state: { readonly ratings: ReadonlyMap<string, AgentRating> };\n readonly rate: (turnId: string, rating: AgentRating) => void;\n readonly canRate: (turnId: string) => boolean;\n readonly Footer: Slot<AgentFooterProps> | undefined;\n readonly onOpenPrivacy: (() => void) | undefined;\n}) {\n const newest = useConversationSelector(props.store, newestWholeReply);\n // A reply restored from before has no thumbs: it cannot be rated against the session it was given in.\n const turnId = newest && props.canRate(newest) ? newest : null;\n const own: AgentFooterProps = {\n turnId,\n rating: turnId ? props.state.ratings.get(turnId) : undefined,\n onRate: (rating) => {\n if (turnId) props.rate(turnId, rating);\n },\n onOpenPrivacy: props.onOpenPrivacy,\n };\n const { Footer } = props;\n return Footer ? (\n <Footer {...own} Default={AgentFooter} />\n ) : (\n <AgentFooter {...own} />\n );\n}\n\n/** The newest reply when it came whole (not cut off, not a refusal): the one to rate. */\nexport function newestWholeReply(view: {\n readonly items: readonly import('@vinaverse/client/conversation').TimelineItem[];\n}): string | null {\n for (let i = view.items.length - 1; i >= 0; i--) {\n const item = view.items[i];\n if (item?.type !== 'message' || item.role !== 'agent') continue;\n const whole =\n item.state === 'sent' &&\n !item.partial &&\n !item.refusal &&\n item.key.startsWith('a:');\n return whole ? item.key.slice(2) : null;\n }\n return null;\n}\n\n/** The conversation's mode, for the full screens' names: one side's agent is never named after the other's. */\nconst ScreenMode = /* @__PURE__ */ createContext<string | undefined>(undefined);\n\n/** The object as the page showed it, until the agent's verified card comes: its photo (by the image policy) and title. */\nfunction Provisional(props: { readonly preview: AgentPlacePreview }) {\n const { title, image_url } = props.preview;\n const { slots, imagePolicy } = useChat();\n const { t } = useCopy();\n const { radius, space } = useTheme();\n const url = allowedImage(image_url, imagePolicy?.hosts);\n const Img = slots.Image ?? Image;\n // In a card's frame where the verified card will be: when it comes, it takes this row's place.\n return (\n <CardFrame\n label={`${t('askingAbout')} ${title}`}\n testID=\"vinaverse-ask-preview\"\n >\n <View style={{ flexDirection: 'row', gap: space.sm }}>\n {url ? (\n <Img\n source={{ uri: url }}\n style={{ width: 40, height: 40, borderRadius: radius.md }}\n testID=\"vinaverse-ask-preview-photo\"\n />\n ) : null}\n <View style={{ flex: 1 }}>\n <Body muted>{t('askingAbout')}</Body>\n <Title numberOfLines={1}>{title}</Title>\n </View>\n </View>\n </CardFrame>\n );\n}\n\nfunction Centered(props: { readonly children: ReactNode }) {\n const { colors, space } = useTheme();\n return (\n <View\n style={{\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n padding: space.xl,\n backgroundColor: colors.background,\n }}\n >\n {props.children}\n </View>\n );\n}\n\nfunction Notice(props: {\n readonly title: string;\n readonly body: string;\n readonly action?: string;\n readonly onPress?: () => void;\n}) {\n const { colors, space, font } = useTheme();\n return (\n <View\n accessibilityRole=\"alert\"\n style={{ alignItems: 'center', gap: space.md }}\n >\n <Text\n style={{\n color: colors.text,\n fontSize: font.size.lg,\n fontWeight: '600',\n textAlign: 'center',\n }}\n >\n {props.title}\n </Text>\n <Text\n style={{\n color: colors.textMuted,\n fontSize: font.size.md,\n textAlign: 'center',\n }}\n >\n {props.body}\n </Text>\n {props.action && props.onPress ? (\n <Button\n label={props.action}\n variant=\"primary\"\n onPress={props.onPress}\n />\n ) : null}\n </View>\n );\n}\n\n/** The conversation is over: a new one starts only when the person asks. */\nexport function DefaultEnded(props: AgentEndedProps): ReactNode {\n const { t } = useCopy();\n return (\n <Notice\n title={t('agentEnded')}\n body={t('agentEndedBody')}\n action={t('agentStartOver')}\n onPress={props.onStartNew}\n />\n );\n}\n\n/** No agent here: says so, and offers a person when the app has one. */\nexport function DefaultUnavailableScreen(\n props: AgentUnavailableScreenProps,\n): ReactNode {\n const { t } = useCopy();\n const name = useAgentName(t('agentFallbackName'), useContext(ScreenMode));\n const title = t('agentOff', { agent: name });\n return (\n <Notice\n title={title.charAt(0).toUpperCase() + title.slice(1)}\n body={t('agentOffBody')}\n {...(props.onContact\n ? { action: t('talkToPerson'), onPress: props.onContact }\n : {})}\n />\n );\n}\n\n/** The app's backend could not be reached, after its tries: try again. */\nexport function DefaultUnreachable(props: AgentUnreachableProps): ReactNode {\n const { t } = useCopy();\n const name = useAgentName(t('agentFallbackName'), useContext(ScreenMode));\n return (\n <Notice\n title={t('agentUnreachable', { agent: name })}\n body={t('agentUnreachableBody')}\n action={t('tryAgain')}\n onPress={props.onRetry}\n />\n );\n}\n\n/** Thumbs on the newest whole reply (thanks once given), and the privacy link. */\nexport function AgentFooter(props: AgentFooterProps): ReactNode {\n const { t } = useCopy();\n const { colors, space, font } = useTheme();\n const muted = { color: colors.textMuted, fontSize: font.size.sm };\n return (\n <View\n style={{\n flexDirection: 'row',\n flexWrap: 'wrap',\n alignItems: 'center',\n gap: space.xs,\n paddingHorizontal: space.lg,\n }}\n >\n {props.turnId === null ? null : props.rating ? (\n <Text style={muted}>{t('helpfulThanks')}</Text>\n ) : (\n <>\n <Text style={muted}>{t('helpful')}</Text>\n <Button\n label={t('helpfulYes')}\n variant=\"text\"\n onPress={() => props.onRate('up')}\n />\n <Button\n label={t('helpfulNo')}\n variant=\"text\"\n onPress={() => props.onRate('down')}\n />\n </>\n )}\n {props.onOpenPrivacy ? (\n <Button\n label={t('privacy')}\n variant=\"text\"\n role=\"link\"\n onPress={props.onOpenPrivacy}\n />\n ) : null}\n </View>\n );\n}\n"]}
@@ -17,6 +17,14 @@ interface MessageBubbleProps {
17
17
  readonly text: string;
18
18
  readonly Default: ComponentType<Omit<MessageBubbleProps, 'Default'>>;
19
19
  }
20
+ /**
21
+ * `components.MessageTime`: the time over a message that starts a new stretch of the conversation (the first, or one
22
+ * after a gap). `label` is the kit's ("10:42 AM" today, else "Fri, Oct 17, 10:42 AM"); `at` the moment (ISO 8601).
23
+ */
24
+ interface MessageTimeProps {
25
+ readonly at: string;
26
+ readonly label: string;
27
+ }
20
28
  interface ComposerProps {
21
29
  readonly placeholder: string;
22
30
  readonly responding: boolean;
@@ -49,10 +57,13 @@ interface ListProps {
49
57
  readonly autoscrollToBottomThreshold: number;
50
58
  readonly animateAutoScrollToBottom: boolean;
51
59
  };
60
+ readonly ListHeaderComponent?: ReactElement | null;
52
61
  readonly ListFooterComponent: ReactElement | null;
53
62
  readonly ListEmptyComponent: ReactElement | null;
54
63
  readonly keyboardShouldPersistTaps: 'handled';
55
64
  readonly contentContainerStyle: object;
65
+ /** What else the rows draw from (the message times' gap): a change redraws them. */
66
+ readonly extraData: unknown;
56
67
  }
57
68
  /** A failure the person needs a way out of: a turn that failed before any reply, or no session to talk to. */
58
69
  interface FailureState {
@@ -184,6 +195,8 @@ interface ChatSlots {
184
195
  readonly CardGroup?: ComponentType<CardGroupProps>;
185
196
  /** Card renderers by kind (`professional`, `proposal`, …). */
186
197
  readonly cards?: Readonly<Partial<Record<string, ComponentType<CardProps>>>>;
198
+ /** The time over a message after a gap (`messageTimes`). Default: a small muted line, centred. */
199
+ readonly MessageTime?: ComponentType<MessageTimeProps>;
187
200
  }
188
201
  /**
189
202
  * What the parts ask of a conversation: the live store, or history's read-only view of a past conversation (every
@@ -202,11 +215,19 @@ interface ChatContextValue {
202
215
  } | null;
203
216
  /** Chips for an empty conversation when the session brings no welcome. */
204
217
  readonly starters: readonly Chip[] | undefined;
218
+ /** Whether the welcome draws its chips (and the starters); default true. */
219
+ readonly welcomeChips?: boolean;
220
+ /** The conversation's first row (`VinaverseChat.listHeader`). */
221
+ readonly listHeader?: ReactElement | null | undefined;
205
222
  readonly imagePolicy: ImagePolicy | undefined;
223
+ /** The disclosure the app holds, until the session's (`VinaverseChat.disclosure`). */
224
+ readonly disclosure?: string | undefined;
225
+ /** The gap after which a message shows its time, in minutes; null: no times. Default 10. */
226
+ readonly messageTimes?: number | null;
206
227
  }
207
228
  /** A tap target that sends `message` as the person's own text (a welcome chip, a starter, a suggestion). */
208
229
  type Chip = Welcome['chips'][number];
209
230
  /** The conversation, handlers and slots; only inside `VinaverseChat` (or `VinaverseChatProvider`). */
210
231
  declare function useChat(): ChatContextValue;
211
232
 
212
- export { CardCarousel as C, type EmptyStateProps as E, type FailureAction as F, type HeaderProps as H, type ImagePolicy as I, type ListProps as L, type MessageBubbleProps as M, type ProposalDecision as P, type CardGroupProps as a, type CardProps as b, type ChatHandlers as c, type ChatSlots as d, type ChatStore as e, type ChatWarning as f, type Chip as g, type ComposerProps as h, type FailureProps as i, type FailureState as j, useChat as u };
233
+ export { CardCarousel as C, type EmptyStateProps as E, type FailureAction as F, type HeaderProps as H, type ImagePolicy as I, type ListProps as L, type MessageBubbleProps as M, type ProposalDecision as P, type CardGroupProps as a, type CardProps as b, type ChatHandlers as c, type ChatSlots as d, type ChatStore as e, type ChatWarning as f, type Chip as g, type ComposerProps as h, type FailureProps as i, type FailureState as j, type MessageTimeProps as k, useChat as u };
@@ -17,6 +17,14 @@ interface MessageBubbleProps {
17
17
  readonly text: string;
18
18
  readonly Default: ComponentType<Omit<MessageBubbleProps, 'Default'>>;
19
19
  }
20
+ /**
21
+ * `components.MessageTime`: the time over a message that starts a new stretch of the conversation (the first, or one
22
+ * after a gap). `label` is the kit's ("10:42 AM" today, else "Fri, Oct 17, 10:42 AM"); `at` the moment (ISO 8601).
23
+ */
24
+ interface MessageTimeProps {
25
+ readonly at: string;
26
+ readonly label: string;
27
+ }
20
28
  interface ComposerProps {
21
29
  readonly placeholder: string;
22
30
  readonly responding: boolean;
@@ -49,10 +57,13 @@ interface ListProps {
49
57
  readonly autoscrollToBottomThreshold: number;
50
58
  readonly animateAutoScrollToBottom: boolean;
51
59
  };
60
+ readonly ListHeaderComponent?: ReactElement | null;
52
61
  readonly ListFooterComponent: ReactElement | null;
53
62
  readonly ListEmptyComponent: ReactElement | null;
54
63
  readonly keyboardShouldPersistTaps: 'handled';
55
64
  readonly contentContainerStyle: object;
65
+ /** What else the rows draw from (the message times' gap): a change redraws them. */
66
+ readonly extraData: unknown;
56
67
  }
57
68
  /** A failure the person needs a way out of: a turn that failed before any reply, or no session to talk to. */
58
69
  interface FailureState {
@@ -184,6 +195,8 @@ interface ChatSlots {
184
195
  readonly CardGroup?: ComponentType<CardGroupProps>;
185
196
  /** Card renderers by kind (`professional`, `proposal`, …). */
186
197
  readonly cards?: Readonly<Partial<Record<string, ComponentType<CardProps>>>>;
198
+ /** The time over a message after a gap (`messageTimes`). Default: a small muted line, centred. */
199
+ readonly MessageTime?: ComponentType<MessageTimeProps>;
187
200
  }
188
201
  /**
189
202
  * What the parts ask of a conversation: the live store, or history's read-only view of a past conversation (every
@@ -202,11 +215,19 @@ interface ChatContextValue {
202
215
  } | null;
203
216
  /** Chips for an empty conversation when the session brings no welcome. */
204
217
  readonly starters: readonly Chip[] | undefined;
218
+ /** Whether the welcome draws its chips (and the starters); default true. */
219
+ readonly welcomeChips?: boolean;
220
+ /** The conversation's first row (`VinaverseChat.listHeader`). */
221
+ readonly listHeader?: ReactElement | null | undefined;
205
222
  readonly imagePolicy: ImagePolicy | undefined;
223
+ /** The disclosure the app holds, until the session's (`VinaverseChat.disclosure`). */
224
+ readonly disclosure?: string | undefined;
225
+ /** The gap after which a message shows its time, in minutes; null: no times. Default 10. */
226
+ readonly messageTimes?: number | null;
206
227
  }
207
228
  /** A tap target that sends `message` as the person's own text (a welcome chip, a starter, a suggestion). */
208
229
  type Chip = Welcome['chips'][number];
209
230
  /** The conversation, handlers and slots; only inside `VinaverseChat` (or `VinaverseChatProvider`). */
210
231
  declare function useChat(): ChatContextValue;
211
232
 
212
- export { CardCarousel as C, type EmptyStateProps as E, type FailureAction as F, type HeaderProps as H, type ImagePolicy as I, type ListProps as L, type MessageBubbleProps as M, type ProposalDecision as P, type CardGroupProps as a, type CardProps as b, type ChatHandlers as c, type ChatSlots as d, type ChatStore as e, type ChatWarning as f, type Chip as g, type ComposerProps as h, type FailureProps as i, type FailureState as j, useChat as u };
233
+ export { CardCarousel as C, type EmptyStateProps as E, type FailureAction as F, type HeaderProps as H, type ImagePolicy as I, type ListProps as L, type MessageBubbleProps as M, type ProposalDecision as P, type CardGroupProps as a, type CardProps as b, type ChatHandlers as c, type ChatSlots as d, type ChatStore as e, type ChatWarning as f, type Chip as g, type ComposerProps as h, type FailureProps as i, type FailureState as j, type MessageTimeProps as k, useChat as u };
package/dist/history.cjs CHANGED
@@ -1,10 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkXAG2P447_cjs = require('./chunk-XAG2P447.cjs');
4
- var chunk6QYDPGRS_cjs = require('./chunk-6QYDPGRS.cjs');
3
+ var chunk272ACDLI_cjs = require('./chunk-272ACDLI.cjs');
4
+ var chunkUMCOOQT6_cjs = require('./chunk-UMCOOQT6.cjs');
5
5
  var agent = require('@vinaverse/react/agent');
6
6
  var history = require('@vinaverse/react/history');
7
7
  var flashList = require('@shopify/flash-list');
8
+ var history$1 = require('@vinaverse/client/history');
8
9
  var react$1 = require('@vinaverse/react');
9
10
  var react = require('react');
10
11
  var reactNative = require('react-native');
@@ -15,7 +16,7 @@ function AgentHistoryList(props) {
15
16
  () => props.agentName ? { ...props.copy, agentFallbackName: props.agentName } : props.copy,
16
17
  [props.agentName, props.copy]
17
18
  );
18
- return /* @__PURE__ */ jsxRuntime.jsx(react$1.CopyProvider, { locale: props.locale, copy, children: /* @__PURE__ */ jsxRuntime.jsx(chunk6QYDPGRS_cjs.ThemeProvider, { theme: props.theme, colorScheme: props.colorScheme, children: /* @__PURE__ */ jsxRuntime.jsx(HistoryList, { ...props }) }) });
19
+ return /* @__PURE__ */ jsxRuntime.jsx(react$1.CopyProvider, { locale: props.locale, copy, children: /* @__PURE__ */ jsxRuntime.jsx(chunkUMCOOQT6_cjs.ThemeProvider, { theme: props.theme, colorScheme: props.colorScheme, children: /* @__PURE__ */ jsxRuntime.jsx(HistoryList, { ...props }) }) });
19
20
  }
20
21
  function alertConfirm(t) {
21
22
  return () => new Promise((resolve) => {
@@ -36,22 +37,23 @@ function alertConfirm(t) {
36
37
  }
37
38
  function HistoryList(props) {
38
39
  const { t, locale, direction } = react$1.useCopy();
39
- const { colors, space } = chunk6QYDPGRS_cjs.useTheme();
40
+ const { colors, space } = chunkUMCOOQT6_cjs.useTheme();
40
41
  const runtime = agent.useAgentRuntime();
41
- chunk6QYDPGRS_cjs.useAgentSweep(runtime);
42
- const { name } = agent.useAgentProfile(t("agentFallbackName"));
43
- const history$1 = history.useAgentHistory({
42
+ chunkUMCOOQT6_cjs.useAgentSweep(runtime);
43
+ const { name } = agent.useAgentProfile(t("agentFallbackName"), props.mode);
44
+ const history$2 = history.useAgentHistory({
44
45
  subject: props.subject,
45
46
  mode: props.mode,
46
47
  scope: props.scope ?? null,
47
48
  agent: props.agent ?? null,
48
49
  ...props.thread === void 0 ? {} : { thread: props.thread },
49
- ...props.pageSize === void 0 ? {} : { pageSize: props.pageSize }
50
+ ...props.pageSize === void 0 ? {} : { pageSize: props.pageSize },
51
+ ...props.keyOf ? { keyOf: props.keyOf } : {}
50
52
  });
51
- const { state } = history$1;
53
+ const { state } = history$2;
52
54
  const [deleting, setDeleting] = react.useState(/* @__PURE__ */ new Set());
53
55
  const [failed, setFailed] = react.useState(/* @__PURE__ */ new Set());
54
- const { onOpen, onContinue, onWarning, confirmDelete, timeZone } = props;
56
+ const { onOpen, onContinue, onWarning, confirmDelete, timeZone, titleOf } = props;
55
57
  const confirm = react.useMemo(
56
58
  () => confirmDelete ?? alertConfirm(t),
57
59
  [confirmDelete, t]
@@ -62,7 +64,7 @@ function HistoryList(props) {
62
64
  mark(setDeleting, conversation.id, true);
63
65
  mark(setFailed, conversation.id, false);
64
66
  try {
65
- await history$1.remove(conversation);
67
+ await history$2.remove(conversation);
66
68
  } catch (error) {
67
69
  mark(setFailed, conversation.id, true);
68
70
  onWarning?.(`Vinaverse history: delete failed: ${String(error)}`, {
@@ -72,7 +74,7 @@ function HistoryList(props) {
72
74
  mark(setDeleting, conversation.id, false);
73
75
  }
74
76
  },
75
- [confirm, history$1, onWarning]
77
+ [confirm, history$2, onWarning]
76
78
  );
77
79
  const slots = props.components ?? {};
78
80
  const { Row: Row2, Empty, Failure, ListComponent } = slots;
@@ -80,11 +82,12 @@ function HistoryList(props) {
80
82
  ({ item }) => {
81
83
  const own = {
82
84
  conversation: item,
85
+ title: history$1.summaryTitle(item, titleOf?.(item)),
83
86
  when: react$1.formatDateTime(item.last_activity_at, locale, timeZone),
84
87
  messages: t("historyMessages", { count: item.message_count }),
85
88
  ended: item.state === "ended",
86
89
  onOpen: onOpen ? () => onOpen(item) : void 0,
87
- onContinue: onContinue && item.state === "open" ? () => onContinue(item, history$1.continue(item)) : void 0,
90
+ onContinue: onContinue && item.state === "open" ? () => onContinue(item, history$2.continue(item)) : void 0,
88
91
  onDelete: () => void remove(item),
89
92
  deleting: deleting.has(item.id),
90
93
  deleteFailed: failed.has(item.id)
@@ -93,12 +96,13 @@ function HistoryList(props) {
93
96
  },
94
97
  [
95
98
  Row2,
99
+ titleOf,
96
100
  locale,
97
101
  timeZone,
98
102
  t,
99
103
  onOpen,
100
104
  onContinue,
101
- history$1,
105
+ history$2,
102
106
  remove,
103
107
  deleting,
104
108
  failed
@@ -108,14 +112,14 @@ function HistoryList(props) {
108
112
  Failure,
109
113
  {
110
114
  reason: state.failure,
111
- onRetry: history$1.refresh,
115
+ onRetry: history$2.refresh,
112
116
  Default: DefaultHistoryFailure
113
117
  }
114
118
  ) : /* @__PURE__ */ jsxRuntime.jsx(
115
119
  DefaultHistoryFailure,
116
120
  {
117
121
  reason: state.failure,
118
- onRetry: history$1.refresh
122
+ onRetry: history$2.refresh
119
123
  }
120
124
  ) }) : state.started && !state.loading ? /* @__PURE__ */ jsxRuntime.jsx(Centered, { children: Empty ? /* @__PURE__ */ jsxRuntime.jsx(Empty, { agentName: name, Default: DefaultHistoryEmpty }) : /* @__PURE__ */ jsxRuntime.jsx(DefaultHistoryEmpty, { agentName: name }) }) : null;
121
125
  const footer = state.loading && state.conversations.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { padding: space.md, alignItems: "center" }, children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -124,20 +128,20 @@ function HistoryList(props) {
124
128
  color: colors.textMuted,
125
129
  accessibilityLabel: t("loading")
126
130
  }
127
- ) }) : state.failure && state.conversations.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { padding: space.sm, alignItems: "center" }, children: /* @__PURE__ */ jsxRuntime.jsx(chunkXAG2P447_cjs.Button, { label: t("tryAgain"), variant: "text", onPress: history$1.retry }) }) : null;
131
+ ) }) : state.failure && state.conversations.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { padding: space.sm, alignItems: "center" }, children: /* @__PURE__ */ jsxRuntime.jsx(chunk272ACDLI_cjs.Button, { label: t("tryAgain"), variant: "text", onPress: history$2.retry }) }) : null;
128
132
  const list = react.useMemo(
129
133
  () => ({
130
134
  data: state.conversations,
131
135
  renderItem,
132
136
  keyExtractor: (item) => item.id,
133
- onEndReached: history$1.loadMore,
134
- onRefresh: history$1.refresh,
137
+ onEndReached: history$2.loadMore,
138
+ onRefresh: history$2.refresh,
135
139
  refreshing: state.loading && state.conversations.length === 0,
136
140
  ListFooterComponent: footer,
137
141
  ListEmptyComponent: empty,
138
142
  contentContainerStyle: { paddingVertical: space.sm }
139
143
  }),
140
- [state, renderItem, history$1, footer, empty, space.sm]
144
+ [state, renderItem, history$2, footer, empty, space.sm]
141
145
  );
142
146
  const List = ListComponent;
143
147
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -159,7 +163,7 @@ var mark = (set, id, on) => set((s) => {
159
163
  return next;
160
164
  });
161
165
  function Centered(props) {
162
- const { space } = chunk6QYDPGRS_cjs.useTheme();
166
+ const { space } = chunkUMCOOQT6_cjs.useTheme();
163
167
  return /* @__PURE__ */ jsxRuntime.jsx(
164
168
  reactNative.View,
165
169
  {
@@ -174,7 +178,7 @@ function Centered(props) {
174
178
  }
175
179
  function DefaultHistoryRow(props) {
176
180
  const { t } = react$1.useCopy();
177
- const { colors, space, font, radius } = chunk6QYDPGRS_cjs.useTheme();
181
+ const { colors, space, font, radius } = chunkUMCOOQT6_cjs.useTheme();
178
182
  const { conversation } = props;
179
183
  const detail = [
180
184
  props.when,
@@ -197,7 +201,7 @@ function DefaultHistoryRow(props) {
197
201
  reactNative.Pressable,
198
202
  {
199
203
  accessibilityRole: "button",
200
- accessibilityLabel: `${conversation.title}. ${detail}`,
204
+ accessibilityLabel: `${props.title}. ${detail}`,
201
205
  accessibilityState: { disabled: !props.onOpen || props.deleting },
202
206
  disabled: !props.onOpen || props.deleting,
203
207
  onPress: props.onOpen,
@@ -213,7 +217,7 @@ function DefaultHistoryRow(props) {
213
217
  fontWeight: "600",
214
218
  ...font.family ? { fontFamily: font.family } : {}
215
219
  },
216
- children: conversation.title
220
+ children: props.title
217
221
  }
218
222
  ),
219
223
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -241,7 +245,7 @@ function DefaultHistoryRow(props) {
241
245
  },
242
246
  children: [
243
247
  props.onContinue ? /* @__PURE__ */ jsxRuntime.jsx(
244
- chunkXAG2P447_cjs.Button,
248
+ chunk272ACDLI_cjs.Button,
245
249
  {
246
250
  label: t("historyContinue"),
247
251
  variant: "text",
@@ -250,7 +254,7 @@ function DefaultHistoryRow(props) {
250
254
  }
251
255
  ) : null,
252
256
  /* @__PURE__ */ jsxRuntime.jsx(
253
- chunkXAG2P447_cjs.Button,
257
+ chunk272ACDLI_cjs.Button,
254
258
  {
255
259
  label: t("historyDelete"),
256
260
  variant: "text",
@@ -268,7 +272,7 @@ function DefaultHistoryRow(props) {
268
272
  }
269
273
  function DefaultHistoryEmpty(props) {
270
274
  const { t } = react$1.useCopy();
271
- const { colors, space, font } = chunk6QYDPGRS_cjs.useTheme();
275
+ const { colors, space, font } = chunkUMCOOQT6_cjs.useTheme();
272
276
  return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: { alignItems: "center", gap: space.sm }, children: [
273
277
  /* @__PURE__ */ jsxRuntime.jsx(
274
278
  reactNative.Text,
@@ -297,7 +301,7 @@ function DefaultHistoryEmpty(props) {
297
301
  }
298
302
  function DefaultHistoryFailure(props) {
299
303
  const { t } = react$1.useCopy();
300
- const { colors, space, font } = chunk6QYDPGRS_cjs.useTheme();
304
+ const { colors, space, font } = chunkUMCOOQT6_cjs.useTheme();
301
305
  const off = props.reason === "off";
302
306
  return /* @__PURE__ */ jsxRuntime.jsxs(
303
307
  reactNative.View,
@@ -317,7 +321,7 @@ function DefaultHistoryFailure(props) {
317
321
  }
318
322
  ),
319
323
  off ? null : /* @__PURE__ */ jsxRuntime.jsx(
320
- chunkXAG2P447_cjs.Button,
324
+ chunk272ACDLI_cjs.Button,
321
325
  {
322
326
  label: t("tryAgain"),
323
327
  variant: "primary",
@@ -372,12 +376,12 @@ function AgentTranscript(props) {
372
376
  () => props.agentName ? { ...props.copy, agentFallbackName: props.agentName } : props.copy,
373
377
  [props.agentName, props.copy]
374
378
  );
375
- return /* @__PURE__ */ jsxRuntime.jsx(react$1.CopyProvider, { locale: props.locale, copy, children: /* @__PURE__ */ jsxRuntime.jsx(chunk6QYDPGRS_cjs.ThemeProvider, { theme: props.theme, colorScheme: props.colorScheme, children: /* @__PURE__ */ jsxRuntime.jsx(Transcript, { ...props }) }) });
379
+ return /* @__PURE__ */ jsxRuntime.jsx(react$1.CopyProvider, { locale: props.locale, copy, children: /* @__PURE__ */ jsxRuntime.jsx(chunkUMCOOQT6_cjs.ThemeProvider, { theme: props.theme, colorScheme: props.colorScheme, children: /* @__PURE__ */ jsxRuntime.jsx(Transcript, { ...props }) }) });
376
380
  }
377
381
  var EMPTY_SLOTS = {};
378
382
  function Transcript(props) {
379
383
  const { t, direction } = react$1.useCopy();
380
- const { colors, space } = chunk6QYDPGRS_cjs.useTheme();
384
+ const { colors, space } = chunkUMCOOQT6_cjs.useTheme();
381
385
  const runtime = agent.useAgentRuntime();
382
386
  const profile = agent.useAgentProfile(t("agentFallbackName"));
383
387
  const name = profile.name;
@@ -422,7 +426,7 @@ function Transcript(props) {
422
426
  const gone = state.failure === "not_found" || state.failure === "expired" || state.failure === "ended";
423
427
  const onContinue = props.onContinue;
424
428
  const agentKey = props.agentKey;
425
- return /* @__PURE__ */ jsxRuntime.jsx(chunkXAG2P447_cjs.ChatContextProvider, { value, children: /* @__PURE__ */ jsxRuntime.jsxs(
429
+ return /* @__PURE__ */ jsxRuntime.jsx(chunk272ACDLI_cjs.ChatContextProvider, { value, children: /* @__PURE__ */ jsxRuntime.jsxs(
426
430
  reactNative.View,
427
431
  {
428
432
  testID: props.testID ?? "vinaverse-transcript",
@@ -431,8 +435,8 @@ function Transcript(props) {
431
435
  props.style
432
436
  ],
433
437
  children: [
434
- props.hideHeader ? null : Header ? /* @__PURE__ */ jsxRuntime.jsx(Header, { ...header, Default: chunkXAG2P447_cjs.DefaultHeader }) : /* @__PURE__ */ jsxRuntime.jsx(chunkXAG2P447_cjs.DefaultHeader, { ...header }),
435
- /* @__PURE__ */ jsxRuntime.jsx(chunkXAG2P447_cjs.DisclosureBar, {}),
438
+ props.hideHeader ? null : Header ? /* @__PURE__ */ jsxRuntime.jsx(Header, { ...header, Default: chunk272ACDLI_cjs.DefaultHeader }) : /* @__PURE__ */ jsxRuntime.jsx(chunk272ACDLI_cjs.DefaultHeader, { ...header }),
439
+ /* @__PURE__ */ jsxRuntime.jsx(chunk272ACDLI_cjs.DisclosureBar, {}),
436
440
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { flex: 1 }, children: state.failure && state.items.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(Centered2, { children: Failure ? /* @__PURE__ */ jsxRuntime.jsx(
437
441
  Failure,
438
442
  {
@@ -462,7 +466,7 @@ function Transcript(props) {
462
466
  }
463
467
  ) }),
464
468
  onContinue && agentKey && !gone && props.ended !== true ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { padding: space.lg }, children: /* @__PURE__ */ jsxRuntime.jsx(
465
- chunkXAG2P447_cjs.Button,
469
+ chunk272ACDLI_cjs.Button,
466
470
  {
467
471
  label: t("historyContinue"),
468
472
  variant: "primary",
@@ -478,12 +482,12 @@ function authorOf(item) {
478
482
  }
479
483
  function TranscriptList(props) {
480
484
  const { t } = react$1.useCopy();
481
- const { colors, space, font } = chunk6QYDPGRS_cjs.useTheme();
482
- const reducedMotion = chunk6QYDPGRS_cjs.useReducedMotion();
485
+ const { colors, space, font } = chunkUMCOOQT6_cjs.useTheme();
486
+ const reducedMotion = chunkUMCOOQT6_cjs.useReducedMotion();
483
487
  const { items, grouped } = props;
484
488
  const runsRef = react.useRef(/* @__PURE__ */ new Map());
485
489
  const grouping = react.useMemo(
486
- () => grouped ? chunkXAG2P447_cjs.carousels(items, runsRef.current) : null,
490
+ () => grouped ? chunk272ACDLI_cjs.carousels(items, runsRef.current) : null,
487
491
  [items, grouped]
488
492
  );
489
493
  runsRef.current = grouping?.runs ?? /* @__PURE__ */ new Map();
@@ -493,7 +497,7 @@ function TranscriptList(props) {
493
497
  groupingRef.current = grouping;
494
498
  const renderItem = react.useCallback(
495
499
  ({ item, index }) => /* @__PURE__ */ jsxRuntime.jsx(
496
- chunkXAG2P447_cjs.Row,
500
+ chunk272ACDLI_cjs.Row,
497
501
  {
498
502
  item,
499
503
  showAuthor: authorOf(item) !== authorOf(itemsRef.current[index - 1]),
@@ -525,7 +529,7 @@ function TranscriptList(props) {
525
529
  children: [
526
530
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: { color: colors.textMuted, fontSize: font.size.sm }, children: t("transcriptEarlier") }),
527
531
  /* @__PURE__ */ jsxRuntime.jsx(
528
- chunkXAG2P447_cjs.Button,
532
+ chunk272ACDLI_cjs.Button,
529
533
  {
530
534
  label: t("tryAgain"),
531
535
  hint: t("transcriptEarlier"),
@@ -537,7 +541,7 @@ function TranscriptList(props) {
537
541
  }
538
542
  )
539
543
  ) : props.more ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { padding: space.sm, alignItems: "center" }, children: /* @__PURE__ */ jsxRuntime.jsx(
540
- chunkXAG2P447_cjs.Button,
544
+ chunk272ACDLI_cjs.Button,
541
545
  {
542
546
  label: t("transcriptEarlier"),
543
547
  variant: "text",
@@ -549,7 +553,7 @@ function TranscriptList(props) {
549
553
  data: items,
550
554
  renderItem,
551
555
  keyExtractor: (item) => item.key,
552
- getItemType: chunkXAG2P447_cjs.itemType,
556
+ getItemType: chunk272ACDLI_cjs.itemType,
553
557
  maintainVisibleContentPosition: {
554
558
  startRenderingFromBottom: true,
555
559
  animateAutoScrollToBottom: !reducedMotion
@@ -564,7 +568,7 @@ function TranscriptList(props) {
564
568
  return List ? /* @__PURE__ */ jsxRuntime.jsx(List, { ...list }) : /* @__PURE__ */ jsxRuntime.jsx(flashList.FlashList, { ...list });
565
569
  }
566
570
  function Centered2(props) {
567
- const { space } = chunk6QYDPGRS_cjs.useTheme();
571
+ const { space } = chunkUMCOOQT6_cjs.useTheme();
568
572
  return /* @__PURE__ */ jsxRuntime.jsx(
569
573
  reactNative.View,
570
574
  {
@@ -580,7 +584,7 @@ function Centered2(props) {
580
584
  }
581
585
  function DefaultTranscriptFailure(props) {
582
586
  const { t } = react$1.useCopy();
583
- const { colors, space, font } = chunk6QYDPGRS_cjs.useTheme();
587
+ const { colors, space, font } = chunkUMCOOQT6_cjs.useTheme();
584
588
  return /* @__PURE__ */ jsxRuntime.jsxs(
585
589
  reactNative.View,
586
590
  {
@@ -599,7 +603,7 @@ function DefaultTranscriptFailure(props) {
599
603
  }
600
604
  ),
601
605
  props.gone ? null : /* @__PURE__ */ jsxRuntime.jsx(
602
- chunkXAG2P447_cjs.Button,
606
+ chunk272ACDLI_cjs.Button,
603
607
  {
604
608
  label: t("tryAgain"),
605
609
  variant: "primary",
@@ -613,15 +617,15 @@ function DefaultTranscriptFailure(props) {
613
617
 
614
618
  Object.defineProperty(exports, "CardCarousel", {
615
619
  enumerable: true,
616
- get: function () { return chunkXAG2P447_cjs.CardCarousel; }
620
+ get: function () { return chunk272ACDLI_cjs.CardCarousel; }
617
621
  });
618
622
  Object.defineProperty(exports, "ThemeProvider", {
619
623
  enumerable: true,
620
- get: function () { return chunk6QYDPGRS_cjs.ThemeProvider; }
624
+ get: function () { return chunkUMCOOQT6_cjs.ThemeProvider; }
621
625
  });
622
626
  Object.defineProperty(exports, "useTheme", {
623
627
  enumerable: true,
624
- get: function () { return chunk6QYDPGRS_cjs.useTheme; }
628
+ get: function () { return chunkUMCOOQT6_cjs.useTheme; }
625
629
  });
626
630
  Object.defineProperty(exports, "AgentRuntimeProvider", {
627
631
  enumerable: true,