@ciridae/ui 0.16.1 → 1.0.1
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.
- package/README.md +17 -12
- package/dist/chat/chat-api-error.d.ts +14 -0
- package/dist/chat/chat-api-error.js +11 -0
- package/dist/chat/chat-client.d.ts +37 -0
- package/dist/chat/chat-client.js +66 -0
- package/dist/chat/chat-hooks.d.ts +4 -0
- package/dist/chat/chat-hooks.js +4 -0
- package/dist/chat/chat-query-keys.d.ts +10 -0
- package/dist/chat/chat-query-keys.js +8 -0
- package/dist/chat/contract.d.ts +488 -0
- package/dist/chat/contract.js +223 -0
- package/dist/chat/conversation-items-query-options.d.ts +382 -0
- package/dist/chat/conversation-items-query-options.js +15 -0
- package/dist/chat/describe-tool-call.d.ts +5 -0
- package/dist/chat/describe-tool-call.js +33 -0
- package/dist/chat/fetch-new-conversation-items.d.ts +10 -0
- package/dist/chat/fetch-new-conversation-items.js +38 -0
- package/dist/chat/message-group-position.d.ts +17 -0
- package/dist/chat/message-group-position.js +25 -0
- package/dist/chat/message-text.d.ts +23 -0
- package/dist/chat/message-text.js +118 -0
- package/dist/chat/mock-chat-client.d.ts +97 -0
- package/dist/chat/mock-chat-client.js +566 -0
- package/dist/chat/use-chat-conversation.d.ts +43 -0
- package/dist/chat/use-chat-conversation.js +156 -0
- package/dist/chat/use-conversation-list.d.ts +32 -0
- package/dist/chat/use-conversation-list.js +19 -0
- package/dist/ciridae.css +60 -479
- package/dist/components/activity-feed.d.ts +80 -0
- package/dist/components/activity-feed.js +373 -0
- package/dist/components/agent-work.d.ts +76 -0
- package/dist/components/agent-work.js +224 -0
- package/dist/components/app-navigation.d.ts +66 -0
- package/dist/components/app-navigation.js +102 -0
- package/dist/components/badge.d.ts +14 -0
- package/dist/components/badge.js +107 -0
- package/dist/components/brand-icons.d.ts +17 -0
- package/dist/components/brand-icons.js +21 -0
- package/dist/components/breakpoint.d.ts +7 -0
- package/dist/components/breakpoint.js +16 -0
- package/dist/components/bulk-action-bar.d.ts +15 -0
- package/dist/components/bulk-action-bar.js +45 -0
- package/dist/components/button.d.ts +52 -0
- package/dist/components/button.js +272 -0
- package/dist/components/calendar.d.ts +14 -0
- package/dist/components/calendar.js +158 -0
- package/dist/components/centered-page.d.ts +21 -0
- package/dist/components/centered-page.js +55 -0
- package/dist/components/chart.d.ts +22 -0
- package/dist/components/chart.js +116 -0
- package/dist/components/chat-page.d.ts +34 -0
- package/dist/components/chat-page.js +171 -0
- package/dist/components/chat-sheet-controller.d.ts +50 -0
- package/dist/components/chat-sheet-controller.js +133 -0
- package/dist/components/chat-sheet.d.ts +80 -0
- package/dist/components/chat-sheet.js +544 -0
- package/dist/components/chat.d.ts +135 -0
- package/dist/components/chat.js +545 -0
- package/dist/components/checkbox-item.d.ts +11 -0
- package/dist/components/checkbox-item.js +45 -0
- package/dist/components/checkbox-list.d.ts +51 -0
- package/dist/components/checkbox-list.js +167 -0
- package/dist/components/chip.d.ts +17 -0
- package/dist/components/chip.js +43 -0
- package/dist/components/collapsible.d.ts +8 -0
- package/dist/components/collapsible.js +41 -0
- package/dist/components/color-theme.d.ts +40 -0
- package/dist/components/color-theme.js +109 -0
- package/dist/components/column-settings.d.ts +22 -0
- package/dist/components/column-settings.js +112 -0
- package/dist/components/command-match.d.ts +7 -0
- package/dist/components/command-match.js +50 -0
- package/dist/components/command-menu.d.ts +43 -0
- package/dist/components/command-menu.js +339 -0
- package/dist/components/command-palette.d.ts +36 -0
- package/dist/components/command-palette.js +77 -0
- package/dist/components/controllable-state.d.ts +5 -0
- package/dist/components/controllable-state.js +15 -0
- package/dist/components/copyable-id.d.ts +37 -0
- package/dist/components/copyable-id.js +136 -0
- package/dist/components/data-display.d.ts +47 -0
- package/dist/components/data-display.js +221 -0
- package/dist/components/data-grid.d.ts +170 -0
- package/dist/components/data-grid.js +829 -0
- package/dist/components/date-range-picker.d.ts +44 -0
- package/dist/components/date-range-picker.js +153 -0
- package/dist/components/date-time.d.ts +11 -0
- package/dist/components/date-time.js +44 -0
- package/dist/components/dialog-height-context.d.ts +2 -0
- package/dist/components/dialog-height-context.js +3 -0
- package/dist/components/document-viewer.d.ts +62 -0
- package/dist/components/document-viewer.js +419 -0
- package/dist/components/drawer.d.ts +44 -0
- package/dist/components/drawer.js +236 -0
- package/dist/components/dropzone.d.ts +47 -0
- package/dist/components/dropzone.js +370 -0
- package/dist/components/editable-field.d.ts +99 -0
- package/dist/components/editable-field.js +422 -0
- package/dist/components/email-input.d.ts +12 -0
- package/dist/components/email-input.js +83 -0
- package/dist/components/environment-frame.d.ts +13 -0
- package/dist/components/environment-frame.js +42 -0
- package/dist/components/expandable-text.d.ts +9 -0
- package/dist/components/expandable-text.js +48 -0
- package/dist/components/feedback-screenshot.d.ts +19 -0
- package/dist/components/feedback-screenshot.js +162 -0
- package/dist/components/feedback-sheet.d.ts +80 -0
- package/dist/components/feedback-sheet.js +475 -0
- package/dist/components/field-context.d.ts +23 -0
- package/dist/components/field-context.js +15 -0
- package/dist/components/filter-bar.d.ts +77 -0
- package/dist/components/filter-bar.js +350 -0
- package/dist/components/form-controls.d.ts +53 -0
- package/dist/components/form-controls.js +123 -0
- package/dist/components/form-layout.d.ts +32 -0
- package/dist/components/form-layout.js +72 -0
- package/dist/components/hotkeys.d.ts +27 -0
- package/dist/components/hotkeys.js +70 -0
- package/dist/components/icon.d.ts +58 -0
- package/dist/components/icon.js +42 -0
- package/dist/components/input.d.ts +36 -0
- package/dist/components/input.js +249 -0
- package/dist/components/keyboard-shortcuts.d.ts +10 -0
- package/dist/components/keyboard-shortcuts.js +91 -0
- package/dist/components/keycap.d.ts +12 -0
- package/dist/components/keycap.js +45 -0
- package/dist/components/layout.d.ts +174 -0
- package/dist/components/layout.js +282 -0
- package/dist/components/lightbox.d.ts +14 -0
- package/dist/components/lightbox.js +117 -0
- package/dist/components/link.d.ts +13 -0
- package/dist/components/link.js +37 -0
- package/dist/components/locale.d.ts +463 -0
- package/dist/components/locale.js +501 -0
- package/dist/components/log-list.d.ts +20 -0
- package/dist/components/log-list.js +92 -0
- package/dist/components/mention-input.d.ts +50 -0
- package/dist/components/mention-input.js +503 -0
- package/dist/components/menu.d.ts +76 -0
- package/dist/components/menu.js +112 -0
- package/dist/components/meter.d.ts +14 -0
- package/dist/components/meter.js +44 -0
- package/dist/components/navigation.d.ts +21 -0
- package/dist/components/navigation.js +75 -0
- package/dist/components/notification-tray.d.ts +47 -0
- package/dist/components/notification-tray.js +218 -0
- package/dist/components/overlays.d.ts +107 -0
- package/dist/components/overlays.js +240 -0
- package/dist/components/page-frame.d.ts +65 -0
- package/dist/components/page-frame.js +94 -0
- package/dist/components/panel.d.ts +24 -0
- package/dist/components/panel.js +107 -0
- package/dist/components/profile-header.d.ts +15 -0
- package/dist/components/profile-header.js +40 -0
- package/dist/components/progress.d.ts +5 -0
- package/dist/components/progress.js +18 -0
- package/dist/components/project-avatar.d.ts +12 -0
- package/dist/components/project-avatar.js +22 -0
- package/dist/components/radio-card.d.ts +22 -0
- package/dist/components/radio-card.js +66 -0
- package/dist/components/recent-items.d.ts +28 -0
- package/dist/components/recent-items.js +63 -0
- package/dist/components/record.d.ts +95 -0
- package/dist/components/record.js +282 -0
- package/dist/components/scroll-area.d.ts +16 -0
- package/dist/components/scroll-area.js +50 -0
- package/dist/components/secret-dialog.d.ts +10 -0
- package/dist/components/secret-dialog.js +12 -0
- package/dist/components/segmented-bar.d.ts +23 -0
- package/dist/components/segmented-bar.js +75 -0
- package/dist/components/select.d.ts +84 -0
- package/dist/components/select.js +374 -0
- package/dist/components/settings.d.ts +34 -0
- package/dist/components/settings.js +56 -0
- package/dist/components/shell-skeleton.d.ts +7 -0
- package/dist/components/shell-skeleton.js +15 -0
- package/dist/components/shell.d.ts +62 -0
- package/dist/components/shell.js +415 -0
- package/dist/components/side-panel.d.ts +36 -0
- package/dist/components/side-panel.js +184 -0
- package/dist/components/sidebar.d.ts +35 -0
- package/dist/components/sidebar.js +207 -0
- package/dist/components/site-banner.d.ts +25 -0
- package/dist/components/site-banner.js +30 -0
- package/dist/components/skeleton.d.ts +15 -0
- package/dist/components/skeleton.js +61 -0
- package/dist/components/skeletons.d.ts +28 -0
- package/dist/components/skeletons.js +60 -0
- package/dist/components/stages.d.ts +97 -0
- package/dist/components/stages.js +365 -0
- package/dist/components/stat-card.d.ts +34 -0
- package/dist/components/stat-card.js +117 -0
- package/dist/components/status-banner.d.ts +17 -0
- package/dist/components/status-banner.js +132 -0
- package/dist/components/status.d.ts +32 -0
- package/dist/components/status.js +93 -0
- package/dist/components/steps.d.ts +17 -0
- package/dist/components/steps.js +51 -0
- package/dist/components/switch.d.ts +6 -0
- package/dist/components/switch.js +39 -0
- package/dist/components/tabs.d.ts +48 -0
- package/dist/components/tabs.js +247 -0
- package/dist/components/theme-customizer.d.ts +53 -0
- package/dist/components/theme-customizer.js +116 -0
- package/dist/components/toast.d.ts +23 -0
- package/dist/components/toast.js +140 -0
- package/dist/components/user-chip.d.ts +66 -0
- package/dist/components/user-chip.js +174 -0
- package/dist/components/wizard.d.ts +33 -0
- package/dist/components/wizard.js +91 -0
- package/dist/feedback/client.d.ts +37 -0
- package/dist/feedback/client.js +125 -0
- package/dist/feedback/comment-types.d.ts +17 -0
- package/dist/feedback/contract.d.ts +252 -0
- package/dist/feedback/contract.js +32 -0
- package/dist/feedback/feedback-cache.d.ts +6 -0
- package/dist/feedback/feedback-cache.js +58 -0
- package/dist/feedback/feedback-center-model.d.ts +8 -0
- package/dist/feedback/feedback-center-model.js +37 -0
- package/dist/feedback/feedback-composer-types.d.ts +11 -0
- package/dist/feedback/feedback-controller.d.ts +56 -0
- package/dist/feedback/feedback-controller.js +181 -0
- package/dist/feedback/feedback-tracking-types.d.ts +14 -0
- package/dist/feedback/generated/index.d.ts +1 -0
- package/dist/feedback/generated/index.js +2 -0
- package/dist/feedback/generated/types.gen.d.ts +737 -0
- package/dist/feedback/generated/types.gen.js +2 -0
- package/dist/feedback/generated/zod.gen.d.ts +738 -0
- package/dist/feedback/generated/zod.gen.js +293 -0
- package/dist/feedback/get-response-error-id.d.ts +1 -0
- package/dist/feedback/get-response-error-id.js +7 -0
- package/dist/feedback/operator-client.d.ts +21 -0
- package/dist/feedback/operator-client.js +96 -0
- package/dist/feedback/operator-contract.d.ts +111 -0
- package/dist/feedback/operator-contract.js +22 -0
- package/dist/feedback/operator-controller.d.ts +80 -0
- package/dist/feedback/operator-controller.js +43 -0
- package/dist/feedback/require-config.d.ts +2 -0
- package/dist/feedback/require-config.js +7 -0
- package/dist/feedback/submit-feedback-with-attachments.d.ts +10 -0
- package/dist/feedback/submit-feedback-with-attachments.js +10 -0
- package/dist/format/compact-number.d.ts +2 -0
- package/dist/format/compact-number.js +8 -0
- package/dist/format/money.d.ts +13 -0
- package/dist/format/money.js +21 -0
- package/dist/format/usd.d.ts +2 -0
- package/dist/format/usd.js +16 -0
- package/dist/preset.d.ts +18 -0
- package/dist/preset.js +470 -0
- package/dist/styled-system/css/conditions.mjs +1 -1
- package/dist/styled-system/css/css.mjs +3 -3
- package/dist/styled-system/patterns/box.d.ts +1 -1
- package/dist/styled-system/patterns/container.d.ts +1 -1
- package/dist/styled-system/patterns/link-overlay.d.ts +1 -1
- package/dist/styled-system/patterns/visually-hidden.d.ts +1 -1
- package/dist/styled-system/styles.css +7834 -458
- package/dist/styled-system/tokens/index.mjs +1465 -677
- package/dist/styled-system/tokens/tokens.d.ts +32 -26
- package/dist/styled-system/types/conditions.d.ts +11 -1
- package/dist/styled-system/types/prop-type.d.ts +12 -23
- package/dist/styled-system/types/style-props.d.ts +25 -24
- package/dist/styles.css +60 -479
- package/dist/theme/breakpoints.d.ts +15 -0
- package/dist/theme/breakpoints.js +12 -0
- package/dist/theme/color.d.ts +2 -0
- package/dist/theme/color.js +27 -0
- package/dist/theme/derive.d.ts +5 -0
- package/dist/theme/derive.js +43 -0
- package/dist/theme/index.d.ts +4 -0
- package/dist/theme/index.js +9 -0
- package/dist/theme/options.d.ts +32 -0
- package/dist/theme/options.js +9 -0
- package/dist/theme/palettes.d.ts +60 -0
- package/dist/theme/palettes.js +185 -0
- package/dist/theme/tokens.d.ts +29 -0
- package/dist/theme/tokens.js +188 -0
- package/package.json +475 -68
- package/dist/assets/ciridae/brand-background-dark.webp +0 -0
- package/dist/assets/ciridae/brand-background-light.webp +0 -0
- package/dist/assets/ciridae/ciridae-black.svg +0 -17
- package/dist/assets/ciridae/ciridae-brand-assets.d.ts +0 -25
- package/dist/assets/ciridae/ciridae-brand-assets.js +0 -25
- package/dist/assets/ciridae/ciridae-icon-black.png +0 -0
- package/dist/assets/ciridae/ciridae-icon-white.png +0 -0
- package/dist/assets/ciridae/ciridae-ui-wordmark-black.png +0 -0
- package/dist/assets/ciridae/ciridae-ui-wordmark-white.png +0 -0
- package/dist/assets/ciridae/ciridae-white.svg +0 -17
- package/dist/assets/ciridae/ciridae-wordmark-black.png +0 -0
- package/dist/assets/ciridae/ciridae-wordmark-white.png +0 -0
- package/dist/assets/ciridae/favicon.ico +0 -0
- package/dist/assets/ciridae/logo-white.png +0 -0
- package/dist/assets/ciridae/sign-in-screenshot.png +0 -0
- package/dist/components/blocks/admin-users-table.d.ts +0 -22
- package/dist/components/blocks/admin-users-table.js +0 -115
- package/dist/components/blocks/comment-composer.d.ts +0 -18
- package/dist/components/blocks/comment-composer.js +0 -137
- package/dist/components/blocks/comment-item.d.ts +0 -8
- package/dist/components/blocks/comment-item.js +0 -45
- package/dist/components/blocks/comment-thread.d.ts +0 -19
- package/dist/components/blocks/comment-thread.js +0 -37
- package/dist/components/blocks/comment-types.d.ts +0 -18
- package/dist/components/blocks/comment-types.js +0 -11
- package/dist/components/blocks/copy-field.d.ts +0 -18
- package/dist/components/blocks/copy-field.js +0 -61
- package/dist/components/blocks/feedback-center-comments.d.ts +0 -16
- package/dist/components/blocks/feedback-center-comments.js +0 -61
- package/dist/components/blocks/feedback-center-footer.d.ts +0 -12
- package/dist/components/blocks/feedback-center-footer.js +0 -10
- package/dist/components/blocks/feedback-center-sheet-parts.d.ts +0 -40
- package/dist/components/blocks/feedback-center-sheet-parts.js +0 -39
- package/dist/components/blocks/feedback-center-sheet.d.ts +0 -28
- package/dist/components/blocks/feedback-center-sheet.js +0 -105
- package/dist/components/blocks/feedback-composer-parts.d.ts +0 -16
- package/dist/components/blocks/feedback-composer-parts.js +0 -43
- package/dist/components/blocks/feedback-composer-types.d.ts +0 -12
- package/dist/components/blocks/feedback-composer.d.ts +0 -23
- package/dist/components/blocks/feedback-composer.js +0 -82
- package/dist/components/blocks/feedback-date-format.d.ts +0 -5
- package/dist/components/blocks/feedback-date-format.js +0 -11
- package/dist/components/blocks/feedback-detail-sheet.d.ts +0 -15
- package/dist/components/blocks/feedback-detail-sheet.js +0 -59
- package/dist/components/blocks/feedback-emergency-fields.d.ts +0 -17
- package/dist/components/blocks/feedback-emergency-fields.js +0 -32
- package/dist/components/blocks/feedback-metrics.d.ts +0 -6
- package/dist/components/blocks/feedback-metrics.js +0 -15
- package/dist/components/blocks/feedback-sheet.d.ts +0 -8
- package/dist/components/blocks/feedback-sheet.js +0 -29
- package/dist/components/blocks/feedback-status-badge.d.ts +0 -6
- package/dist/components/blocks/feedback-status-badge.js +0 -15
- package/dist/components/blocks/feedback-table-row.d.ts +0 -6
- package/dist/components/blocks/feedback-table-row.js +0 -27
- package/dist/components/blocks/feedback-table-sort.d.ts +0 -11
- package/dist/components/blocks/feedback-table-sort.js +0 -82
- package/dist/components/blocks/feedback-table.d.ts +0 -16
- package/dist/components/blocks/feedback-table.js +0 -45
- package/dist/components/blocks/feedback-tracking-types.d.ts +0 -102
- package/dist/components/blocks/feedback-tracking-types.js +0 -54
- package/dist/components/blocks/feedback-triage-timeline.d.ts +0 -11
- package/dist/components/blocks/feedback-triage-timeline.js +0 -17
- package/dist/components/blocks/feedback-type-badge.d.ts +0 -11
- package/dist/components/blocks/feedback-type-badge.js +0 -18
- package/dist/components/blocks/feedback-unread-badge.d.ts +0 -6
- package/dist/components/blocks/feedback-unread-badge.js +0 -9
- package/dist/components/blocks/feedback-user-detail.d.ts +0 -11
- package/dist/components/blocks/feedback-user-detail.js +0 -63
- package/dist/components/blocks/feedback-user-list.d.ts +0 -11
- package/dist/components/blocks/feedback-user-list.js +0 -41
- package/dist/components/blocks/generated-connect-link.d.ts +0 -22
- package/dist/components/blocks/generated-connect-link.js +0 -68
- package/dist/components/blocks/invite-user-sheet.d.ts +0 -20
- package/dist/components/blocks/invite-user-sheet.js +0 -72
- package/dist/components/blocks/kanban-board-parts.d.ts +0 -26
- package/dist/components/blocks/kanban-board-parts.js +0 -83
- package/dist/components/blocks/kanban-board-utils.d.ts +0 -58
- package/dist/components/blocks/kanban-board-utils.js +0 -140
- package/dist/components/blocks/kanban-board.d.ts +0 -16
- package/dist/components/blocks/kanban-board.js +0 -35
- package/dist/components/blocks/kanban-card.d.ts +0 -10
- package/dist/components/blocks/kanban-card.js +0 -34
- package/dist/components/blocks/kanban-column.d.ts +0 -17
- package/dist/components/blocks/kanban-column.js +0 -34
- package/dist/components/blocks/kanban-detail-sheet.d.ts +0 -17
- package/dist/components/blocks/kanban-detail-sheet.js +0 -34
- package/dist/components/blocks/kanban-types.d.ts +0 -24
- package/dist/components/blocks/mcp-access-grouped-tool-picker.d.ts +0 -19
- package/dist/components/blocks/mcp-access-grouped-tool-picker.js +0 -116
- package/dist/components/blocks/mcp-access-tool-picker-internals.d.ts +0 -35
- package/dist/components/blocks/mcp-access-tool-picker-internals.js +0 -24
- package/dist/components/blocks/mcp-access-tool-picker.d.ts +0 -22
- package/dist/components/blocks/mcp-access-tool-picker.js +0 -33
- package/dist/components/blocks/mcp-access-types.d.ts +0 -42
- package/dist/components/blocks/mcp-access-types.js +0 -7
- package/dist/components/blocks/mcp-client-setup.d.ts +0 -29
- package/dist/components/blocks/mcp-client-setup.js +0 -58
- package/dist/components/blocks/mcp-connect-clients.d.ts +0 -43
- package/dist/components/blocks/mcp-connect-clients.js +0 -66
- package/dist/components/blocks/mcp-plan-choice.d.ts +0 -17
- package/dist/components/blocks/mcp-plan-choice.js +0 -28
- package/dist/components/blocks/submit-feedback-composer.d.ts +0 -5
- package/dist/components/blocks/submit-feedback-composer.js +0 -40
- package/dist/components/blocks/timestamp-format.d.ts +0 -14
- package/dist/components/blocks/timestamp-format.js +0 -72
- package/dist/components/blocks/use-feedback-composer-state.d.ts +0 -27
- package/dist/components/blocks/use-feedback-composer-state.js +0 -60
- package/dist/components/blocks/use-reveal-thread-end.d.ts +0 -11
- package/dist/components/blocks/use-reveal-thread-end.js +0 -25
- package/dist/components/pages/admin-users-page.d.ts +0 -11
- package/dist/components/pages/admin-users-page.js +0 -30
- package/dist/components/pages/feedback-stakeholder-page-parts.d.ts +0 -18
- package/dist/components/pages/feedback-stakeholder-page-parts.js +0 -36
- package/dist/components/pages/feedback-stakeholder-page.d.ts +0 -9
- package/dist/components/pages/feedback-stakeholder-page.js +0 -66
- package/dist/components/pages/kanban-page.d.ts +0 -13
- package/dist/components/pages/kanban-page.js +0 -68
- package/dist/components/ui/accordion.d.ts +0 -7
- package/dist/components/ui/accordion.js +0 -17
- package/dist/components/ui/alert-dialog.d.ts +0 -22
- package/dist/components/ui/alert-dialog.js +0 -51
- package/dist/components/ui/alert.d.ts +0 -9
- package/dist/components/ui/alert.js +0 -24
- package/dist/components/ui/app-shell-page.d.ts +0 -22
- package/dist/components/ui/app-shell-page.js +0 -21
- package/dist/components/ui/app-shell.d.ts +0 -45
- package/dist/components/ui/app-shell.js +0 -44
- package/dist/components/ui/aspect-ratio.d.ts +0 -3
- package/dist/components/ui/aspect-ratio.js +0 -7
- package/dist/components/ui/avatar.d.ts +0 -11
- package/dist/components/ui/avatar.js +0 -22
- package/dist/components/ui/badge-variants.d.ts +0 -100
- package/dist/components/ui/badge-variants.js +0 -140
- package/dist/components/ui/badge.d.ts +0 -6
- package/dist/components/ui/badge.js +0 -9
- package/dist/components/ui/breadcrumb.d.ts +0 -11
- package/dist/components/ui/breadcrumb.js +0 -27
- package/dist/components/ui/button-group-variants.d.ts +0 -6
- package/dist/components/ui/button-group-variants.js +0 -13
- package/dist/components/ui/button-group.d.ts +0 -8
- package/dist/components/ui/button-group.js +0 -16
- package/dist/components/ui/button-variants.d.ts +0 -133
- package/dist/components/ui/button-variants.js +0 -170
- package/dist/components/ui/button.d.ts +0 -8
- package/dist/components/ui/button.js +0 -59
- package/dist/components/ui/calendar.d.ts +0 -10
- package/dist/components/ui/calendar.js +0 -99
- package/dist/components/ui/card.d.ts +0 -14
- package/dist/components/ui/card.js +0 -28
- package/dist/components/ui/carousel.d.ts +0 -19
- package/dist/components/ui/carousel.js +0 -104
- package/dist/components/ui/chart-context.d.ts +0 -33
- package/dist/components/ui/chart-context.js +0 -36
- package/dist/components/ui/chart-panel.d.ts +0 -11
- package/dist/components/ui/chart-panel.js +0 -6
- package/dist/components/ui/chart-tooltip.d.ts +0 -13
- package/dist/components/ui/chart-tooltip.js +0 -84
- package/dist/components/ui/chart.d.ts +0 -23
- package/dist/components/ui/chart.js +0 -52
- package/dist/components/ui/checkbox.d.ts +0 -4
- package/dist/components/ui/checkbox.js +0 -9
- package/dist/components/ui/ciridae-ui-provider.d.ts +0 -8
- package/dist/components/ui/ciridae-ui-provider.js +0 -14
- package/dist/components/ui/collapsible.d.ts +0 -5
- package/dist/components/ui/collapsible.js +0 -12
- package/dist/components/ui/color-theme-context.d.ts +0 -28
- package/dist/components/ui/color-theme-context.js +0 -3
- package/dist/components/ui/color-theme.d.ts +0 -5
- package/dist/components/ui/color-theme.js +0 -147
- package/dist/components/ui/combobox-anchor.d.ts +0 -3
- package/dist/components/ui/combobox-anchor.js +0 -5
- package/dist/components/ui/combobox.d.ts +0 -24
- package/dist/components/ui/combobox.js +0 -54
- package/dist/components/ui/command.d.ts +0 -19
- package/dist/components/ui/command.js +0 -38
- package/dist/components/ui/context-menu.d.ts +0 -30
- package/dist/components/ui/context-menu.js +0 -63
- package/dist/components/ui/data-table-column-settings.d.ts +0 -23
- package/dist/components/ui/data-table-column-settings.js +0 -170
- package/dist/components/ui/data-table-context.d.ts +0 -8
- package/dist/components/ui/data-table-context.js +0 -53
- package/dist/components/ui/data-table-controls.d.ts +0 -9
- package/dist/components/ui/data-table-controls.js +0 -30
- package/dist/components/ui/data-table-facet-filter.d.ts +0 -39
- package/dist/components/ui/data-table-facet-filter.js +0 -65
- package/dist/components/ui/data-table-grid.d.ts +0 -10
- package/dist/components/ui/data-table-grid.js +0 -34
- package/dist/components/ui/data-table-pagination.d.ts +0 -17
- package/dist/components/ui/data-table-pagination.js +0 -89
- package/dist/components/ui/data-table-search-input.d.ts +0 -14
- package/dist/components/ui/data-table-search-input.js +0 -15
- package/dist/components/ui/data-table-state.d.ts +0 -19
- package/dist/components/ui/data-table-state.js +0 -8
- package/dist/components/ui/data-table-tanstack.d.ts +0 -99
- package/dist/components/ui/data-table-tanstack.js +0 -128
- package/dist/components/ui/data-table.d.ts +0 -19
- package/dist/components/ui/data-table.js +0 -35
- package/dist/components/ui/dialog.d.ts +0 -23
- package/dist/components/ui/dialog.js +0 -48
- package/dist/components/ui/direction-context.d.ts +0 -3
- package/dist/components/ui/direction-context.js +0 -3
- package/dist/components/ui/direction.d.ts +0 -6
- package/dist/components/ui/direction.js +0 -7
- package/dist/components/ui/drawer.d.ts +0 -18
- package/dist/components/ui/drawer.js +0 -47
- package/dist/components/ui/dropdown-menu.d.ts +0 -30
- package/dist/components/ui/dropdown-menu.js +0 -63
- package/dist/components/ui/empty.d.ts +0 -11
- package/dist/components/ui/empty.js +0 -33
- package/dist/components/ui/expandable-data-table.d.ts +0 -24
- package/dist/components/ui/expandable-data-table.js +0 -62
- package/dist/components/ui/field.d.ts +0 -26
- package/dist/components/ui/field.js +0 -74
- package/dist/components/ui/file-upload-field-parts.d.ts +0 -21
- package/dist/components/ui/file-upload-field-parts.js +0 -55
- package/dist/components/ui/file-upload-field.d.ts +0 -16
- package/dist/components/ui/file-upload-field.js +0 -85
- package/dist/components/ui/form-context.d.ts +0 -23
- package/dist/components/ui/form-context.js +0 -35
- package/dist/components/ui/form-sheet.d.ts +0 -22
- package/dist/components/ui/form-sheet.js +0 -74
- package/dist/components/ui/form.d.ts +0 -12
- package/dist/components/ui/form.js +0 -38
- package/dist/components/ui/hover-card.d.ts +0 -10
- package/dist/components/ui/hover-card.js +0 -22
- package/dist/components/ui/input-group.d.ts +0 -16
- package/dist/components/ui/input-group.js +0 -62
- package/dist/components/ui/input-otp.d.ts +0 -11
- package/dist/components/ui/input-otp.js +0 -21
- package/dist/components/ui/input.d.ts +0 -3
- package/dist/components/ui/input.js +0 -6
- package/dist/components/ui/item.d.ts +0 -24
- package/dist/components/ui/item.js +0 -73
- package/dist/components/ui/kbd.d.ts +0 -3
- package/dist/components/ui/kbd.js +0 -9
- package/dist/components/ui/label.d.ts +0 -4
- package/dist/components/ui/label.js +0 -7
- package/dist/components/ui/loading-state.d.ts +0 -27
- package/dist/components/ui/loading-state.js +0 -44
- package/dist/components/ui/menubar.d.ts +0 -30
- package/dist/components/ui/menubar.js +0 -63
- package/dist/components/ui/metrics-strip.d.ts +0 -7
- package/dist/components/ui/metrics-strip.js +0 -18
- package/dist/components/ui/native-select.d.ts +0 -7
- package/dist/components/ui/native-select.js +0 -13
- package/dist/components/ui/navigation-menu-variants.d.ts +0 -2
- package/dist/components/ui/navigation-menu-variants.js +0 -3
- package/dist/components/ui/navigation-menu.d.ts +0 -13
- package/dist/components/ui/navigation-menu.js +0 -30
- package/dist/components/ui/page-header.d.ts +0 -33
- package/dist/components/ui/page-header.js +0 -54
- package/dist/components/ui/pagination.d.ts +0 -13
- package/dist/components/ui/pagination.js +0 -29
- package/dist/components/ui/popover.d.ts +0 -14
- package/dist/components/ui/popover.js +0 -34
- package/dist/components/ui/progress.d.ts +0 -4
- package/dist/components/ui/progress.js +0 -8
- package/dist/components/ui/property-list.d.ts +0 -6
- package/dist/components/ui/property-list.js +0 -15
- package/dist/components/ui/radio-group.d.ts +0 -5
- package/dist/components/ui/radio-group.js +0 -11
- package/dist/components/ui/registry-docs-api.d.ts +0 -11
- package/dist/components/ui/registry-docs-api.js +0 -9
- package/dist/components/ui/registry-docs-code.d.ts +0 -19
- package/dist/components/ui/registry-docs-code.js +0 -78
- package/dist/components/ui/registry-docs-showcase.d.ts +0 -11
- package/dist/components/ui/registry-docs-showcase.js +0 -27
- package/dist/components/ui/registry-docs.d.ts +0 -27
- package/dist/components/ui/registry-docs.js +0 -32
- package/dist/components/ui/resizable.d.ts +0 -14
- package/dist/components/ui/resizable.js +0 -15
- package/dist/components/ui/scroll-area.d.ts +0 -7
- package/dist/components/ui/scroll-area.js +0 -10
- package/dist/components/ui/select.d.ts +0 -15
- package/dist/components/ui/select.js +0 -38
- package/dist/components/ui/separator.d.ts +0 -4
- package/dist/components/ui/separator.js +0 -7
- package/dist/components/ui/sheet.d.ts +0 -21
- package/dist/components/ui/sheet.js +0 -62
- package/dist/components/ui/sidebar/context.d.ts +0 -27
- package/dist/components/ui/sidebar/context.js +0 -23
- package/dist/components/ui/sidebar/group.d.ts +0 -10
- package/dist/components/ui/sidebar/group.js +0 -18
- package/dist/components/ui/sidebar/layout.d.ts +0 -17
- package/dist/components/ui/sidebar/layout.js +0 -78
- package/dist/components/ui/sidebar/menu.d.ts +0 -30
- package/dist/components/ui/sidebar/menu.js +0 -64
- package/dist/components/ui/sidebar/provider.d.ts +0 -7
- package/dist/components/ui/sidebar/provider.js +0 -53
- package/dist/components/ui/sidebar/rail.d.ts +0 -3
- package/dist/components/ui/sidebar/rail.js +0 -12
- package/dist/components/ui/sidebar/trigger.d.ts +0 -4
- package/dist/components/ui/sidebar/trigger.js +0 -16
- package/dist/components/ui/sidebar-account-menu-theme.d.ts +0 -7
- package/dist/components/ui/sidebar-account-menu-theme.js +0 -32
- package/dist/components/ui/sidebar-account-menu.d.ts +0 -16
- package/dist/components/ui/sidebar-account-menu.js +0 -51
- package/dist/components/ui/sidebar.d.ts +0 -7
- package/dist/components/ui/sidebar.js +0 -7
- package/dist/components/ui/skeleton.d.ts +0 -2
- package/dist/components/ui/skeleton.js +0 -15
- package/dist/components/ui/slider.d.ts +0 -4
- package/dist/components/ui/slider.js +0 -9
- package/dist/components/ui/sonner.d.ts +0 -3
- package/dist/components/ui/sonner.js +0 -33
- package/dist/components/ui/spinner.d.ts +0 -2
- package/dist/components/ui/spinner.js +0 -16
- package/dist/components/ui/switch.d.ts +0 -6
- package/dist/components/ui/switch.js +0 -7
- package/dist/components/ui/table.d.ts +0 -21
- package/dist/components/ui/table.js +0 -34
- package/dist/components/ui/tabs-variants.d.ts +0 -6
- package/dist/components/ui/tabs-variants.js +0 -13
- package/dist/components/ui/tabs.d.ts +0 -8
- package/dist/components/ui/tabs.js +0 -17
- package/dist/components/ui/textarea.d.ts +0 -3
- package/dist/components/ui/textarea.js +0 -6
- package/dist/components/ui/toggle-group.d.ts +0 -9
- package/dist/components/ui/toggle-group.js +0 -24
- package/dist/components/ui/toggle-variants.d.ts +0 -7
- package/dist/components/ui/toggle-variants.js +0 -19
- package/dist/components/ui/toggle.d.ts +0 -5
- package/dist/components/ui/toggle.js +0 -9
- package/dist/components/ui/tooltip.d.ts +0 -14
- package/dist/components/ui/tooltip.js +0 -25
- package/dist/components/ui/use-color-theme.d.ts +0 -2
- package/dist/components/ui/use-color-theme.js +0 -10
- package/dist/components/ui/workflow-timeline.d.ts +0 -20
- package/dist/components/ui/workflow-timeline.js +0 -92
- package/dist/components/walkthrough/presentation/WalkthroughCoach.d.ts +0 -14
- package/dist/components/walkthrough/presentation/WalkthroughCoach.js +0 -32
- package/dist/components/walkthrough/presentation/WalkthroughHighlight.d.ts +0 -5
- package/dist/components/walkthrough/presentation/WalkthroughHighlight.js +0 -9
- package/dist/components/walkthrough/presentation/WalkthroughOverlay.d.ts +0 -1
- package/dist/components/walkthrough/presentation/WalkthroughOverlay.js +0 -70
- package/dist/components/walkthrough/presentation/positionWalkthroughCoach.d.ts +0 -11
- package/dist/components/walkthrough/presentation/positionWalkthroughCoach.js +0 -24
- package/dist/components/walkthrough/presentation/useWalkthroughCoachPosition.d.ts +0 -4
- package/dist/components/walkthrough/presentation/useWalkthroughCoachPosition.js +0 -17
- package/dist/components/walkthrough/runtime/WalkthroughContextDefinition.d.ts +0 -20
- package/dist/components/walkthrough/runtime/WalkthroughContextDefinition.js +0 -2
- package/dist/components/walkthrough/runtime/WalkthroughProvider.d.ts +0 -12
- package/dist/components/walkthrough/runtime/WalkthroughProvider.js +0 -190
- package/dist/components/walkthrough/runtime/useWalkthrough.d.ts +0 -1
- package/dist/components/walkthrough/runtime/useWalkthrough.js +0 -8
- package/dist/components/walkthrough/runtime/walkthroughEvents.d.ts +0 -3
- package/dist/components/walkthrough/runtime/walkthroughEvents.js +0 -55
- package/dist/components/walkthrough/runtime/walkthroughLocation.d.ts +0 -2
- package/dist/components/walkthrough/runtime/walkthroughLocation.js +0 -27
- package/dist/components/walkthrough/runtime/walkthroughStorage.d.ts +0 -3
- package/dist/components/walkthrough/runtime/walkthroughStorage.js +0 -54
- package/dist/components/walkthrough/runtime/walkthroughTypes.d.ts +0 -32
- package/dist/components/walkthrough/targeting/listenForOutsideWalkthroughInteraction.d.ts +0 -2
- package/dist/components/walkthrough/targeting/listenForOutsideWalkthroughInteraction.js +0 -19
- package/dist/components/walkthrough/targeting/useWalkthroughTargetRect.d.ts +0 -15
- package/dist/components/walkthrough/targeting/useWalkthroughTargetRect.js +0 -54
- package/dist/components/walkthrough/targeting/walkthroughTarget.d.ts +0 -6
- package/dist/components/walkthrough/targeting/walkthroughTarget.js +0 -24
- package/dist/components/walkthrough.d.ts +0 -4
- package/dist/components/walkthrough.js +0 -2
- package/dist/entries/accordion.d.ts +0 -1
- package/dist/entries/accordion.js +0 -1
- package/dist/entries/admin-users-page.d.ts +0 -1
- package/dist/entries/admin-users-page.js +0 -1
- package/dist/entries/admin-users-table.d.ts +0 -1
- package/dist/entries/admin-users-table.js +0 -1
- package/dist/entries/alert-dialog.d.ts +0 -1
- package/dist/entries/alert-dialog.js +0 -1
- package/dist/entries/alert.d.ts +0 -1
- package/dist/entries/alert.js +0 -1
- package/dist/entries/app-shell-page.d.ts +0 -1
- package/dist/entries/app-shell-page.js +0 -1
- package/dist/entries/app-shell.d.ts +0 -1
- package/dist/entries/app-shell.js +0 -1
- package/dist/entries/aspect-ratio.d.ts +0 -1
- package/dist/entries/aspect-ratio.js +0 -1
- package/dist/entries/avatar.d.ts +0 -1
- package/dist/entries/avatar.js +0 -1
- package/dist/entries/badge-variants.d.ts +0 -1
- package/dist/entries/badge-variants.js +0 -1
- package/dist/entries/badge.d.ts +0 -1
- package/dist/entries/badge.js +0 -1
- package/dist/entries/breadcrumb.d.ts +0 -1
- package/dist/entries/breadcrumb.js +0 -1
- package/dist/entries/button-group-variants.d.ts +0 -1
- package/dist/entries/button-group-variants.js +0 -1
- package/dist/entries/button-group.d.ts +0 -1
- package/dist/entries/button-group.js +0 -1
- package/dist/entries/button-variants.d.ts +0 -1
- package/dist/entries/button-variants.js +0 -1
- package/dist/entries/button.d.ts +0 -1
- package/dist/entries/button.js +0 -1
- package/dist/entries/calendar.d.ts +0 -1
- package/dist/entries/calendar.js +0 -1
- package/dist/entries/card.d.ts +0 -1
- package/dist/entries/card.js +0 -1
- package/dist/entries/carousel.d.ts +0 -1
- package/dist/entries/carousel.js +0 -1
- package/dist/entries/chart-context.d.ts +0 -1
- package/dist/entries/chart-context.js +0 -1
- package/dist/entries/chart-panel.d.ts +0 -1
- package/dist/entries/chart-panel.js +0 -1
- package/dist/entries/chart-tooltip.d.ts +0 -1
- package/dist/entries/chart-tooltip.js +0 -1
- package/dist/entries/chart.d.ts +0 -1
- package/dist/entries/chart.js +0 -1
- package/dist/entries/checkbox.d.ts +0 -1
- package/dist/entries/checkbox.js +0 -1
- package/dist/entries/ciridae-brand-assets.d.ts +0 -1
- package/dist/entries/ciridae-brand-assets.js +0 -1
- package/dist/entries/ciridae-ui-provider.d.ts +0 -1
- package/dist/entries/ciridae-ui-provider.js +0 -1
- package/dist/entries/collapsible.d.ts +0 -1
- package/dist/entries/collapsible.js +0 -1
- package/dist/entries/color-theme-context.d.ts +0 -1
- package/dist/entries/color-theme-context.js +0 -1
- package/dist/entries/color-theme.d.ts +0 -1
- package/dist/entries/color-theme.js +0 -1
- package/dist/entries/combobox-anchor.d.ts +0 -1
- package/dist/entries/combobox-anchor.js +0 -1
- package/dist/entries/combobox.d.ts +0 -1
- package/dist/entries/combobox.js +0 -1
- package/dist/entries/command.d.ts +0 -1
- package/dist/entries/command.js +0 -1
- package/dist/entries/comment-composer.d.ts +0 -1
- package/dist/entries/comment-composer.js +0 -1
- package/dist/entries/comment-item.d.ts +0 -1
- package/dist/entries/comment-item.js +0 -1
- package/dist/entries/comment-thread.d.ts +0 -1
- package/dist/entries/comment-thread.js +0 -1
- package/dist/entries/comment-types.d.ts +0 -1
- package/dist/entries/comment-types.js +0 -1
- package/dist/entries/context-menu.d.ts +0 -1
- package/dist/entries/context-menu.js +0 -1
- package/dist/entries/copy-field.d.ts +0 -1
- package/dist/entries/copy-field.js +0 -1
- package/dist/entries/data-table-column-settings.d.ts +0 -1
- package/dist/entries/data-table-column-settings.js +0 -1
- package/dist/entries/data-table-context.d.ts +0 -1
- package/dist/entries/data-table-context.js +0 -1
- package/dist/entries/data-table-controls.d.ts +0 -1
- package/dist/entries/data-table-controls.js +0 -1
- package/dist/entries/data-table-facet-filter.d.ts +0 -1
- package/dist/entries/data-table-facet-filter.js +0 -1
- package/dist/entries/data-table-grid.d.ts +0 -1
- package/dist/entries/data-table-grid.js +0 -1
- package/dist/entries/data-table-pagination.d.ts +0 -1
- package/dist/entries/data-table-pagination.js +0 -1
- package/dist/entries/data-table-search-input.d.ts +0 -1
- package/dist/entries/data-table-search-input.js +0 -1
- package/dist/entries/data-table-state.d.ts +0 -1
- package/dist/entries/data-table-state.js +0 -1
- package/dist/entries/data-table-tanstack.d.ts +0 -1
- package/dist/entries/data-table-tanstack.js +0 -1
- package/dist/entries/data-table.d.ts +0 -1
- package/dist/entries/data-table.js +0 -1
- package/dist/entries/dialog.d.ts +0 -1
- package/dist/entries/dialog.js +0 -1
- package/dist/entries/direction-context.d.ts +0 -1
- package/dist/entries/direction-context.js +0 -1
- package/dist/entries/direction.d.ts +0 -1
- package/dist/entries/direction.js +0 -1
- package/dist/entries/drawer.d.ts +0 -1
- package/dist/entries/drawer.js +0 -1
- package/dist/entries/dropdown-menu.d.ts +0 -1
- package/dist/entries/dropdown-menu.js +0 -1
- package/dist/entries/empty.d.ts +0 -1
- package/dist/entries/empty.js +0 -1
- package/dist/entries/expandable-data-table.d.ts +0 -1
- package/dist/entries/expandable-data-table.js +0 -1
- package/dist/entries/feedback-center-comments.d.ts +0 -1
- package/dist/entries/feedback-center-comments.js +0 -1
- package/dist/entries/feedback-center-footer.d.ts +0 -1
- package/dist/entries/feedback-center-footer.js +0 -1
- package/dist/entries/feedback-center-sheet-parts.d.ts +0 -1
- package/dist/entries/feedback-center-sheet-parts.js +0 -1
- package/dist/entries/feedback-center-sheet.d.ts +0 -1
- package/dist/entries/feedback-center-sheet.js +0 -1
- package/dist/entries/feedback-composer-parts.d.ts +0 -1
- package/dist/entries/feedback-composer-parts.js +0 -1
- package/dist/entries/feedback-composer-types.d.ts +0 -1
- package/dist/entries/feedback-composer-types.js +0 -1
- package/dist/entries/feedback-composer.d.ts +0 -1
- package/dist/entries/feedback-composer.js +0 -1
- package/dist/entries/feedback-date-format.d.ts +0 -1
- package/dist/entries/feedback-date-format.js +0 -1
- package/dist/entries/feedback-detail-sheet.d.ts +0 -1
- package/dist/entries/feedback-detail-sheet.js +0 -1
- package/dist/entries/feedback-emergency-fields.d.ts +0 -1
- package/dist/entries/feedback-emergency-fields.js +0 -1
- package/dist/entries/feedback-metrics.d.ts +0 -1
- package/dist/entries/feedback-metrics.js +0 -1
- package/dist/entries/feedback-sheet.d.ts +0 -1
- package/dist/entries/feedback-sheet.js +0 -1
- package/dist/entries/feedback-stakeholder-page-parts.d.ts +0 -1
- package/dist/entries/feedback-stakeholder-page-parts.js +0 -1
- package/dist/entries/feedback-stakeholder-page.d.ts +0 -1
- package/dist/entries/feedback-stakeholder-page.js +0 -1
- package/dist/entries/feedback-status-badge.d.ts +0 -1
- package/dist/entries/feedback-status-badge.js +0 -1
- package/dist/entries/feedback-table-row.d.ts +0 -1
- package/dist/entries/feedback-table-row.js +0 -1
- package/dist/entries/feedback-table-sort.d.ts +0 -1
- package/dist/entries/feedback-table-sort.js +0 -1
- package/dist/entries/feedback-table.d.ts +0 -1
- package/dist/entries/feedback-table.js +0 -1
- package/dist/entries/feedback-tracking-types.d.ts +0 -1
- package/dist/entries/feedback-tracking-types.js +0 -1
- package/dist/entries/feedback-triage-timeline.d.ts +0 -1
- package/dist/entries/feedback-triage-timeline.js +0 -1
- package/dist/entries/feedback-type-badge.d.ts +0 -1
- package/dist/entries/feedback-type-badge.js +0 -1
- package/dist/entries/feedback-unread-badge.d.ts +0 -1
- package/dist/entries/feedback-unread-badge.js +0 -1
- package/dist/entries/feedback-user-detail.d.ts +0 -1
- package/dist/entries/feedback-user-detail.js +0 -1
- package/dist/entries/feedback-user-list.d.ts +0 -1
- package/dist/entries/feedback-user-list.js +0 -1
- package/dist/entries/field.d.ts +0 -1
- package/dist/entries/field.js +0 -1
- package/dist/entries/file-upload-field-parts.d.ts +0 -1
- package/dist/entries/file-upload-field-parts.js +0 -1
- package/dist/entries/file-upload-field.d.ts +0 -1
- package/dist/entries/file-upload-field.js +0 -1
- package/dist/entries/form-context.d.ts +0 -1
- package/dist/entries/form-context.js +0 -1
- package/dist/entries/form-sheet.d.ts +0 -1
- package/dist/entries/form-sheet.js +0 -1
- package/dist/entries/form.d.ts +0 -1
- package/dist/entries/form.js +0 -1
- package/dist/entries/generated-connect-link.d.ts +0 -1
- package/dist/entries/generated-connect-link.js +0 -1
- package/dist/entries/hover-card.d.ts +0 -1
- package/dist/entries/hover-card.js +0 -1
- package/dist/entries/input-group.d.ts +0 -1
- package/dist/entries/input-group.js +0 -1
- package/dist/entries/input-otp.d.ts +0 -1
- package/dist/entries/input-otp.js +0 -1
- package/dist/entries/input.d.ts +0 -1
- package/dist/entries/input.js +0 -1
- package/dist/entries/invite-user-sheet.d.ts +0 -1
- package/dist/entries/invite-user-sheet.js +0 -1
- package/dist/entries/item.d.ts +0 -1
- package/dist/entries/item.js +0 -1
- package/dist/entries/kanban-board-parts.d.ts +0 -1
- package/dist/entries/kanban-board-parts.js +0 -1
- package/dist/entries/kanban-board-utils.d.ts +0 -1
- package/dist/entries/kanban-board-utils.js +0 -1
- package/dist/entries/kanban-board.d.ts +0 -1
- package/dist/entries/kanban-board.js +0 -1
- package/dist/entries/kanban-card.d.ts +0 -1
- package/dist/entries/kanban-card.js +0 -1
- package/dist/entries/kanban-column.d.ts +0 -1
- package/dist/entries/kanban-column.js +0 -1
- package/dist/entries/kanban-detail-sheet.d.ts +0 -1
- package/dist/entries/kanban-detail-sheet.js +0 -1
- package/dist/entries/kanban-page.d.ts +0 -1
- package/dist/entries/kanban-page.js +0 -1
- package/dist/entries/kanban-types.d.ts +0 -1
- package/dist/entries/kanban-types.js +0 -1
- package/dist/entries/kbd.d.ts +0 -1
- package/dist/entries/kbd.js +0 -1
- package/dist/entries/label.d.ts +0 -1
- package/dist/entries/label.js +0 -1
- package/dist/entries/loading-state.d.ts +0 -1
- package/dist/entries/loading-state.js +0 -1
- package/dist/entries/mcp-access-grouped-tool-picker.d.ts +0 -1
- package/dist/entries/mcp-access-grouped-tool-picker.js +0 -1
- package/dist/entries/mcp-access-tool-picker.d.ts +0 -1
- package/dist/entries/mcp-access-tool-picker.js +0 -1
- package/dist/entries/mcp-access-types.d.ts +0 -1
- package/dist/entries/mcp-access-types.js +0 -1
- package/dist/entries/mcp-client-setup.d.ts +0 -1
- package/dist/entries/mcp-client-setup.js +0 -1
- package/dist/entries/mcp-connect-clients.d.ts +0 -1
- package/dist/entries/mcp-connect-clients.js +0 -1
- package/dist/entries/mcp-plan-choice.d.ts +0 -1
- package/dist/entries/mcp-plan-choice.js +0 -1
- package/dist/entries/menubar.d.ts +0 -1
- package/dist/entries/menubar.js +0 -1
- package/dist/entries/metrics-strip.d.ts +0 -1
- package/dist/entries/metrics-strip.js +0 -1
- package/dist/entries/native-select.d.ts +0 -1
- package/dist/entries/native-select.js +0 -1
- package/dist/entries/navigation-menu-variants.d.ts +0 -1
- package/dist/entries/navigation-menu-variants.js +0 -1
- package/dist/entries/navigation-menu.d.ts +0 -1
- package/dist/entries/navigation-menu.js +0 -1
- package/dist/entries/page-header.d.ts +0 -1
- package/dist/entries/page-header.js +0 -1
- package/dist/entries/pagination.d.ts +0 -1
- package/dist/entries/pagination.js +0 -1
- package/dist/entries/palette.d.ts +0 -2
- package/dist/entries/palette.js +0 -2
- package/dist/entries/popover.d.ts +0 -1
- package/dist/entries/popover.js +0 -1
- package/dist/entries/progress.d.ts +0 -1
- package/dist/entries/progress.js +0 -1
- package/dist/entries/property-list.d.ts +0 -1
- package/dist/entries/property-list.js +0 -1
- package/dist/entries/radio-group.d.ts +0 -1
- package/dist/entries/radio-group.js +0 -1
- package/dist/entries/registry-docs-api.d.ts +0 -1
- package/dist/entries/registry-docs-api.js +0 -1
- package/dist/entries/registry-docs-code.d.ts +0 -1
- package/dist/entries/registry-docs-code.js +0 -1
- package/dist/entries/registry-docs-showcase.d.ts +0 -1
- package/dist/entries/registry-docs-showcase.js +0 -1
- package/dist/entries/registry-docs.d.ts +0 -1
- package/dist/entries/registry-docs.js +0 -1
- package/dist/entries/resizable.d.ts +0 -1
- package/dist/entries/resizable.js +0 -1
- package/dist/entries/scroll-area.d.ts +0 -1
- package/dist/entries/scroll-area.js +0 -1
- package/dist/entries/select.d.ts +0 -1
- package/dist/entries/select.js +0 -1
- package/dist/entries/separator.d.ts +0 -1
- package/dist/entries/separator.js +0 -1
- package/dist/entries/sheet.d.ts +0 -1
- package/dist/entries/sheet.js +0 -1
- package/dist/entries/sidebar/context.d.ts +0 -1
- package/dist/entries/sidebar/context.js +0 -1
- package/dist/entries/sidebar/group.d.ts +0 -1
- package/dist/entries/sidebar/group.js +0 -1
- package/dist/entries/sidebar/layout.d.ts +0 -1
- package/dist/entries/sidebar/layout.js +0 -1
- package/dist/entries/sidebar/menu.d.ts +0 -1
- package/dist/entries/sidebar/menu.js +0 -1
- package/dist/entries/sidebar/provider.d.ts +0 -1
- package/dist/entries/sidebar/provider.js +0 -1
- package/dist/entries/sidebar/rail.d.ts +0 -1
- package/dist/entries/sidebar/rail.js +0 -1
- package/dist/entries/sidebar/trigger.d.ts +0 -1
- package/dist/entries/sidebar/trigger.js +0 -1
- package/dist/entries/sidebar-account-menu-theme.d.ts +0 -1
- package/dist/entries/sidebar-account-menu-theme.js +0 -1
- package/dist/entries/sidebar-account-menu.d.ts +0 -1
- package/dist/entries/sidebar-account-menu.js +0 -1
- package/dist/entries/sidebar.d.ts +0 -1
- package/dist/entries/sidebar.js +0 -1
- package/dist/entries/skeleton.d.ts +0 -1
- package/dist/entries/skeleton.js +0 -1
- package/dist/entries/slider.d.ts +0 -1
- package/dist/entries/slider.js +0 -1
- package/dist/entries/sonner.d.ts +0 -1
- package/dist/entries/sonner.js +0 -1
- package/dist/entries/spinner.d.ts +0 -1
- package/dist/entries/spinner.js +0 -1
- package/dist/entries/submit-feedback-composer.d.ts +0 -1
- package/dist/entries/submit-feedback-composer.js +0 -1
- package/dist/entries/switch.d.ts +0 -1
- package/dist/entries/switch.js +0 -1
- package/dist/entries/table.d.ts +0 -1
- package/dist/entries/table.js +0 -1
- package/dist/entries/tabs-variants.d.ts +0 -1
- package/dist/entries/tabs-variants.js +0 -1
- package/dist/entries/tabs.d.ts +0 -1
- package/dist/entries/tabs.js +0 -1
- package/dist/entries/textarea.d.ts +0 -1
- package/dist/entries/textarea.js +0 -1
- package/dist/entries/timestamp-format.d.ts +0 -1
- package/dist/entries/timestamp-format.js +0 -1
- package/dist/entries/toggle-group.d.ts +0 -1
- package/dist/entries/toggle-group.js +0 -1
- package/dist/entries/toggle-variants.d.ts +0 -1
- package/dist/entries/toggle-variants.js +0 -1
- package/dist/entries/toggle.d.ts +0 -1
- package/dist/entries/toggle.js +0 -1
- package/dist/entries/tooltip.d.ts +0 -1
- package/dist/entries/tooltip.js +0 -1
- package/dist/entries/use-color-theme.d.ts +0 -1
- package/dist/entries/use-color-theme.js +0 -1
- package/dist/entries/use-feedback-composer-state.d.ts +0 -1
- package/dist/entries/use-feedback-composer-state.js +0 -1
- package/dist/entries/use-mobile.d.ts +0 -1
- package/dist/entries/use-mobile.js +0 -1
- package/dist/entries/utils.d.ts +0 -1
- package/dist/entries/utils.js +0 -1
- package/dist/entries/walkthrough.d.ts +0 -1
- package/dist/entries/walkthrough.js +0 -1
- package/dist/entries/workflow-timeline.d.ts +0 -1
- package/dist/entries/workflow-timeline.js +0 -1
- package/dist/hooks/use-mobile.d.ts +0 -1
- package/dist/hooks/use-mobile.js +0 -17
- package/dist/lib/browser-storage.d.ts +0 -12
- package/dist/lib/browser-storage.js +0 -42
- package/dist/lib/palette-presets.d.ts +0 -17
- package/dist/lib/palette-presets.js +0 -42
- package/dist/lib/palette-tokens.d.ts +0 -39
- package/dist/lib/palette-tokens.js +0 -133
- package/dist/lib/palette.d.ts +0 -83
- package/dist/lib/palette.js +0 -151
- package/dist/lib/utils.d.ts +0 -5
- package/dist/lib/utils.js +0 -8
- package/dist/style-imports.d.ts +0 -3
- /package/dist/{components/blocks/feedback-composer-types.js → feedback/comment-types.js} +0 -0
- /package/dist/{components/blocks/kanban-types.js → feedback/feedback-composer-types.js} +0 -0
- /package/dist/{components/walkthrough/runtime/walkthroughTypes.js → feedback/feedback-tracking-types.js} +0 -0
|
@@ -0,0 +1,566 @@
|
|
|
1
|
+
import { ChatApiError } from "./chat-api-error.js";
|
|
2
|
+
import { AnswerQuestionRequestSchema, ApprovalSchema, AttachmentSchema, ConversationSchema, CreatedItemSchema, ItemSchema, parseMentions, ResponseSchema, } from "./contract.js";
|
|
3
|
+
const defaultStepDelayMs = 900;
|
|
4
|
+
const defaultToolDurationMs = 1600;
|
|
5
|
+
const defaultNetworkDelayMs = 120;
|
|
6
|
+
const defaultFirstItemsReadDelayMs = 1500;
|
|
7
|
+
const defaultUploadDelayMs = 700;
|
|
8
|
+
/** How long a new response waits in the queue before the agent starts it. */
|
|
9
|
+
const queuedDelayMs = 400;
|
|
10
|
+
const conversationPageSize = 20;
|
|
11
|
+
const seededStepSpacingMs = 4000;
|
|
12
|
+
let mockClientCount = 0;
|
|
13
|
+
/**
|
|
14
|
+
* An in-memory chat service with a scripted agent, for the showcase and for tests. Seeded turns
|
|
15
|
+
* exist from the start; `liveSteps` and new messages play out on timers, so polling sees the
|
|
16
|
+
* same progression a real service would produce.
|
|
17
|
+
*/
|
|
18
|
+
export function createMockChatClient({ conversations: conversationSeeds = [], respond = respondWithDefaultScript, respondToSteering = respondToSteeringWithDefaultScript, stepDelayMs = defaultStepDelayMs, networkDelayMs = defaultNetworkDelayMs, firstItemsReadDelayMs = defaultFirstItemsReadDelayMs, uploadDelayMs = defaultUploadDelayMs, cacheKey = `mock-${++mockClientCount}`, } = {}) {
|
|
19
|
+
let nextIdentifier = 1;
|
|
20
|
+
const conversations = new Map();
|
|
21
|
+
const runs = new Map();
|
|
22
|
+
const responses = new Map();
|
|
23
|
+
const uploadedAttachments = new Map();
|
|
24
|
+
const conversationIdsWithItemsRead = new Set();
|
|
25
|
+
for (const seed of conversationSeeds)
|
|
26
|
+
seedConversation(seed);
|
|
27
|
+
function createIdentifier(prefix) {
|
|
28
|
+
return `${prefix}_${nextIdentifier++}`;
|
|
29
|
+
}
|
|
30
|
+
function seedConversation(seed) {
|
|
31
|
+
const updatedAt = new Date(Date.now() - (seed.updatedMinutesAgo ?? 0) * 60000);
|
|
32
|
+
const conversation = createConversationRecord({
|
|
33
|
+
id: seed.id,
|
|
34
|
+
agent: seed.agent,
|
|
35
|
+
title: seed.title,
|
|
36
|
+
createdAt: new Date(updatedAt.getTime() - seed.turns.length * 10 * seededStepSpacingMs),
|
|
37
|
+
});
|
|
38
|
+
conversation.updatedAt = updatedAt;
|
|
39
|
+
seed.turns.forEach((turn, index) => {
|
|
40
|
+
const isLastTurn = index === seed.turns.length - 1;
|
|
41
|
+
const startedAt = new Date(turn.startedSecondsAgo === undefined
|
|
42
|
+
? updatedAt.getTime() - (seed.turns.length - index) * 10 * seededStepSpacingMs
|
|
43
|
+
: Date.now() - turn.startedSecondsAgo * 1000);
|
|
44
|
+
const response = createResponseRecord(conversation, startedAt);
|
|
45
|
+
let timestamp = startedAt.getTime();
|
|
46
|
+
const nextTimestamp = () => new Date((timestamp += seededStepSpacingMs));
|
|
47
|
+
appendItem(conversation, response.id, startedAt, {
|
|
48
|
+
type: "message",
|
|
49
|
+
role: "user",
|
|
50
|
+
content: turn.message,
|
|
51
|
+
attachments: (turn.attachments ?? []).map((attachment) => ({
|
|
52
|
+
id: createIdentifier("file"),
|
|
53
|
+
name: attachment.name,
|
|
54
|
+
media_type: attachment.media_type,
|
|
55
|
+
size_bytes: attachment.size_bytes,
|
|
56
|
+
url: attachment.url ?? null,
|
|
57
|
+
})),
|
|
58
|
+
});
|
|
59
|
+
let failure = null;
|
|
60
|
+
for (const step of turn.steps) {
|
|
61
|
+
failure = appendPlayedStep(conversation, response.id, step, nextTimestamp);
|
|
62
|
+
if (failure)
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
markUserMessagesRead(conversation);
|
|
66
|
+
if (isLastTurn && turn.liveSteps) {
|
|
67
|
+
startRun(conversation, response, [...turn.liveSteps]);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
settleResponse(response, failure ? "failed" : turn.cancelled ? "cancelled" : "completed", failure, nextTimestamp());
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function createConversationRecord({ id, agent = "assistant", title, createdAt, }) {
|
|
74
|
+
const conversation = {
|
|
75
|
+
id: ConversationSchema.shape.id.parse(id ?? createIdentifier("conv")),
|
|
76
|
+
agent,
|
|
77
|
+
title,
|
|
78
|
+
createdAt,
|
|
79
|
+
updatedAt: createdAt,
|
|
80
|
+
items: [],
|
|
81
|
+
nextSeq: 1,
|
|
82
|
+
latestResponseId: null,
|
|
83
|
+
};
|
|
84
|
+
conversations.set(conversation.id, conversation);
|
|
85
|
+
return conversation;
|
|
86
|
+
}
|
|
87
|
+
function createResponseRecord(conversation, createdAt, status = "in_progress") {
|
|
88
|
+
const response = ResponseSchema.parse({
|
|
89
|
+
id: createIdentifier("resp"),
|
|
90
|
+
conversation_id: conversation.id,
|
|
91
|
+
status,
|
|
92
|
+
output_item_ids: [],
|
|
93
|
+
usage: null,
|
|
94
|
+
error: null,
|
|
95
|
+
created_at: createdAt.toISOString(),
|
|
96
|
+
completed_at: null,
|
|
97
|
+
});
|
|
98
|
+
responses.set(response.id, response);
|
|
99
|
+
conversation.latestResponseId = response.id;
|
|
100
|
+
return response;
|
|
101
|
+
}
|
|
102
|
+
function appendItem(conversation, responseId, createdAt, fields) {
|
|
103
|
+
const item = ItemSchema.parse({
|
|
104
|
+
...fields,
|
|
105
|
+
id: createIdentifier("item"),
|
|
106
|
+
conversation_id: conversation.id,
|
|
107
|
+
seq: conversation.nextSeq++,
|
|
108
|
+
response_id: responseId,
|
|
109
|
+
created_at: createdAt.toISOString(),
|
|
110
|
+
});
|
|
111
|
+
conversation.items.push(item);
|
|
112
|
+
conversation.updatedAt = createdAt;
|
|
113
|
+
const response = responses.get(responseId);
|
|
114
|
+
if (response && !(item.type === "message" && item.role === "user")) {
|
|
115
|
+
response.output_item_ids.push(item.id);
|
|
116
|
+
}
|
|
117
|
+
return item;
|
|
118
|
+
}
|
|
119
|
+
/** Appends a step that already happened; returns the failure when the step ends the turn. */
|
|
120
|
+
function appendPlayedStep(conversation, responseId, step, nextTimestamp) {
|
|
121
|
+
switch (step.type) {
|
|
122
|
+
case "reasoning":
|
|
123
|
+
appendItem(conversation, responseId, nextTimestamp(), {
|
|
124
|
+
type: "reasoning",
|
|
125
|
+
content: step.content,
|
|
126
|
+
});
|
|
127
|
+
return null;
|
|
128
|
+
case "message":
|
|
129
|
+
appendItem(conversation, responseId, nextTimestamp(), {
|
|
130
|
+
type: "message",
|
|
131
|
+
role: "assistant",
|
|
132
|
+
content: step.content,
|
|
133
|
+
attachments: [],
|
|
134
|
+
});
|
|
135
|
+
return null;
|
|
136
|
+
case "user_message":
|
|
137
|
+
appendItem(conversation, responseId, nextTimestamp(), {
|
|
138
|
+
type: "message",
|
|
139
|
+
role: "user",
|
|
140
|
+
content: step.content,
|
|
141
|
+
attachments: [],
|
|
142
|
+
});
|
|
143
|
+
return null;
|
|
144
|
+
case "tool_call": {
|
|
145
|
+
const callId = createIdentifier("call");
|
|
146
|
+
appendItem(conversation, responseId, nextTimestamp(), {
|
|
147
|
+
type: "function_call",
|
|
148
|
+
call_id: callId,
|
|
149
|
+
name: step.name,
|
|
150
|
+
arguments: JSON.stringify(step.arguments),
|
|
151
|
+
});
|
|
152
|
+
appendItem(conversation, responseId, nextTimestamp(), {
|
|
153
|
+
type: "function_call_output",
|
|
154
|
+
call_id: callId,
|
|
155
|
+
status: step.status ?? "completed",
|
|
156
|
+
output: JSON.stringify(step.output),
|
|
157
|
+
});
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
case "approval":
|
|
161
|
+
appendItem(conversation, responseId, nextTimestamp(), {
|
|
162
|
+
type: "approval_request",
|
|
163
|
+
approval_id: createIdentifier("appr"),
|
|
164
|
+
tool: step.tool,
|
|
165
|
+
arguments: JSON.stringify(step.arguments),
|
|
166
|
+
decision: step.decision ?? "allow",
|
|
167
|
+
});
|
|
168
|
+
return null;
|
|
169
|
+
case "question":
|
|
170
|
+
appendItem(conversation, responseId, nextTimestamp(), {
|
|
171
|
+
type: "question",
|
|
172
|
+
question_id: createIdentifier("que"),
|
|
173
|
+
questions: [...step.questions],
|
|
174
|
+
answers: step.answers ?? step.questions.map((question) => [question.options[0]?.label ?? ""]),
|
|
175
|
+
});
|
|
176
|
+
return null;
|
|
177
|
+
case "fail":
|
|
178
|
+
return { code: step.code, message: step.message };
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
function settleResponse(response, status, failure, completedAt) {
|
|
182
|
+
response.status = status;
|
|
183
|
+
response.error = failure;
|
|
184
|
+
response.completed_at = completedAt.toISOString();
|
|
185
|
+
response.usage = {
|
|
186
|
+
input_tokens: 1800 + response.output_item_ids.length * 420,
|
|
187
|
+
output_tokens: 240,
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
function startRun(conversation, response, queue) {
|
|
191
|
+
const run = {
|
|
192
|
+
conversation,
|
|
193
|
+
response,
|
|
194
|
+
queue,
|
|
195
|
+
stop: new AbortController(),
|
|
196
|
+
decideApproval: null,
|
|
197
|
+
answerQuestion: null,
|
|
198
|
+
};
|
|
199
|
+
runs.set(response.id, run);
|
|
200
|
+
void playRun(run).finally(() => runs.delete(response.id));
|
|
201
|
+
}
|
|
202
|
+
async function playRun(run) {
|
|
203
|
+
const { conversation, response, stop } = run;
|
|
204
|
+
if (response.status === "queued") {
|
|
205
|
+
if (!(await wait(queuedDelayMs, stop.signal)))
|
|
206
|
+
return;
|
|
207
|
+
response.status = "in_progress";
|
|
208
|
+
}
|
|
209
|
+
while (run.queue.length > 0) {
|
|
210
|
+
const step = run.queue.shift();
|
|
211
|
+
if (!step)
|
|
212
|
+
break;
|
|
213
|
+
if (!(await wait(step.delayMs ?? stepDelayMs, stop.signal)))
|
|
214
|
+
return;
|
|
215
|
+
// Each step starts by reading what the user sent since the last one.
|
|
216
|
+
markUserMessagesRead(conversation, new Date());
|
|
217
|
+
switch (step.type) {
|
|
218
|
+
case "reasoning":
|
|
219
|
+
case "message":
|
|
220
|
+
case "user_message":
|
|
221
|
+
appendPlayedStep(conversation, response.id, step, () => new Date());
|
|
222
|
+
break;
|
|
223
|
+
case "tool_call": {
|
|
224
|
+
const callId = createIdentifier("call");
|
|
225
|
+
appendItem(conversation, response.id, new Date(), {
|
|
226
|
+
type: "function_call",
|
|
227
|
+
call_id: callId,
|
|
228
|
+
name: step.name,
|
|
229
|
+
arguments: JSON.stringify(step.arguments),
|
|
230
|
+
});
|
|
231
|
+
if (!(await wait(step.durationMs ?? defaultToolDurationMs, stop.signal)))
|
|
232
|
+
return;
|
|
233
|
+
appendItem(conversation, response.id, new Date(), {
|
|
234
|
+
type: "function_call_output",
|
|
235
|
+
call_id: callId,
|
|
236
|
+
status: step.status ?? "completed",
|
|
237
|
+
output: JSON.stringify(step.output),
|
|
238
|
+
});
|
|
239
|
+
break;
|
|
240
|
+
}
|
|
241
|
+
case "approval": {
|
|
242
|
+
appendItem(conversation, response.id, new Date(), {
|
|
243
|
+
type: "approval_request",
|
|
244
|
+
approval_id: createIdentifier("appr"),
|
|
245
|
+
tool: step.tool,
|
|
246
|
+
arguments: JSON.stringify(step.arguments),
|
|
247
|
+
decision: null,
|
|
248
|
+
});
|
|
249
|
+
response.status = "requires_action";
|
|
250
|
+
const decision = await new Promise((resolve) => {
|
|
251
|
+
run.decideApproval = resolve;
|
|
252
|
+
stop.signal.addEventListener("abort", () => resolve(null), { once: true });
|
|
253
|
+
});
|
|
254
|
+
run.decideApproval = null;
|
|
255
|
+
if (decision === null)
|
|
256
|
+
return;
|
|
257
|
+
response.status = "in_progress";
|
|
258
|
+
// A denied tool ends the scripted plan: the agent only reports that it did not run.
|
|
259
|
+
if (decision === "deny") {
|
|
260
|
+
run.queue = [
|
|
261
|
+
{ type: "message", content: `Did not run \`${step.tool}\`.`, delayMs: 400 },
|
|
262
|
+
];
|
|
263
|
+
}
|
|
264
|
+
break;
|
|
265
|
+
}
|
|
266
|
+
case "question": {
|
|
267
|
+
appendItem(conversation, response.id, new Date(), {
|
|
268
|
+
type: "question",
|
|
269
|
+
question_id: createIdentifier("que"),
|
|
270
|
+
questions: [...step.questions],
|
|
271
|
+
answers: null,
|
|
272
|
+
});
|
|
273
|
+
response.status = "requires_action";
|
|
274
|
+
const answers = await new Promise((resolve) => {
|
|
275
|
+
run.answerQuestion = resolve;
|
|
276
|
+
stop.signal.addEventListener("abort", () => resolve(null), { once: true });
|
|
277
|
+
});
|
|
278
|
+
run.answerQuestion = null;
|
|
279
|
+
if (answers === null)
|
|
280
|
+
return;
|
|
281
|
+
response.status = "in_progress";
|
|
282
|
+
run.queue.unshift(...(step.reply?.(answers) ?? []));
|
|
283
|
+
break;
|
|
284
|
+
}
|
|
285
|
+
case "fail":
|
|
286
|
+
settleResponse(response, "failed", { code: step.code, message: step.message }, new Date());
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
settleResponse(response, "completed", null, new Date());
|
|
291
|
+
}
|
|
292
|
+
function findUploadedAttachment(attachmentId) {
|
|
293
|
+
const attachment = uploadedAttachments.get(attachmentId);
|
|
294
|
+
if (!attachment) {
|
|
295
|
+
throw new ChatApiError({
|
|
296
|
+
method: "POST",
|
|
297
|
+
path: "/v1/conversations/items",
|
|
298
|
+
status: 400,
|
|
299
|
+
responseBody: `Unknown attachment ${attachmentId}`,
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
return attachment;
|
|
303
|
+
}
|
|
304
|
+
function findConversation(conversationId) {
|
|
305
|
+
const conversation = conversations.get(conversationId);
|
|
306
|
+
if (!conversation)
|
|
307
|
+
throw notFound("GET", `/v1/conversations/${conversationId}`);
|
|
308
|
+
return conversation;
|
|
309
|
+
}
|
|
310
|
+
function findResponse(responseId) {
|
|
311
|
+
const response = responses.get(responseId);
|
|
312
|
+
if (!response)
|
|
313
|
+
throw notFound("GET", `/v1/responses/${responseId}`);
|
|
314
|
+
return response;
|
|
315
|
+
}
|
|
316
|
+
function toConversation(conversation) {
|
|
317
|
+
const latestResponse = conversation.latestResponseId
|
|
318
|
+
? responses.get(conversation.latestResponseId)
|
|
319
|
+
: undefined;
|
|
320
|
+
return ConversationSchema.parse({
|
|
321
|
+
id: conversation.id,
|
|
322
|
+
agent: conversation.agent,
|
|
323
|
+
title: conversation.title,
|
|
324
|
+
preview: summarizeLatestMessage(conversation.items),
|
|
325
|
+
metadata: {},
|
|
326
|
+
latest_response: latestResponse ?? null,
|
|
327
|
+
created_at: conversation.createdAt.toISOString(),
|
|
328
|
+
updated_at: conversation.updatedAt.toISOString(),
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
const settle = () => wait(networkDelayMs, new AbortController().signal);
|
|
332
|
+
return {
|
|
333
|
+
cacheKey,
|
|
334
|
+
async createConversation({ agent } = {}) {
|
|
335
|
+
await settle();
|
|
336
|
+
const conversation = createConversationRecord({ agent, title: null, createdAt: new Date() });
|
|
337
|
+
conversationIdsWithItemsRead.add(conversation.id);
|
|
338
|
+
return toConversation(conversation);
|
|
339
|
+
},
|
|
340
|
+
async listConversations({ cursor } = {}) {
|
|
341
|
+
await settle();
|
|
342
|
+
const offset = cursor ? Number(cursor) : 0;
|
|
343
|
+
const ordered = [...conversations.values()].sort((first, second) => second.updatedAt.getTime() - first.updatedAt.getTime());
|
|
344
|
+
const page = ordered.slice(offset, offset + conversationPageSize);
|
|
345
|
+
const nextOffset = offset + conversationPageSize;
|
|
346
|
+
return {
|
|
347
|
+
data: page.map(toConversation),
|
|
348
|
+
next_cursor: nextOffset < ordered.length ? String(nextOffset) : null,
|
|
349
|
+
};
|
|
350
|
+
},
|
|
351
|
+
async getConversation(conversationId) {
|
|
352
|
+
await settle();
|
|
353
|
+
return toConversation(findConversation(conversationId));
|
|
354
|
+
},
|
|
355
|
+
async deleteConversation(conversationId) {
|
|
356
|
+
await settle();
|
|
357
|
+
const conversation = findConversation(conversationId);
|
|
358
|
+
if (conversation.latestResponseId)
|
|
359
|
+
runs.get(conversation.latestResponseId)?.stop.abort();
|
|
360
|
+
conversations.delete(conversationId);
|
|
361
|
+
},
|
|
362
|
+
async uploadAttachment(file) {
|
|
363
|
+
await wait(uploadDelayMs, new AbortController().signal);
|
|
364
|
+
const attachment = AttachmentSchema.parse({
|
|
365
|
+
id: createIdentifier("file"),
|
|
366
|
+
name: file.name,
|
|
367
|
+
media_type: file.type || "application/octet-stream",
|
|
368
|
+
size_bytes: file.size,
|
|
369
|
+
url: URL.createObjectURL(file),
|
|
370
|
+
});
|
|
371
|
+
uploadedAttachments.set(attachment.id, attachment);
|
|
372
|
+
return attachment;
|
|
373
|
+
},
|
|
374
|
+
getAttachmentUrl: ({ url }) => url,
|
|
375
|
+
async createItem(conversationId, { content, attachment_ids = [] }) {
|
|
376
|
+
await settle();
|
|
377
|
+
const conversation = findConversation(conversationId);
|
|
378
|
+
const attachments = attachment_ids.map(findUploadedAttachment);
|
|
379
|
+
const activeRun = conversation.latestResponseId
|
|
380
|
+
? runs.get(conversation.latestResponseId)
|
|
381
|
+
: undefined;
|
|
382
|
+
const response = activeRun?.response ?? createResponseRecord(conversation, new Date(), "queued");
|
|
383
|
+
const userMessage = appendItem(conversation, response.id, new Date(), {
|
|
384
|
+
type: "message",
|
|
385
|
+
role: "user",
|
|
386
|
+
content,
|
|
387
|
+
attachments,
|
|
388
|
+
});
|
|
389
|
+
conversation.title ?? (conversation.title = summarizeAsTitle(content));
|
|
390
|
+
if (activeRun) {
|
|
391
|
+
activeRun.queue.unshift(...respondToSteering({ content }));
|
|
392
|
+
}
|
|
393
|
+
else {
|
|
394
|
+
startRun(conversation, response, [
|
|
395
|
+
...respond({
|
|
396
|
+
content,
|
|
397
|
+
attachments: userMessage.type === "message" ? userMessage.attachments : [],
|
|
398
|
+
}),
|
|
399
|
+
]);
|
|
400
|
+
}
|
|
401
|
+
return CreatedItemSchema.parse({ response_id: response.id });
|
|
402
|
+
},
|
|
403
|
+
async listItems(conversationId, { after } = {}) {
|
|
404
|
+
const delayMs = conversationIdsWithItemsRead.has(conversationId)
|
|
405
|
+
? networkDelayMs
|
|
406
|
+
: firstItemsReadDelayMs;
|
|
407
|
+
await wait(delayMs, new AbortController().signal);
|
|
408
|
+
conversationIdsWithItemsRead.add(conversationId);
|
|
409
|
+
const conversation = findConversation(conversationId);
|
|
410
|
+
return {
|
|
411
|
+
data: conversation.items
|
|
412
|
+
.filter((item) => after === undefined || item.seq > after)
|
|
413
|
+
.map((item) => ItemSchema.parse(item)),
|
|
414
|
+
has_more: false,
|
|
415
|
+
};
|
|
416
|
+
},
|
|
417
|
+
async getResponse(responseId) {
|
|
418
|
+
await settle();
|
|
419
|
+
return ResponseSchema.parse(findResponse(responseId));
|
|
420
|
+
},
|
|
421
|
+
async cancelResponse(responseId) {
|
|
422
|
+
await settle();
|
|
423
|
+
const response = findResponse(responseId);
|
|
424
|
+
const run = runs.get(responseId);
|
|
425
|
+
if (run) {
|
|
426
|
+
run.stop.abort();
|
|
427
|
+
settleResponse(response, "cancelled", null, new Date());
|
|
428
|
+
}
|
|
429
|
+
return ResponseSchema.parse(response);
|
|
430
|
+
},
|
|
431
|
+
async decideApproval(responseId, approvalId, decision) {
|
|
432
|
+
await settle();
|
|
433
|
+
const response = findResponse(responseId);
|
|
434
|
+
const conversation = findConversation(response.conversation_id);
|
|
435
|
+
const request = conversation.items.find((item) => item.type === "approval_request" && item.approval_id === approvalId);
|
|
436
|
+
if (request?.type !== "approval_request") {
|
|
437
|
+
throw notFound("POST", `/v1/responses/${responseId}/approvals/${approvalId}`);
|
|
438
|
+
}
|
|
439
|
+
request.decision = decision;
|
|
440
|
+
runs.get(responseId)?.decideApproval?.(decision);
|
|
441
|
+
return ApprovalSchema.parse({
|
|
442
|
+
id: approvalId,
|
|
443
|
+
response_id: responseId,
|
|
444
|
+
item_id: request.id,
|
|
445
|
+
tool: request.tool,
|
|
446
|
+
arguments: request.arguments,
|
|
447
|
+
decision,
|
|
448
|
+
decided_by: "mock-user",
|
|
449
|
+
decided_at: new Date().toISOString(),
|
|
450
|
+
});
|
|
451
|
+
},
|
|
452
|
+
async answerQuestion(conversationId, questionId, answers) {
|
|
453
|
+
await settle();
|
|
454
|
+
const path = `/v1/conversations/${conversationId}/questions/${questionId}/answer`;
|
|
455
|
+
const request = AnswerQuestionRequestSchema.parse({ answers });
|
|
456
|
+
const question = findConversation(conversationId).items.find((item) => item.type === "question" && item.question_id === questionId);
|
|
457
|
+
if (question?.type !== "question")
|
|
458
|
+
throw notFound("POST", path);
|
|
459
|
+
if (question.answers !== null) {
|
|
460
|
+
throw new ChatApiError({
|
|
461
|
+
method: "POST",
|
|
462
|
+
path,
|
|
463
|
+
status: 409,
|
|
464
|
+
responseBody: "Already answered",
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
question.answers = request.answers;
|
|
468
|
+
runs.get(question.response_id)?.answerQuestion?.(request.answers);
|
|
469
|
+
},
|
|
470
|
+
};
|
|
471
|
+
}
|
|
472
|
+
/** Resolves true after `durationMs`, or false as soon as `signal` aborts. */
|
|
473
|
+
function wait(durationMs, signal) {
|
|
474
|
+
if (signal.aborted)
|
|
475
|
+
return Promise.resolve(false);
|
|
476
|
+
return new Promise((resolve) => {
|
|
477
|
+
const timer = setTimeout(() => resolve(true), durationMs);
|
|
478
|
+
signal.addEventListener("abort", () => {
|
|
479
|
+
clearTimeout(timer);
|
|
480
|
+
resolve(false);
|
|
481
|
+
}, { once: true });
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
function notFound(method, path) {
|
|
485
|
+
return new ChatApiError({ method, path, status: 404, responseBody: "Not found" });
|
|
486
|
+
}
|
|
487
|
+
/** Marks the conversation's unread user messages read: at `readAt`, or a second after each was sent. */
|
|
488
|
+
function markUserMessagesRead(conversation, readAt) {
|
|
489
|
+
for (const item of conversation.items) {
|
|
490
|
+
if (item.type !== "message" || item.role !== "user" || item.read_at)
|
|
491
|
+
continue;
|
|
492
|
+
item.read_at = (readAt ?? new Date(Date.parse(item.created_at) + 1000)).toISOString();
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
const previewLength = 160;
|
|
496
|
+
/** The latest message as one plain line, as the service previews it in the conversation list. */
|
|
497
|
+
function summarizeLatestMessage(items) {
|
|
498
|
+
const messages = items.flatMap((item) => (item.type === "message" ? [item] : []));
|
|
499
|
+
const latestMessage = messages[messages.length - 1];
|
|
500
|
+
if (!latestMessage)
|
|
501
|
+
return null;
|
|
502
|
+
const line = toPlainText(latestMessage.content)
|
|
503
|
+
.replace(/[*`#|]/g, "")
|
|
504
|
+
.replace(/\s+/g, " ")
|
|
505
|
+
.trim();
|
|
506
|
+
return line.length > previewLength ? `${line.slice(0, previewLength - 3)}...` : line;
|
|
507
|
+
}
|
|
508
|
+
function summarizeAsTitle(content) {
|
|
509
|
+
const words = toPlainText(content).trim().split(/\s+/).slice(0, 7).join(" ");
|
|
510
|
+
return words.length > 48 ? `${words.slice(0, 47)}...` : words;
|
|
511
|
+
}
|
|
512
|
+
/** Message text with each mention as its `@label`, as the service writes previews and titles. */
|
|
513
|
+
function toPlainText(content) {
|
|
514
|
+
return parseMentions(content)
|
|
515
|
+
.map((part) => (typeof part === "string" ? part : `@${part.label}`))
|
|
516
|
+
.join("");
|
|
517
|
+
}
|
|
518
|
+
function respondWithDefaultScript({ content }) {
|
|
519
|
+
const query = toPlainText(content);
|
|
520
|
+
if (/approv/i.test(content)) {
|
|
521
|
+
return [
|
|
522
|
+
{ type: "reasoning", content: "This changes data, so it needs approval before it runs." },
|
|
523
|
+
{
|
|
524
|
+
type: "approval",
|
|
525
|
+
tool: "update_invoice_status",
|
|
526
|
+
arguments: { invoice_id: "INV-2041", status: "paid" },
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
type: "tool_call",
|
|
530
|
+
name: "update_invoice_status",
|
|
531
|
+
arguments: { invoice_id: "INV-2041", status: "paid" },
|
|
532
|
+
output: { invoice_id: "INV-2041", status: "paid" },
|
|
533
|
+
},
|
|
534
|
+
{ type: "message", content: "Marked **INV-2041** as paid." },
|
|
535
|
+
];
|
|
536
|
+
}
|
|
537
|
+
if (/fail/i.test(content)) {
|
|
538
|
+
return [
|
|
539
|
+
{ type: "reasoning", content: "Checking the ledger export." },
|
|
540
|
+
{
|
|
541
|
+
type: "tool_call",
|
|
542
|
+
name: "export_ledger",
|
|
543
|
+
arguments: { period: "2026-09" },
|
|
544
|
+
output: { error: "Ledger service timed out after 30s" },
|
|
545
|
+
status: "failed",
|
|
546
|
+
},
|
|
547
|
+
{ type: "fail", code: "tool_error", message: "The ledger service timed out." },
|
|
548
|
+
];
|
|
549
|
+
}
|
|
550
|
+
return [
|
|
551
|
+
{ type: "reasoning", content: `Looking for records related to "${query}".` },
|
|
552
|
+
{
|
|
553
|
+
type: "tool_call",
|
|
554
|
+
name: "search_records",
|
|
555
|
+
arguments: { query, limit: 5 },
|
|
556
|
+
output: { results: [{ id: "REC-118", title: "Quarterly vendor review" }] },
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
type: "message",
|
|
560
|
+
content: `Found one match for **${content}**:\n\n- REC-118, Quarterly vendor review`,
|
|
561
|
+
},
|
|
562
|
+
];
|
|
563
|
+
}
|
|
564
|
+
function respondToSteeringWithDefaultScript({ content }) {
|
|
565
|
+
return [{ type: "message", content: `Noted. Adjusting for: ${content}`, delayMs: 600 }];
|
|
566
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type ApprovalDecision, type ApprovalRequestItem, type Attachment, type Conversation, type ConversationId, type Item, type QuestionItem, type Response } from "./contract.js";
|
|
2
|
+
import type { ChatClient } from "./chat-client.js";
|
|
3
|
+
/** A message the user sent that the conversation's items do not include yet. */
|
|
4
|
+
export type PendingMessage = {
|
|
5
|
+
type: "pending_message";
|
|
6
|
+
localId: string;
|
|
7
|
+
conversationId: ConversationId | null;
|
|
8
|
+
content: string;
|
|
9
|
+
/** Already uploaded; the message references them by id. */
|
|
10
|
+
attachments: readonly Attachment[];
|
|
11
|
+
/** When the user sent it, as epoch milliseconds, so it groups with the messages around it. */
|
|
12
|
+
sentAt: number;
|
|
13
|
+
/** `posted` once the service accepted it, until the conversation's items include it. */
|
|
14
|
+
state: "sending" | "posted" | "failed";
|
|
15
|
+
};
|
|
16
|
+
export type ChatConversationState = {
|
|
17
|
+
conversation: Conversation | undefined;
|
|
18
|
+
items: readonly Item[];
|
|
19
|
+
pendingMessages: readonly PendingMessage[];
|
|
20
|
+
/** The response the conversation is running, or the one that ran last. */
|
|
21
|
+
response: Response | null;
|
|
22
|
+
isResponseActive: boolean;
|
|
23
|
+
isLoading: boolean;
|
|
24
|
+
loadError: Error | null;
|
|
25
|
+
/** Sends a message. While a response runs, the message joins it instead of starting another. */
|
|
26
|
+
sendMessage: (content: string, attachments: readonly Attachment[]) => Promise<void>;
|
|
27
|
+
cancelResponse: () => Promise<void>;
|
|
28
|
+
decideApproval: (request: ApprovalRequestItem, decision: ApprovalDecision) => Promise<void>;
|
|
29
|
+
/** Answers a waiting question with one list of picked labels or typed text per question. */
|
|
30
|
+
answerQuestion: (question: QuestionItem, answers: string[][]) => Promise<void>;
|
|
31
|
+
discardPendingMessage: (localId: string) => void;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Loads a conversation and keeps it current: while its response is active, the response and the
|
|
35
|
+
* items after the newest one already loaded are polled about once a second, and polling stops
|
|
36
|
+
* once the response settles. With no `conversationId`, the first message creates a conversation
|
|
37
|
+
* and reports it through `onConversationCreated`.
|
|
38
|
+
*/
|
|
39
|
+
export declare function useChatConversation({ client, conversationId, onConversationCreated, }: {
|
|
40
|
+
client: ChatClient;
|
|
41
|
+
conversationId: ConversationId | null;
|
|
42
|
+
onConversationCreated: (conversation: Conversation) => void;
|
|
43
|
+
}): ChatConversationState;
|