pixelize-design-library 3.1.0 → 3.2.0

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 (142) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/COMPONENT-GOTCHAS.md +29 -0
  3. package/DESIGN-GUIDE.md +27 -0
  4. package/README.md +8 -8
  5. package/dist/Components/Assistant/assistantModel.d.ts +17 -0
  6. package/dist/Components/Assistant/assistantModel.js +35 -0
  7. package/dist/Components/Assistant/assistantStyles.d.ts +27 -0
  8. package/dist/Components/Assistant/assistantStyles.js +53 -0
  9. package/dist/Components/Assistant/assistantTypes.d.ts +163 -0
  10. package/dist/Components/Assistant/assistantTypes.js +2 -0
  11. package/dist/Components/Assistant/banner/AssistantStatusBanner.d.ts +3 -0
  12. package/dist/Components/Assistant/banner/AssistantStatusBanner.js +25 -0
  13. package/dist/Components/Assistant/banner/AssistantStatusBannerProps.d.ts +27 -0
  14. package/dist/Components/Assistant/banner/AssistantStatusBannerProps.js +2 -0
  15. package/dist/Components/Assistant/cards/AssistantApprovalCard.d.ts +3 -0
  16. package/dist/Components/Assistant/cards/AssistantApprovalCard.js +51 -0
  17. package/dist/Components/Assistant/cards/AssistantApprovalCardProps.d.ts +66 -0
  18. package/dist/Components/Assistant/cards/AssistantApprovalCardProps.js +2 -0
  19. package/dist/Components/Assistant/cards/AssistantProposalCard.d.ts +3 -0
  20. package/dist/Components/Assistant/cards/AssistantProposalCard.js +36 -0
  21. package/dist/Components/Assistant/cards/AssistantProposalCardProps.d.ts +56 -0
  22. package/dist/Components/Assistant/cards/AssistantProposalCardProps.js +2 -0
  23. package/dist/Components/Assistant/cards/CardShell.d.ts +31 -0
  24. package/dist/Components/Assistant/cards/CardShell.js +32 -0
  25. package/dist/Components/Assistant/composer/AssistantComposer.d.ts +3 -0
  26. package/dist/Components/Assistant/composer/AssistantComposer.js +264 -0
  27. package/dist/Components/Assistant/composer/AssistantComposerProps.d.ts +128 -0
  28. package/dist/Components/Assistant/composer/AssistantComposerProps.js +2 -0
  29. package/dist/Components/Assistant/composer/ComposerMenu.d.ts +24 -0
  30. package/dist/Components/Assistant/composer/ComposerMenu.js +38 -0
  31. package/dist/Components/Assistant/composer/composerLogic.d.ts +19 -0
  32. package/dist/Components/Assistant/composer/composerLogic.js +65 -0
  33. package/dist/Components/Assistant/context/AssistantContextBar.d.ts +3 -0
  34. package/dist/Components/Assistant/context/AssistantContextBar.js +27 -0
  35. package/dist/Components/Assistant/context/AssistantContextBarProps.d.ts +34 -0
  36. package/dist/Components/Assistant/context/AssistantContextBarProps.js +2 -0
  37. package/dist/Components/Assistant/history/AssistantHistoryList.d.ts +3 -0
  38. package/dist/Components/Assistant/history/AssistantHistoryList.js +123 -0
  39. package/dist/Components/Assistant/history/AssistantHistoryListProps.d.ts +83 -0
  40. package/dist/Components/Assistant/history/AssistantHistoryListProps.js +2 -0
  41. package/dist/Components/Assistant/history/groupConversations.d.ts +12 -0
  42. package/dist/Components/Assistant/history/groupConversations.js +55 -0
  43. package/dist/Components/Assistant/index.d.ts +16 -0
  44. package/dist/Components/Assistant/index.js +38 -0
  45. package/dist/Components/Assistant/launcher/AssistantLauncher.d.ts +3 -0
  46. package/dist/Components/Assistant/launcher/AssistantLauncher.js +45 -0
  47. package/dist/Components/Assistant/launcher/AssistantLauncherProps.d.ts +37 -0
  48. package/dist/Components/Assistant/launcher/AssistantLauncherProps.js +2 -0
  49. package/dist/Components/Assistant/markdown/AssistantMarkdown.d.ts +3 -0
  50. package/dist/Components/Assistant/markdown/AssistantMarkdown.js +146 -0
  51. package/dist/Components/Assistant/markdown/AssistantMarkdownProps.d.ts +38 -0
  52. package/dist/Components/Assistant/markdown/AssistantMarkdownProps.js +2 -0
  53. package/dist/Components/Assistant/markdown/parseMarkdown.d.ts +74 -0
  54. package/dist/Components/Assistant/markdown/parseMarkdown.js +328 -0
  55. package/dist/Components/Assistant/markdown/safeHref.d.ts +21 -0
  56. package/dist/Components/Assistant/markdown/safeHref.js +28 -0
  57. package/dist/Components/Assistant/message/AssistantMessage.d.ts +3 -0
  58. package/dist/Components/Assistant/message/AssistantMessage.js +131 -0
  59. package/dist/Components/Assistant/message/AssistantMessageProps.d.ts +83 -0
  60. package/dist/Components/Assistant/message/AssistantMessageProps.js +2 -0
  61. package/dist/Components/Assistant/message/MessageActions.d.ts +16 -0
  62. package/dist/Components/Assistant/message/MessageActions.js +23 -0
  63. package/dist/Components/Assistant/panel/AssistantPanel.d.ts +3 -0
  64. package/dist/Components/Assistant/panel/AssistantPanel.js +87 -0
  65. package/dist/Components/Assistant/panel/AssistantPanelProps.d.ts +86 -0
  66. package/dist/Components/Assistant/panel/AssistantPanelProps.js +2 -0
  67. package/dist/Components/Assistant/panel/ResizeHandle.d.ts +14 -0
  68. package/dist/Components/Assistant/panel/ResizeHandle.js +72 -0
  69. package/dist/Components/Assistant/sources/AssistantSources.d.ts +3 -0
  70. package/dist/Components/Assistant/sources/AssistantSources.js +63 -0
  71. package/dist/Components/Assistant/sources/AssistantSourcesProps.d.ts +29 -0
  72. package/dist/Components/Assistant/sources/AssistantSourcesProps.js +2 -0
  73. package/dist/Components/Assistant/steps/AssistantToolSteps.d.ts +3 -0
  74. package/dist/Components/Assistant/steps/AssistantToolSteps.js +41 -0
  75. package/dist/Components/Assistant/steps/AssistantToolStepsProps.d.ts +37 -0
  76. package/dist/Components/Assistant/steps/AssistantToolStepsProps.js +2 -0
  77. package/dist/Components/Assistant/suggestions/AssistantSuggestions.d.ts +3 -0
  78. package/dist/Components/Assistant/suggestions/AssistantSuggestions.js +18 -0
  79. package/dist/Components/Assistant/suggestions/AssistantSuggestionsProps.d.ts +15 -0
  80. package/dist/Components/Assistant/suggestions/AssistantSuggestionsProps.js +2 -0
  81. package/dist/Components/Assistant/thread/AssistantThread.d.ts +3 -0
  82. package/dist/Components/Assistant/thread/AssistantThread.js +112 -0
  83. package/dist/Components/Assistant/thread/AssistantThreadProps.d.ts +37 -0
  84. package/dist/Components/Assistant/thread/AssistantThreadProps.js +2 -0
  85. package/dist/Components/Assistant/typing/AssistantTypingIndicator.d.ts +3 -0
  86. package/dist/Components/Assistant/typing/AssistantTypingIndicator.js +33 -0
  87. package/dist/Components/Assistant/typing/AssistantTypingIndicatorProps.d.ts +9 -0
  88. package/dist/Components/Assistant/typing/AssistantTypingIndicatorProps.js +2 -0
  89. package/dist/Components/Assistant/welcome/AssistantWelcome.d.ts +3 -0
  90. package/dist/Components/Assistant/welcome/AssistantWelcome.js +30 -0
  91. package/dist/Components/Assistant/welcome/AssistantWelcomeProps.d.ts +40 -0
  92. package/dist/Components/Assistant/welcome/AssistantWelcomeProps.js +2 -0
  93. package/dist/Components/Table/components/TableBody.js +5 -1
  94. package/dist/esm/Components/Assistant/assistantModel.js +29 -0
  95. package/dist/esm/Components/Assistant/assistantStyles.js +47 -0
  96. package/dist/esm/Components/Assistant/assistantTypes.js +1 -0
  97. package/dist/esm/Components/Assistant/banner/AssistantStatusBanner.js +20 -0
  98. package/dist/esm/Components/Assistant/banner/AssistantStatusBannerProps.js +1 -0
  99. package/dist/esm/Components/Assistant/cards/AssistantApprovalCard.js +46 -0
  100. package/dist/esm/Components/Assistant/cards/AssistantApprovalCardProps.js +1 -0
  101. package/dist/esm/Components/Assistant/cards/AssistantProposalCard.js +31 -0
  102. package/dist/esm/Components/Assistant/cards/AssistantProposalCardProps.js +1 -0
  103. package/dist/esm/Components/Assistant/cards/CardShell.js +23 -0
  104. package/dist/esm/Components/Assistant/composer/AssistantComposer.js +259 -0
  105. package/dist/esm/Components/Assistant/composer/AssistantComposerProps.js +1 -0
  106. package/dist/esm/Components/Assistant/composer/ComposerMenu.js +30 -0
  107. package/dist/esm/Components/Assistant/composer/composerLogic.js +56 -0
  108. package/dist/esm/Components/Assistant/context/AssistantContextBar.js +22 -0
  109. package/dist/esm/Components/Assistant/context/AssistantContextBarProps.js +1 -0
  110. package/dist/esm/Components/Assistant/history/AssistantHistoryList.js +118 -0
  111. package/dist/esm/Components/Assistant/history/AssistantHistoryListProps.js +1 -0
  112. package/dist/esm/Components/Assistant/history/groupConversations.js +51 -0
  113. package/dist/esm/Components/Assistant/index.js +16 -0
  114. package/dist/esm/Components/Assistant/launcher/AssistantLauncher.js +40 -0
  115. package/dist/esm/Components/Assistant/launcher/AssistantLauncherProps.js +1 -0
  116. package/dist/esm/Components/Assistant/markdown/AssistantMarkdown.js +141 -0
  117. package/dist/esm/Components/Assistant/markdown/AssistantMarkdownProps.js +1 -0
  118. package/dist/esm/Components/Assistant/markdown/parseMarkdown.js +322 -0
  119. package/dist/esm/Components/Assistant/markdown/safeHref.js +23 -0
  120. package/dist/esm/Components/Assistant/message/AssistantMessage.js +126 -0
  121. package/dist/esm/Components/Assistant/message/AssistantMessageProps.js +1 -0
  122. package/dist/esm/Components/Assistant/message/MessageActions.js +16 -0
  123. package/dist/esm/Components/Assistant/panel/AssistantPanel.js +82 -0
  124. package/dist/esm/Components/Assistant/panel/AssistantPanelProps.js +1 -0
  125. package/dist/esm/Components/Assistant/panel/ResizeHandle.js +68 -0
  126. package/dist/esm/Components/Assistant/sources/AssistantSources.js +58 -0
  127. package/dist/esm/Components/Assistant/sources/AssistantSourcesProps.js +1 -0
  128. package/dist/esm/Components/Assistant/steps/AssistantToolSteps.js +36 -0
  129. package/dist/esm/Components/Assistant/steps/AssistantToolStepsProps.js +1 -0
  130. package/dist/esm/Components/Assistant/suggestions/AssistantSuggestions.js +13 -0
  131. package/dist/esm/Components/Assistant/suggestions/AssistantSuggestionsProps.js +1 -0
  132. package/dist/esm/Components/Assistant/thread/AssistantThread.js +107 -0
  133. package/dist/esm/Components/Assistant/thread/AssistantThreadProps.js +1 -0
  134. package/dist/esm/Components/Assistant/typing/AssistantTypingIndicator.js +28 -0
  135. package/dist/esm/Components/Assistant/typing/AssistantTypingIndicatorProps.js +1 -0
  136. package/dist/esm/Components/Assistant/welcome/AssistantWelcome.js +25 -0
  137. package/dist/esm/Components/Assistant/welcome/AssistantWelcomeProps.js +1 -0
  138. package/dist/esm/Components/Table/components/TableBody.js +5 -1
  139. package/dist/esm/index.js +2 -0
  140. package/dist/index.d.ts +18 -0
  141. package/dist/index.js +20 -1
  142. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -11,6 +11,30 @@ line below names its issue number.
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ### Added
15
+
16
+ - **The Assistant family** — a presentational, app-agnostic AI-assistant kit extracted from the tickets app, so HRMS
17
+ and CRM share one look. Nothing in it fetches: the app streams, persists and acts. `AssistantPanel` (docked with a
18
+ keyboard-operable resize handle, floating or full screen; status dot, header actions, banner, footer),
19
+ `AssistantLauncher` (round floating button with busy ring, badge and `KbdShortcut` hint), `AssistantThread`
20
+ (stick-to-bottom, Jump to latest, one polite announcement per finished reply), `AssistantMessage` (user bubble;
21
+ assistant parts for text, tool steps, results via `renderers`, proposals, approvals, sources, suggestions, notices
22
+ and errors; copy, retry, edit, thumbs with reasons; `renderPart` override), `AssistantMarkdown` (safe and
23
+ dependency-free: no HTML, images become `[image: alt]` text, only http(s), mailto and app-relative links become
24
+ anchors), `AssistantToolSteps`, `AssistantProposalCard`, `AssistantApprovalCard`, `AssistantSuggestions`,
25
+ `AssistantComposer` (autosizing, Enter to send and IME-safe, Stop while streaming, attachments by button, paste
26
+ and drop, `/` commands, `@` mentions, voice toggle, counter), `AssistantWelcome`, `AssistantHistoryList` (date
27
+ groups, search, inline rename, pin, confirmed delete), `AssistantContextBar`, `AssistantSources`,
28
+ `AssistantStatusBanner` and `AssistantTypingIndicator`. The shared message model (`AssistantMessageModel`,
29
+ `AssistantPart` and one type per part) and every props, labels and item type are root exports. Demo at
30
+ `/assistant`, full screen at `/examples/assistant`.
31
+
32
+ ### Fixed
33
+
34
+ - **`Table` (windowed, >30 rows) flickered at the bottom of a `tableMaxHeight` scroller.** The scroll limit ignored the
35
+ sticky header, so the clamp stopped one header-height (41px) short of the real bottom and fought the browser's own
36
+ scroll there. Rows now get the viewport minus the header.
37
+
14
38
  ## [3.1.0] — 2026-10-23
15
39
 
16
40
  ### Added
@@ -2079,3 +2079,32 @@ exposes `role="checkbox"`, so `getByRole("checkbox")` finds nothing inside the p
2079
2079
  ### Page behind an open `WorkspaceWindow` is `aria-hidden`
2080
2080
 
2081
2081
  While a window is open (not minimized) role queries for background elements need `{ hidden: true }` or a test id.
2082
+
2083
+ ### Assistant family: what the props do not hint at
2084
+
2085
+ - **A feature exists only when its callback is passed.** No `onRetry` means no Retry (also on a `retryable` error
2086
+ part), no `onFeedback` no thumbs, no `onSuggestion` no suggestion chips at all, no `onProposalAction` /
2087
+ `onApprovalAction` read-only cards, no `onAttach` no paperclip and no paste or drop, no `onResize` no resize
2088
+ handle, no `onSizeChange` no size buttons. Nothing is disabled; it is absent.
2089
+ - **Message callbacks get the message last**: `onRetry(message)`, `onEdit(message)`, `onCopy(text, message)`,
2090
+ `onFeedback(rating, reason, message)`, `onProposalAction(id, action, message)`. Pressing the active thumb again
2091
+ sends `rating: null`. One `messageProps` object on `AssistantThread` therefore serves every message.
2092
+ - **`AssistantComposer` is fully controlled and never clears itself.** Clear `value` in `onSubmit`. It never submits
2093
+ while `isStreaming` (Enter does nothing, Send becomes Stop) or with blank text and no attachments. Picking a `/`
2094
+ command replaces the text with `"/command "` and then calls `onCommand`; picking an `@` mention inserts
2095
+ `"@Label "` unless `formatMention` says otherwise. Files from paste and drop are filtered by `accept` too.
2096
+ - **User messages render as plain text, never markdown**, so `**` shows literally in the bubble. Only assistant text
2097
+ goes through `AssistantMarkdown`.
2098
+ - **`AssistantMarkdown` is deliberately lossy for safety**: an image is `[image: alt]` text, HTML shows as text, and a
2099
+ link whose href is not http(s), mailto, `/path` or `#fragment` renders as plain text (no anchor, no error). A link
2100
+ URL may contain one level of parentheses; spaces or deeper nesting leave the markdown literal. `#` renders as `h3`
2101
+ (`headingLevel`). A single newline inside a paragraph is a line break.
2102
+ - **`AssistantThread` announces a reply only when its `status` leaves `"streaming"`.** A reply that is never marked
2103
+ `streaming` first is never announced; one left on `streaming` keeps its caret and hides its action row.
2104
+ - **`AssistantHistoryList` without `now` freezes "now" at mount**, so Today and Yesterday do not roll over at midnight
2105
+ until it remounts. Pass `now` when a list can stay open across days. `onDelete` runs only after the confirm dialog;
2106
+ a rejected promise keeps the dialog open.
2107
+ - **`AssistantPanel` is not a dialog**: no focus trap, Esc never closes it, and its default `positioning="fixed"`
2108
+ resolves against the nearest transformed ancestor if there is one. Use `positioning="absolute"` inside a positioned
2109
+ layout box. The docked resize handle is hidden below `sm`, where the docked panel is full width.
2110
+
package/DESIGN-GUIDE.md CHANGED
@@ -194,6 +194,7 @@ sections are `Card` with the title in `header`.
194
194
  | Notification tray | `NotificationCenter` — bell plus a two-tab panel (Needs you, Activity) with inline approvals and undo; `NotificationBell` alone is just the badge. `NotificationPanel`, `NotificationList` and `NotificationItem` are deprecated |
195
195
  | Notification inbox page | `NotificationInbox` (tabs, search, type filter, bulk actions, reading pane, `variant="phone"`) — share one `NotificationCenterProvider` with the bell |
196
196
  | Notification settings page | `NotificationPreferences` (`channels`, `groups`, `values`, `onChange`; locked cells, autosave with rollback) |
197
+ | AI assistant (launcher, chat panel, history, composer) | `AssistantLauncher` + `AssistantPanel` + `AssistantThread` + `AssistantComposer` — see section 11; never render model markdown yourself |
197
198
  | Confirm that needs the name typed to arm it | `ConfirmDialog confirmationText="delete-me"` — `onConfirm` does **not** close; call `onClose` yourself |
198
199
  | Scrim over the page or one panel while something runs | `Backdrop open loader` — `variant="dim"` by default. Add `container` to scope it to the nearest positioned ancestor, `allowBackgroundInteraction` to let clicks through, `onClick` to dismiss |
199
200
  | A short "saved" / "copied" / "failed" notice | `useToaster().showToast({ title, status })` (`PixelizeThemeProvider` and `withTheme` mount the provider) — not a `ToolTip`, not an `AlertDialog` |
@@ -322,6 +323,7 @@ not shipped in this package). Start from the closest one:
322
323
  | App launcher (browse, pins, recents, search with actions) | `launcher.tsx` (`/examples/launcher`) | `NavLauncher` with an app-owned registry and role-based permission filter, pinned / frequent / recent ids, `linkAs`, remote results via `extraResults`, `isLoading`, Classic / Spotlight toggle, synonyms, scopes, quick actions, company facts with Copy, answers |
323
324
  | Wizard / multi-step dialog | `wizard.tsx` (`/examples/wizard`) | `WizardDialog`, inline `Wizard` and `WizardDialog chrome="inline"` in a `WorkspaceWindow`: per-step `validate` messages, locked future steps, error summary, `summary`-driven review, `isFinishing` |
324
325
  | Template editor with merge fields | `templateEditor.tsx` (`/examples/template-editor`) | `Editor mergeFields`: grouped Insert field, chips, unknown-field error chips and `onUnknownTokens`, Make dynamic, side preview, label / helper / error |
326
+ | AI assistant beside a work page | `AssistantExample.tsx` (`/examples/assistant`) | docked `AssistantPanel` with `AssistantThread`, `AssistantComposer` (commands, mentions, context chips), `AssistantLauncher`, history, `renderPart` for an editable proposal, a scripted streaming reply, and the four states |
325
327
  | Shop front (home → listing → product → bag → checkout → order) | `storefront/` | `ProductCard` grid / rail / quick-add, `ProductDetails` + `StickyBuyBar`, `CartItem`, `OrderSummary`, `CouponField`, address/payment groups, `OrderStatusTimeline`, `BagBar`; mobile frame + desktop |
326
328
 
327
329
  ## 10. Shop screens (e-commerce)
@@ -340,3 +342,28 @@ and rules: [COMPONENT-GOTCHAS.md](COMPONENT-GOTCHAS.md) "Commerce kit".
340
342
  from `PriceBlock`, the tax note and legal-metrology block in `DetailSections`.
341
343
  - **Four states per screen** as usual: `ProductCardSkeleton` / `CartItem isLoading`, first-run and
342
344
  filtered-empty `EmptyState`, `ErrorState` with Retry.
345
+
346
+ ## 11. AI assistant
347
+
348
+ An app's assistant is built from the `Assistant*` family, never hand-rolled. The family is presentational: **the app
349
+ streams, stores and acts**; the components take an `AssistantMessageModel[]` and callbacks. Detail and traps:
350
+ [COMPONENT-GOTCHAS.md](COMPONENT-GOTCHAS.md) "Assistant family".
351
+
352
+ ```tsx
353
+ <AssistantLauncher onClick={toggle} isOpen={open} aria-controls="assistant" shortcut="mod+shift+a" />
354
+ <AssistantPanel id="assistant" title="Assistant" status="online" onClose={close} onResize={setWidth} width={width}
355
+ footer={<AssistantComposer value={draft} onChange={setDraft} onSubmit={send} isStreaming={busy} onStop={stop} />}>
356
+ <AssistantThread messages={messages} emptyState={<AssistantWelcome capabilities={caps} onSelectCapability={pick} />}
357
+ messageProps={{ renderers, onRetry, onFeedback, onSuggestion: send, onProposalAction, onApprovalAction }} />
358
+ </AssistantPanel>
359
+ ```
360
+
361
+ - **Map your stream onto parts**: tokens append to a `text` part, tool calls become `tool` parts (`running` → `done`),
362
+ structured output becomes a `result` part drawn by `renderers[part.render ?? part.name]`, and anything that changes
363
+ data is a `proposal` (the person applies it) or an `approval` (the person says yes). Set `status: "streaming"` until
364
+ the stream ends, then `complete`, `error` or `aborted`.
365
+ - **Never render model text yourself.** Use `AssistantMessage` or `AssistantMarkdown`: they drop images and unsafe links.
366
+ Route in-app links through `onLinkClick` (call `event.preventDefault()` and navigate).
367
+ - **One loud action**: the composer's Send is the only solid control; card primaries are solid only while pending.
368
+ - **Four states**: loading (a thread skeleton), empty (`AssistantWelcome`), error (`AssistantStatusBanner tone="error"`
369
+ in `banner`, plus an `error` part with `retryable`) and data.
package/README.md CHANGED
@@ -394,21 +394,21 @@ block is generated: after adding or removing an export run
394
394
 
395
395
  <!-- exports-index:start -->
396
396
 
397
- **Components and primitives (256)**
397
+ **Components and primitives (278)**
398
398
 
399
- `Accordian`, `Accordion`, `AddressCard`, `AddressCardGroup`, `Alert`, `AlertDescription`, `AlertDialog`, `AlertIcon`, `AlertTitle`, `ApexAreaChart`, `ApexBarChart`, `ApexLineChart`, `ApexPieChart`, `ApexPolarChart`, `ApexRadialChart`, `AppSwitcher`, `AppearanceSettings`, `AudioRecorder`, `Avatar`, `AvatarGroup`, `Backdrop`, `Badge`, `BagBar`, `Box`, `Breadcrumbs`, `BulkSelectionBar`, `Button`, `ButtonGroupIcon`, `CalendarGrid`, `Card`, `CartItem`, `Center`, `ChakraProvider`, `Checkbox`, `ChoiceCard`, `ChoiceCardGroup`, `CircularProgress`, `Collapse`, `ConfirmDialog`, `ContactForm`, `Container`, `CopyButton`, `CouponField`, `CustomModulesTable`, `DatePicker`, `DescriptionList`, `DetailSections`, `Divider`, `Drawer`, `DrawerBody`, `DrawerFooter`, `DrawerHeader`, `Dropdown`, `Editor`, `EmptyState`, `ErrorState`, `FeedbackForm`, `FieldMessage`, `FieldSelectModal`, `FilePreview`, `FilePreviewTrigger`, `FileUpload`, `FileUploader`, `FilterBar`, `FilterSidebar`, `FilteredEmptyState`, `Flex`, `FormControl`, `FormDrawer`, `FormErrorMessage`, `FormField`, `FormHelperText`, `FormLabel`, `FormWrapper`, `Grid`, `GridItem`, `Header`, `HeaderActions`, `Heading`, `Hide`, `Icon`, `IconButton`, `Image`, `InputSwitch`, `InputTextArea`, `KanbanActions`, `KanbanBoard`, `Kbd`, `KbdShortcut`, `LauncherSearchEngine`, `LauncherTrigger`, `LazyWrapper`, `LimitReachedModal`, `Link`, `List`, `ListIcon`, `ListItem`, `Loading`, `MediaAudioPlayer`, `MediaDocumentStage`, `MediaGallery`, `MediaImageViewer`, `MediaLightbox`, `MediaScrubber`, `MediaStatusPanel`, `MediaVideoPlayer`, `MediaViewer`, `Menu`, `MenuButton`, `MenuDivider`, `MenuGroup`, `MenuItem`, `MenuItemOption`, `MenuList`, `MenuOptionGroup`, `Modal`, `ModalBody`, `ModalFooter`, `ModalHeader`, `MoreItems`, `MultiSelect`, `NavLauncher`, `NavigationBar`, `NewTabLink`, `NoteTextArea`, `Notification`, `NotificationBell`, `NotificationItem`, `NotificationList`, `NotificationPanel`, `NumberInput`, `OffersList`, `OptionChip`, `OrderStatusTimeline`, `OrderSummary`, `OrderedList`, `OrgSwitcher`, `OrganizationDetails`, `OverflowToolTip`, `PageHeader`, `Pagination`, `PaymentCard`, `PaymentOption`, `PaymentOptionGroup`, `PdfViewer`, `PersonChip`, `PhoneNumberInput`, `PinInput`, `PinToggle`, `PincodeChecker`, `PixelizeThemeProvider`, `PlanBadge`, `PlanPill`, `Popover`, `PopoverArrow`, `PopoverBody`, `PopoverCloseButton`, `PopoverContent`, `PopoverFooter`, `PopoverHeader`, `PopoverTrigger`, `Portal`, `PriceBlock`, `ProductBadges`, `ProductCard`, `ProductCardGrid`, `ProductCardSkeleton`, `ProductDetails`, `ProfileCard`, `ProfileCardBody`, `ProfileCardFooter`, `ProfileCardHeader`, `ProfilePhotoViewer`, `ProgressBar`, `QuantityStepper`, `QueryStateBoundary`, `QuickAddSheet`, `RadioButton`, `RadioButtonGroup`, `RangeSlider`, `Rating`, `Reorder`, `ReviewList`, `ReviewSummary`, `RolesPermission`, `SaveBar`, `ScrollToTop`, `ScrollbarBox`, `Search`, `SearchSelect`, `SectionRail`, `SegmentedControl`, `Select`, `SelectSearch`, `SelectV2`, `SettingRow`, `SettingsSection`, `Show`, `SideBar`, `SignInActivityTable`, `SimpleGrid`, `Skeletons`, `SkipLink`, `Slider`, `Spacer`, `SpecTable`, `Spinner`, `Stack`, `StageItem`, `StageProgress`, `StatCard`, `StatusTag`, `StickyBuyBar`, `StockStatus`, `Switch`, `Tab`, `TabList`, `TabPanel`, `TabPanels`, `Table`, `TableContainer`, `TableRoot`, `TableToggle`, `Tabs`, `Tag`, `TagInput`, `Tbody`, `Td`, `Text`, `TextInput`, `Tfoot`, `Th`, `Thead`, `ThemeSwitcher`, `ThemesList`, `TimePicker`, `Timeline`, `Toaster`, `ToggleSwitch`, `ToolTip`, `Tr`, `TrustBadges`, `UnorderedList`, `UpgradeButton`, `UserDetails`, `VariantSelector`, `VerifyEmailOtp`, `VisuallyHidden`, `WishlistToggle`, `Wizard`, `WizardDialog`, `WorkspaceTray`, `WorkspaceTrayPreview`, `WorkspaceWindow`, `Wrap`, `WrapItem`
399
+ `Accordian`, `Accordion`, `AddressCard`, `AddressCardGroup`, `Alert`, `AlertDescription`, `AlertDialog`, `AlertIcon`, `AlertTitle`, `ApexAreaChart`, `ApexBarChart`, `ApexLineChart`, `ApexPieChart`, `ApexPolarChart`, `ApexRadialChart`, `AppSwitcher`, `AppearanceSettings`, `AssistantApprovalCard`, `AssistantComposer`, `AssistantContextBar`, `AssistantHistoryList`, `AssistantLauncher`, `AssistantMarkdown`, `AssistantMessage`, `AssistantPanel`, `AssistantProposalCard`, `AssistantSources`, `AssistantStatusBanner`, `AssistantSuggestions`, `AssistantThread`, `AssistantToolSteps`, `AssistantTypingIndicator`, `AssistantWelcome`, `AudioRecorder`, `Avatar`, `AvatarGroup`, `Backdrop`, `Badge`, `BagBar`, `Box`, `Breadcrumbs`, `BulkSelectionBar`, `Button`, `ButtonGroupIcon`, `CalendarGrid`, `Card`, `CartItem`, `Center`, `ChakraProvider`, `Checkbox`, `ChoiceCard`, `ChoiceCardGroup`, `CircularProgress`, `Collapse`, `ConfirmDialog`, `ContactForm`, `Container`, `CopyButton`, `CouponField`, `CustomModulesTable`, `DatePicker`, `DescriptionList`, `DetailSections`, `Divider`, `Drawer`, `DrawerBody`, `DrawerFooter`, `DrawerHeader`, `Dropdown`, `Editor`, `EmptyState`, `ErrorState`, `FeedbackForm`, `FieldMessage`, `FieldSelectModal`, `FilePreview`, `FilePreviewTrigger`, `FileUpload`, `FileUploader`, `FilterBar`, `FilterSidebar`, `FilteredEmptyState`, `Flex`, `FormControl`, `FormDrawer`, `FormErrorMessage`, `FormField`, `FormHelperText`, `FormLabel`, `FormWrapper`, `Grid`, `GridItem`, `Header`, `HeaderActions`, `Heading`, `Hide`, `Icon`, `IconButton`, `Image`, `InputSwitch`, `InputTextArea`, `KanbanActions`, `KanbanBoard`, `Kbd`, `KbdShortcut`, `LauncherSearchEngine`, `LauncherTrigger`, `LazyWrapper`, `LimitReachedModal`, `Link`, `List`, `ListIcon`, `ListItem`, `Loading`, `MediaAudioPlayer`, `MediaDocumentStage`, `MediaGallery`, `MediaImageViewer`, `MediaLightbox`, `MediaScrubber`, `MediaStatusPanel`, `MediaVideoPlayer`, `MediaViewer`, `Menu`, `MenuButton`, `MenuDivider`, `MenuGroup`, `MenuItem`, `MenuItemOption`, `MenuList`, `MenuOptionGroup`, `Modal`, `ModalBody`, `ModalFooter`, `ModalHeader`, `MoreItems`, `MultiSelect`, `NavLauncher`, `NavigationBar`, `NewTabLink`, `NoteTextArea`, `Notification`, `NotificationBell`, `NotificationCenter`, `NotificationCenterProvider`, `NotificationDetail`, `NotificationInbox`, `NotificationItem`, `NotificationList`, `NotificationPanel`, `NotificationPreferences`, `NotificationRow`, `NumberInput`, `OffersList`, `OptionChip`, `OrderStatusTimeline`, `OrderSummary`, `OrderedList`, `OrgSwitcher`, `OrganizationDetails`, `OverflowToolTip`, `PageHeader`, `Pagination`, `PaymentCard`, `PaymentOption`, `PaymentOptionGroup`, `PdfViewer`, `PersonChip`, `PhoneNumberInput`, `PinInput`, `PinToggle`, `PincodeChecker`, `PixelizeThemeProvider`, `PlanBadge`, `PlanPill`, `Popover`, `PopoverArrow`, `PopoverBody`, `PopoverCloseButton`, `PopoverContent`, `PopoverFooter`, `PopoverHeader`, `PopoverTrigger`, `Portal`, `PriceBlock`, `ProductBadges`, `ProductCard`, `ProductCardGrid`, `ProductCardSkeleton`, `ProductDetails`, `ProfileCard`, `ProfileCardBody`, `ProfileCardFooter`, `ProfileCardHeader`, `ProfilePhotoViewer`, `ProgressBar`, `QuantityStepper`, `QueryStateBoundary`, `QuickAddSheet`, `RadioButton`, `RadioButtonGroup`, `RangeSlider`, `Rating`, `Reorder`, `ReviewList`, `ReviewSummary`, `RolesPermission`, `SaveBar`, `ScrollToTop`, `ScrollbarBox`, `Search`, `SearchSelect`, `SectionRail`, `SegmentedControl`, `Select`, `SelectSearch`, `SelectV2`, `SettingRow`, `SettingsSection`, `Show`, `SideBar`, `SignInActivityTable`, `SimpleGrid`, `Skeletons`, `SkipLink`, `Slider`, `Spacer`, `SpecTable`, `Spinner`, `Stack`, `StageItem`, `StageProgress`, `StatCard`, `StatusTag`, `StickyBuyBar`, `StockStatus`, `Switch`, `Tab`, `TabList`, `TabPanel`, `TabPanels`, `Table`, `TableContainer`, `TableRoot`, `TableToggle`, `Tabs`, `Tag`, `TagInput`, `Tbody`, `Td`, `Text`, `TextInput`, `Tfoot`, `Th`, `Thead`, `ThemeSwitcher`, `ThemesList`, `TimePicker`, `Timeline`, `Toaster`, `ToggleSwitch`, `ToolTip`, `Tr`, `TrustBadges`, `UnorderedList`, `UpgradeButton`, `UserDetails`, `VariantSelector`, `VerifyEmailOtp`, `VisuallyHidden`, `WishlistToggle`, `Wizard`, `WizardDialog`, `WorkspaceTray`, `WorkspaceTrayPreview`, `WorkspaceWindow`, `Wrap`, `WrapItem`
400
400
 
401
- **Hooks (18)**
401
+ **Hooks (19)**
402
402
 
403
- `useAnchoredPanelHeight`, `useAppSwitcherShortcut`, `useBreakpointValue`, `useChartTheme`, `useCustomTheme`, `useDebouncedCallback`, `useDebouncedValue`, `useDisclosure`, `useFieldIds`, `useFileViewer`, `useFontSizeSync`, `useIsTruncated`, `useMediaQuery`, `usePrefersReducedMotion`, `useSidebarPrefs`, `useThemeMode`, `useToaster`, `useToken`
403
+ `useAnchoredPanelHeight`, `useAppSwitcherShortcut`, `useBreakpointValue`, `useChartTheme`, `useCustomTheme`, `useDebouncedCallback`, `useDebouncedValue`, `useDisclosure`, `useFieldIds`, `useFileViewer`, `useFontSizeSync`, `useIsTruncated`, `useMediaQuery`, `useNotificationCenter`, `usePrefersReducedMotion`, `useSidebarPrefs`, `useThemeMode`, `useToaster`, `useToken`
404
404
 
405
- **Constants (45)**
405
+ **Constants (46)**
406
406
 
407
- `AA_NON_TEXT`, `AA_NORMAL_TEXT`, `ACCENT_GRADIENT`, `AVATAR_SEEDS`, `BORDER_WIDTHS`, `CALENDAR_DAY_CLASS`, `CATEGORICAL_SERIES`, `CONTROL_SIZES`, `CONTROL_SIZE_NAMES`, `DARK_CANVAS_LUMINANCE`, `DAY_STATE_KEYS`, `DEFAULT_CONTROL_SIZE`, `DEFAULT_DATE_FALLBACK`, `DEFAULT_FONT_SIZE`, `DISABLED_OPACITY`, `EMAIL_REGEX`, `FOCUS_HALO_WIDTH`, `FOCUS_RING_WIDTH`, `FOCUS_VISIBLE_OVER_STATE`, `FONT_SIZE_OPTIONS`, `LOW_STOCK_THRESHOLD`, `MAX_ZOOM`, `MIN_ZOOM`, `MOTION_BEZIER`, `MOTION_EASE`, `MOTION_EASE_IN`, `MOTION_EASE_OUT`, `MOTION_KEEP_CLASS`, `MOTION_LOOP_MS`, `MOTION_MS`, `MOTION_PRESS_SCALE`, `NUMERIC_TEXT`, `OVERLAY_BLUR`, `PIXELIZE_SUITE`, `PLAYBACK_SPEEDS`, `RADIUS_ROLE`, `RAISED_OVERLAY`, `REDUCED_MOTION_QUERY`, `SCRIM_OPACITY`, `SCROLLBAR_WIDTH`, `SEEK_STEP_SECONDS`, `STATUS_INK`, `TEXT_STYLES`, `TONES`, `ZOOM_STEP`
407
+ `AA_NON_TEXT`, `AA_NORMAL_TEXT`, `ACCENT_GRADIENT`, `AVATAR_SEEDS`, `BORDER_WIDTHS`, `CALENDAR_DAY_CLASS`, `CATEGORICAL_SERIES`, `CONTROL_SIZES`, `CONTROL_SIZE_NAMES`, `DARK_CANVAS_LUMINANCE`, `DAY_STATE_KEYS`, `DEFAULT_CONTROL_SIZE`, `DEFAULT_DATE_FALLBACK`, `DEFAULT_FONT_SIZE`, `DEFAULT_NOTIFICATION_LOCALE`, `DISABLED_OPACITY`, `EMAIL_REGEX`, `FOCUS_HALO_WIDTH`, `FOCUS_RING_WIDTH`, `FOCUS_VISIBLE_OVER_STATE`, `FONT_SIZE_OPTIONS`, `LOW_STOCK_THRESHOLD`, `MAX_ZOOM`, `MIN_ZOOM`, `MOTION_BEZIER`, `MOTION_EASE`, `MOTION_EASE_IN`, `MOTION_EASE_OUT`, `MOTION_KEEP_CLASS`, `MOTION_LOOP_MS`, `MOTION_MS`, `MOTION_PRESS_SCALE`, `NUMERIC_TEXT`, `OVERLAY_BLUR`, `PIXELIZE_SUITE`, `PLAYBACK_SPEEDS`, `RADIUS_ROLE`, `RAISED_OVERLAY`, `REDUCED_MOTION_QUERY`, `SCRIM_OPACITY`, `SCROLLBAR_WIDTH`, `SEEK_STEP_SECONDS`, `STATUS_INK`, `TEXT_STYLES`, `TONES`, `ZOOM_STEP`
408
408
 
409
- **Helpers and tokens (185)**
409
+ **Helpers and tokens (189)**
410
410
 
411
- `HStack`, `VStack`, `accentTextOnCanvas`, `accentTextOnPlanes`, `appInitials`, `avatarFillFor`, `avatarScaleKeyFor`, `bandOn`, `brandThemes`, `buildDarkPalette`, `buildFileItems`, `buildFocusRing`, `buildMediaItems`, `buildSuiteApps`, `buildSurfaceRaised`, `cardRule`, `chartAxisLabelColor`, `chartInk`, `chartMode`, `chipBorder`, `chipFill`, `chipHtml`, `chipify`, `clearChunkReloadGuard`, `compositeOver`, `contrastRatio`, `controlSizeStyles`, `countMedia`, `createAccountHandoff`, `createEnumLabelResolver`, `darkPalettes`, `darkerFillRung`, `debounce`, `default`, `defaultMediaAudioPlayerLabels`, `defaultMediaDocumentStageLabels`, `defaultMediaGalleryLabels`, `defaultMediaImageViewerLabels`, `defaultMediaLightboxLabels`, `defaultMediaVideoPlayerLabels`, `defaultMediaViewerLabels`, `defaultPaginationLabels`, `defaultValidationMessages`, `describeDayStates`, `discountAmount`, `discountPercent`, `downloadBlob`, `extendTheme`, `extractTokens`, `fieldControlStyles`, `fieldLabelStyles`, `fieldMessageStyles`, `fieldSurfaces`, `fieldToken`, `fileKind`, `filterApps`, `findVariant`, `firstAvailableSelection`, `firstInvalidStep`, `flattenScreens`, `focusRingShadow`, `focusVisibleRing`, `focusVisibleStyles`, `formatCount`, `formatDate`, `formatDateRange`, `formatDateTime`, `formatPlanElapsed`, `formatPlanExpiry`, `formatPlanRemaining`, `formatPrice`, `formatRelativeTime`, `formatShortcut`, `getApiErrorMessage`, `getApiErrorStatus`, `getCategoricalSeriesColors`, `getDefaultSeriesColors`, `globalScrollbarStyles`, `gradientCss`, `groupConsecutive`, `hexToHsl`, `hexToRgb`, `hexToRgba`, `highlightSegments`, `hslToHex`, `hslToRgb`, `humanize`, `initialsFor`, `inkSafeGradient`, `inkSafeGradientToken`, `installPreloadErrorReload`, `isAllowedReturnUrl`, `isChunkLoadError`, `isControlSize`, `isDarkCanvas`, `isDayStateKey`, `isFontSize`, `isOptionAvailable`, `isTone`, `labelOnFill`, `labelOnSeries`, `lazyWithRetry`, `liftToContrast`, `lightPalettes`, `listRowBackgrounds`, `matchesShortcut`, `meetsBodyText`, `mergeRefs`, `mix`, `motionTransition`, `onFilled`, `onGradient`, `optionRowCursorSx`, `optionRowDescriptionInk`, `optionRowFill`, `optionRowInk`, `optionRowWeight`, `overlayScrim`, `overlayScrimStyles`, `palettes`, `pickAccentText`, `placeholderInk`, `placeholderInkOn`, `planPreview`, `priceRange`, `rafThrottle`, `raisedRule`, `recessOn`, `reducedMotionSx`, `relativeLuminance`, `remainingStock`, `resolveAvatarColorway`, `resolveAvatarFill`, `resolveDayStateVisual`, `resolveFilledSurface`, `resolveFontSize`, `resolveGradient`, `resolveMediaUrl`, `resolvePlanBadge`, `resolveReturnUrl`, `resolveSoftTone`, `resolveStatusTone`, `resolveSuiteApps`, `rgbToHex`, `rgbToHsl`, `ruleOn`, `safeFileName`, `scrollbarStyles`, `searchLauncher`, `searchLauncherSections`, `sectionizeByDay`, `selectionComplete`, `serializeChips`, `setRef`, `settleBetween`, `shadowsFor`, `solidFillRung`, `splitMonthsAndDays`, `statusGradient`, `stockState`, `themeNames`, `toCsv`, `toWords`, `toneInk`, `toneScale`, `toneToColorScheme`, `toneToSemantic`, `tooltipSurface`, `transitionFor`, `unitPrice`, `unknownTokens`, `validateEmail`, `validateFile`, `validateFileSize`, `validateFileType`, `validatePassword`, `validatePositiveNumber`, `validateRequired`, `validateVideoFile`, `validateVideoFileType`, `validateYoutubeUrl`, `withFocusRing`, `withLightness`, `withOutlineRung`, `wizardTransition`
411
+ `HStack`, `VStack`, `accentTextOnCanvas`, `accentTextOnPlanes`, `appInitials`, `avatarFillFor`, `avatarScaleKeyFor`, `bandOn`, `brandThemes`, `buildDarkPalette`, `buildFileItems`, `buildFocusRing`, `buildMediaItems`, `buildSuiteApps`, `buildSurfaceRaised`, `cardRule`, `chartAxisLabelColor`, `chartInk`, `chartMode`, `chipBorder`, `chipFill`, `chipHtml`, `chipify`, `clearChunkReloadGuard`, `compositeOver`, `contrastRatio`, `controlSizeStyles`, `countMedia`, `createAccountHandoff`, `createEnumLabelResolver`, `darkPalettes`, `darkerFillRung`, `debounce`, `default`, `defaultMediaAudioPlayerLabels`, `defaultMediaDocumentStageLabels`, `defaultMediaGalleryLabels`, `defaultMediaImageViewerLabels`, `defaultMediaLightboxLabels`, `defaultMediaVideoPlayerLabels`, `defaultMediaViewerLabels`, `defaultNotificationLabels`, `defaultPaginationLabels`, `defaultValidationMessages`, `describeDayStates`, `discountAmount`, `discountPercent`, `downloadBlob`, `extendTheme`, `extractTokens`, `fieldControlStyles`, `fieldLabelStyles`, `fieldMessageStyles`, `fieldSurfaces`, `fieldToken`, `fileKind`, `filterApps`, `findVariant`, `firstAvailableSelection`, `firstInvalidStep`, `flattenScreens`, `focusRingShadow`, `focusVisibleRing`, `focusVisibleStyles`, `formatCount`, `formatDate`, `formatDateRange`, `formatDateTime`, `formatPlanElapsed`, `formatPlanExpiry`, `formatPlanRemaining`, `formatPrice`, `formatRelativeTime`, `formatShortcut`, `getApiErrorMessage`, `getApiErrorStatus`, `getCategoricalSeriesColors`, `getDefaultSeriesColors`, `globalScrollbarStyles`, `gradientCss`, `groupConsecutive`, `hexToHsl`, `hexToRgb`, `hexToRgba`, `highlightSegments`, `hslToHex`, `hslToRgb`, `humanize`, `initialsFor`, `inkSafeGradient`, `inkSafeGradientToken`, `installPreloadErrorReload`, `isAllowedReturnUrl`, `isChunkLoadError`, `isControlSize`, `isDarkCanvas`, `isDayStateKey`, `isFontSize`, `isNotificationActionError`, `isOptionAvailable`, `isTone`, `labelOnFill`, `labelOnSeries`, `lazyWithRetry`, `liftToContrast`, `lightPalettes`, `listRowBackgrounds`, `matchesShortcut`, `meetsBodyText`, `mergeRefs`, `mix`, `motionTransition`, `notificationActionError`, `onFilled`, `onGradient`, `optionRowCursorSx`, `optionRowDescriptionInk`, `optionRowFill`, `optionRowInk`, `optionRowWeight`, `overlayScrim`, `overlayScrimStyles`, `palettes`, `pickAccentText`, `placeholderInk`, `placeholderInkOn`, `planPreview`, `priceRange`, `rafThrottle`, `raisedRule`, `recessOn`, `reducedMotionSx`, `relativeLuminance`, `remainingStock`, `resolveAvatarColorway`, `resolveAvatarFill`, `resolveDayStateVisual`, `resolveFilledSurface`, `resolveFontSize`, `resolveGradient`, `resolveMediaUrl`, `resolvePlanBadge`, `resolveReturnUrl`, `resolveSoftTone`, `resolveStatusTone`, `resolveSuiteApps`, `rgbToHex`, `rgbToHsl`, `ruleOn`, `safeFileName`, `scrollbarStyles`, `searchLauncher`, `searchLauncherSections`, `sectionizeByDay`, `selectionComplete`, `serializeChips`, `setRef`, `settleBetween`, `shadowsFor`, `solidFillRung`, `splitMonthsAndDays`, `statusGradient`, `stockState`, `themeNames`, `toCsv`, `toNotificationActionError`, `toWords`, `toneInk`, `toneScale`, `toneToColorScheme`, `toneToSemantic`, `tooltipSurface`, `transitionFor`, `unitPrice`, `unknownTokens`, `validateEmail`, `validateFile`, `validateFileSize`, `validateFileType`, `validatePassword`, `validatePositiveNumber`, `validateRequired`, `validateVideoFile`, `validateVideoFileType`, `validateYoutubeUrl`, `withFocusRing`, `withLightness`, `withOutlineRung`, `wizardTransition`
412
412
 
413
413
  <!-- exports-index:end -->
414
414
 
@@ -0,0 +1,17 @@
1
+ import type { AssistantMessageModel, AssistantPart, AssistantToolPart } from "./assistantTypes";
2
+ /** Plain text of a message: its text parts joined by a blank line. */
3
+ export declare const messageText: (message: AssistantMessageModel) => string;
4
+ /** A run of parts the message renders as one unit: consecutive tool parts collapse into one group. */
5
+ export type PartGroup = {
6
+ kind: "tools";
7
+ key: string;
8
+ parts: AssistantToolPart[];
9
+ } | {
10
+ kind: "part";
11
+ key: string;
12
+ part: AssistantPart;
13
+ index: number;
14
+ };
15
+ export declare const groupParts: (parts: readonly AssistantPart[]) => PartGroup[];
16
+ /** Cuts `text` at a word boundary near `max` characters and adds an ellipsis. */
17
+ export declare const truncate: (text: string, max: number) => string;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.truncate = exports.groupParts = exports.messageText = void 0;
4
+ /** Plain text of a message: its text parts joined by a blank line. */
5
+ const messageText = (message) => message.parts
6
+ .flatMap((part) => (part.type === "text" ? [part.text] : []))
7
+ .join("\n\n");
8
+ exports.messageText = messageText;
9
+ const keyOf = (part, index) => "id" in part ? `${part.type}-${part.id}` : `${part.type}-${index}`;
10
+ const groupParts = (parts) => {
11
+ const groups = [];
12
+ parts.forEach((part, index) => {
13
+ const last = groups[groups.length - 1];
14
+ if (part.type === "tool") {
15
+ if ((last === null || last === void 0 ? void 0 : last.kind) === "tools")
16
+ last.parts.push(part);
17
+ else
18
+ groups.push({ kind: "tools", key: `tools-${keyOf(part, index)}`, parts: [part] });
19
+ return;
20
+ }
21
+ groups.push({ kind: "part", key: keyOf(part, index), part, index });
22
+ });
23
+ return groups;
24
+ };
25
+ exports.groupParts = groupParts;
26
+ /** Cuts `text` at a word boundary near `max` characters and adds an ellipsis. */
27
+ const truncate = (text, max) => {
28
+ const flat = text.replace(/\s+/g, " ").trim();
29
+ if (flat.length <= max)
30
+ return flat;
31
+ const cut = flat.slice(0, max);
32
+ const space = cut.lastIndexOf(" ");
33
+ return `${(space > max * 0.6 ? cut.slice(0, space) : cut).trimEnd()}…`;
34
+ };
35
+ exports.truncate = truncate;
@@ -0,0 +1,27 @@
1
+ import type { PaletteProps } from "../../Theme/tokens/types";
2
+ import { type Tone } from "../../Theme/tokens/builders/tone";
3
+ /**
4
+ * The colour roles every Assistant component reads. The family lives on an overlay plane (the panel is
5
+ * `surfaceRaised`), so rules, insets and link ink are resolved against it as well as the page planes —
6
+ * the same component can then sit in the panel or straight on a page.
7
+ */
8
+ export declare const assistantTokens: (colors: PaletteProps) => {
9
+ surface: string;
10
+ rule: string;
11
+ /** A rule that also reads on the page canvas and on a card. */
12
+ pageRule: string;
13
+ inset: string;
14
+ link: string;
15
+ body: string;
16
+ heading: string;
17
+ muted: string;
18
+ };
19
+ /** Soft tinted fill + ink for a status tone on the assistant's overlay plane. */
20
+ export declare const assistantTone: (colors: PaletteProps, tone: Tone) => {
21
+ bg: string;
22
+ border: string;
23
+ ink: string;
24
+ text: string;
25
+ };
26
+ /** The blinking block caret at the end of a streaming answer; static under reduced motion. */
27
+ export declare const StreamingCaret: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StreamingCaret = exports.assistantTone = exports.assistantTokens = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("@chakra-ui/react");
6
+ const react_2 = require("@emotion/react");
7
+ const accentText_1 = require("../../Theme/tokens/builders/accentText");
8
+ const planeStep_1 = require("../../Theme/tokens/builders/planeStep");
9
+ const surfaceRaised_1 = require("../../Theme/tokens/builders/surfaceRaised");
10
+ const tone_1 = require("../../Theme/tokens/builders/tone");
11
+ const motion_1 = require("../../Theme/tokens/primitives/motion");
12
+ const motion_2 = require("../../Theme/chakra/motion");
13
+ /**
14
+ * The colour roles every Assistant component reads. The family lives on an overlay plane (the panel is
15
+ * `surfaceRaised`), so rules, insets and link ink are resolved against it as well as the page planes —
16
+ * the same component can then sit in the panel or straight on a page.
17
+ */
18
+ const assistantTokens = (colors) => {
19
+ const surface = colors.surfaceRaised;
20
+ return {
21
+ surface,
22
+ rule: (0, surfaceRaised_1.raisedRule)(colors),
23
+ /** A rule that also reads on the page canvas and on a card. */
24
+ pageRule: (0, planeStep_1.ruleOn)(colors, colors.background[50]),
25
+ inset: (0, planeStep_1.bandOn)(colors.backgroundColor.secondary, surface),
26
+ link: (0, accentText_1.accentTextOnPlanes)(colors.primary, [
27
+ colors.backgroundColor.main,
28
+ colors.backgroundColor.base,
29
+ colors.background[50],
30
+ surface,
31
+ ]),
32
+ body: colors.text[800],
33
+ heading: colors.header[900],
34
+ muted: colors.textMuted,
35
+ };
36
+ };
37
+ exports.assistantTokens = assistantTokens;
38
+ /** Soft tinted fill + ink for a status tone on the assistant's overlay plane. */
39
+ const assistantTone = (colors, tone) => {
40
+ const soft = (0, tone_1.resolveSoftTone)(colors, (0, tone_1.toneScale)(colors, tone), colors.surfaceRaised);
41
+ return { bg: soft.bg, border: soft.border, ink: soft.fg, text: (0, tone_1.toneInk)(colors, tone) };
42
+ };
43
+ exports.assistantTone = assistantTone;
44
+ const blink = (0, react_2.keyframes) `
45
+ 0%, 45% { opacity: 1; }
46
+ 55%, 100% { opacity: 0; }
47
+ `;
48
+ /** The blinking block caret at the end of a streaming answer; static under reduced motion. */
49
+ const StreamingCaret = () => ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", "aria-hidden": "true", "data-testid": "assistant-caret", display: "inline-block", w: "0.5em", h: "1em", ml: "0.125em", verticalAlign: "text-bottom", bg: "currentColor", sx: {
50
+ animation: `${blink} ${motion_1.MOTION_LOOP_MS.sweep}ms steps(1, end) infinite`,
51
+ [motion_2.REDUCED_MOTION_QUERY]: { animation: "none" },
52
+ } }));
53
+ exports.StreamingCaret = StreamingCaret;
@@ -0,0 +1,163 @@
1
+ import type { ElementType } from "react";
2
+ /** Who wrote a message: the person, or the model. */
3
+ export type AssistantRole = "user" | "assistant";
4
+ /** Lifecycle of one message; only "streaming" shows the caret and hides the action row. */
5
+ export type AssistantMessageStatus = "streaming" | "complete" | "error" | "aborted";
6
+ /** One field an approval would change, shown as `label: before → after`. */
7
+ export interface AssistantChange {
8
+ /** Field name, e.g. "Priority". */
9
+ label: string;
10
+ /** Current value; omitted for a field that is being set for the first time. */
11
+ before?: string;
12
+ /** Value after the change is approved. */
13
+ after: string;
14
+ }
15
+ /** A citation the answer drew on. */
16
+ export interface AssistantSource {
17
+ /** Stable key, handed back to `onSelect`. */
18
+ id: string;
19
+ /** Visible title of the source. */
20
+ title: string;
21
+ /** Only http(s), mailto and app-relative (`/…`, `#…`) links render as anchors; anything else stays text. */
22
+ href?: string;
23
+ /** Short type word shown beside the title, e.g. "Ticket" or "Doc". */
24
+ kind?: string;
25
+ /** Second line, e.g. a record key or a snippet. */
26
+ subtitle?: string;
27
+ }
28
+ /** Markdown answer text; rendered by `AssistantMarkdown`. */
29
+ export interface AssistantTextPart {
30
+ /** Discriminant. */
31
+ type: "text";
32
+ /** Markdown source. User messages render it as plain text. */
33
+ text: string;
34
+ }
35
+ /** One tool call; consecutive tool parts render together as `AssistantToolSteps`. */
36
+ export interface AssistantToolPart {
37
+ /** Discriminant. */
38
+ type: "tool";
39
+ /** Stable key of the call. */
40
+ id: string;
41
+ /** Machine name of the tool; shown when `label` is missing. */
42
+ name: string;
43
+ /** Human label, e.g. "Searching tickets". */
44
+ label?: string;
45
+ /** Drives the spinner, check or error icon. */
46
+ status: "running" | "done" | "error";
47
+ /** Muted second line, e.g. "12 results". */
48
+ detail?: string;
49
+ }
50
+ /** Structured tool output; drawn by `renderers[render ?? name]`, else a quiet fallback line. */
51
+ export interface AssistantResultPart {
52
+ /** Discriminant. */
53
+ type: "result";
54
+ /** Stable key of the result. */
55
+ id: string;
56
+ /** Tool name; the renderer key when `render` is not set. */
57
+ name: string;
58
+ /** Renderer key that wins over `name`, e.g. "chart" for several chart-producing tools. */
59
+ render?: string;
60
+ /** Whatever the renderer expects; the library never reads it. */
61
+ data: unknown;
62
+ }
63
+ /** Something the assistant proposes to create or change; the app applies it. */
64
+ export interface AssistantProposalPart {
65
+ /** Discriminant. */
66
+ type: "proposal";
67
+ /** Handed back to `onProposalAction`. */
68
+ id: string;
69
+ /** Tool or action name, e.g. "create_issue". */
70
+ name: string;
71
+ /** Card title. */
72
+ title: string;
73
+ /** Summary under the title. */
74
+ summary?: string;
75
+ /** Label/value preview of what will be created. */
76
+ fields?: {
77
+ label: string;
78
+ value: string;
79
+ }[];
80
+ /** Actions show only while "pending" (and "failed", as a retry). */
81
+ status: "pending" | "applying" | "applied" | "dismissed" | "failed";
82
+ /** Shown while `status` is "failed". */
83
+ error?: string;
84
+ }
85
+ /** An action the assistant wants to run and that needs a person's yes. */
86
+ export interface AssistantApprovalPart {
87
+ /** Discriminant. */
88
+ type: "approval";
89
+ /** Handed back to `onApprovalAction`. */
90
+ id: string;
91
+ /** Tool or action name. */
92
+ name: string;
93
+ /** Card title, e.g. "Close 3 tickets". */
94
+ title: string;
95
+ /** Summary under the title. */
96
+ summary?: string;
97
+ /** Fields that change, as before → after. */
98
+ changes?: AssistantChange[];
99
+ /** Shown as a badge; "high" also turns Approve red. */
100
+ risk?: "low" | "medium" | "high";
101
+ /** Approve and Deny show only while "pending" (and "failed", as a retry). */
102
+ status: "pending" | "approving" | "approved" | "denied" | "expired" | "failed";
103
+ /** Shown while `status` is "failed". */
104
+ error?: string;
105
+ /** With status "approved" and an `onApprovalAction`, shows Undo. */
106
+ undoable?: boolean;
107
+ }
108
+ /** Citations for the answer. */
109
+ export interface AssistantSourcesPart {
110
+ /** Discriminant. */
111
+ type: "sources";
112
+ /** The sources, in citation order. */
113
+ items: AssistantSource[];
114
+ }
115
+ /** Follow-up prompts offered as chips. */
116
+ export interface AssistantSuggestionsPart {
117
+ /** Discriminant. */
118
+ type: "suggestions";
119
+ /** Each one is sent as-is through `onSuggestion`. */
120
+ items: string[];
121
+ }
122
+ /** A one-line inline notice inside an answer. */
123
+ export interface AssistantNoticePart {
124
+ /** Discriminant. */
125
+ type: "notice";
126
+ /** Picks the icon and ink. */
127
+ tone: "info" | "warning";
128
+ /** Notice text (plain, not markdown). */
129
+ text: string;
130
+ }
131
+ /** A failure inside an answer, with an optional Retry. */
132
+ export interface AssistantErrorPart {
133
+ /** Discriminant. */
134
+ type: "error";
135
+ /** What went wrong, in words a person can act on. */
136
+ message: string;
137
+ /** Shows Retry, which calls the message's `onRetry`. */
138
+ retryable?: boolean;
139
+ }
140
+ /** One piece of a message; a message is an ordered list of parts. */
141
+ export type AssistantPart = AssistantTextPart | AssistantToolPart | AssistantResultPart | AssistantProposalPart | AssistantApprovalPart | AssistantSourcesPart | AssistantSuggestionsPart | AssistantNoticePart | AssistantErrorPart;
142
+ /** One message in a conversation — the shape every Assistant component reads. */
143
+ export interface AssistantMessageModel {
144
+ /** Stable key; also how the thread notices a message finished streaming. */
145
+ id: string;
146
+ /** "user" renders a right-aligned bubble; "assistant" a plain left column. */
147
+ role: AssistantRole;
148
+ /** Ordered content. */
149
+ parts: AssistantPart[];
150
+ /** Defaults to "complete". */
151
+ status?: AssistantMessageStatus;
152
+ /** Epoch milliseconds. */
153
+ createdAt?: number;
154
+ /** Current rating; drives the pressed state of the thumbs. */
155
+ feedback?: "up" | "down" | null;
156
+ /** Shown as a small badge when the message's `showMeta` is on. */
157
+ meta?: {
158
+ model?: string;
159
+ provider?: string;
160
+ };
161
+ }
162
+ /** A lucide-react (or any) icon component. */
163
+ export type AssistantIcon = ElementType;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import type { AssistantStatusBannerProps } from "./AssistantStatusBannerProps";
2
+ declare const _default: import("react").MemoExoticComponent<({ tone, title, message, children, action, onDismiss, dismissLabel, "data-testid": testId, }: AssistantStatusBannerProps) => import("react/jsx-runtime").JSX.Element>;
3
+ export default _default;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const react_1 = require("react");
8
+ const react_2 = require("@chakra-ui/react");
9
+ const lucide_react_1 = require("lucide-react");
10
+ const useCustomTheme_1 = require("../../../Theme/useCustomTheme");
11
+ const borderWidths_1 = require("../../../Theme/tokens/primitives/borderWidths");
12
+ const radii_1 = require("../../../Theme/tokens/primitives/radii");
13
+ const Button_1 = __importDefault(require("../../Button/Button"));
14
+ const IconButton_1 = __importDefault(require("../../IconButton/IconButton"));
15
+ const assistantStyles_1 = require("../assistantStyles");
16
+ const ICON = { info: lucide_react_1.Info, warning: lucide_react_1.AlertTriangle, error: lucide_react_1.AlertCircle };
17
+ /** Tinted info/warning/error strip with an optional action and dismiss, sized for the assistant panel. */
18
+ const AssistantStatusBanner = ({ tone = "info", title, message, children, action, onDismiss, dismissLabel = "Dismiss", "data-testid": testId = "assistant-status-banner", }) => {
19
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
20
+ const look = (0, assistantStyles_1.assistantTone)(colors, tone);
21
+ const Icon = ICON[tone];
22
+ const body = children !== null && children !== void 0 ? children : message;
23
+ return ((0, jsx_runtime_1.jsxs)(react_2.Flex, { role: tone === "error" ? "alert" : "status", align: "flex-start", gap: 2.5, px: 3, py: 2, bg: look.bg, borderWidth: borderWidths_1.BORDER_WIDTHS.hairline, borderColor: look.border, borderRadius: radii_1.RADIUS_ROLE.control, "data-testid": testId, "data-tone": tone, children: [(0, jsx_runtime_1.jsx)(react_2.Box, { as: Icon, "aria-hidden": "true", boxSize: 4, mt: 0.5, flexShrink: 0, color: look.ink }), (0, jsx_runtime_1.jsxs)(react_2.Box, { flex: "1", minW: 0, fontSize: "sm", lineHeight: 1.5, children: [title ? ((0, jsx_runtime_1.jsx)(react_2.Text, { fontWeight: 600, color: look.ink, children: title })) : null, body ? (0, jsx_runtime_1.jsx)(react_2.Box, { color: colors.text[800], children: body }) : null] }), action ? ((0, jsx_runtime_1.jsx)(Button_1.default, { size: "xs", variant: "outline", colorScheme: "gray", label: action.label, onClick: action.onClick, flexShrink: 0 })) : null, onDismiss ? ((0, jsx_runtime_1.jsx)(IconButton_1.default, { "aria-label": dismissLabel, size: "xs", variant: "ghost", colorScheme: "gray", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.X, { size: 14 }), onClick: onDismiss, flexShrink: 0 })) : null] }));
24
+ };
25
+ exports.default = (0, react_1.memo)(AssistantStatusBanner);
@@ -0,0 +1,27 @@
1
+ import type { ReactNode } from "react";
2
+ /** The one button a banner can carry, e.g. "Retry" or "Add credits". */
3
+ export interface AssistantStatusBannerAction {
4
+ /** Visible button text. */
5
+ label: string;
6
+ /** Called on click. */
7
+ onClick: () => void;
8
+ }
9
+ /** A slim tinted banner for the assistant's state: mock mode, degraded provider, a quota hit. */
10
+ export interface AssistantStatusBannerProps {
11
+ /** Picks the tint and the icon; "error" is announced assertively (`role="alert"`), the others politely. Default "info". */
12
+ tone?: "info" | "warning" | "error";
13
+ /** Bold first line. */
14
+ title?: ReactNode;
15
+ /** Body text; `children` wins when both are passed. */
16
+ message?: ReactNode;
17
+ /** Body content, for richer markup than `message`. */
18
+ children?: ReactNode;
19
+ /** One outline button at the end of the banner. */
20
+ action?: AssistantStatusBannerAction;
21
+ /** Adds the close button; the parent stops rendering the banner itself. */
22
+ onDismiss?: () => void;
23
+ /** Accessible name of the close button. Default "Dismiss". */
24
+ dismissLabel?: string;
25
+ /** data-testid on the root. */
26
+ "data-testid"?: string;
27
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import type { AssistantApprovalCardProps } from "./AssistantApprovalCardProps";
2
+ declare const _default: import("react").MemoExoticComponent<({ title, summary, changes, risk, status, error, undoable, onApprove, onDeny, onUndo, icon, labels, "data-testid": testId, }: AssistantApprovalCardProps) => import("react/jsx-runtime").JSX.Element>;
3
+ export default _default;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const react_1 = require("react");
8
+ const react_2 = require("@chakra-ui/react");
9
+ const lucide_react_1 = require("lucide-react");
10
+ const useCustomTheme_1 = require("../../../Theme/useCustomTheme");
11
+ const Button_1 = __importDefault(require("../../Button/Button"));
12
+ const Tag_1 = __importDefault(require("../../Tag/Tag"));
13
+ const VisuallyHidden_1 = __importDefault(require("../../VisuallyHidden/VisuallyHidden"));
14
+ const assistantStyles_1 = require("../assistantStyles");
15
+ const CardShell_1 = require("./CardShell");
16
+ const DEFAULT_LABELS = {
17
+ approve: "Approve",
18
+ deny: "Deny",
19
+ undo: "Undo",
20
+ retry: "Try again",
21
+ changes: "Changes",
22
+ changesTo: "changes to",
23
+ empty: "Not set",
24
+ };
25
+ const DEFAULT_RISK = { low: "Low risk", medium: "Medium risk", high: "High risk" };
26
+ const DEFAULT_STATUS = { approving: "Approving", approved: "Approved", denied: "Denied", expired: "Expired", failed: "Failed" };
27
+ const RISK_TONE = { low: "neutral", medium: "warning", high: "error" };
28
+ const STATUS_TONE = {
29
+ approving: "info",
30
+ approved: "success",
31
+ denied: "neutral",
32
+ expired: "neutral",
33
+ failed: "error",
34
+ };
35
+ /** A compact approve/deny card: what changes (before → after), how risky, and Undo once approved. */
36
+ const AssistantApprovalCard = ({ title, summary, changes, risk, status = "pending", error, undoable = false, onApprove, onDeny, onUndo, icon = lucide_react_1.ShieldCheck, labels, "data-testid": testId = "assistant-approval", }) => {
37
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
38
+ const tokens = (0, assistantStyles_1.assistantTokens)(colors);
39
+ const text = { ...DEFAULT_LABELS, ...labels };
40
+ const riskText = { ...DEFAULT_RISK, ...labels === null || labels === void 0 ? void 0 : labels.risk };
41
+ const statusText = { ...DEFAULT_STATUS, ...labels === null || labels === void 0 ? void 0 : labels.status };
42
+ const busy = status === "approving";
43
+ const open = status === "pending" || busy || status === "failed";
44
+ const closed = status === "denied" || status === "expired";
45
+ const badge = status === "pending" ? undefined : { label: statusText[status], tone: STATUS_TONE[status] };
46
+ return ((0, jsx_runtime_1.jsxs)(CardShell_1.CardShell, { title: title, icon: icon, badge: badge, edgeTone: status === "approved" ? "success" : status === "failed" ? "error" : undefined, quiet: closed, isBusy: busy, status: status, testId: testId, children: [summary || risk ? ((0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "flex-start", gap: 2, wrap: "wrap", children: [summary ? ((0, jsx_runtime_1.jsx)(react_2.Box, { flex: "1", minW: "10rem", fontSize: "sm", color: closed ? tokens.muted : tokens.body, children: summary })) : null, risk && open ? ((0, jsx_runtime_1.jsx)(Tag_1.default, { label: riskText[risk], tone: RISK_TONE[risk], size: "xs", variant: "outline", "data-testid": `${testId}-risk` })) : null] })) : null, (changes === null || changes === void 0 ? void 0 : changes.length) ? ((0, jsx_runtime_1.jsx)(react_2.Box, { as: "ul", "aria-label": text.changes, listStyleType: "none", m: 0, p: 0, fontSize: "sm", children: changes.map((change, i) => {
47
+ var _a;
48
+ return ((0, jsx_runtime_1.jsxs)(react_2.Flex, { as: "li", align: "baseline", gap: 1.5, wrap: "wrap", py: 0.5, children: [(0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", color: tokens.muted, children: `${change.label}: ` }), (0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", color: tokens.muted, textDecoration: change.before ? "line-through" : undefined, children: (_a = change.before) !== null && _a !== void 0 ? _a : text.empty }), (0, jsx_runtime_1.jsx)(react_2.Box, { as: lucide_react_1.ArrowRight, "aria-hidden": "true", boxSize: 3, color: tokens.muted, alignSelf: "center" }), (0, jsx_runtime_1.jsxs)(VisuallyHidden_1.default, { children: [" ", text.changesTo, " "] }), (0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", fontWeight: 500, color: closed ? tokens.muted : tokens.heading, children: change.after })] }, `${change.label}-${i}`));
49
+ }) })) : null, status === "failed" && error ? (0, jsx_runtime_1.jsx)(CardShell_1.CardError, { message: error }) : null, open && (onApprove || onDeny) ? ((0, jsx_runtime_1.jsxs)(CardShell_1.CardActions, { children: [onDeny ? ((0, jsx_runtime_1.jsx)(Button_1.default, { size: "sm", variant: "outline", colorScheme: "gray", label: text.deny, onClick: onDeny, isDisabled: busy })) : null, onApprove ? ((0, jsx_runtime_1.jsx)(Button_1.default, { size: "sm", variant: "solid", colorScheme: risk === "high" ? "red" : "primary", label: status === "failed" ? text.retry : text.approve, onClick: onApprove, isLoading: busy })) : null] })) : null, status === "approved" && undoable && onUndo ? ((0, jsx_runtime_1.jsx)(CardShell_1.CardActions, { children: (0, jsx_runtime_1.jsx)(Button_1.default, { size: "sm", variant: "outline", colorScheme: "gray", label: text.undo, onClick: onUndo }) })) : null] }));
50
+ };
51
+ exports.default = (0, react_1.memo)(AssistantApprovalCard);