@object-ui/app-shell 6.2.2 → 7.0.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/CHANGELOG.md +967 -0
- package/README.md +292 -0
- package/dist/assistant/assistantBus.d.ts +72 -0
- package/dist/assistant/assistantBus.js +133 -0
- package/dist/chrome/CommandPalette.d.ts +1 -1
- package/dist/chrome/CommandPalette.js +26 -22
- package/dist/chrome/ConditionalAuthWrapper.d.ts +1 -1
- package/dist/chrome/ConsoleToaster.d.ts +1 -1
- package/dist/chrome/ConsoleToaster.js +3 -1
- package/dist/chrome/ErrorBoundary.d.ts +1 -1
- package/dist/chrome/KeyboardShortcutsDialog.d.ts +1 -1
- package/dist/chrome/KeyboardShortcutsDialog.js +16 -5
- package/dist/chrome/LoadingScreen.d.ts +1 -1
- package/dist/chrome/LoadingScreen.js +22 -26
- package/dist/chrome/RouteFader.d.ts +1 -1
- package/dist/chrome/ThemeProvider.d.ts +1 -1
- package/dist/components/ManagedByBadge.d.ts +1 -1
- package/dist/console/AppContent.d.ts +1 -1
- package/dist/console/AppContent.js +170 -37
- package/dist/console/ConsoleShell.d.ts +7 -7
- package/dist/console/ConsoleShell.js +32 -3
- package/dist/console/ai/AiChatPage.d.ts +88 -1
- package/dist/console/ai/AiChatPage.js +743 -66
- package/dist/console/ai/ConversationsSidebar.d.ts +26 -1
- package/dist/console/ai/ConversationsSidebar.js +149 -34
- package/dist/console/ai/LiveCanvas.d.ts +22 -0
- package/dist/console/ai/LiveCanvas.js +78 -0
- package/dist/console/ai/reconcileTurn.d.ts +8 -0
- package/dist/console/ai/reconcileTurn.js +20 -0
- package/dist/console/auth/AuthPageLayout.d.ts +1 -1
- package/dist/console/auth/ForgotPasswordPage.d.ts +1 -1
- package/dist/console/auth/LoginPage.d.ts +1 -1
- package/dist/console/auth/RegisterPage.d.ts +1 -1
- package/dist/console/auth/RegisterPage.js +23 -3
- package/dist/console/cloud-connection/CloudConnectionPanel.d.ts +1 -0
- package/dist/console/cloud-connection/CloudConnectionPanel.js +169 -0
- package/dist/console/home/AppCard.d.ts +1 -1
- package/dist/console/home/AppCard.js +6 -12
- package/dist/console/home/HomeAppsStrip.d.ts +8 -0
- package/dist/console/home/HomeAppsStrip.js +61 -0
- package/dist/console/home/HomeLayout.d.ts +1 -1
- package/dist/console/home/HomeLayout.js +3 -1
- package/dist/console/home/HomePage.d.ts +1 -2
- package/dist/console/home/HomePage.js +149 -21
- package/dist/console/home/HomeRail.d.ts +22 -0
- package/dist/console/home/HomeRail.js +62 -0
- package/dist/console/home/QuickActions.d.ts +1 -1
- package/dist/console/home/QuickActions.js +3 -11
- package/dist/console/home/RecentApps.d.ts +1 -1
- package/dist/console/home/RecentApps.js +2 -2
- package/dist/console/home/StarredApps.d.ts +1 -1
- package/dist/console/home/StarredApps.js +2 -2
- package/dist/console/marketplace/InstalledListWidget.d.ts +1 -0
- package/dist/console/marketplace/InstalledListWidget.js +93 -0
- package/dist/console/marketplace/MarkdownText.d.ts +1 -1
- package/dist/console/marketplace/MarketplaceAccessDenied.d.ts +1 -1
- package/dist/console/marketplace/MarketplaceInstalledPage.d.ts +8 -14
- package/dist/console/marketplace/MarketplaceInstalledPage.js +14 -66
- package/dist/console/marketplace/MarketplacePackagePage.d.ts +1 -1
- package/dist/console/marketplace/MarketplacePackagePage.js +249 -8
- package/dist/console/marketplace/MarketplacePage.d.ts +1 -1
- package/dist/console/marketplace/MarketplacePage.js +60 -3
- package/dist/console/marketplace/PackageIcon.d.ts +1 -1
- package/dist/console/marketplace/PluginDisclosure.d.ts +14 -0
- package/dist/console/marketplace/PluginDisclosure.js +38 -0
- package/dist/console/marketplace/marketplaceApi.d.ts +123 -0
- package/dist/console/marketplace/marketplaceApi.js +254 -1
- package/dist/console/organizations/CreateWorkspaceDialog.d.ts +1 -1
- package/dist/console/organizations/OrganizationsLayout.d.ts +1 -1
- package/dist/console/organizations/OrganizationsPage.d.ts +1 -1
- package/dist/console/organizations/manage/AcceptInvitationPage.d.ts +1 -1
- package/dist/console/organizations/manage/InvitationsPage.d.ts +1 -1
- package/dist/console/organizations/manage/InviteMemberDialog.d.ts +1 -1
- package/dist/console/organizations/manage/MembersPage.d.ts +1 -1
- package/dist/console/organizations/manage/OrganizationLayout.d.ts +1 -1
- package/dist/console/organizations/manage/SettingsPage.d.ts +1 -1
- package/dist/context/CommandPaletteProvider.d.ts +44 -0
- package/dist/context/CommandPaletteProvider.js +71 -0
- package/dist/context/FavoritesProvider.d.ts +1 -1
- package/dist/context/NavigationContext.d.ts +1 -1
- package/dist/context/RecentItemsProvider.d.ts +2 -2
- package/dist/context/UserStateAdapters.d.ts +1 -1
- package/dist/context/index.d.ts +2 -0
- package/dist/context/index.js +1 -0
- package/dist/hooks/index.d.ts +5 -2
- package/dist/hooks/index.js +4 -1
- package/dist/hooks/useActionModal.d.ts +53 -0
- package/dist/hooks/useActionModal.js +111 -0
- package/dist/hooks/useChatConversation.d.ts +107 -4
- package/dist/hooks/useChatConversation.js +253 -25
- package/dist/hooks/useConsoleActionRuntime.d.ts +70 -0
- package/dist/hooks/useConsoleActionRuntime.js +560 -0
- package/dist/hooks/useConversationList.js +61 -3
- package/dist/hooks/useHomeInbox.d.ts +13 -0
- package/dist/hooks/useHomeInbox.js +142 -0
- package/dist/hooks/useNavPins.js +17 -23
- package/dist/hooks/useNavigationSync.d.ts +33 -0
- package/dist/hooks/useNavigationSync.js +98 -12
- package/dist/hooks/useReconcileOnError.d.ts +40 -0
- package/dist/hooks/useReconcileOnError.js +37 -0
- package/dist/hooks/useRecordApprovals.d.ts +18 -19
- package/dist/hooks/useRecordApprovals.js +24 -40
- package/dist/hooks/useResponsiveSidebar.js +14 -5
- package/dist/hooks/useSettleSignal.d.ts +19 -0
- package/dist/hooks/useSettleSignal.js +20 -0
- package/dist/hooks/useTrackRouteAsRecent.js +35 -0
- package/dist/hooks/useUrlOverlay.d.ts +62 -0
- package/dist/hooks/useUrlOverlay.js +88 -0
- package/dist/index.d.ts +16 -7
- package/dist/index.js +12 -4
- package/dist/layout/ActivityFeed.d.ts +1 -1
- package/dist/layout/AppHeader.d.ts +3 -2
- package/dist/layout/AppHeader.js +237 -72
- package/dist/layout/AppSidebar.d.ts +2 -1
- package/dist/layout/AppSidebar.js +26 -46
- package/dist/layout/AppSwitcher.d.ts +2 -1
- package/dist/layout/AppSwitcher.js +9 -5
- package/dist/layout/AuthPageLayout.d.ts +1 -1
- package/dist/layout/ConnectionStatus.d.ts +1 -1
- package/dist/layout/ConnectionStatus.js +9 -6
- package/dist/layout/ConsoleChatbotFab.d.ts +19 -1
- package/dist/layout/ConsoleChatbotFab.js +16 -2
- package/dist/layout/ConsoleFloatingChatbot.d.ts +32 -2
- package/dist/layout/ConsoleFloatingChatbot.js +374 -41
- package/dist/layout/ConsoleLayout.d.ts +1 -1
- package/dist/layout/ConsoleLayout.js +27 -11
- package/dist/layout/ContextSelectors.d.ts +44 -0
- package/dist/layout/ContextSelectors.js +218 -0
- package/dist/layout/InboxPopover.d.ts +6 -1
- package/dist/layout/InboxPopover.js +25 -6
- package/dist/layout/LocaleSwitcher.d.ts +1 -1
- package/dist/layout/LocalizedSidebarTrigger.d.ts +2 -0
- package/dist/layout/LocalizedSidebarTrigger.js +15 -0
- package/dist/layout/MobileViewSwitcherContext.d.ts +1 -1
- package/dist/layout/ModeToggle.d.ts +1 -1
- package/dist/layout/PageHeader.d.ts +1 -1
- package/dist/layout/UnifiedSidebar.d.ts +2 -1
- package/dist/layout/UnifiedSidebar.js +116 -15
- package/dist/observability/index.d.ts +1 -0
- package/dist/observability/index.js +1 -0
- package/dist/observability/settleSignal.d.ts +64 -0
- package/dist/observability/settleSignal.js +131 -0
- package/dist/preview/DraftChangesPanel.d.ts +19 -0
- package/dist/preview/DraftChangesPanel.js +114 -0
- package/dist/preview/DraftPreviewBar.d.ts +8 -0
- package/dist/preview/DraftPreviewBar.js +86 -0
- package/dist/preview/PreviewDraftEmptyState.d.ts +16 -0
- package/dist/preview/PreviewDraftEmptyState.js +47 -0
- package/dist/preview/PreviewModeContext.d.ts +57 -0
- package/dist/preview/PreviewModeContext.js +99 -0
- package/dist/preview/UnpublishedAppBar.d.ts +8 -0
- package/dist/preview/UnpublishedAppBar.js +79 -0
- package/dist/preview/draftStatus.d.ts +20 -0
- package/dist/preview/draftStatus.js +27 -0
- package/dist/preview/usePublishAllDrafts.d.ts +18 -0
- package/dist/preview/usePublishAllDrafts.js +106 -0
- package/dist/providers/AdapterProvider.d.ts +1 -1
- package/dist/providers/AdapterProvider.js +6 -1
- package/dist/providers/ExpressionProvider.d.ts +1 -1
- package/dist/providers/MetadataProvider.d.ts +17 -2
- package/dist/providers/MetadataProvider.js +183 -12
- package/dist/runtime-config.d.ts +46 -2
- package/dist/runtime-config.js +39 -2
- package/dist/services/builtinComponents.js +68 -59
- package/dist/skeletons/SkeletonDashboard.d.ts +1 -1
- package/dist/skeletons/SkeletonDetail.d.ts +1 -1
- package/dist/skeletons/SkeletonGrid.d.ts +1 -1
- package/dist/utils/appRoute.d.ts +21 -0
- package/dist/utils/appRoute.js +25 -0
- package/dist/utils/deriveRelatedLists.d.ts +54 -0
- package/dist/utils/deriveRelatedLists.js +91 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/managedByEmptyState.d.ts +8 -1
- package/dist/utils/managedByEmptyState.js +13 -7
- package/dist/utils/preferLocal.d.ts +18 -0
- package/dist/utils/preferLocal.js +24 -0
- package/dist/views/ActionConfirmDialog.d.ts +1 -1
- package/dist/views/ActionConfirmDialog.js +3 -1
- package/dist/views/ActionParamDialog.d.ts +6 -1
- package/dist/views/ActionParamDialog.js +9 -3
- package/dist/views/ActionResultDialog.d.ts +13 -0
- package/dist/views/ActionResultDialog.js +134 -0
- package/dist/views/ComponentNavView.d.ts +14 -1
- package/dist/views/CreateViewDialog.d.ts +1 -1
- package/dist/views/DashboardConfigPanel.d.ts +28 -0
- package/dist/views/DashboardConfigPanel.js +81 -0
- package/dist/views/DashboardView.d.ts +4 -3
- package/dist/views/DashboardView.js +38 -239
- package/dist/views/FlowRunner.d.ts +59 -0
- package/dist/views/FlowRunner.js +153 -0
- package/dist/views/InterfaceListPage.d.ts +49 -0
- package/dist/views/InterfaceListPage.js +347 -0
- package/dist/views/MetadataInspector.d.ts +2 -2
- package/dist/views/ObjectView.d.ts +1 -1
- package/dist/views/ObjectView.js +209 -532
- package/dist/views/PageView.d.ts +8 -3
- package/dist/views/PageView.js +45 -32
- package/dist/views/RecordDetailView.d.ts +1 -1
- package/dist/views/RecordDetailView.js +363 -148
- package/dist/views/RecordFormPage.d.ts +1 -1
- package/dist/views/RecordFormPage.js +26 -1
- package/dist/views/ReportConfigPanel.d.ts +37 -0
- package/dist/views/ReportConfigPanel.js +85 -0
- package/dist/views/ReportView.d.ts +1 -1
- package/dist/views/ReportView.js +116 -7
- package/dist/views/RuntimeDraftBar.d.ts +30 -0
- package/dist/views/RuntimeDraftBar.js +112 -0
- package/dist/views/SearchResultsPage.d.ts +1 -1
- package/dist/views/SearchResultsPage.js +8 -18
- package/dist/views/ViewConfigPanel.d.ts +24 -17
- package/dist/views/ViewConfigPanel.js +121 -77
- package/dist/views/index.d.ts +1 -1
- package/dist/views/index.js +1 -1
- package/dist/views/metadata-admin/AuditPanel.d.ts +28 -0
- package/dist/views/metadata-admin/AuditPanel.js +79 -0
- package/dist/views/metadata-admin/DiagnosticsPage.d.ts +20 -0
- package/dist/views/metadata-admin/DiagnosticsPage.js +69 -0
- package/dist/views/metadata-admin/DirectoryPage.d.ts +16 -1
- package/dist/views/metadata-admin/DirectoryPage.js +113 -24
- package/dist/views/metadata-admin/DraftReviewPanel.d.ts +33 -0
- package/dist/views/metadata-admin/DraftReviewPanel.js +77 -0
- package/dist/views/metadata-admin/EmbeddedItemEditor.d.ts +17 -1
- package/dist/views/metadata-admin/EmbeddedItemEditor.js +15 -8
- package/dist/views/metadata-admin/JsonSourceEditor.d.ts +37 -0
- package/dist/views/metadata-admin/JsonSourceEditor.js +178 -0
- package/dist/views/metadata-admin/LayeredDiff.d.ts +39 -1
- package/dist/views/metadata-admin/LayeredDiff.js +171 -5
- package/dist/views/metadata-admin/MetadataDetailDrawer.d.ts +15 -1
- package/dist/views/metadata-admin/MetadataTypeActions.d.ts +48 -0
- package/dist/views/metadata-admin/MetadataTypeActions.js +165 -0
- package/dist/views/metadata-admin/PackagesPage.d.ts +18 -0
- package/dist/views/metadata-admin/PackagesPage.js +395 -0
- package/dist/views/metadata-admin/PageShell.d.ts +1 -1
- package/dist/views/metadata-admin/PageShell.js +9 -4
- package/dist/views/metadata-admin/PermissionMatrixEditor.d.ts +35 -1
- package/dist/views/metadata-admin/QuickFind.d.ts +21 -1
- package/dist/views/metadata-admin/QuickFind.js +6 -3
- package/dist/views/metadata-admin/RelatedPanel.d.ts +24 -1
- package/dist/views/metadata-admin/RelatedPanel.js +20 -18
- package/dist/views/metadata-admin/ResourceEditPage.d.ts +40 -1
- package/dist/views/metadata-admin/ResourceEditPage.js +1223 -60
- package/dist/views/metadata-admin/ResourceHistoryPage.d.ts +39 -1
- package/dist/views/metadata-admin/ResourceHistoryPage.js +66 -16
- package/dist/views/metadata-admin/ResourceListPage.d.ts +13 -1
- package/dist/views/metadata-admin/ResourceListPage.js +266 -30
- package/dist/views/metadata-admin/ResourceRouter.d.ts +23 -1
- package/dist/views/metadata-admin/SchemaForm.d.ts +34 -1
- package/dist/views/metadata-admin/SchemaForm.js +559 -49
- package/dist/views/metadata-admin/StudioHomePage.d.ts +22 -0
- package/dist/views/metadata-admin/StudioHomePage.js +213 -0
- package/dist/views/metadata-admin/anchors.js +237 -24
- package/dist/views/metadata-admin/clientValidation.d.ts +50 -0
- package/dist/views/metadata-admin/clientValidation.js +169 -0
- package/dist/views/metadata-admin/color-variant-field.d.ts +30 -0
- package/dist/views/metadata-admin/color-variant-field.js +38 -0
- package/dist/views/metadata-admin/createDerive.d.ts +75 -0
- package/dist/views/metadata-admin/createDerive.js +179 -0
- package/dist/views/metadata-admin/dashboard-schema.d.ts +12 -0
- package/dist/views/metadata-admin/dashboard-schema.js +80 -0
- package/dist/views/metadata-admin/datasource/DatasourceResourcePage.d.ts +35 -0
- package/dist/views/metadata-admin/datasource/DatasourceResourcePage.js +327 -0
- package/dist/views/metadata-admin/datasource/register.d.ts +1 -0
- package/dist/views/metadata-admin/datasource/register.js +24 -0
- package/dist/views/metadata-admin/default-inspector-registry.d.ts +49 -0
- package/dist/views/metadata-admin/default-inspector-registry.js +8 -0
- package/dist/views/metadata-admin/default-schemas.js +115 -10
- package/dist/views/metadata-admin/external/ExternalDatasourcePanel.d.ts +27 -0
- package/dist/views/metadata-admin/external/ExternalDatasourcePanel.js +69 -0
- package/dist/views/metadata-admin/external/ImportObjectDialog.d.ts +27 -0
- package/dist/views/metadata-admin/external/ImportObjectDialog.js +77 -0
- package/dist/views/metadata-admin/external/SchemaBrowser.d.ts +16 -0
- package/dist/views/metadata-admin/external/SchemaBrowser.js +74 -0
- package/dist/views/metadata-admin/external/ValidationPanel.d.ts +16 -0
- package/dist/views/metadata-admin/external/ValidationPanel.js +68 -0
- package/dist/views/metadata-admin/external/api.d.ts +100 -0
- package/dist/views/metadata-admin/external/api.js +124 -0
- package/dist/views/metadata-admin/i18n.d.ts +1 -0
- package/dist/views/metadata-admin/i18n.js +1166 -2
- package/dist/views/metadata-admin/index.d.ts +8 -5
- package/dist/views/metadata-admin/index.js +12 -2
- package/dist/views/metadata-admin/inspector-registry.d.ts +51 -0
- package/dist/views/metadata-admin/inspector-registry.js +11 -0
- package/dist/views/metadata-admin/inspectors/ActionDefaultInspector.d.ts +30 -0
- package/dist/views/metadata-admin/inspectors/ActionDefaultInspector.js +180 -0
- package/dist/views/metadata-admin/inspectors/AppNavInspector.d.ts +16 -0
- package/dist/views/metadata-admin/inspectors/AppNavInspector.js +110 -0
- package/dist/views/metadata-admin/inspectors/ConditionBuilder.d.ts +29 -0
- package/dist/views/metadata-admin/inspectors/ConditionBuilder.js +154 -0
- package/dist/views/metadata-admin/inspectors/DashboardDefaultInspector.d.ts +28 -0
- package/dist/views/metadata-admin/inspectors/DashboardDefaultInspector.js +110 -0
- package/dist/views/metadata-admin/inspectors/DashboardWidgetInspector.d.ts +18 -0
- package/dist/views/metadata-admin/inspectors/DashboardWidgetInspector.js +139 -0
- package/dist/views/metadata-admin/inspectors/DatasetDefaultInspector.d.ts +21 -0
- package/dist/views/metadata-admin/inspectors/DatasetDefaultInspector.js +107 -0
- package/dist/views/metadata-admin/inspectors/FlowEdgeInspector.d.ts +16 -0
- package/dist/views/metadata-admin/inspectors/FlowEdgeInspector.js +45 -0
- package/dist/views/metadata-admin/inspectors/FlowInspector.d.ts +12 -0
- package/dist/views/metadata-admin/inspectors/FlowInspector.js +9 -0
- package/dist/views/metadata-admin/inspectors/FlowKeyValueField.d.ts +30 -0
- package/dist/views/metadata-admin/inspectors/FlowKeyValueField.js +125 -0
- package/dist/views/metadata-admin/inspectors/FlowNodeConfigField.d.ts +18 -0
- package/dist/views/metadata-admin/inspectors/FlowNodeConfigField.js +40 -0
- package/dist/views/metadata-admin/inspectors/FlowNodeInspector.d.ts +14 -0
- package/dist/views/metadata-admin/inspectors/FlowNodeInspector.js +140 -0
- package/dist/views/metadata-admin/inspectors/FlowObjectListField.d.ts +26 -0
- package/dist/views/metadata-admin/inspectors/FlowObjectListField.js +105 -0
- package/dist/views/metadata-admin/inspectors/FlowReferenceField.d.ts +83 -0
- package/dist/views/metadata-admin/inspectors/FlowReferenceField.js +181 -0
- package/dist/views/metadata-admin/inspectors/FlowStringListField.d.ts +21 -0
- package/dist/views/metadata-admin/inspectors/FlowStringListField.js +60 -0
- package/dist/views/metadata-admin/inspectors/InspectorComboField.d.ts +40 -0
- package/dist/views/metadata-admin/inspectors/InspectorComboField.js +61 -0
- package/dist/views/metadata-admin/inspectors/ObjectDefaultInspector.d.ts +21 -0
- package/dist/views/metadata-admin/inspectors/ObjectDefaultInspector.js +54 -0
- package/dist/views/metadata-admin/inspectors/ObjectFieldInspector.d.ts +23 -0
- package/dist/views/metadata-admin/inspectors/ObjectFieldInspector.js +330 -0
- package/dist/views/metadata-admin/inspectors/PageBlockInspector.d.ts +48 -0
- package/dist/views/metadata-admin/inspectors/PageBlockInspector.js +332 -0
- package/dist/views/metadata-admin/inspectors/ReportDefaultInspector.d.ts +58 -0
- package/dist/views/metadata-admin/inspectors/ReportDefaultInspector.js +160 -0
- package/dist/views/metadata-admin/inspectors/ViewColumnInspector.d.ts +19 -0
- package/dist/views/metadata-admin/inspectors/ViewColumnInspector.js +144 -0
- package/dist/views/metadata-admin/inspectors/ViewInspector.d.ts +19 -0
- package/dist/views/metadata-admin/inspectors/ViewInspector.js +21 -0
- package/dist/views/metadata-admin/inspectors/ViewVariantInspector.d.ts +54 -0
- package/dist/views/metadata-admin/inspectors/ViewVariantInspector.js +191 -0
- package/dist/views/metadata-admin/inspectors/_shared.d.ts +124 -0
- package/dist/views/metadata-admin/inspectors/_shared.js +113 -0
- package/dist/views/metadata-admin/inspectors/expression-validate.d.ts +26 -0
- package/dist/views/metadata-admin/inspectors/expression-validate.js +66 -0
- package/dist/views/metadata-admin/inspectors/flow-node-config.d.ts +143 -0
- package/dist/views/metadata-admin/inspectors/flow-node-config.js +461 -0
- package/dist/views/metadata-admin/inspectors/index.d.ts +1 -0
- package/dist/views/metadata-admin/inspectors/index.js +45 -0
- package/dist/views/metadata-admin/inspectors/json-schema-to-fields.d.ts +40 -0
- package/dist/views/metadata-admin/inspectors/json-schema-to-fields.js +227 -0
- package/dist/views/metadata-admin/inspectors/useDatasetFields.d.ts +72 -0
- package/dist/views/metadata-admin/inspectors/useDatasetFields.js +0 -0
- package/dist/views/metadata-admin/mergeServerFields.d.ts +65 -0
- package/dist/views/metadata-admin/mergeServerFields.js +56 -0
- package/dist/views/metadata-admin/preview-registry.d.ts +55 -0
- package/dist/views/metadata-admin/previews/ActionPreview.d.ts +25 -0
- package/dist/views/metadata-admin/previews/ActionPreview.js +238 -0
- package/dist/views/metadata-admin/previews/AddWidgetPicker.d.ts +12 -0
- package/dist/views/metadata-admin/previews/AddWidgetPicker.js +56 -0
- package/dist/views/metadata-admin/previews/AgentPreview.d.ts +24 -0
- package/dist/views/metadata-admin/previews/AgentPreview.js +100 -0
- package/dist/views/metadata-admin/previews/AppNavCanvas.d.ts +31 -0
- package/dist/views/metadata-admin/previews/AppNavCanvas.js +260 -0
- package/dist/views/metadata-admin/previews/AppPreview.d.ts +16 -1
- package/dist/views/metadata-admin/previews/AppPreview.js +23 -14
- package/dist/views/metadata-admin/previews/BookPreview.d.ts +20 -0
- package/dist/views/metadata-admin/previews/BookPreview.js +132 -0
- package/dist/views/metadata-admin/previews/DashboardPreview.d.ts +16 -1
- package/dist/views/metadata-admin/previews/DashboardPreview.js +110 -8
- package/dist/views/metadata-admin/previews/DatasetPreview.d.ts +18 -0
- package/dist/views/metadata-admin/previews/DatasetPreview.js +89 -0
- package/dist/views/metadata-admin/previews/DatasourcePreview.d.ts +23 -0
- package/dist/views/metadata-admin/previews/DatasourcePreview.js +68 -0
- package/dist/views/metadata-admin/previews/EmailTemplatePreview.d.ts +14 -1
- package/dist/views/metadata-admin/previews/FieldStub.d.ts +30 -0
- package/dist/views/metadata-admin/previews/FieldStub.js +104 -0
- package/dist/views/metadata-admin/previews/FieldsListEditor.d.ts +50 -0
- package/dist/views/metadata-admin/previews/FieldsListEditor.js +97 -0
- package/dist/views/metadata-admin/previews/FlowCanvas.d.ts +43 -0
- package/dist/views/metadata-admin/previews/FlowCanvas.js +328 -0
- package/dist/views/metadata-admin/previews/FlowPreview.d.ts +20 -0
- package/dist/views/metadata-admin/previews/FlowPreview.js +92 -0
- package/dist/views/metadata-admin/previews/FlowRunsPanel.d.ts +46 -0
- package/dist/views/metadata-admin/previews/FlowRunsPanel.js +97 -0
- package/dist/views/metadata-admin/previews/FlowSimulatorPanel.d.ts +25 -0
- package/dist/views/metadata-admin/previews/FlowSimulatorPanel.js +170 -0
- package/dist/views/metadata-admin/previews/JobPreview.d.ts +28 -0
- package/dist/views/metadata-admin/previews/JobPreview.js +290 -0
- package/dist/views/metadata-admin/previews/ObjectFormCanvas.d.ts +30 -0
- package/dist/views/metadata-admin/previews/ObjectFormCanvas.js +547 -0
- package/dist/views/metadata-admin/previews/ObjectPreview.d.ts +14 -1
- package/dist/views/metadata-admin/previews/ObjectPreview.js +5 -30
- package/dist/views/metadata-admin/previews/OutlineStrip.d.ts +32 -0
- package/dist/views/metadata-admin/previews/OutlineStrip.js +8 -0
- package/dist/views/metadata-admin/previews/PageBlockCanvas.d.ts +49 -0
- package/dist/views/metadata-admin/previews/PageBlockCanvas.js +510 -0
- package/dist/views/metadata-admin/previews/PagePreview.d.ts +10 -1
- package/dist/views/metadata-admin/previews/PagePreview.js +90 -4
- package/dist/views/metadata-admin/previews/PermissionPreview.d.ts +27 -0
- package/dist/views/metadata-admin/previews/PermissionPreview.js +115 -0
- package/dist/views/metadata-admin/previews/PreviewShell.d.ts +29 -6
- package/dist/views/metadata-admin/previews/PreviewShell.js +16 -3
- package/dist/views/metadata-admin/previews/ReportPreview.d.ts +18 -1
- package/dist/views/metadata-admin/previews/ReportPreview.js +23 -15
- package/dist/views/metadata-admin/previews/RolePreview.d.ts +19 -0
- package/dist/views/metadata-admin/previews/RolePreview.js +14 -0
- package/dist/views/metadata-admin/previews/SkillPreview.d.ts +22 -0
- package/dist/views/metadata-admin/previews/SkillPreview.js +34 -0
- package/dist/views/metadata-admin/previews/ToolPreview.d.ts +25 -0
- package/dist/views/metadata-admin/previews/ToolPreview.js +122 -0
- package/dist/views/metadata-admin/previews/TranslationPreview.d.ts +25 -0
- package/dist/views/metadata-admin/previews/TranslationPreview.js +52 -0
- package/dist/views/metadata-admin/previews/ValidationPreview.d.ts +27 -0
- package/dist/views/metadata-admin/previews/ValidationPreview.js +110 -0
- package/dist/views/metadata-admin/previews/ViewColumnPanes.d.ts +62 -0
- package/dist/views/metadata-admin/previews/ViewColumnPanes.js +140 -0
- package/dist/views/metadata-admin/previews/ViewPreview.d.ts +23 -1
- package/dist/views/metadata-admin/previews/ViewPreview.js +101 -73
- package/dist/views/metadata-admin/previews/block-config.d.ts +82 -0
- package/dist/views/metadata-admin/previews/block-config.js +324 -0
- package/dist/views/metadata-admin/previews/block-types.d.ts +40 -0
- package/dist/views/metadata-admin/previews/block-types.js +110 -0
- package/dist/views/metadata-admin/previews/field-types.d.ts +53 -0
- package/dist/views/metadata-admin/previews/field-types.js +97 -0
- package/dist/views/metadata-admin/previews/flow-canvas-layout.d.ts +88 -0
- package/dist/views/metadata-admin/previews/flow-canvas-layout.js +190 -0
- package/dist/views/metadata-admin/previews/flow-canvas-parts.d.ts +88 -0
- package/dist/views/metadata-admin/previews/flow-canvas-parts.js +358 -0
- package/dist/views/metadata-admin/previews/form-preview.d.ts +24 -0
- package/dist/views/metadata-admin/previews/form-preview.js +29 -0
- package/dist/views/metadata-admin/previews/index.js +43 -0
- package/dist/views/metadata-admin/previews/object-fields-bridge.d.ts +66 -0
- package/dist/views/metadata-admin/previews/object-fields-bridge.js +171 -0
- package/dist/views/metadata-admin/previews/object-fields-io.d.ts +109 -0
- package/dist/views/metadata-admin/previews/object-fields-io.js +208 -0
- package/dist/views/metadata-admin/previews/simulator/flow-sim-types.d.ts +91 -0
- package/dist/views/metadata-admin/previews/simulator/flow-sim-types.js +2 -0
- package/dist/views/metadata-admin/previews/simulator/flow-sim-validate.d.ts +8 -0
- package/dist/views/metadata-admin/previews/simulator/flow-sim-validate.js +113 -0
- package/dist/views/metadata-admin/previews/simulator/flow-simulator.d.ts +44 -0
- package/dist/views/metadata-admin/previews/simulator/flow-simulator.js +316 -0
- package/dist/views/metadata-admin/previews/useDatasetCatalog.d.ts +47 -0
- package/dist/views/metadata-admin/previews/useDatasetCatalog.js +133 -0
- package/dist/views/metadata-admin/previews/useFlowNodePalette.d.ts +44 -0
- package/dist/views/metadata-admin/previews/useFlowNodePalette.js +124 -0
- package/dist/views/metadata-admin/previews/useMetaOptions.d.ts +8 -0
- package/dist/views/metadata-admin/previews/useMetaOptions.js +50 -0
- package/dist/views/metadata-admin/previews/useObjectFields.d.ts +23 -0
- package/dist/views/metadata-admin/previews/useObjectFields.js +79 -0
- package/dist/views/metadata-admin/previews/useObjectOptions.d.ts +8 -0
- package/dist/views/metadata-admin/previews/useObjectOptions.js +43 -0
- package/dist/views/metadata-admin/previews/view-column-io.d.ts +42 -0
- package/dist/views/metadata-admin/previews/view-column-io.js +73 -0
- package/dist/views/metadata-admin/previews/widget-types.d.ts +24 -0
- package/dist/views/metadata-admin/previews/widget-types.js +40 -0
- package/dist/views/metadata-admin/registry.d.ts +140 -19
- package/dist/views/metadata-admin/report-schema.d.ts +26 -0
- package/dist/views/metadata-admin/report-schema.js +121 -0
- package/dist/views/metadata-admin/useMetadata.d.ts +100 -2
- package/dist/views/metadata-admin/useMetadata.js +155 -4
- package/dist/views/metadata-admin/view-item-normalize.d.ts +20 -0
- package/dist/views/metadata-admin/view-item-normalize.js +68 -0
- package/dist/views/metadata-admin/view-schema.d.ts +16 -0
- package/dist/views/metadata-admin/view-schema.js +107 -0
- package/dist/views/metadata-admin/view-variant-model.d.ts +23 -0
- package/dist/views/metadata-admin/view-variant-model.js +64 -0
- package/dist/views/metadata-admin/widgets.d.ts +89 -1
- package/dist/views/metadata-admin/widgets.js +491 -17
- package/dist/views/runtime-metadata-persistence.d.ts +78 -0
- package/dist/views/runtime-metadata-persistence.js +89 -0
- package/dist/views/useOpenRecordList.d.ts +18 -0
- package/dist/views/useOpenRecordList.js +36 -0
- package/dist/views/userFilterUrlState.d.ts +15 -0
- package/dist/views/userFilterUrlState.js +53 -0
- package/dist/views/view-config-adapter.d.ts +38 -0
- package/dist/views/view-config-adapter.js +80 -0
- package/package.json +52 -34
- package/dist/views/DesignDrawer.d.ts +0 -28
- package/dist/views/DesignDrawer.js +0 -51
- package/dist/views/metadata-admin/DesignerEditorWrapper.d.ts +0 -68
- package/dist/views/metadata-admin/DesignerEditorWrapper.js +0 -158
|
@@ -1,7 +1,32 @@
|
|
|
1
|
+
import { type ConversationSummary } from '../../hooks/useConversationList';
|
|
1
2
|
export interface ConversationsSidebarProps {
|
|
2
3
|
userId: string | undefined;
|
|
3
4
|
apiBase: string;
|
|
5
|
+
/**
|
|
6
|
+
* Backend name of the surface's active agent. When set, the list is scoped to
|
|
7
|
+
* this agent's conversations (each `/ai/:agent` surface shows its own history)
|
|
8
|
+
* and New/delete navigation stays on the surface. Alias-aware, so legacy and
|
|
9
|
+
* new ids match. Omit for an unscoped, all-agents list.
|
|
10
|
+
*/
|
|
11
|
+
activeAgent?: string;
|
|
4
12
|
className?: string;
|
|
5
13
|
refreshKey?: number | string;
|
|
14
|
+
titleHints?: Record<string, string>;
|
|
15
|
+
onNavigate?: () => void;
|
|
6
16
|
}
|
|
7
|
-
export
|
|
17
|
+
export type ConversationGroupKey = 'today' | 'yesterday' | 'previous7Days' | 'previous30Days' | 'older';
|
|
18
|
+
export interface ConversationGroup {
|
|
19
|
+
key: ConversationGroupKey;
|
|
20
|
+
items: ConversationSummary[];
|
|
21
|
+
}
|
|
22
|
+
/** English fallbacks for the section headers (overridable via i18n). */
|
|
23
|
+
export declare const CONVERSATION_GROUP_LABELS: Record<ConversationGroupKey, string>;
|
|
24
|
+
/**
|
|
25
|
+
* Bucket conversations into recency sections (ChatGPT/Claude-style), newest
|
|
26
|
+
* first within each. Boundaries are calendar-day based off local midnight, so
|
|
27
|
+
* "Today"/"Yesterday" track the actual day rather than a rolling 24h. Pure +
|
|
28
|
+
* exported for tests; `nowMs` defaults to the current time (kept out of the
|
|
29
|
+
* component's render path). Empty sections are omitted.
|
|
30
|
+
*/
|
|
31
|
+
export declare function groupConversationsByDate(conversations: ConversationSummary[], nowMs?: number): ConversationGroup[];
|
|
32
|
+
export declare function ConversationsSidebar({ userId, apiBase, activeAgent, className, refreshKey, titleHints, onNavigate, }: ConversationsSidebarProps): import("react").JSX.Element;
|
|
@@ -8,9 +8,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
9
9
|
import { useNavigate, useParams } from 'react-router-dom';
|
|
10
10
|
import { Plus, Trash2, Pencil, MessageSquare, Search, Check, X } from 'lucide-react';
|
|
11
|
+
import { useObjectTranslation } from '@object-ui/i18n';
|
|
11
12
|
import { Button, Input, ScrollArea, Empty, EmptyTitle, EmptyDescription, cn, } from '@object-ui/components';
|
|
13
|
+
import { agentAliasGroup, agentRouteName } from '@object-ui/plugin-chatbot';
|
|
12
14
|
import { useConversationList } from '../../hooks/useConversationList';
|
|
13
|
-
function formatTimestamp(iso) {
|
|
15
|
+
function formatTimestamp(iso, t) {
|
|
14
16
|
if (!iso)
|
|
15
17
|
return '';
|
|
16
18
|
const d = new Date(iso);
|
|
@@ -22,16 +24,76 @@ function formatTimestamp(iso) {
|
|
|
22
24
|
const hour = 60 * min;
|
|
23
25
|
const day = 24 * hour;
|
|
24
26
|
if (diff < min)
|
|
25
|
-
return '
|
|
27
|
+
return t('console.ai.justNow');
|
|
26
28
|
if (diff < hour)
|
|
27
|
-
return
|
|
29
|
+
return t('console.ai.minutesAgo', { count: Math.floor(diff / min) });
|
|
28
30
|
if (diff < day)
|
|
29
|
-
return
|
|
31
|
+
return t('console.ai.hoursAgo', { count: Math.floor(diff / hour) });
|
|
30
32
|
if (diff < 7 * day)
|
|
31
|
-
return
|
|
33
|
+
return t('console.ai.daysAgo', { count: Math.floor(diff / day) });
|
|
32
34
|
return d.toLocaleDateString();
|
|
33
35
|
}
|
|
34
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Full, locale-aware date+time for the row's `title` tooltip. The visible
|
|
38
|
+
* label is relative ("2 minutes ago") which is scannable but vague — hovering
|
|
39
|
+
* reveals the exact moment, matching ChatGPT/Claude. Returns '' for a missing
|
|
40
|
+
* or invalid timestamp so no empty tooltip appears.
|
|
41
|
+
*/
|
|
42
|
+
function absoluteTimestamp(iso) {
|
|
43
|
+
if (!iso)
|
|
44
|
+
return '';
|
|
45
|
+
const d = new Date(iso);
|
|
46
|
+
return Number.isNaN(d.getTime()) ? '' : d.toLocaleString();
|
|
47
|
+
}
|
|
48
|
+
const GROUP_ORDER = ['today', 'yesterday', 'previous7Days', 'previous30Days', 'older'];
|
|
49
|
+
/** English fallbacks for the section headers (overridable via i18n). */
|
|
50
|
+
export const CONVERSATION_GROUP_LABELS = {
|
|
51
|
+
today: 'Today',
|
|
52
|
+
yesterday: 'Yesterday',
|
|
53
|
+
previous7Days: 'Previous 7 days',
|
|
54
|
+
previous30Days: 'Previous 30 days',
|
|
55
|
+
older: 'Older',
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Bucket conversations into recency sections (ChatGPT/Claude-style), newest
|
|
59
|
+
* first within each. Boundaries are calendar-day based off local midnight, so
|
|
60
|
+
* "Today"/"Yesterday" track the actual day rather than a rolling 24h. Pure +
|
|
61
|
+
* exported for tests; `nowMs` defaults to the current time (kept out of the
|
|
62
|
+
* component's render path). Empty sections are omitted.
|
|
63
|
+
*/
|
|
64
|
+
export function groupConversationsByDate(conversations, nowMs = Date.now()) {
|
|
65
|
+
const startOfToday = new Date(nowMs);
|
|
66
|
+
startOfToday.setHours(0, 0, 0, 0);
|
|
67
|
+
const todayMs = startOfToday.getTime();
|
|
68
|
+
const DAY = 24 * 60 * 60 * 1000;
|
|
69
|
+
const stamp = (c) => {
|
|
70
|
+
const v = new Date(c.updatedAt ?? c.createdAt ?? 0).getTime();
|
|
71
|
+
return Number.isNaN(v) ? 0 : v;
|
|
72
|
+
};
|
|
73
|
+
const buckets = {
|
|
74
|
+
today: [],
|
|
75
|
+
yesterday: [],
|
|
76
|
+
previous7Days: [],
|
|
77
|
+
previous30Days: [],
|
|
78
|
+
older: [],
|
|
79
|
+
};
|
|
80
|
+
for (const c of [...conversations].sort((a, b) => stamp(b) - stamp(a))) {
|
|
81
|
+
const v = stamp(c);
|
|
82
|
+
if (v >= todayMs)
|
|
83
|
+
buckets.today.push(c);
|
|
84
|
+
else if (v >= todayMs - DAY)
|
|
85
|
+
buckets.yesterday.push(c);
|
|
86
|
+
else if (v >= todayMs - 7 * DAY)
|
|
87
|
+
buckets.previous7Days.push(c);
|
|
88
|
+
else if (v >= todayMs - 30 * DAY)
|
|
89
|
+
buckets.previous30Days.push(c);
|
|
90
|
+
else
|
|
91
|
+
buckets.older.push(c);
|
|
92
|
+
}
|
|
93
|
+
return GROUP_ORDER.filter((k) => buckets[k].length > 0).map((key) => ({ key, items: buckets[key] }));
|
|
94
|
+
}
|
|
95
|
+
export function ConversationsSidebar({ userId, apiBase, activeAgent, className, refreshKey, titleHints, onNavigate, }) {
|
|
96
|
+
const { t } = useObjectTranslation();
|
|
35
97
|
const navigate = useNavigate();
|
|
36
98
|
const { conversationId: activeId } = useParams();
|
|
37
99
|
const { conversations, isLoading, error, remove, rename } = useConversationList({
|
|
@@ -41,22 +103,58 @@ export function ConversationsSidebar({ userId, apiBase, className, refreshKey, }
|
|
|
41
103
|
});
|
|
42
104
|
const [filter, setFilter] = useState('');
|
|
43
105
|
const [renamingId, setRenamingId] = useState(undefined);
|
|
106
|
+
// Friendly route segment for New/delete navigation (stays on this surface).
|
|
107
|
+
const agentRoute = activeAgent ? agentRouteName(activeAgent) : undefined;
|
|
108
|
+
// Names equivalent to the active agent, for scoping the list (alias-aware).
|
|
109
|
+
const agentGroup = useMemo(() => (activeAgent ? new Set(agentAliasGroup(activeAgent)) : undefined), [activeAgent]);
|
|
110
|
+
const decoratedConversations = useMemo(() => {
|
|
111
|
+
return conversations.map((conversation) => {
|
|
112
|
+
const hint = titleHints?.[conversation.id]?.trim();
|
|
113
|
+
if (!hint || conversation.title?.trim() || conversation.preview?.trim()) {
|
|
114
|
+
return conversation;
|
|
115
|
+
}
|
|
116
|
+
return { ...conversation, preview: hint };
|
|
117
|
+
});
|
|
118
|
+
}, [conversations, titleHints]);
|
|
119
|
+
// Scope to this surface's agent. Lenient: a conversation with no agent yet
|
|
120
|
+
// (freshly created, pre-first-message) and the currently-open one are always
|
|
121
|
+
// kept so nothing the user is looking at can vanish from the list.
|
|
122
|
+
const scoped = useMemo(() => {
|
|
123
|
+
if (!agentGroup)
|
|
124
|
+
return decoratedConversations;
|
|
125
|
+
return decoratedConversations.filter((c) => !c.agentId || agentGroup.has(c.agentId) || c.id === activeId);
|
|
126
|
+
}, [decoratedConversations, agentGroup, activeId]);
|
|
44
127
|
const visible = useMemo(() => {
|
|
45
128
|
const q = filter.trim().toLowerCase();
|
|
46
129
|
if (!q)
|
|
47
|
-
return
|
|
48
|
-
return
|
|
130
|
+
return scoped;
|
|
131
|
+
return scoped.filter((c) => {
|
|
49
132
|
const hay = `${c.title ?? ''} ${c.preview ?? ''}`.toLowerCase();
|
|
50
133
|
return hay.includes(q);
|
|
51
134
|
});
|
|
52
|
-
}, [
|
|
53
|
-
|
|
135
|
+
}, [scoped, filter]);
|
|
136
|
+
// Navigate to a conversation on its OWN agent surface (so a lenient
|
|
137
|
+
// cross-agent row still opens correctly); fall back to this surface.
|
|
138
|
+
const conversationHref = useCallback((c) => {
|
|
139
|
+
const seg = c.agentId ? agentRouteName(c.agentId) : agentRoute;
|
|
140
|
+
return seg ? `/ai/${seg}/${c.id}` : `/ai/${c.id}`;
|
|
141
|
+
}, [agentRoute]);
|
|
142
|
+
const handleNew = useCallback(() => {
|
|
143
|
+
// `?new=1` is the explicit new-conversation intent — a bare surface visit
|
|
144
|
+
// resumes the last cached conversation (by design), so without the flag
|
|
145
|
+
// this button silently landed back on the current chat. Stays on the
|
|
146
|
+
// active agent's surface.
|
|
147
|
+
navigate(agentRoute ? `/ai/${agentRoute}?new=1` : '/ai?new=1');
|
|
148
|
+
onNavigate?.();
|
|
149
|
+
}, [navigate, agentRoute, onNavigate]);
|
|
54
150
|
const handleDelete = useCallback(async (e, id) => {
|
|
55
151
|
e.stopPropagation();
|
|
56
152
|
await remove(id);
|
|
57
|
-
if (id === activeId)
|
|
58
|
-
navigate('/ai', { replace: true });
|
|
59
|
-
|
|
153
|
+
if (id === activeId) {
|
|
154
|
+
navigate(agentRoute ? `/ai/${agentRoute}` : '/ai', { replace: true });
|
|
155
|
+
onNavigate?.();
|
|
156
|
+
}
|
|
157
|
+
}, [remove, activeId, navigate, agentRoute, onNavigate]);
|
|
60
158
|
const handleRenameSubmit = useCallback(async (id, title) => {
|
|
61
159
|
setRenamingId(undefined);
|
|
62
160
|
try {
|
|
@@ -66,10 +164,43 @@ export function ConversationsSidebar({ userId, apiBase, className, refreshKey, }
|
|
|
66
164
|
// optimistic update already rolled back via refetch in the hook
|
|
67
165
|
}
|
|
68
166
|
}, [rename]);
|
|
69
|
-
return (_jsxs("aside", { className: cn('flex h-full min-h-0 flex-col bg-muted/30', className), "data-testid": "ai-conversations-sidebar", children: [_jsxs("div", { className: "flex shrink-0 flex-col gap-2 border-b px-3 py-2", children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx("span", { className: "text-sm font-medium", children:
|
|
167
|
+
return (_jsxs("aside", { className: cn('flex h-full min-h-0 flex-col bg-muted/30', className), "data-testid": "ai-conversations-sidebar", children: [_jsxs("div", { className: "flex shrink-0 flex-col gap-2 border-b px-3 py-2", children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx("span", { className: "text-sm font-medium", children: t('console.ai.chats') }), _jsxs(Button, { size: "sm", variant: "outline", onClick: handleNew, "data-testid": "ai-new-chat", children: [_jsx(Plus, { className: "h-3.5 w-3.5" }), t('console.ai.newChat')] })] }), _jsxs("div", { className: "relative", children: [_jsx(Search, { className: "pointer-events-none absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }), _jsx(Input, { value: filter, onChange: (e) => setFilter(e.target.value), placeholder: t('console.ai.searchChats'), className: "h-7 pl-7 text-xs", "data-testid": "ai-conversations-search" })] })] }), _jsx(ScrollArea, { className: "flex-1 min-h-0", children: isLoading && conversations.length === 0 ? (_jsx("div", { className: "px-3 py-4 text-xs text-muted-foreground", children: t('common.loading') })) : error ? (_jsx("div", { className: "px-3 py-4 text-xs text-destructive", children: error.message })) : scoped.length === 0 ? (_jsxs(Empty, { className: "px-3 py-8", children: [_jsx(MessageSquare, { className: "h-8 w-8 text-muted-foreground" }), _jsx(EmptyTitle, { children: t('console.ai.noChatsYet') }), _jsx(EmptyDescription, { children: t('console.ai.noChatsDescription') })] })) : visible.length === 0 ? (_jsx("div", { className: "px-3 py-4 text-xs text-muted-foreground", children: t('console.ai.noMatchingChats') })) : (_jsx("div", { className: "flex flex-col py-1", children: groupConversationsByDate(visible).map((group) => (_jsxs("section", { "data-testid": `ai-conversation-group-${group.key}`, children: [_jsx("h3", { className: "px-3 pb-1 pt-3 text-[10px] font-medium uppercase tracking-wide text-muted-foreground", children: t(`console.ai.group.${group.key}`, { defaultValue: CONVERSATION_GROUP_LABELS[group.key] }) }), _jsx("ul", { className: "flex flex-col", children: group.items.map((c) => (_jsx(ConversationRow, { conversation: c, query: filter.trim(), active: c.id === activeId, renaming: c.id === renamingId, onSelect: () => {
|
|
168
|
+
navigate(conversationHref(c));
|
|
169
|
+
onNavigate?.();
|
|
170
|
+
}, onDelete: (e) => handleDelete(e, c.id), onStartRename: () => setRenamingId(c.id), onCancelRename: () => setRenamingId(undefined), onSubmitRename: (title) => handleRenameSubmit(c.id, title) }, c.id))) })] }, group.key))) })) })] }));
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Wrap each case-insensitive occurrence of `query` inside `text` in a styled
|
|
174
|
+
* <mark>, so a conversation-list search makes clear WHICH term matched a row.
|
|
175
|
+
* Returns the text untouched when there is no active query (the common case),
|
|
176
|
+
* so non-searching renders pay nothing.
|
|
177
|
+
*/
|
|
178
|
+
function highlightQuery(text, query) {
|
|
179
|
+
if (!text)
|
|
180
|
+
return text ?? null;
|
|
181
|
+
const needle = query?.trim().toLowerCase();
|
|
182
|
+
if (!needle)
|
|
183
|
+
return text;
|
|
184
|
+
const haystack = text.toLowerCase();
|
|
185
|
+
const parts = [];
|
|
186
|
+
let cursor = 0;
|
|
187
|
+
let key = 0;
|
|
188
|
+
for (;;) {
|
|
189
|
+
const idx = haystack.indexOf(needle, cursor);
|
|
190
|
+
if (idx === -1) {
|
|
191
|
+
parts.push(text.slice(cursor));
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
if (idx > cursor)
|
|
195
|
+
parts.push(text.slice(cursor, idx));
|
|
196
|
+
parts.push(_jsx("mark", { className: "rounded-[2px] bg-primary/20 px-0.5 text-foreground", children: text.slice(idx, idx + needle.length) }, key++));
|
|
197
|
+
cursor = idx + needle.length;
|
|
198
|
+
}
|
|
199
|
+
return parts;
|
|
70
200
|
}
|
|
71
|
-
function ConversationRow({ conversation, active, renaming, onSelect, onDelete, onStartRename, onCancelRename, onSubmitRename, }) {
|
|
72
|
-
const
|
|
201
|
+
function ConversationRow({ conversation, query, active, renaming, onSelect, onDelete, onStartRename, onCancelRename, onSubmitRename, }) {
|
|
202
|
+
const { t } = useObjectTranslation();
|
|
203
|
+
const title = conversation.title?.trim() || conversation.preview?.trim() || t('console.ai.newConversation');
|
|
73
204
|
const [draft, setDraft] = useState(title);
|
|
74
205
|
const inputRef = useRef(null);
|
|
75
206
|
useEffect(() => {
|
|
@@ -89,23 +220,7 @@ function ConversationRow({ conversation, active, renaming, onSelect, onDelete, o
|
|
|
89
220
|
e.preventDefault();
|
|
90
221
|
onCancelRename();
|
|
91
222
|
}
|
|
92
|
-
}, className: "h-7 flex-1 text-sm", "data-testid": `ai-conversation-rename-input-${conversation.id}`, "aria-label":
|
|
223
|
+
}, className: "h-7 flex-1 text-sm", "data-testid": `ai-conversation-rename-input-${conversation.id}`, "aria-label": t('console.ai.renameConversation') }), _jsx(Button, { size: "sm", variant: "ghost", className: "h-7 w-7 p-0", onClick: () => onSubmitRename(draft), "data-testid": `ai-conversation-rename-confirm-${conversation.id}`, "aria-label": t('console.ai.saveRename'), children: _jsx(Check, { className: "h-3.5 w-3.5" }) }), _jsx(Button, { size: "sm", variant: "ghost", className: "h-7 w-7 p-0", onClick: onCancelRename, "aria-label": t('console.ai.cancelRename'), children: _jsx(X, { className: "h-3.5 w-3.5" }) })] }) }));
|
|
93
224
|
}
|
|
94
|
-
return (_jsx("li", { children: _jsxs("
|
|
95
|
-
e.stopPropagation();
|
|
96
|
-
onStartRename();
|
|
97
|
-
}, onKeyDown: (e) => {
|
|
98
|
-
if (e.key === 'Enter' || e.key === ' ') {
|
|
99
|
-
e.stopPropagation();
|
|
100
|
-
onStartRename();
|
|
101
|
-
}
|
|
102
|
-
}, className: "hover:text-primary", "data-testid": `ai-conversation-rename-${conversation.id}`, "aria-label": "Rename conversation", children: _jsx(Pencil, { className: "h-3.5 w-3.5" }) }), _jsx("span", { role: "button", tabIndex: 0, onClick: (e) => {
|
|
103
|
-
e.stopPropagation();
|
|
104
|
-
onDelete(e);
|
|
105
|
-
}, onKeyDown: (e) => {
|
|
106
|
-
if (e.key === 'Enter' || e.key === ' ') {
|
|
107
|
-
e.stopPropagation();
|
|
108
|
-
onDelete(e);
|
|
109
|
-
}
|
|
110
|
-
}, className: "hover:text-destructive", "data-testid": `ai-conversation-delete-${conversation.id}`, "aria-label": "Delete conversation", children: _jsx(Trash2, { className: "h-3.5 w-3.5" }) })] })] }), conversation.preview && conversation.preview !== title ? (_jsx("span", { className: "line-clamp-1 text-xs text-muted-foreground", children: conversation.preview })) : null, _jsx("span", { className: "text-[10px] text-muted-foreground", children: formatTimestamp(conversation.updatedAt ?? conversation.createdAt) })] }) }));
|
|
225
|
+
return (_jsx("li", { children: _jsxs("div", { className: cn('group flex w-full items-start gap-2 border-l-2 border-transparent px-3 py-2 text-sm transition-colors hover:bg-accent/50', active && 'border-primary bg-accent'), "data-testid": `ai-conversation-row-${conversation.id}`, children: [_jsxs("button", { type: "button", onClick: onSelect, className: "min-w-0 flex-1 text-left", "data-testid": `ai-conversation-select-${conversation.id}`, children: [_jsx("span", { className: "line-clamp-1 font-medium", children: highlightQuery(title, query) }), conversation.preview && conversation.preview !== title ? (_jsx("span", { className: "mt-0.5 block line-clamp-1 text-xs text-muted-foreground", children: highlightQuery(conversation.preview, query) })) : null, _jsx("span", { className: "mt-0.5 block text-[10px] text-muted-foreground", title: absoluteTimestamp(conversation.updatedAt ?? conversation.createdAt), children: formatTimestamp(conversation.updatedAt ?? conversation.createdAt, t) })] }), _jsxs("div", { className: "flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100", children: [_jsx(Button, { type: "button", size: "sm", variant: "ghost", className: "h-7 w-7 p-0 hover:text-primary", onClick: onStartRename, "data-testid": `ai-conversation-rename-${conversation.id}`, "aria-label": t('console.ai.renameConversation'), children: _jsx(Pencil, { className: "h-3.5 w-3.5" }) }), _jsx(Button, { type: "button", size: "sm", variant: "ghost", className: "h-7 w-7 p-0 hover:text-destructive", onClick: onDelete, "data-testid": `ai-conversation-delete-${conversation.id}`, "aria-label": t('console.ai.deleteConversation'), children: _jsx(Trash2, { className: "h-3.5 w-3.5" }) })] })] }) }));
|
|
111
226
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ObjectUI
|
|
3
|
+
* Copyright (c) 2024-present ObjectStack Inc.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
export interface LiveCanvasProps {
|
|
9
|
+
/** The drafted app to render (its `app` metadata name). */
|
|
10
|
+
appName: string;
|
|
11
|
+
/**
|
|
12
|
+
* ADR-0045: the build was materialized — the app is live (real tables and
|
|
13
|
+
* seed rows) but unlisted. The canvas then renders the REAL app URL: full
|
|
14
|
+
* data, full interaction; the in-app UnpublishedAppBar narrates the state.
|
|
15
|
+
* False (default) keeps the ADR-0037 draft-overlay preview for mutations.
|
|
16
|
+
*/
|
|
17
|
+
materialized?: boolean;
|
|
18
|
+
/** Bump to reload the pane (the host coalesces invalidation storms). */
|
|
19
|
+
refreshKey: number;
|
|
20
|
+
onClose: () => void;
|
|
21
|
+
}
|
|
22
|
+
export declare function LiveCanvas({ appName, materialized, refreshKey, onClose }: LiveCanvasProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* ObjectUI
|
|
4
|
+
* Copyright (c) 2024-present ObjectStack Inc.
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* ADR-0037 Live Canvas — the result pane of a build session. Chat on the
|
|
11
|
+
* left, the user's app rendered from the DRAFT overlay on the right, taking
|
|
12
|
+
* shape while they talk.
|
|
13
|
+
*
|
|
14
|
+
* Deliberately an iframe onto `/apps/:name?preview=draft`: the canvas mounts
|
|
15
|
+
* the EXISTING app renderers in preview mode through the same route a user
|
|
16
|
+
* could open by hand — no second renderer, no canvas-only store (ADR-0037
|
|
17
|
+
* boundary rules: one truth, the canvas never edits in place). Per-artifact
|
|
18
|
+
* invalidations from the chat coalesce into a reload of the pane, so during
|
|
19
|
+
* an `apply_blueprint` the app grows step-by-step with the build tree.
|
|
20
|
+
*/
|
|
21
|
+
import { useEffect, useRef } from 'react';
|
|
22
|
+
import { X, Eye } from 'lucide-react';
|
|
23
|
+
import { Button } from '@object-ui/components';
|
|
24
|
+
import { useObjectTranslation } from '@object-ui/i18n';
|
|
25
|
+
/**
|
|
26
|
+
* The SPA's mount prefix for ABSOLUTE urls (the iframe bypasses the router's
|
|
27
|
+
* basename, unlike navigate()). The console ships under `/_console`; bare
|
|
28
|
+
* mounts (tests, custom hosts) fall back to ''.
|
|
29
|
+
*/
|
|
30
|
+
function spaBase() {
|
|
31
|
+
if (typeof window === 'undefined')
|
|
32
|
+
return '';
|
|
33
|
+
return window.location.pathname.startsWith('/_console') ? '/_console' : '';
|
|
34
|
+
}
|
|
35
|
+
/** Canvas iframe target: the REAL app once materialized, the draft overlay otherwise. */
|
|
36
|
+
function canvasSrc(appName, materialized) {
|
|
37
|
+
const base = `${spaBase()}/apps/${encodeURIComponent(appName)}`;
|
|
38
|
+
return materialized ? base : `${base}?preview=draft`;
|
|
39
|
+
}
|
|
40
|
+
export function LiveCanvas({ appName, materialized = false, refreshKey, onClose }) {
|
|
41
|
+
const { t } = useObjectTranslation();
|
|
42
|
+
const iframeRef = useRef(null);
|
|
43
|
+
// Materialized world swap: changing src on the SAME iframe element
|
|
44
|
+
// navigates it in place (no white-flash remount).
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
if (!iframeRef.current)
|
|
47
|
+
return;
|
|
48
|
+
const next = canvasSrc(appName, materialized);
|
|
49
|
+
try {
|
|
50
|
+
if (iframeRef.current.getAttribute('src') !== next)
|
|
51
|
+
iframeRef.current.setAttribute('src', next);
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
/* not ready — the mount src covers it */
|
|
55
|
+
}
|
|
56
|
+
}, [appName, materialized]);
|
|
57
|
+
// Refresh in place (src reload) instead of remounting the iframe — keeps
|
|
58
|
+
// the pane from flashing white on every invalidation.
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
if (refreshKey > 0) {
|
|
61
|
+
try {
|
|
62
|
+
iframeRef.current?.contentWindow?.location.reload();
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
/* cross-origin or not ready — the next mount picks it up */
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}, [refreshKey]);
|
|
69
|
+
return (_jsxs("div", { className: "flex h-full min-h-0 flex-1 flex-col border-l", "data-testid": "live-canvas", children: [_jsxs("div", { className: "flex shrink-0 items-center gap-2 border-b bg-muted/30 px-3 py-1.5 text-xs text-muted-foreground", children: [_jsx(Eye, { className: "h-3.5 w-3.5" }), _jsx("span", { className: "min-w-0 flex-1 truncate", children: materialized
|
|
70
|
+
? t('console.ai.liveCanvasUnlisted', {
|
|
71
|
+
app: appName,
|
|
72
|
+
defaultValue: 'Live app — {{app}} (unlisted until published)',
|
|
73
|
+
})
|
|
74
|
+
: t('console.ai.liveCanvas', {
|
|
75
|
+
app: appName,
|
|
76
|
+
defaultValue: 'Live preview — {{app}} (draft)',
|
|
77
|
+
}) }), _jsx(Button, { size: "sm", variant: "ghost", onClick: onClose, "data-testid": "live-canvas-close", children: _jsx(X, { className: "h-3.5 w-3.5" }) })] }), _jsx("iframe", { ref: iframeRef, title: `Draft preview: ${appName}`, src: canvasSrc(appName, materialized), className: "h-full w-full flex-1 border-0 bg-background", "data-testid": "live-canvas-frame" })] }));
|
|
78
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// ADR-0013 D2: pure decision helper for "reconcile on stream-transport failure".
|
|
2
|
+
//
|
|
3
|
+
// The agent runtime persists the FINAL assistant reply BEFORE it streams it, so a
|
|
4
|
+
// transport drop after completion leaves a complete reply in the conversation. On
|
|
5
|
+
// a chat stream error the client re-fetches the conversation and asks: did this
|
|
6
|
+
// turn actually finish? If so it renders the persisted reply instead of a scary
|
|
7
|
+
// "Response failed / Retry" (which would blindly re-run and risk re-planning).
|
|
8
|
+
//
|
|
9
|
+
// "Finished" = the last message is an assistant message that carries non-empty
|
|
10
|
+
// TEXT (not merely tool calls). A thread that ends on a tool result, or on an
|
|
11
|
+
// assistant turn that only emitted tool calls, did NOT produce a final reply →
|
|
12
|
+
// genuine failure → show the banner.
|
|
13
|
+
export function isReconcilableCompletedTurn(messages) {
|
|
14
|
+
if (!messages || messages.length === 0)
|
|
15
|
+
return false;
|
|
16
|
+
const last = messages[messages.length - 1];
|
|
17
|
+
if (!last || last.role !== 'assistant')
|
|
18
|
+
return false;
|
|
19
|
+
return last.parts.some((part) => part.type === 'text' && String(part.text ?? '').trim().length > 0);
|
|
20
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/**
|
|
3
3
|
* Register Page for ObjectStack Console
|
|
4
4
|
*/
|
|
@@ -11,13 +11,16 @@ const RouterLink = ({ href, className, children }) => (_jsx(Link, { to: href, cl
|
|
|
11
11
|
export function RegisterPage() {
|
|
12
12
|
const navigate = useNavigate();
|
|
13
13
|
const { t } = useObjectTranslation();
|
|
14
|
-
const { getAuthConfig } = useAuth();
|
|
14
|
+
const { getAuthConfig, sendVerificationEmail } = useAuth();
|
|
15
15
|
// Defense-in-depth: even if a user lands on /register directly when
|
|
16
16
|
// signup is disabled, bounce them to /login. The server-side
|
|
17
17
|
// `disableSignUp` (set by env `OS_DISABLE_SIGNUP=true` or the
|
|
18
18
|
// `emailAndPassword.disableSignUp` config option) will still 403 any
|
|
19
19
|
// submission, but redirecting here avoids a confusing form.
|
|
20
20
|
const [allowed, setAllowed] = useState(undefined);
|
|
21
|
+
const [pendingEmail, setPendingEmail] = useState(null);
|
|
22
|
+
const [resendState, setResendState] = useState('idle');
|
|
23
|
+
const [resendError, setResendError] = useState(null);
|
|
21
24
|
useEffect(() => {
|
|
22
25
|
let cancelled = false;
|
|
23
26
|
getAuthConfig()
|
|
@@ -39,7 +42,24 @@ export function RegisterPage() {
|
|
|
39
42
|
// Render nothing until we know the flag — prevents a flash of the form.
|
|
40
43
|
return _jsx(AuthPageLayout, { children: null });
|
|
41
44
|
}
|
|
42
|
-
|
|
45
|
+
if (pendingEmail) {
|
|
46
|
+
const handleResend = async () => {
|
|
47
|
+
setResendState('sending');
|
|
48
|
+
setResendError(null);
|
|
49
|
+
try {
|
|
50
|
+
await sendVerificationEmail(pendingEmail);
|
|
51
|
+
setResendState('sent');
|
|
52
|
+
}
|
|
53
|
+
catch (err) {
|
|
54
|
+
setResendState('error');
|
|
55
|
+
setResendError(err instanceof Error ? err.message : String(err));
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
return (_jsx(AuthPageLayout, { children: _jsxs("div", { className: "mx-auto flex w-full flex-col justify-center space-y-7 sm:w-[400px]", children: [_jsxs("div", { className: "flex flex-col items-center space-y-3 text-center", children: [_jsx("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-primary/10 text-primary", children: _jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", className: "h-6 w-6", "aria-hidden": "true", children: [_jsx("path", { d: "M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" }), _jsx("polyline", { points: "22,6 12,13 2,6" })] }) }), _jsx("h1", { className: "text-2xl font-semibold tracking-tight", children: t('auth.register.verifyInbox.title', { defaultValue: 'Check your inbox' }) }), _jsx("p", { className: "text-sm text-muted-foreground", children: t('auth.register.verifyInbox.description', { email: pendingEmail, defaultValue: "We've sent a verification link to {{email}}. Click the link to activate your account." }) })] }), _jsxs("div", { className: "space-y-3", children: [_jsx("button", { type: "button", onClick: handleResend, disabled: resendState === 'sending', className: "inline-flex h-10 w-full items-center justify-center rounded-md bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 disabled:opacity-50", children: resendState === 'sending'
|
|
59
|
+
? t('auth.register.verifyInbox.resending', { defaultValue: 'Sending…' })
|
|
60
|
+
: t('auth.register.verifyInbox.resend', { defaultValue: 'Resend verification email' }) }), resendState === 'sent' && (_jsx("p", { className: "text-center text-sm text-emerald-600 dark:text-emerald-400", children: t('auth.register.verifyInbox.resent', { defaultValue: 'Verification email sent.' }) })), resendState === 'error' && resendError && (_jsx("p", { className: "text-center text-sm text-destructive", children: resendError }))] }), _jsx("p", { className: "px-8 text-center text-sm text-muted-foreground", children: _jsx(Link, { to: "/login", className: "font-medium text-primary hover:underline", children: t('auth.register.verifyInbox.backToSignIn', { defaultValue: 'Back to sign in' }) }) })] }) }));
|
|
61
|
+
}
|
|
62
|
+
return (_jsx(AuthPageLayout, { children: _jsx(RegisterForm, { onSuccess: () => navigate('/'), onVerificationRequired: (email) => setPendingEmail(email), loginUrl: "/login", title: t('auth.register.title'), description: t('auth.register.description'), linkComponent: RouterLink, labels: {
|
|
43
63
|
nameLabel: t('auth.register.nameLabel'),
|
|
44
64
|
namePlaceholder: t('auth.register.namePlaceholder'),
|
|
45
65
|
emailLabel: t('auth.register.emailLabel'),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function CloudConnectionPanel(): import("react").JSX.Element;
|