@declarion/react 0.142.0 → 0.146.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.
- package/dist-lib/{Icons-Dzl-AkD_.d.ts → Icons-BdXCxyw3.d.ts} +0 -4
- package/dist-lib/api/access-expiry.js +1 -2
- package/dist-lib/api/agents.js +1 -2
- package/dist-lib/api/audience.js +1 -2
- package/dist-lib/api/auth-redirect.js +1 -2
- package/dist-lib/api/auth.js +1 -2
- package/dist-lib/api/batch.js +1 -2
- package/dist-lib/api/client.js +27 -28
- package/dist-lib/api/data.js +23 -24
- package/dist-lib/api/entities.js +36 -37
- package/dist-lib/api/events.js +6 -7
- package/dist-lib/api/fileReferences.js +1 -2
- package/dist-lib/api/params.js +1 -2
- package/dist-lib/api/properties.js +1 -2
- package/dist-lib/api/request-bounds.js +1 -2
- package/dist-lib/api/schema.js +5 -6
- package/dist-lib/api/session-renewal.js +6 -7
- package/dist-lib/api/status.js +1 -2
- package/dist-lib/app.js +154 -155
- package/dist-lib/components/actions/ActionButton.js +32 -33
- package/dist-lib/components/actions/ActionDialog.js +85 -86
- package/dist-lib/components/actions/ActionResultDialog.impl.js +48 -49
- package/dist-lib/components/actions/ActionResultDialog.js +1 -2
- package/dist-lib/components/actions/ActionRunner.js +96 -97
- package/dist-lib/components/actions/ObjectActionBar.js +49 -50
- package/dist-lib/components/actions/PropertyGridEditor.js +50 -51
- package/dist-lib/components/actions/ResponsiveActionBar.js +127 -128
- package/dist-lib/components/actions/RowActionsKebab.js +27 -28
- package/dist-lib/components/agents/AgentChatPanel.impl.js +317 -318
- package/dist-lib/components/agents/AgentChatPanel.js +1 -2
- package/dist-lib/components/agents/AgentConversationDrawer.js +6 -7
- package/dist-lib/components/agents/AgentElicitForm.js +13 -14
- package/dist-lib/components/agents/AgentOpenFollower.impl.js +1 -2
- package/dist-lib/components/agents/AgentOpenFollower.js +1 -2
- package/dist-lib/components/agents/AgentPicker.js +1 -2
- package/dist-lib/components/agents/ChatAttachments.js +22 -23
- package/dist-lib/components/agents/transcript-runs.js +1 -2
- package/dist-lib/components/chrome/AssociationTabs.js +44 -45
- package/dist-lib/components/chrome/AuditMetaStrip.js +1 -2
- package/dist-lib/components/chrome/Breadcrumbs.js +1 -2
- package/dist-lib/components/chrome/HighlightsStrip.js +1 -2
- package/dist-lib/components/chrome/PageHeader.js +12 -13
- package/dist-lib/components/chrome/PageShell.js +1 -2
- package/dist-lib/components/chrome/RecordHeader.js +1 -2
- package/dist-lib/components/chrome/headerActionZone.js +0 -1
- package/dist-lib/components/detail-layout/AssociatedBlock.js +463 -464
- package/dist-lib/components/detail-layout/AssociatedToolbar.js +43 -44
- package/dist-lib/components/detail-layout/ChildrenBlock.js +24 -25
- package/dist-lib/components/detail-layout/ChildrenCards.js +29 -30
- package/dist-lib/components/detail-layout/ChildrenList.js +23 -24
- package/dist-lib/components/detail-layout/ChildrenTable.js +50 -51
- package/dist-lib/components/detail-layout/ChildrenTimeline.js +164 -165
- package/dist-lib/components/detail-layout/DetailAuditStrip.js +14 -15
- package/dist-lib/components/detail-layout/DetailHighlights.js +23 -24
- package/dist-lib/components/detail-layout/DraggableChildrenTable.js +76 -77
- package/dist-lib/components/detail-layout/EditableChildrenTable.js +90 -91
- package/dist-lib/components/detail-layout/ErrorSummary.js +7 -8
- package/dist-lib/components/detail-layout/EvidenceBlock.js +15 -16
- package/dist-lib/components/detail-layout/FieldRow.js +11 -12
- package/dist-lib/components/detail-layout/FieldsBlock.js +31 -32
- package/dist-lib/components/detail-layout/LayoutColumn.js +1 -2
- package/dist-lib/components/detail-layout/LayoutRenderer.js +11 -12
- package/dist-lib/components/detail-layout/LayoutRow.js +1 -2
- package/dist-lib/components/detail-layout/LayoutTabs.js +23 -24
- package/dist-lib/components/detail-layout/PropertiesBlock.js +38 -39
- package/dist-lib/components/detail-layout/QuickAddForm.js +28 -29
- package/dist-lib/components/detail-layout/SectionBlock.js +9 -10
- package/dist-lib/components/detail-layout/StatusesBlock.js +1 -2
- package/dist-lib/components/detail-layout/TimelineComposer.js +19 -20
- package/dist-lib/components/detail-layout/blockMeta.js +1 -2
- package/dist-lib/components/detail-layout/useManualColumnResize.js +1 -2
- package/dist-lib/components/detail-layout/useQuickAdd.js +21 -22
- package/dist-lib/components/detail-layout/visibility.js +1 -2
- package/dist-lib/components/detail-layout/widgets/EntityScorecardWidget.js +25 -26
- package/dist-lib/components/detail-layout/widgets/JsonDiffWidget.js +18 -19
- package/dist-lib/components/detail-layout/widgets/MonacoJson.js +1 -2
- package/dist-lib/components/detail-layout/widgets/WidgetHost.js +10 -11
- package/dist-lib/components/detail-layout/widgets/builtins.js +1 -2
- package/dist-lib/components/detail-layout/widgets/canonicalizeJson.js +1 -2
- package/dist-lib/components/detail-layout/widgets/monacoBootstrap.js +1 -2
- package/dist-lib/components/detail-layout/widgets/registry.js +1 -2
- package/dist-lib/components/fields/BoolField.js +1 -2
- package/dist-lib/components/fields/EmailField.js +5 -6
- package/dist-lib/components/fields/EnumField.js +7 -8
- package/dist-lib/components/fields/FileReferenceField.js +18 -19
- package/dist-lib/components/fields/IntArrayField.js +11 -12
- package/dist-lib/components/fields/JsonEditor.js +1 -2
- package/dist-lib/components/fields/JsonField.js +1 -2
- package/dist-lib/components/fields/MultilangArrayField.js +22 -23
- package/dist-lib/components/fields/MultilangField.js +13 -14
- package/dist-lib/components/fields/MultilangTextField.js +13 -14
- package/dist-lib/components/fields/NumberField.js +5 -6
- package/dist-lib/components/fields/PasswordField.js +1 -2
- package/dist-lib/components/fields/PhoneField.js +24 -25
- package/dist-lib/components/fields/RefCombobox.js +42 -43
- package/dist-lib/components/fields/RefField.js +14 -15
- package/dist-lib/components/fields/RichTextField.js +29 -30
- package/dist-lib/components/fields/SecretField.js +1 -2
- package/dist-lib/components/fields/StringArrayField.js +29 -30
- package/dist-lib/components/fields/StringField.js +12 -13
- package/dist-lib/components/fields/StructureField.js +60 -61
- package/dist-lib/components/fields/TextField.js +18 -19
- package/dist-lib/components/fields/TimestampField.js +17 -18
- package/dist-lib/components/fields/UrlField.js +5 -6
- package/dist-lib/components/fields/cells/factories/badge.js +5 -6
- package/dist-lib/components/fields/cells/factories/boolPill.js +1 -2
- package/dist-lib/components/fields/cells/factories/code.js +1 -2
- package/dist-lib/components/fields/cells/factories/date.js +1 -2
- package/dist-lib/components/fields/cells/factories/email.js +1 -2
- package/dist-lib/components/fields/cells/factories/emptyCell.js +0 -1
- package/dist-lib/components/fields/cells/factories/fileReference.js +1 -2
- package/dist-lib/components/fields/cells/factories/host-icons.js +1 -2
- package/dist-lib/components/fields/cells/factories/json.js +1 -2
- package/dist-lib/components/fields/cells/factories/link.js +10 -11
- package/dist-lib/components/fields/cells/factories/markdown.js +14 -15
- package/dist-lib/components/fields/cells/factories/markdownPreview.js +1 -2
- package/dist-lib/components/fields/cells/factories/money.js +1 -2
- package/dist-lib/components/fields/cells/factories/multilangInline.js +1 -2
- package/dist-lib/components/fields/cells/factories/nextRun.js +8 -9
- package/dist-lib/components/fields/cells/factories/number.js +1 -2
- package/dist-lib/components/fields/cells/factories/passwordMask.js +1 -2
- package/dist-lib/components/fields/cells/factories/phone.js +1 -2
- package/dist-lib/components/fields/cells/factories/refLink.js +13 -14
- package/dist-lib/components/fields/cells/factories/richTextPreview.js +16 -17
- package/dist-lib/components/fields/cells/factories/statusPill.js +5 -6
- package/dist-lib/components/fields/cells/factories/tagList.js +6 -7
- package/dist-lib/components/fields/cells/factories/text.js +1 -2
- package/dist-lib/components/fields/cells/factories/timestamp.js +1 -2
- package/dist-lib/components/fields/cells/factories/url-helpers.js +1 -2
- package/dist-lib/components/fields/cells/factories/url.js +13 -14
- package/dist-lib/components/fields/cells/registry.js +1 -2
- package/dist-lib/components/fields/index.js +19 -20
- package/dist-lib/components/fields/langMap.js +1 -2
- package/dist-lib/components/fields/secretValue.js +1 -2
- package/dist-lib/components/file-widgets/CircleImage.js +1 -2
- package/dist-lib/components/file-widgets/DocumentCard.js +101 -102
- package/dist-lib/components/file-widgets/FileList.js +35 -36
- package/dist-lib/components/file-widgets/Grid.js +119 -120
- package/dist-lib/components/file-widgets/GridLazy.js +1 -2
- package/dist-lib/components/file-widgets/ImageWidget.js +189 -190
- package/dist-lib/components/file-widgets/LabeledSlots.js +14 -15
- package/dist-lib/components/file-widgets/SquareImage.js +1 -2
- package/dist-lib/components/file-widgets/UnknownFileWidget.js +1 -2
- package/dist-lib/components/file-widgets/UploadFailureText.js +1 -2
- package/dist-lib/components/file-widgets/WideBanner.js +1 -2
- package/dist-lib/components/file-widgets/builtins.js +1 -2
- package/dist-lib/components/file-widgets/cropper.js +1 -2
- package/dist-lib/components/file-widgets/draft-scope.js +1 -2
- package/dist-lib/components/file-widgets/helpers.js +1 -2
- package/dist-lib/components/file-widgets/host.js +33 -34
- package/dist-lib/components/file-widgets/payload.js +1 -2
- package/dist-lib/components/file-widgets/registry.js +1 -2
- package/dist-lib/components/file-widgets/upload.js +41 -42
- package/dist-lib/components/file-widgets/useEmbedFileSrc.js +12 -13
- package/dist-lib/components/file-widgets/useFileSelection.js +1 -2
- package/dist-lib/components/file-widgets/value.js +1 -2
- package/dist-lib/components/filters/FilterChips.js +15 -16
- package/dist-lib/components/filters/FilterConditionValue.js +15 -16
- package/dist-lib/components/filters/FilterDrawer.js +141 -142
- package/dist-lib/components/filters/FilterOmittedNotice.js +1 -2
- package/dist-lib/components/filters/filter-op-label.js +1 -2
- package/dist-lib/components/layout/CommandPalette.impl.js +24 -25
- package/dist-lib/components/layout/CommandPalette.js +1 -2
- package/dist-lib/components/layout/DirtyTabsCloseDialog.impl.js +15 -16
- package/dist-lib/components/layout/DirtyTabsCloseDialog.js +1 -2
- package/dist-lib/components/layout/ImpersonationBanner.impl.js +6 -7
- package/dist-lib/components/layout/ImpersonationBanner.js +1 -2
- package/dist-lib/components/layout/ImpersonationFrame.js +4 -5
- package/dist-lib/components/layout/ImpersonationStartModal.impl.js +4 -5
- package/dist-lib/components/layout/ImpersonationStartModal.js +1 -2
- package/dist-lib/components/layout/Layout.js +132 -140
- package/dist-lib/components/layout/Rail.js +11 -12
- package/dist-lib/components/layout/Sidebar.js +60 -61
- package/dist-lib/components/layout/TabStrip.js +66 -67
- package/dist-lib/components/layout/TenantChip.js +21 -22
- package/dist-lib/components/layout/TopBar.js +89 -90
- package/dist-lib/components/layout/tab-close.js +1 -2
- package/dist-lib/components/list/ColumnPicker.js +35 -36
- package/dist-lib/components/list/InlineEditCell.js +22 -23
- package/dist-lib/components/list/PeekFieldCell.js +7 -8
- package/dist-lib/components/list/QuickPeek.js +29 -30
- package/dist-lib/components/list/ViewSwitcher.js +44 -45
- package/dist-lib/components/list/peekDraftStore.js +1 -2
- package/dist-lib/components/pages/AdminCatalogPage.impl.js +59 -60
- package/dist-lib/components/pages/AdminCatalogPage.js +1 -2
- package/dist-lib/components/pages/DocumentsMenu.js +53 -54
- package/dist-lib/components/pages/ExportMenu.js +37 -38
- package/dist-lib/components/pages/NoScreensPage.impl.js +5 -6
- package/dist-lib/components/pages/NoScreensPage.js +1 -2
- package/dist-lib/components/pages/NotFoundPage.impl.js +7 -8
- package/dist-lib/components/pages/NotFoundPage.js +1 -2
- package/dist-lib/components/pages/RecordDocumentsPanel.js +40 -41
- package/dist-lib/components/pages/RecordNotesPanel.js +43 -44
- package/dist-lib/components/pages/RecordPanels.js +1 -2
- package/dist-lib/components/pages/SSOCallbackPage.impl.js +6 -7
- package/dist-lib/components/pages/SSOCallbackPage.js +1 -2
- package/dist-lib/components/pages/SmartDetailPage.impl.js +501 -502
- package/dist-lib/components/pages/SmartDetailPage.js +1 -2
- package/dist-lib/components/pages/SmartListPage.impl.js +316 -317
- package/dist-lib/components/pages/SmartListPage.js +1 -2
- package/dist-lib/components/pages/SmartRecordListPage.impl.js +316 -317
- package/dist-lib/components/pages/SmartRecordListPage.js +1 -2
- package/dist-lib/components/pages/auth/AuthShell.js +14 -15
- package/dist-lib/components/pages/auth/CodeInput.js +0 -1
- package/dist-lib/components/pages/auth/Forgot.impl.js +12 -13
- package/dist-lib/components/pages/auth/Forgot.js +1 -2
- package/dist-lib/components/pages/auth/Reset.impl.js +20 -21
- package/dist-lib/components/pages/auth/Reset.js +1 -2
- package/dist-lib/components/pages/auth/SignIn.js +44 -45
- package/dist-lib/components/pages/auth/SignUp.impl.js +35 -36
- package/dist-lib/components/pages/auth/SignUp.js +1 -2
- package/dist-lib/components/pages/auth/SignUpCode.js +17 -18
- package/dist-lib/components/pages/auth/TwoFA.impl.js +9 -10
- package/dist-lib/components/pages/auth/TwoFA.js +1 -2
- package/dist-lib/components/pages/auth/icons.js +1 -2
- package/dist-lib/components/pages/exportRequest.js +1 -2
- package/dist-lib/components/pages/list/DataCell.js +1 -2
- package/dist-lib/components/pages/list/DeleteViewDialog.js +5 -6
- package/dist-lib/components/pages/list/ListCardRow.js +53 -54
- package/dist-lib/components/pages/list/ListCardsBody.js +1 -2
- package/dist-lib/components/pages/list/ListFloatbar.js +25 -26
- package/dist-lib/components/pages/list/ListFooter.js +17 -18
- package/dist-lib/components/pages/list/ListHeader.js +31 -32
- package/dist-lib/components/pages/list/ListNoRows.js +32 -33
- package/dist-lib/components/pages/list/ListTable.js +29 -30
- package/dist-lib/components/pages/list/ListTableRow.js +1 -2
- package/dist-lib/components/pages/list/ListToolbar.js +58 -59
- package/dist-lib/components/pages/list/ListUrlBanner.js +1 -2
- package/dist-lib/components/pages/list/RowActionsCell.js +6 -7
- package/dist-lib/components/pages/list/RowContextMenu.js +1 -2
- package/dist-lib/components/pages/list/SaveViewDialog.js +5 -6
- package/dist-lib/components/pages/list/SortHeaderMenu.js +25 -26
- package/dist-lib/components/pages/list/cardProjection.js +16 -17
- package/dist-lib/components/pages/list/column-sizing.js +1 -2
- package/dist-lib/components/pages/list/columns.js +74 -75
- package/dist-lib/components/pages/list/filter-meta.js +1 -2
- package/dist-lib/components/pages/list/page-size.js +1 -2
- package/dist-lib/components/pages/list/sortable-header.js +1 -2
- package/dist-lib/components/pages/list/table-features.js +1 -2
- package/dist-lib/components/pages/list/use-filter-value-labels.js +15 -16
- package/dist-lib/components/pages/list/useActiveView.js +1 -2
- package/dist-lib/components/pages/list/useHeaderReorder.js +1 -2
- package/dist-lib/components/pages/list/useListColumnLayout.js +6 -7
- package/dist-lib/components/pages/list/useListFilterPresentation.js +1 -2
- package/dist-lib/components/pages/list/useListQuery.js +1 -2
- package/dist-lib/components/pages/list/useListRowInteraction.js +37 -38
- package/dist-lib/components/pages/list/useListSelection.js +16 -17
- package/dist-lib/components/pages/list/useListSort.js +1 -2
- package/dist-lib/components/pages/list/useListViews.js +31 -32
- package/dist-lib/components/pages/list/useRowMenu.js +20 -21
- package/dist-lib/components/pages/list/visible-filters.js +1 -2
- package/dist-lib/components/pages/profile/Preferences.impl.js +44 -45
- package/dist-lib/components/pages/profile/Preferences.js +1 -2
- package/dist-lib/components/pages/profile/Profile.impl.js +223 -224
- package/dist-lib/components/pages/profile/Profile.js +1 -2
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.impl.js +133 -134
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.js +1 -2
- package/dist-lib/components/params/ParamsBlock.js +30 -31
- package/dist-lib/components/params/param-editors.js +58 -59
- package/dist-lib/components/primitives/Avatar.js +1 -2
- package/dist-lib/components/primitives/BoolToggle.js +1 -2
- package/dist-lib/components/primitives/BrandGlyph.js +1 -2
- package/dist-lib/components/primitives/BrandLogo.js +1 -2
- package/dist-lib/components/primitives/Btn.js +1 -2
- package/dist-lib/components/primitives/Check.js +1 -2
- package/dist-lib/components/primitives/Chip.js +1 -2
- package/dist-lib/components/primitives/ClassifiedFieldLocked.js +1 -2
- package/dist-lib/components/primitives/Dropdown.js +2 -3
- package/dist-lib/components/primitives/Fields.js +128 -129
- package/dist-lib/components/primitives/HoverCard.js +2 -3
- package/dist-lib/components/primitives/IconBtn.js +1 -2
- package/dist-lib/components/primitives/Icons.js +1 -2
- package/dist-lib/components/primitives/Kbd.js +1 -2
- package/dist-lib/components/primitives/MenuItem.js +1 -2
- package/dist-lib/components/primitives/Pill.js +1 -2
- package/dist-lib/components/primitives/RecordIdBadge.js +1 -2
- package/dist-lib/components/primitives/RetryButton.js +5 -6
- package/dist-lib/components/primitives/RowField.js +1 -2
- package/dist-lib/components/primitives/SectionCard.js +1 -2
- package/dist-lib/components/primitives/Spinner.js +1 -2
- package/dist-lib/components/primitives/StatTile.js +1 -2
- package/dist-lib/components/primitives/Tooltip.js +1 -2
- package/dist-lib/components/primitives/dataTableStyles.js +1 -2
- package/dist-lib/components/shared/BlankScreen.js +1 -2
- package/dist-lib/components/shared/ChangePasswordDialog.impl.js +20 -21
- package/dist-lib/components/shared/ChangePasswordDialog.js +1 -2
- package/dist-lib/components/shared/ConfirmDialog.js +7 -8
- package/dist-lib/components/shared/ConnectionNotice.js +1 -2
- package/dist-lib/components/shared/CopyButton.js +1 -2
- package/dist-lib/components/shared/DynamicIcon.js +1 -2
- package/dist-lib/components/shared/EmptyState.js +1 -2
- package/dist-lib/components/shared/ErrorBoundary.js +10 -11
- package/dist-lib/components/shared/LoadingSkeleton.js +1 -2
- package/dist-lib/components/shared/LucideIcon.js +1 -2
- package/dist-lib/components/shared/Markdown.js +1 -2
- package/dist-lib/components/shared/MarkdownRenderer.js +22 -23
- package/dist-lib/components/shared/ModalFrame.js +1 -2
- package/dist-lib/components/shared/RefreshControl.js +6 -7
- package/dist-lib/components/shared/StatusGroupsDisplay.js +16 -17
- package/dist-lib/components/shared/StatusStepper.js +1 -2
- package/dist-lib/components/shared/toast/DeclarionToast.js +1 -2
- package/dist-lib/components/shared/useOwnRefresh.js +1 -2
- package/dist-lib/embed/EmbedAuthBootstrap.js +30 -31
- package/dist-lib/embed/EmbedContext.js +1 -2
- package/dist-lib/embed/EmbedDirtyReporter.js +6 -7
- package/dist-lib/embed/EmbedHistoryTracker.js +1 -2
- package/dist-lib/embed/EmbedLocationReporter.js +11 -12
- package/dist-lib/embed/EmbedResizeReporter.js +9 -10
- package/dist-lib/embed/EmbedUnsavedGuard.js +5 -6
- package/dist-lib/embed/embed-dirty.js +1 -2
- package/dist-lib/embed/embed-history.js +1 -2
- package/dist-lib/embed/embed-nav-guard.js +1 -2
- package/dist-lib/embed/file-src.js +12 -13
- package/dist-lib/embed/handshake.js +1 -2
- package/dist-lib/embed/params.js +1 -2
- package/dist-lib/embed/protocol.js +1 -2
- package/dist-lib/embed/screen-location.js +1 -2
- package/dist-lib/embed/theme.js +1 -2
- package/dist-lib/embed/token.js +1 -2
- package/dist-lib/embed/useEmbedNavigate.js +25 -26
- package/dist-lib/embed/useGlobalLinkInterceptor.js +9 -10
- package/dist-lib/hooks/useActionData.js +1 -2
- package/dist-lib/hooks/useActiveTabFollowsRoute.js +7 -8
- package/dist-lib/hooks/useAgentConversation.js +122 -123
- package/dist-lib/hooks/useAggregate.js +1 -2
- package/dist-lib/hooks/useAllEntityData.js +9 -10
- package/dist-lib/hooks/useAssociatedData.js +1 -2
- package/dist-lib/hooks/useAuth.js +26 -27
- package/dist-lib/hooks/useBranding.js +1 -2
- package/dist-lib/hooks/useBrandingChrome.js +16 -17
- package/dist-lib/hooks/useChildrenData.js +4 -5
- package/dist-lib/hooks/useColumns.js +1 -2
- package/dist-lib/hooks/useConnectionNotice.js +16 -17
- package/dist-lib/hooks/useCurrentLocation.js +1 -2
- package/dist-lib/hooks/useCurrentScreen.js +1 -2
- package/dist-lib/hooks/useCursorEntityData.js +1 -2
- package/dist-lib/hooks/useDebounce.js +1 -2
- package/dist-lib/hooks/useDisplayTimeZone.js +4 -5
- package/dist-lib/hooks/useDocumentTitle.js +5 -6
- package/dist-lib/hooks/useEntity.js +1 -2
- package/dist-lib/hooks/useEntityData.js +1 -2
- package/dist-lib/hooks/useFileReferenceJSON.js +9 -10
- package/dist-lib/hooks/useFilters.js +5 -6
- package/dist-lib/hooks/useFollowAgentOpen.js +40 -41
- package/dist-lib/hooks/useImpersonation.js +15 -16
- package/dist-lib/hooks/useIntentPrefetch.js +6 -7
- package/dist-lib/hooks/useJsonSnapshot.js +1 -2
- package/dist-lib/hooks/useLanguage.js +11 -12
- package/dist-lib/hooks/useLiveObject.js +6 -7
- package/dist-lib/hooks/useLongPress.js +1 -2
- package/dist-lib/hooks/useMutations.js +31 -32
- package/dist-lib/hooks/useObject.js +1 -2
- package/dist-lib/hooks/useObjectStatus.js +4 -5
- package/dist-lib/hooks/usePageState.js +9 -10
- package/dist-lib/hooks/usePageStateRuntime.js +16 -17
- package/dist-lib/hooks/usePageStateTtl.js +1 -2
- package/dist-lib/hooks/useParams.js +58 -59
- package/dist-lib/hooks/useProperties.js +5 -6
- package/dist-lib/hooks/useRealtimeThresholds.js +4 -5
- package/dist-lib/hooks/useRefRecords.js +31 -32
- package/dist-lib/hooks/useRegisterScreenTab.js +12 -13
- package/dist-lib/hooks/useResponsiveMode.js +1 -2
- package/dist-lib/hooks/useRowTenant.js +1 -2
- package/dist-lib/hooks/useSSE.js +100 -101
- package/dist-lib/hooks/useSchema.js +16 -17
- package/dist-lib/hooks/useScreen.js +1 -2
- package/dist-lib/hooks/useScreenBack.js +17 -18
- package/dist-lib/hooks/useScreenTab.js +1 -2
- package/dist-lib/hooks/useTabNavigate.js +25 -26
- package/dist-lib/hooks/useTabSearchMirror.js +6 -7
- package/dist-lib/hooks/useTabTitle.js +10 -11
- package/dist-lib/hooks/useText.js +6 -7
- package/dist-lib/hooks/useTimelineData.js +5 -6
- package/dist-lib/hooks/useUiPreferences.js +31 -32
- package/dist-lib/hooks/useUnsavedInput.js +1 -2
- package/dist-lib/hooks/useVersionWatcher.js +16 -17
- package/dist-lib/hooks/useViews.js +16 -17
- package/dist-lib/hooks/useWindowConversation.js +1 -2
- package/dist-lib/{icon-registry-CUT4eF63.d.ts → icon-registry-BY2tt-GF.d.ts} +0 -2
- package/dist-lib/icons.d.ts +2 -4
- package/dist-lib/icons.js +5 -5
- package/dist-lib/index.d.ts +4 -272
- package/dist-lib/index.js +129 -129
- package/dist-lib/lib/action-dispatch.js +1 -2
- package/dist-lib/lib/actions.js +26 -27
- package/dist-lib/lib/anchor.js +1 -2
- package/dist-lib/lib/brand-tokens.js +1 -2
- package/dist-lib/lib/branding.js +1 -2
- package/dist-lib/lib/canonical-url.js +1 -2
- package/dist-lib/lib/capabilityPrefetch.js +1 -2
- package/dist-lib/lib/child-config.js +1 -2
- package/dist-lib/lib/children-validation.js +2 -3
- package/dist-lib/lib/date-text.js +1 -2
- package/dist-lib/lib/decimal-text.js +1 -2
- package/dist-lib/lib/display-value.js +1 -2
- package/dist-lib/lib/document-templates.js +1 -2
- package/dist-lib/lib/download.js +13 -14
- package/dist-lib/lib/evidence-verdict.js +1 -2
- package/dist-lib/lib/failure.js +4 -5
- package/dist-lib/lib/field-classification.js +1 -2
- package/dist-lib/lib/field-regions.js +1 -2
- package/dist-lib/lib/filter-evaluator.js +1 -2
- package/dist-lib/lib/filters.js +1 -2
- package/dist-lib/lib/format-count.js +1 -2
- package/dist-lib/lib/html-state.js +1 -2
- package/dist-lib/lib/language.js +1 -2
- package/dist-lib/lib/longPressGesture.js +0 -1
- package/dist-lib/lib/mass-edit.js +1 -2
- package/dist-lib/lib/money-text.js +1 -2
- package/dist-lib/lib/number-text.js +1 -2
- package/dist-lib/lib/page-inset.js +1 -2
- package/dist-lib/lib/phone.js +1 -2
- package/dist-lib/lib/profile.js +1 -2
- package/dist-lib/lib/query-retry.js +1 -2
- package/dist-lib/lib/quick-add.js +1 -2
- package/dist-lib/lib/read-display-state.js +1 -2
- package/dist-lib/lib/realtime-query-keys.js +2 -3
- package/dist-lib/lib/realtime-reconcile.js +32 -33
- package/dist-lib/lib/realtime-resync.js +40 -41
- package/dist-lib/lib/record-documents-key.js +1 -2
- package/dist-lib/lib/ref-choices.js +1 -2
- package/dist-lib/lib/refetch-when-idle.js +1 -2
- package/dist-lib/lib/rich-text.js +1 -2
- package/dist-lib/lib/role-label.js +1 -2
- package/dist-lib/lib/rowClickGesture.js +1 -2
- package/dist-lib/lib/safe-url.js +1 -2
- package/dist-lib/lib/schema-routing.js +1 -2
- package/dist-lib/lib/screen-back.js +1 -2
- package/dist-lib/lib/scroll-restoration.js +21 -22
- package/dist-lib/lib/shortcut.js +1 -2
- package/dist-lib/lib/size-value.js +1 -2
- package/dist-lib/lib/sort.js +1 -2
- package/dist-lib/lib/timestamp.js +1 -2
- package/dist-lib/lib/toast.js +1 -2
- package/dist-lib/lib/ui-actions.js +43 -44
- package/dist-lib/lib/utils.js +1 -2
- package/dist-lib/lib/variants.js +1 -2
- package/dist-lib/lib/versionTracker.js +26 -27
- package/dist-lib/lib/viewport-category.js +1 -2
- package/dist-lib/lib/window-election.js +1 -2
- package/dist-lib/stores/auth.js +32 -33
- package/dist-lib/stores/icon-registry.js +1 -2
- package/dist-lib/stores/list-layout.js +0 -1
- package/dist-lib/stores/page-state.js +1 -2
- package/dist-lib/stores/preferences.js +1 -2
- package/dist-lib/stores/realtime.js +1 -2
- package/dist-lib/stores/screen-registry.js +1 -2
- package/dist-lib/stores/tabs.js +1 -2
- package/dist-lib/test/seed-schema.js +4 -5
- package/dist-lib/testing.d.ts +2 -4
- package/dist-lib/testing.js +49 -50
- package/dist-lib/types/api.js +1 -2
- package/dist-lib/types/fieldType.js +1 -2
- package/dist-lib/types/ordmap.js +1 -2
- package/dist-lib/types/schema.js +1 -2
- package/dist-lib/{useResponsiveMode-C4MeAgoS.d.ts → useResponsiveMode-BElw02Gh.d.ts} +1 -19
- package/dist-lib/vite/index.d.ts +0 -2
- package/dist-lib/vite/index.js +1 -2
- package/package.json +11 -11
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { isModifiedClick as e } from "../lib/utils.js";
|
|
2
|
+
import { useTabNavigate as t } from "../hooks/useTabNavigate.js";
|
|
3
|
+
import { useEmbed as n } from "./EmbedContext.js";
|
|
4
4
|
import { useEffect as r, useRef as i } from "react";
|
|
5
|
-
|
|
5
|
+
// src/embed/useGlobalLinkInterceptor.ts
|
|
6
6
|
var a = "data-declarion-native-link";
|
|
7
7
|
function o(e) {
|
|
8
8
|
return e instanceof HTMLAnchorElement || typeof SVGAElement < "u" && e instanceof SVGAElement;
|
|
@@ -14,9 +14,9 @@ function s(e) {
|
|
|
14
14
|
function c(e) {
|
|
15
15
|
return e instanceof HTMLAnchorElement ? e.getAttribute("href") : e.href?.baseVal ?? e.getAttribute("href") ?? e.getAttribute("xlink:href");
|
|
16
16
|
}
|
|
17
|
-
function l(
|
|
18
|
-
if (
|
|
19
|
-
let r = s(
|
|
17
|
+
function l(t, n = window.location) {
|
|
18
|
+
if (t.defaultPrevented || e(t)) return null;
|
|
19
|
+
let r = s(t);
|
|
20
20
|
if (!r || r.hasAttribute("data-declarion-native-link")) return null;
|
|
21
21
|
let i = c(r);
|
|
22
22
|
if (!i) return null;
|
|
@@ -43,8 +43,8 @@ function u(e, t = window.location) {
|
|
|
43
43
|
return n.protocol !== "http:" && n.protocol !== "https:" || n.origin !== t.origin ? null : n.pathname + n.search + n.hash;
|
|
44
44
|
}
|
|
45
45
|
function d() {
|
|
46
|
-
let
|
|
47
|
-
o.current =
|
|
46
|
+
let e = t(), a = n().enabled, o = i(e);
|
|
47
|
+
o.current = e, r(() => {
|
|
48
48
|
let e = (e) => {
|
|
49
49
|
let t = l(e);
|
|
50
50
|
t != null && (e.preventDefault(), o.current(t));
|
|
@@ -59,5 +59,4 @@ function d() {
|
|
|
59
59
|
};
|
|
60
60
|
}, [a]);
|
|
61
61
|
}
|
|
62
|
-
//#endregion
|
|
63
62
|
export { a as NATIVE_LINK_ATTR, l as interceptedNavigationTarget, u as interceptedProgrammaticTarget, d as useGlobalLinkInterceptor };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { executeAction as e } from "../api/data.js";
|
|
2
2
|
import { useMemo as t } from "react";
|
|
3
3
|
import { useInfiniteQuery as n, useQuery as r } from "@tanstack/react-query";
|
|
4
|
-
|
|
4
|
+
// src/hooks/useActionData.ts
|
|
5
5
|
var i = "action-data", a = "action-data-cursor";
|
|
6
6
|
function o(e, t) {
|
|
7
7
|
return [
|
|
@@ -54,5 +54,4 @@ function l(r, i, a = !0) {
|
|
|
54
54
|
queryKey: o
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
//#endregion
|
|
58
57
|
export { a as ACTION_DATA_CURSOR_KEY, i as ACTION_DATA_KEY, o as actionDataQueryKey, c as cursorActionDataQueryKey, s as useActionData, l as useCursorActionData };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useTabStore as e } from "../stores/tabs.js";
|
|
2
2
|
import { useEmbed as t } from "../embed/EmbedContext.js";
|
|
3
3
|
import { useSchema as n } from "./useSchema.js";
|
|
4
4
|
import { useText as r } from "./useText.js";
|
|
5
|
-
import {
|
|
5
|
+
import { builtInPageTitle as i } from "./useTabTitle.js";
|
|
6
6
|
import { stripLeadingQuestion as a } from "../lib/screen-back.js";
|
|
7
|
-
import {
|
|
7
|
+
import { screenTitleForPath as o } from "../types/schema.js";
|
|
8
8
|
import { useEffect as s, useRef as c } from "react";
|
|
9
9
|
import { NavigationType as l, useLocation as u, useNavigationType as d } from "react-router";
|
|
10
|
-
|
|
10
|
+
// src/hooks/useActiveTabFollowsRoute.ts
|
|
11
11
|
function f() {
|
|
12
|
-
let f = t(), p = r(), { data: m } = n(), { pathname: h, search: g } = u(), _ = d(), v =
|
|
12
|
+
let f = t(), p = r(), { data: m } = n(), { pathname: h, search: g } = u(), _ = d(), v = e((e) => e.restored), y = c(h);
|
|
13
13
|
s(() => {
|
|
14
14
|
let t = y.current;
|
|
15
15
|
if (y.current = h, !v || f.enabled || !m) return;
|
|
16
|
-
let n =
|
|
16
|
+
let n = e.getState(), r = n.tabs.find((e) => e.id === n.activeTabId), s = _ === l.Replace && r && r.pathname === t && t !== h ? r : void 0, c = n.findTabByPathname(h);
|
|
17
17
|
if (c) {
|
|
18
18
|
n.activeTabId !== c.id && n.switchTab(c.id), s && n.closeTabs([s.id]);
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
|
-
let u =
|
|
21
|
+
let u = i(p, h), d = u ? void 0 : o(p, h, m.screens, m.entities), b = u ?? d?.title, x = {
|
|
22
22
|
pathname: h,
|
|
23
23
|
search: a(g),
|
|
24
24
|
derivedTitle: !0,
|
|
@@ -45,5 +45,4 @@ function f() {
|
|
|
45
45
|
p
|
|
46
46
|
]);
|
|
47
47
|
}
|
|
48
|
-
//#endregion
|
|
49
48
|
export { f as useActiveTabFollowsRoute };
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { useAuthStore as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { useCallback as m, useEffect as h, useMemo as
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
function b(e) {
|
|
10
|
-
if (e) return `${y}:${e}`;
|
|
11
|
-
}
|
|
1
|
+
import { approveInvocation as e, cancelConversation as t, cancelInvocation as n, createConversation as r, listAvailableAgents as i, listConversations as a, loadConversationInvocations as o, loadConversationTurns as s, loadHistory as c, rejectInvocation as ee, sendElicitResponse as l, sendMessage as te } from "../api/agents.js";
|
|
2
|
+
import { AGENT_FRAME_EVENT as u, AGENT_MESSAGE_CHANGED_EVENT as d, agentBus as f } from "../api/events.js";
|
|
3
|
+
import { useAuthStore as ne } from "../stores/auth.js";
|
|
4
|
+
import { ApiError as p } from "../types/api.js";
|
|
5
|
+
import { coerceDisplayString as re } from "../lib/display-value.js";
|
|
6
|
+
import { useCallback as m, useEffect as h, useMemo as g, useRef as _, useState as v } from "react";
|
|
7
|
+
// src/hooks/useAgentConversation.ts
|
|
8
|
+
var y = { streaming: !1 }, b = "declarion.agents.conversation_id";
|
|
12
9
|
function x(e) {
|
|
10
|
+
if (e) return `${b}:${e}`;
|
|
11
|
+
}
|
|
12
|
+
function ie(e) {
|
|
13
13
|
if (typeof window > "u") return;
|
|
14
|
-
let t =
|
|
14
|
+
let t = x(e);
|
|
15
15
|
if (t) try {
|
|
16
16
|
return window.localStorage.getItem(t) || void 0;
|
|
17
17
|
} catch {
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function ae(e, t) {
|
|
22
22
|
if (typeof window > "u") return;
|
|
23
|
-
let n =
|
|
23
|
+
let n = x(e);
|
|
24
24
|
if (n) try {
|
|
25
25
|
t ? window.localStorage.setItem(n, t) : window.localStorage.removeItem(n);
|
|
26
26
|
} catch {}
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
return !(
|
|
28
|
+
function S(e) {
|
|
29
|
+
return !(e instanceof p) || e.code !== "entity.foreign_key_violation" ? !1 : e.ext("constraint") === "agent_messages_tenant_conv_fk";
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function C(e, t) {
|
|
32
32
|
return {
|
|
33
33
|
id: e,
|
|
34
34
|
conversation_id: t,
|
|
@@ -39,14 +39,14 @@ function w(e, t) {
|
|
|
39
39
|
streaming: !0
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function w(e, t) {
|
|
43
43
|
let n = !1, r = e.map((e) => e.role !== "assistant" || !e.streaming || e.id === t ? e : (n = !0, {
|
|
44
44
|
...e,
|
|
45
45
|
streaming: !1
|
|
46
46
|
}));
|
|
47
47
|
return n ? r : e;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function T(e, t) {
|
|
50
50
|
let n = !1, r = [];
|
|
51
51
|
for (let i of e) i.id !== t || i.role !== "assistant" ? r.push(i) : (n = !0, i.content.length !== 0 && (i.streaming ? r.push({
|
|
52
52
|
...i,
|
|
@@ -54,19 +54,19 @@ function E(e, t) {
|
|
|
54
54
|
}) : r.push(i)));
|
|
55
55
|
return n ? r : e;
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function E(e) {
|
|
58
58
|
let t = e;
|
|
59
|
-
for (let n of e) n.role === "assistant" && n.streaming && (t =
|
|
59
|
+
for (let n of e) n.role === "assistant" && n.streaming && (t = T(t, n.id));
|
|
60
60
|
return t;
|
|
61
61
|
}
|
|
62
62
|
function D(e, t, n, r) {
|
|
63
63
|
let i = !1, a = e.map((e) => e.id === n ? (i = !0, r(e)) : e);
|
|
64
|
-
return i ? a : [...e, r(
|
|
64
|
+
return i ? a : [...e, r(C(n, t))];
|
|
65
65
|
}
|
|
66
66
|
function oe(e, t, n, r) {
|
|
67
67
|
if (!r) return e;
|
|
68
68
|
let i = e.find((e) => e.id === n);
|
|
69
|
-
return i && !i.streaming ? e : D(
|
|
69
|
+
return i && !i.streaming ? e : D(w(e, n), t, n, (e) => {
|
|
70
70
|
let t = [...e.content], n = t[t.length - 1];
|
|
71
71
|
return n?.type === "text" ? t[t.length - 1] = {
|
|
72
72
|
...n,
|
|
@@ -83,7 +83,7 @@ function oe(e, t, n, r) {
|
|
|
83
83
|
}
|
|
84
84
|
function O(e, t, n, r, i, a) {
|
|
85
85
|
let o = e.find((e) => e.id === n);
|
|
86
|
-
return o && !o.streaming ? e : D(
|
|
86
|
+
return o && !o.streaming ? e : D(w(e, n), t, n, (e) => r && e.content.some((e) => e.type === "tool_use" && e.id === r) ? e.streaming ? e : {
|
|
87
87
|
...e,
|
|
88
88
|
streaming: !0
|
|
89
89
|
} : {
|
|
@@ -141,195 +141,195 @@ function j(e) {
|
|
|
141
141
|
let t = e.payload?.message_id;
|
|
142
142
|
return typeof t == "string" && t ? t : void 0;
|
|
143
143
|
}
|
|
144
|
-
function M(
|
|
145
|
-
let
|
|
146
|
-
|
|
147
|
-
}, [
|
|
144
|
+
function M(p) {
|
|
145
|
+
let b = ne.getState().activeTenant?.id, [x, C] = v(p ?? ie(b)), M = m((e) => {
|
|
146
|
+
ae(b, e), C(e);
|
|
147
|
+
}, [b]), [N, P] = v([]), [se, F] = v(y), [I, L] = v([]), [R, z] = v([]), [B, V] = v([]), [H, U] = v([]), [W, G] = v(), K = _(/* @__PURE__ */ new Set()), q = _(0), J = _(null), ce = (e) => (J.current?.fingerprint !== e && (J.current = {
|
|
148
148
|
key: crypto.randomUUID(),
|
|
149
149
|
fingerprint: e
|
|
150
|
-
}),
|
|
150
|
+
}), J.current.key);
|
|
151
151
|
h(() => {
|
|
152
|
-
if (!
|
|
153
|
-
P([]),
|
|
152
|
+
if (!x) {
|
|
153
|
+
P([]), F(y), L([]), z([]);
|
|
154
154
|
return;
|
|
155
155
|
}
|
|
156
|
-
if (
|
|
157
|
-
|
|
156
|
+
if (K.current.has(x)) {
|
|
157
|
+
K.current.delete(x);
|
|
158
158
|
return;
|
|
159
159
|
}
|
|
160
|
-
let e = !1, t = ++
|
|
160
|
+
let e = !1, t = ++q.current;
|
|
161
161
|
return Promise.all([
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
162
|
+
c(x),
|
|
163
|
+
s(x),
|
|
164
|
+
o(x)
|
|
165
165
|
]).then(([n, r, i]) => {
|
|
166
|
-
if (e || t !==
|
|
166
|
+
if (e || t !== q.current) return;
|
|
167
167
|
let a = n.map((e) => e.streaming ? {
|
|
168
168
|
...e,
|
|
169
169
|
streaming: !1
|
|
170
170
|
} : e);
|
|
171
|
-
P(a),
|
|
171
|
+
P(a), L(r), z(i);
|
|
172
172
|
}, (t) => {
|
|
173
173
|
e || t?.status === 404 && (M(void 0), P([]));
|
|
174
174
|
}), () => {
|
|
175
175
|
e = !0;
|
|
176
176
|
};
|
|
177
|
-
}, [
|
|
178
|
-
let
|
|
177
|
+
}, [x, M]);
|
|
178
|
+
let Y = _(x);
|
|
179
179
|
h(() => {
|
|
180
|
-
|
|
181
|
-
}, [
|
|
182
|
-
let
|
|
183
|
-
if (
|
|
184
|
-
|
|
180
|
+
Y.current = x;
|
|
181
|
+
}, [x]);
|
|
182
|
+
let X = _(!1), Z = _(null), Q = m((e) => {
|
|
183
|
+
if (X.current) {
|
|
184
|
+
Z.current = e;
|
|
185
185
|
return;
|
|
186
186
|
}
|
|
187
|
-
|
|
188
|
-
let t = ++
|
|
187
|
+
X.current = !0;
|
|
188
|
+
let t = ++q.current;
|
|
189
189
|
Promise.all([
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
190
|
+
c(e),
|
|
191
|
+
s(e),
|
|
192
|
+
o(e)
|
|
193
193
|
]).then(([n, r, i]) => {
|
|
194
|
-
e ===
|
|
194
|
+
e === Y.current && t === q.current && (P((e) => A(n, e)), L(r), z(i));
|
|
195
195
|
}, () => {}).finally(() => {
|
|
196
|
-
|
|
197
|
-
let e =
|
|
198
|
-
|
|
196
|
+
X.current = !1;
|
|
197
|
+
let e = Z.current;
|
|
198
|
+
Z.current = null, e && Q(e);
|
|
199
199
|
});
|
|
200
200
|
}, []);
|
|
201
201
|
h(() => {
|
|
202
202
|
let e = (e) => {
|
|
203
|
-
let { convId:
|
|
204
|
-
|
|
203
|
+
let { convId: n, kind: r, turnId: i, payload: a } = e.detail;
|
|
204
|
+
n === Y.current && t(n, {
|
|
205
205
|
kind: r,
|
|
206
206
|
turnId: i,
|
|
207
207
|
payload: a
|
|
208
208
|
});
|
|
209
209
|
};
|
|
210
|
-
|
|
211
|
-
let
|
|
212
|
-
switch (
|
|
210
|
+
f.addEventListener(u, e);
|
|
211
|
+
let t = (e, t) => {
|
|
212
|
+
switch (t.kind) {
|
|
213
213
|
case "turn.started":
|
|
214
|
-
|
|
214
|
+
F((e) => ({
|
|
215
215
|
...e,
|
|
216
216
|
streaming: !0
|
|
217
|
-
})), P((e) =>
|
|
217
|
+
})), P((e) => w(e));
|
|
218
218
|
break;
|
|
219
219
|
case "assistant.message.created": {
|
|
220
|
-
let
|
|
221
|
-
if (!
|
|
222
|
-
P((
|
|
220
|
+
let n = typeof t.payload?.message_id == "string" ? t.payload.message_id : "";
|
|
221
|
+
if (!n) break;
|
|
222
|
+
P((t) => D(w(t, n), e, n, (e) => ({
|
|
223
223
|
...e,
|
|
224
224
|
streaming: !0
|
|
225
225
|
})));
|
|
226
226
|
break;
|
|
227
227
|
}
|
|
228
228
|
case "text.delta": {
|
|
229
|
-
let
|
|
230
|
-
if (!
|
|
231
|
-
P((t) => oe(t, e,
|
|
229
|
+
let n = re(t.payload?.text), r = j(t);
|
|
230
|
+
if (!r || !n) break;
|
|
231
|
+
P((t) => oe(t, e, r, n));
|
|
232
232
|
break;
|
|
233
233
|
}
|
|
234
234
|
case "elicit.pending":
|
|
235
|
-
|
|
235
|
+
Q(e);
|
|
236
236
|
break;
|
|
237
237
|
case "tool.pending":
|
|
238
|
-
|
|
238
|
+
Q(e);
|
|
239
239
|
break;
|
|
240
240
|
case "tool.proposed": {
|
|
241
|
-
let
|
|
242
|
-
if (!
|
|
243
|
-
P((
|
|
241
|
+
let n = j(t), r = typeof t.payload?.tool == "string" ? t.payload.tool : "", i = t.payload?.params ?? {}, a = typeof t.payload?.tool_use_id == "string" ? t.payload.tool_use_id : "";
|
|
242
|
+
if (!n || !r) break;
|
|
243
|
+
P((t) => O(t, e, n, a, r, i));
|
|
244
244
|
break;
|
|
245
245
|
}
|
|
246
246
|
case "tool.result":
|
|
247
247
|
case "tool.failed":
|
|
248
248
|
case "tool.canceled":
|
|
249
|
-
|
|
249
|
+
Q(e);
|
|
250
250
|
break;
|
|
251
251
|
case "turn.finished": {
|
|
252
|
-
|
|
253
|
-
let e = j(
|
|
254
|
-
e && P((t) =>
|
|
252
|
+
F(y);
|
|
253
|
+
let e = j(t);
|
|
254
|
+
e && P((t) => T(t, e));
|
|
255
255
|
break;
|
|
256
256
|
}
|
|
257
|
-
case "error": P((e) =>
|
|
257
|
+
case "error": P((e) => E(e)), F((e) => ({
|
|
258
258
|
...e,
|
|
259
259
|
streaming: !1
|
|
260
260
|
}));
|
|
261
261
|
}
|
|
262
|
-
},
|
|
263
|
-
let e =
|
|
264
|
-
e &&
|
|
262
|
+
}, n = () => {
|
|
263
|
+
let e = Y.current;
|
|
264
|
+
e && Q(e);
|
|
265
265
|
};
|
|
266
|
-
return
|
|
267
|
-
|
|
266
|
+
return f.addEventListener(d, n), () => {
|
|
267
|
+
f.removeEventListener(u, e), f.removeEventListener(d, n);
|
|
268
268
|
};
|
|
269
|
-
}, [
|
|
270
|
-
let
|
|
271
|
-
let
|
|
272
|
-
|
|
273
|
-
let
|
|
269
|
+
}, [Q]);
|
|
270
|
+
let $ = m(async (e, t, n = []) => {
|
|
271
|
+
let i = n.map((e) => e.id), a = x;
|
|
272
|
+
a || (a = (await r({ agent_id: W })).id, K.current.add(a), Y.current = a, M(a));
|
|
273
|
+
let o, s = (n) => te(e, n, t, i, ce(JSON.stringify([
|
|
274
274
|
n,
|
|
275
275
|
e,
|
|
276
276
|
t ?? null,
|
|
277
|
-
|
|
277
|
+
i
|
|
278
278
|
])));
|
|
279
279
|
try {
|
|
280
|
-
|
|
280
|
+
o = await s(a);
|
|
281
281
|
} catch (e) {
|
|
282
|
-
if (!
|
|
283
|
-
|
|
282
|
+
if (!S(e)) throw e;
|
|
283
|
+
a = (await r({ agent_id: W })).id, K.current.add(a), Y.current = a, M(a), o = await s(a);
|
|
284
284
|
}
|
|
285
|
-
|
|
286
|
-
if (t.some((e) => e.id ===
|
|
285
|
+
J.current = null, P((t) => {
|
|
286
|
+
if (t.some((e) => e.id === o.id)) return t;
|
|
287
287
|
let r = e ? [{
|
|
288
288
|
type: "text",
|
|
289
289
|
text: e
|
|
290
290
|
}] : [];
|
|
291
291
|
return [...t, {
|
|
292
|
-
...
|
|
292
|
+
...o,
|
|
293
293
|
content: r,
|
|
294
294
|
attachments: n
|
|
295
295
|
}];
|
|
296
296
|
});
|
|
297
297
|
}, [
|
|
298
|
-
|
|
298
|
+
x,
|
|
299
299
|
M,
|
|
300
|
-
|
|
301
|
-
]), le = m(async (
|
|
302
|
-
await
|
|
303
|
-
}, [
|
|
304
|
-
await
|
|
305
|
-
}, [
|
|
306
|
-
|
|
307
|
-
}, [
|
|
308
|
-
|
|
309
|
-
}, [
|
|
310
|
-
|
|
311
|
-
}, [
|
|
312
|
-
|
|
300
|
+
W
|
|
301
|
+
]), le = m(async (t, n) => {
|
|
302
|
+
await e(t, n), x && Q(x);
|
|
303
|
+
}, [x, Q]), ue = m(async (e, t) => {
|
|
304
|
+
await ee(e, t), x && Q(x);
|
|
305
|
+
}, [x, Q]), de = m(async (e, t) => {
|
|
306
|
+
x && (await l(x, e, t), Q(x));
|
|
307
|
+
}, [x, Q]), fe = m(async (e) => {
|
|
308
|
+
x && (await n(e), Q(x));
|
|
309
|
+
}, [x, Q]), pe = m(async () => {
|
|
310
|
+
x && await t(x);
|
|
311
|
+
}, [x]), me = m(async () => {
|
|
312
|
+
V(await a());
|
|
313
313
|
}, []), he = m(() => {
|
|
314
|
-
M(void 0), P([]),
|
|
314
|
+
M(void 0), P([]), F(y);
|
|
315
315
|
}, [M]);
|
|
316
316
|
return h(() => {
|
|
317
317
|
let e = !0;
|
|
318
|
-
return
|
|
319
|
-
e && (
|
|
318
|
+
return i().then((t) => {
|
|
319
|
+
e && (U(t), G((e) => e ?? t.find((e) => e.is_default)?.id));
|
|
320
320
|
}).catch((e) => {
|
|
321
321
|
console.warn("agents.list_available failed; the agent picker is unavailable", e);
|
|
322
322
|
}), () => {
|
|
323
323
|
e = !1;
|
|
324
324
|
};
|
|
325
325
|
}, []), {
|
|
326
|
-
conversationId:
|
|
327
|
-
messages:
|
|
328
|
-
turn:
|
|
329
|
-
turns:
|
|
330
|
-
invocations:
|
|
331
|
-
conversations:
|
|
332
|
-
send:
|
|
326
|
+
conversationId: x,
|
|
327
|
+
messages: g(() => k(N, R), [N, R]),
|
|
328
|
+
turn: se,
|
|
329
|
+
turns: I,
|
|
330
|
+
invocations: R,
|
|
331
|
+
conversations: B,
|
|
332
|
+
send: $,
|
|
333
333
|
approve: le,
|
|
334
334
|
reject: ue,
|
|
335
335
|
submitInput: de,
|
|
@@ -337,11 +337,10 @@ function M(e) {
|
|
|
337
337
|
cancel: pe,
|
|
338
338
|
refreshConversations: me,
|
|
339
339
|
startNew: he,
|
|
340
|
-
agents:
|
|
341
|
-
selectedAgentId:
|
|
342
|
-
selectAgent:
|
|
340
|
+
agents: H,
|
|
341
|
+
selectedAgentId: W,
|
|
342
|
+
selectAgent: G,
|
|
343
343
|
setConversationId: M
|
|
344
344
|
};
|
|
345
345
|
}
|
|
346
|
-
//#endregion
|
|
347
346
|
export { M as useAgentConversation };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { aggregateEntities as e } from "../api/data.js";
|
|
2
2
|
import { ENTITY_AGGREGATE_KEY as t } from "../lib/realtime-query-keys.js";
|
|
3
3
|
import { useQuery as n } from "@tanstack/react-query";
|
|
4
|
-
|
|
4
|
+
// src/hooks/useAggregate.ts
|
|
5
5
|
function r(r, i, a = !0) {
|
|
6
6
|
return n({
|
|
7
7
|
queryKey: [
|
|
@@ -14,5 +14,4 @@ function r(r, i, a = !0) {
|
|
|
14
14
|
staleTime: 3e4
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
|
-
//#endregion
|
|
18
17
|
export { r as useAggregate };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { listEntities as e } from "../api/data.js";
|
|
2
|
+
import { RefCache as t } from "../api/entities.js";
|
|
3
|
+
import { ApiError as n } from "../types/api.js";
|
|
4
4
|
import { useQuery as r } from "@tanstack/react-query";
|
|
5
|
-
|
|
5
|
+
// src/hooks/useAllEntityData.ts
|
|
6
6
|
var i = 1e3, a = 20;
|
|
7
7
|
function o(o, s = {}) {
|
|
8
8
|
return r({
|
|
@@ -19,20 +19,20 @@ function o(o, s = {}) {
|
|
|
19
19
|
count: "with"
|
|
20
20
|
}, l;
|
|
21
21
|
try {
|
|
22
|
-
l = await
|
|
22
|
+
l = await e(o, {
|
|
23
23
|
...c,
|
|
24
24
|
page: 1
|
|
25
25
|
}, { signal: r });
|
|
26
|
-
} catch (
|
|
27
|
-
throw
|
|
26
|
+
} catch (e) {
|
|
27
|
+
throw e instanceof n && e.code === "cursor.cross_tier_offset_unsupported" ? Error(`useAllEntityData: entity "${o}" is cursor-paginated (cross-store archive); it cannot be eagerly fetched into memory. Use a paginated cursor list (useCursorEntityData) instead.`) : e;
|
|
28
28
|
}
|
|
29
29
|
let u = l.meta.total_pages ?? 1;
|
|
30
30
|
if (u <= 1) return l;
|
|
31
31
|
if (u > a) throw Error(`useAllEntityData: entity "${o}" spans ${u} pages (limit ${a}); it is not a bounded entity. Use useEntityData with server-side pagination instead.`);
|
|
32
|
-
let d = await Promise.all(Array.from({ length: u - 1 }, (
|
|
32
|
+
let d = await Promise.all(Array.from({ length: u - 1 }, (t, n) => e(o, {
|
|
33
33
|
...c,
|
|
34
34
|
page: n + 2
|
|
35
|
-
}, { signal: r }))), f = new
|
|
35
|
+
}, { signal: r }))), f = new t();
|
|
36
36
|
f.merge(l.$refs);
|
|
37
37
|
let p = [...l.data];
|
|
38
38
|
for (let e of d) p.push(...e.data), f.merge(e.$refs);
|
|
@@ -49,5 +49,4 @@ function o(o, s = {}) {
|
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
//#endregion
|
|
53
52
|
export { o as useAllEntityData };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { apiFetch as e } from "../api/client.js";
|
|
2
2
|
import { ENTITY_CHILDREN_KEY as t } from "./useChildrenData.js";
|
|
3
3
|
import { useInfiniteQuery as n } from "@tanstack/react-query";
|
|
4
|
-
|
|
4
|
+
// src/hooks/useAssociatedData.ts
|
|
5
5
|
function r(r, i, a, o, s, c, l, u) {
|
|
6
6
|
let d = u ? JSON.stringify(Object.entries(u).sort()) : void 0;
|
|
7
7
|
return n({
|
|
@@ -33,5 +33,4 @@ function r(r, i, a, o, s, c, l, u) {
|
|
|
33
33
|
enabled: !!r && !!i && !!a && !!o
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
//#endregion
|
|
37
36
|
export { r as useAssociatedData };
|