@sixb/app 0.1.11 → 0.1.12
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/LICENSE +2 -0
- package/README.md +25 -19
- package/assets/connector-icons/README.md +29 -0
- package/assets/connector-icons/ace-iot.ico +0 -0
- package/assets/connector-icons/companycam.png +0 -0
- package/assets/connector-icons/exa.png +0 -0
- package/assets/connector-icons/github.svg +1 -0
- package/assets/connector-icons/google.ico +0 -0
- package/assets/connector-icons/googleads.svg +29 -0
- package/assets/connector-icons/linkedin.svg +1 -0
- package/assets/connector-icons/mercury.svg +1 -0
- package/assets/connector-icons/meta.svg +1 -0
- package/assets/connector-icons/microsoft.ico +0 -0
- package/assets/connector-icons/notion.svg +1 -0
- package/assets/connector-icons/pandadoc.png +0 -0
- package/assets/connector-icons/pennylane.ico +0 -0
- package/assets/connector-icons/pipedrive.png +0 -0
- package/assets/connector-icons/plaud.png +0 -0
- package/assets/connector-icons/quickbooks.svg +1 -0
- package/assets/connector-icons/stripe.svg +1 -0
- package/assets/connector-icons/teamleader.ico +0 -0
- package/assets/connector-icons/tiktok.svg +1 -0
- package/assets/connector-icons/unipile.png +0 -0
- package/dist/agent/activity-label.d.ts +5 -0
- package/dist/agent/activity-label.d.ts.map +1 -0
- package/dist/agent/agent-chat.d.ts +24 -0
- package/dist/agent/agent-chat.d.ts.map +1 -0
- package/dist/agent/agent-context-provider.d.ts +9 -0
- package/dist/agent/agent-context-provider.d.ts.map +1 -0
- package/dist/agent/agent-execution-trace.d.ts +9 -0
- package/dist/agent/agent-execution-trace.d.ts.map +1 -0
- package/dist/agent/agent-panel.d.ts +27 -0
- package/dist/agent/agent-panel.d.ts.map +1 -0
- package/dist/agent/agent-surface-state.d.ts +22 -0
- package/dist/agent/agent-surface-state.d.ts.map +1 -0
- package/dist/agent/agent-surface.d.ts +46 -0
- package/dist/agent/agent-surface.d.ts.map +1 -0
- package/dist/agent/bash/bash-tool-view.d.ts +17 -0
- package/dist/agent/bash/bash-tool-view.d.ts.map +1 -0
- package/dist/agent/bash/data.d.ts +35 -0
- package/dist/agent/bash/data.d.ts.map +1 -0
- package/dist/agent/bash/interpret.d.ts +84 -0
- package/dist/agent/bash/interpret.d.ts.map +1 -0
- package/dist/agent/bash/renderers.d.ts +31 -0
- package/dist/agent/bash/renderers.d.ts.map +1 -0
- package/dist/agent/bash/shell.d.ts +16 -0
- package/dist/agent/bash/shell.d.ts.map +1 -0
- package/dist/agent/components/activity-status.d.ts +13 -0
- package/dist/agent/components/activity-status.d.ts.map +1 -0
- package/dist/agent/components/agent-thread-switcher.d.ts +16 -0
- package/dist/agent/components/agent-thread-switcher.d.ts.map +1 -0
- package/dist/agent/components/composer.d.ts +47 -0
- package/dist/agent/components/composer.d.ts.map +1 -0
- package/dist/agent/components/context-chips.d.ts +7 -0
- package/dist/agent/components/context-chips.d.ts.map +1 -0
- package/dist/agent/components/context-picker.d.ts +16 -0
- package/dist/agent/components/context-picker.d.ts.map +1 -0
- package/dist/agent/components/conversation-panel.d.ts +82 -0
- package/dist/agent/components/conversation-panel.d.ts.map +1 -0
- package/dist/agent/components/file-attachment-card.d.ts +8 -0
- package/dist/agent/components/file-attachment-card.d.ts.map +1 -0
- package/dist/agent/components/message-parts.d.ts +13 -0
- package/dist/agent/components/message-parts.d.ts.map +1 -0
- package/dist/agent/components/message-view.d.ts +58 -0
- package/dist/agent/components/message-view.d.ts.map +1 -0
- package/dist/agent/components/model-controls.d.ts +20 -0
- package/dist/agent/components/model-controls.d.ts.map +1 -0
- package/dist/agent/components/model-picker-row.d.ts +8 -0
- package/dist/agent/components/model-picker-row.d.ts.map +1 -0
- package/dist/agent/components/provider-logo.d.ts +6 -0
- package/dist/agent/components/provider-logo.d.ts.map +1 -0
- package/dist/agent/components/provider-logos.d.ts +3 -0
- package/dist/agent/components/provider-logos.d.ts.map +1 -0
- package/dist/agent/components/reasoning-effort-slider.d.ts +11 -0
- package/dist/agent/components/reasoning-effort-slider.d.ts.map +1 -0
- package/dist/agent/components/sandbox-recovery.d.ts +6 -0
- package/dist/agent/components/sandbox-recovery.d.ts.map +1 -0
- package/dist/agent/components/transcript.d.ts +36 -0
- package/dist/agent/components/transcript.d.ts.map +1 -0
- package/dist/agent/components/web-fetch-tool-view.d.ts +5 -0
- package/dist/agent/components/web-fetch-tool-view.d.ts.map +1 -0
- package/dist/agent/components/web-search-tool-view.d.ts +5 -0
- package/dist/agent/components/web-search-tool-view.d.ts.map +1 -0
- package/dist/agent/components/web-sources.d.ts +9 -0
- package/dist/agent/components/web-sources.d.ts.map +1 -0
- package/dist/agent/document-preview/classify.d.ts +4 -0
- package/dist/agent/document-preview/classify.d.ts.map +1 -0
- package/dist/agent/document-preview/content-policy.d.ts +10 -0
- package/dist/agent/document-preview/content-policy.d.ts.map +1 -0
- package/dist/agent/document-preview/content.d.ts +26 -0
- package/dist/agent/document-preview/content.d.ts.map +1 -0
- package/dist/agent/document-preview/delimited.d.ts +19 -0
- package/dist/agent/document-preview/delimited.d.ts.map +1 -0
- package/dist/agent/document-preview/document-preview-root.d.ts +24 -0
- package/dist/agent/document-preview/document-preview-root.d.ts.map +1 -0
- package/dist/agent/document-preview/file-size.d.ts +3 -0
- package/dist/agent/document-preview/file-size.d.ts.map +1 -0
- package/dist/agent/document-preview/html.d.ts +9 -0
- package/dist/agent/document-preview/html.d.ts.map +1 -0
- package/dist/agent/document-preview/persistence.d.ts +6 -0
- package/dist/agent/document-preview/persistence.d.ts.map +1 -0
- package/dist/agent/document-preview/presentation.d.ts +3 -0
- package/dist/agent/document-preview/presentation.d.ts.map +1 -0
- package/dist/agent/document-preview/rendering.d.ts +14 -0
- package/dist/agent/document-preview/rendering.d.ts.map +1 -0
- package/dist/agent/document-preview/source.d.ts +13 -0
- package/dist/agent/document-preview/source.d.ts.map +1 -0
- package/dist/agent/document-preview/state.d.ts +27 -0
- package/dist/agent/document-preview/state.d.ts.map +1 -0
- package/dist/agent/document-preview/types.d.ts +33 -0
- package/dist/agent/document-preview/types.d.ts.map +1 -0
- package/dist/agent/format.d.ts +12 -0
- package/dist/agent/format.d.ts.map +1 -0
- package/dist/agent/hooks/use-agent-conversation.d.ts +338 -0
- package/dist/agent/hooks/use-agent-conversation.d.ts.map +1 -0
- package/dist/agent/hooks/use-thread-stream.d.ts +22 -0
- package/dist/agent/hooks/use-thread-stream.d.ts.map +1 -0
- package/dist/agent/i18n/en.d.ts +589 -0
- package/dist/agent/i18n/en.d.ts.map +1 -0
- package/dist/agent/i18n/fr.d.ts +4 -0
- package/dist/agent/i18n/fr.d.ts.map +1 -0
- package/dist/agent/i18n/index.d.ts +1161 -0
- package/dist/agent/i18n/index.d.ts.map +1 -0
- package/dist/agent/live-run.d.ts +48 -0
- package/dist/agent/live-run.d.ts.map +1 -0
- package/dist/agent/model-selection.d.ts +33 -0
- package/dist/agent/model-selection.d.ts.map +1 -0
- package/dist/agent/object-context-title.d.ts +22 -0
- package/dist/agent/object-context-title.d.ts.map +1 -0
- package/dist/agent/parts.d.ts +42 -0
- package/dist/agent/parts.d.ts.map +1 -0
- package/dist/agent/react-router.d.ts +8 -0
- package/dist/agent/react-router.d.ts.map +1 -0
- package/dist/agent/read/interpret.d.ts +24 -0
- package/dist/agent/read/interpret.d.ts.map +1 -0
- package/dist/agent/read/read-tool-view.d.ts +5 -0
- package/dist/agent/read/read-tool-view.d.ts.map +1 -0
- package/dist/agent/requester-settings.d.ts +15 -0
- package/dist/agent/requester-settings.d.ts.map +1 -0
- package/dist/agent/run-presentation.d.ts +70 -0
- package/dist/agent/run-presentation.d.ts.map +1 -0
- package/dist/agent/thread-navigation.d.ts +5 -0
- package/dist/agent/thread-navigation.d.ts.map +1 -0
- package/dist/agent/types.d.ts +22 -0
- package/dist/agent/types.d.ts.map +1 -0
- package/dist/agent/utils/context-display.d.ts +5 -0
- package/dist/agent/utils/context-display.d.ts.map +1 -0
- package/dist/agent/utils/context-mention.d.ts +12 -0
- package/dist/agent/utils/context-mention.d.ts.map +1 -0
- package/dist/agent/utils/web-fetch.d.ts +4 -0
- package/dist/agent/utils/web-fetch.d.ts.map +1 -0
- package/dist/agent/utils/web-search.d.ts +20 -0
- package/dist/agent/utils/web-search.d.ts.map +1 -0
- package/dist/agent/view-file/interpret.d.ts +9 -0
- package/dist/agent/view-file/interpret.d.ts.map +1 -0
- package/dist/agent/view-file/view-file-tool-view.d.ts +9 -0
- package/dist/agent/view-file/view-file-tool-view.d.ts.map +1 -0
- package/dist/agent/workspace.d.ts +11 -0
- package/dist/agent/workspace.d.ts.map +1 -0
- package/dist/chunk-3a99tmwg.js +176 -0
- package/dist/chunk-3a99tmwg.js.map +10 -0
- package/dist/chunk-48pkffj6.js +20 -0
- package/dist/chunk-48pkffj6.js.map +10 -0
- package/dist/chunk-6n5pdqp0.js +115 -0
- package/dist/chunk-6n5pdqp0.js.map +11 -0
- package/dist/chunk-j97e06rg.js +10668 -0
- package/dist/chunk-j97e06rg.js.map +80 -0
- package/dist/chunk-md3p7qdt.js +379 -0
- package/dist/chunk-md3p7qdt.js.map +10 -0
- package/dist/chunk-shmw3f8t.js +251 -0
- package/dist/chunk-shmw3f8t.js.map +10 -0
- package/dist/chunk-yvhzn4ye.js +98 -0
- package/dist/chunk-yvhzn4ye.js.map +10 -0
- package/dist/chunk-zcxrt24m.js +148 -0
- package/dist/chunk-zcxrt24m.js.map +10 -0
- package/dist/codegen.d.ts +6 -4
- package/dist/codegen.d.ts.map +1 -1
- package/dist/createCustomApp.d.ts +14 -7
- package/dist/createCustomApp.d.ts.map +1 -1
- package/dist/index.d.ts +33 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +958 -2890
- package/dist/index.js.map +14 -13
- package/dist/locale-messages.d.ts +72 -6
- package/dist/locale-messages.d.ts.map +1 -1
- package/dist/locale.d.ts +73 -8
- package/dist/locale.d.ts.map +1 -1
- package/dist/locale.js +10 -19
- package/dist/locale.js.map +3 -4
- package/dist/metadata.d.ts.map +1 -1
- package/dist/pages/data/connectors.d.ts +5 -0
- package/dist/pages/data/connectors.d.ts.map +1 -0
- package/dist/pages/data/datasets.d.ts +30 -0
- package/dist/pages/data/datasets.d.ts.map +1 -0
- package/dist/pages/data/live-updates.d.ts +13 -0
- package/dist/pages/data/live-updates.d.ts.map +1 -0
- package/dist/pages/data/messages.d.ts +354 -0
- package/dist/pages/data/messages.d.ts.map +1 -0
- package/dist/pages/data/pipeline-canvas.d.ts +34 -0
- package/dist/pages/data/pipeline-canvas.d.ts.map +1 -0
- package/dist/pages/data/pipelines.d.ts +9 -0
- package/dist/pages/data/pipelines.d.ts.map +1 -0
- package/dist/pages/data/projections.d.ts +10 -0
- package/dist/pages/data/projections.d.ts.map +1 -0
- package/dist/pages/data/schema.d.ts +20 -0
- package/dist/pages/data/schema.d.ts.map +1 -0
- package/dist/pages/data/shared.d.ts +13 -0
- package/dist/pages/data/shared.d.ts.map +1 -0
- package/dist/pages/data/sync-button.d.ts +15 -0
- package/dist/pages/data/sync-button.d.ts.map +1 -0
- package/dist/pages/data/syncs.d.ts +5 -0
- package/dist/pages/data/syncs.d.ts.map +1 -0
- package/dist/pages/home.d.ts +6 -0
- package/dist/pages/home.d.ts.map +1 -0
- package/dist/pages/mosaic.d.ts +5 -0
- package/dist/pages/mosaic.d.ts.map +1 -0
- package/dist/pages/observability/action-run.d.ts +19 -0
- package/dist/pages/observability/action-run.d.ts.map +1 -0
- package/dist/pages/observability/ai-usage/calls.d.ts +27 -0
- package/dist/pages/observability/ai-usage/calls.d.ts.map +1 -0
- package/dist/pages/observability/ai-usage/charts.d.ts +23 -0
- package/dist/pages/observability/ai-usage/charts.d.ts.map +1 -0
- package/dist/pages/observability/ai-usage/format.d.ts +101 -0
- package/dist/pages/observability/ai-usage/format.d.ts.map +1 -0
- package/dist/pages/observability/ai-usage/limits.d.ts +12 -0
- package/dist/pages/observability/ai-usage/limits.d.ts.map +1 -0
- package/dist/pages/observability/ai-usage/messages.d.ts +431 -0
- package/dist/pages/observability/ai-usage/messages.d.ts.map +1 -0
- package/dist/pages/observability/ai-usage/page.d.ts +6 -0
- package/dist/pages/observability/ai-usage/page.d.ts.map +1 -0
- package/dist/pages/observability/live-updates.d.ts +3 -0
- package/dist/pages/observability/live-updates.d.ts.map +1 -0
- package/dist/pages/observability/logs.d.ts +11 -0
- package/dist/pages/observability/logs.d.ts.map +1 -0
- package/dist/pages/observability/messages.d.ts +329 -0
- package/dist/pages/observability/messages.d.ts.map +1 -0
- package/dist/pages/observability/runs.d.ts +7 -0
- package/dist/pages/observability/runs.d.ts.map +1 -0
- package/dist/pages/observability/workflow-run.d.ts +6 -0
- package/dist/pages/observability/workflow-run.d.ts.map +1 -0
- package/dist/pages/ontology/actions.d.ts +3 -0
- package/dist/pages/ontology/actions.d.ts.map +1 -0
- package/dist/pages/ontology/components/action-button.d.ts +12 -0
- package/dist/pages/ontology/components/action-button.d.ts.map +1 -0
- package/dist/pages/ontology/components/action-param-null-control.d.ts +7 -0
- package/dist/pages/ontology/components/action-param-null-control.d.ts.map +1 -0
- package/dist/pages/ontology/components/collection-toolbar.d.ts +21 -0
- package/dist/pages/ontology/components/collection-toolbar.d.ts.map +1 -0
- package/dist/pages/ontology/components/common.d.ts +16 -0
- package/dist/pages/ontology/components/common.d.ts.map +1 -0
- package/dist/pages/ontology/components/file-ref-upload-field.d.ts +13 -0
- package/dist/pages/ontology/components/file-ref-upload-field.d.ts.map +1 -0
- package/dist/pages/ontology/components/object-filter-popover.d.ts +9 -0
- package/dist/pages/ontology/components/object-filter-popover.d.ts.map +1 -0
- package/dist/pages/ontology/components/object-icon.d.ts +7 -0
- package/dist/pages/ontology/components/object-icon.d.ts.map +1 -0
- package/dist/pages/ontology/components/object-query-bar.d.ts +21 -0
- package/dist/pages/ontology/components/object-query-bar.d.ts.map +1 -0
- package/dist/pages/ontology/components/telemetry-chart.d.ts +18 -0
- package/dist/pages/ontology/components/telemetry-chart.d.ts.map +1 -0
- package/dist/pages/ontology/components/telemetry-grid.d.ts +19 -0
- package/dist/pages/ontology/components/telemetry-grid.d.ts.map +1 -0
- package/dist/pages/ontology/components/telemetry-tile.d.ts +18 -0
- package/dist/pages/ontology/components/telemetry-tile.d.ts.map +1 -0
- package/dist/pages/ontology/components/telemetry-value.d.ts +10 -0
- package/dist/pages/ontology/components/telemetry-value.d.ts.map +1 -0
- package/dist/pages/ontology/components/usage-bar.d.ts +12 -0
- package/dist/pages/ontology/components/usage-bar.d.ts.map +1 -0
- package/dist/pages/ontology/graph.d.ts +6 -0
- package/dist/pages/ontology/graph.d.ts.map +1 -0
- package/dist/pages/ontology/hooks/object-live-updates.d.ts +5 -0
- package/dist/pages/ontology/hooks/object-live-updates.d.ts.map +1 -0
- package/dist/pages/ontology/hooks/object-telemetry-updates.d.ts +8 -0
- package/dist/pages/ontology/hooks/object-telemetry-updates.d.ts.map +1 -0
- package/dist/pages/ontology/hooks/object-type-counts.d.ts +5 -0
- package/dist/pages/ontology/hooks/object-type-counts.d.ts.map +1 -0
- package/dist/pages/ontology/hooks/rule-live-updates.d.ts +9 -0
- package/dist/pages/ontology/hooks/rule-live-updates.d.ts.map +1 -0
- package/dist/pages/ontology/hooks/workflow-live-updates.d.ts +6 -0
- package/dist/pages/ontology/hooks/workflow-live-updates.d.ts.map +1 -0
- package/dist/pages/ontology/lib/action-params.d.ts +55 -0
- package/dist/pages/ontology/lib/action-params.d.ts.map +1 -0
- package/dist/pages/ontology/lib/format-value.d.ts +3 -0
- package/dist/pages/ontology/lib/format-value.d.ts.map +1 -0
- package/dist/pages/ontology/lib/labels.d.ts +3 -0
- package/dist/pages/ontology/lib/labels.d.ts.map +1 -0
- package/dist/pages/ontology/lib/live-update-keys.d.ts +15 -0
- package/dist/pages/ontology/lib/live-update-keys.d.ts.map +1 -0
- package/dist/pages/ontology/lib/object-query.d.ts +72 -0
- package/dist/pages/ontology/lib/object-query.d.ts.map +1 -0
- package/dist/pages/ontology/lib/ontology-graph-layout.d.ts +68 -0
- package/dist/pages/ontology/lib/ontology-graph-layout.d.ts.map +1 -0
- package/dist/pages/ontology/lib/ontology-graph-links.d.ts +4 -0
- package/dist/pages/ontology/lib/ontology-graph-links.d.ts.map +1 -0
- package/dist/pages/ontology/lib/telemetry-history.d.ts +10 -0
- package/dist/pages/ontology/lib/telemetry-history.d.ts.map +1 -0
- package/dist/pages/ontology/lib/time.d.ts +3 -0
- package/dist/pages/ontology/lib/time.d.ts.map +1 -0
- package/dist/pages/ontology/lib/user-preferences.d.ts +8 -0
- package/dist/pages/ontology/lib/user-preferences.d.ts.map +1 -0
- package/dist/pages/ontology/object-page.d.ts +7 -0
- package/dist/pages/ontology/object-page.d.ts.map +1 -0
- package/dist/pages/ontology/object-type.d.ts +3 -0
- package/dist/pages/ontology/object-type.d.ts.map +1 -0
- package/dist/pages/ontology/object-types.d.ts +7 -0
- package/dist/pages/ontology/object-types.d.ts.map +1 -0
- package/dist/pages/ontology/objects.d.ts +6 -0
- package/dist/pages/ontology/objects.d.ts.map +1 -0
- package/dist/pages/ontology/rules.d.ts +32 -0
- package/dist/pages/ontology/rules.d.ts.map +1 -0
- package/dist/pages/ontology/workflow.d.ts +6 -0
- package/dist/pages/ontology/workflow.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/agent-execution-panel.d.ts +17 -0
- package/dist/pages/ontology/workflows/agent-execution-panel.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/intervention-panel.d.ts +5 -0
- package/dist/pages/ontology/workflows/intervention-panel.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/node-execution-panel.d.ts +11 -0
- package/dist/pages/ontology/workflows/node-execution-panel.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/request-run-dialog.d.ts +5 -0
- package/dist/pages/ontology/workflows/request-run-dialog.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/run-debug-section.d.ts +11 -0
- package/dist/pages/ontology/workflows/run-debug-section.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/run-input-form.d.ts +18 -0
- package/dist/pages/ontology/workflows/run-input-form.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/run-progress.d.ts +15 -0
- package/dist/pages/ontology/workflows/run-progress.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/schema-shape.d.ts +10 -0
- package/dist/pages/ontology/workflows/schema-shape.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/status-badge.d.ts +5 -0
- package/dist/pages/ontology/workflows/status-badge.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/utils.d.ts +29 -0
- package/dist/pages/ontology/workflows/utils.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/workflow-card.d.ts +5 -0
- package/dist/pages/ontology/workflows/workflow-card.d.ts.map +1 -0
- package/dist/pages/ontology/workflows.d.ts +3 -0
- package/dist/pages/ontology/workflows.d.ts.map +1 -0
- package/dist/pages/routes.d.ts +19 -0
- package/dist/pages/routes.d.ts.map +1 -0
- package/dist/pages/section-page.d.ts +91 -0
- package/dist/pages/section-page.d.ts.map +1 -0
- package/dist/pages/section-ui.d.ts +211 -0
- package/dist/pages/section-ui.d.ts.map +1 -0
- package/dist/pages/settings/controls.d.ts +94 -0
- package/dist/pages/settings/controls.d.ts.map +1 -0
- package/dist/pages/settings/developers.d.ts +3 -0
- package/dist/pages/settings/developers.d.ts.map +1 -0
- package/dist/pages/settings/members.d.ts +3 -0
- package/dist/pages/settings/members.d.ts.map +1 -0
- package/dist/pages/settings/messages.d.ts +538 -0
- package/dist/pages/settings/messages.d.ts.map +1 -0
- package/dist/pages/settings/personal.d.ts +6 -0
- package/dist/pages/settings/personal.d.ts.map +1 -0
- package/dist/pages/settings/service-accounts.d.ts +3 -0
- package/dist/pages/settings/service-accounts.d.ts.map +1 -0
- package/dist/pages/settings/sessions.d.ts +3 -0
- package/dist/pages/settings/sessions.d.ts.map +1 -0
- package/dist/pages/values.d.ts +77 -0
- package/dist/pages/values.d.ts.map +1 -0
- package/dist/pages.d.ts +42 -0
- package/dist/pages.d.ts.map +1 -0
- package/dist/pages.js +23931 -0
- package/dist/pages.js.map +85 -0
- package/dist/runtime.d.ts +0 -2
- package/dist/runtime.d.ts.map +1 -1
- package/dist/sections/catalog.d.ts +37 -0
- package/dist/sections/catalog.d.ts.map +1 -0
- package/dist/sections/counts.d.ts +7 -0
- package/dist/sections/counts.d.ts.map +1 -0
- package/dist/sections/sections.d.ts +67 -0
- package/dist/sections/sections.d.ts.map +1 -0
- package/dist/server.d.ts +8 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +2983 -0
- package/dist/server.js.map +19 -0
- package/dist/session.d.ts +18 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/shell/agent-dock.d.ts +7 -0
- package/dist/shell/agent-dock.d.ts.map +1 -0
- package/dist/shell/app-shell.d.ts +42 -0
- package/dist/shell/app-shell.d.ts.map +1 -0
- package/dist/shell/brand.d.ts +15 -0
- package/dist/shell/brand.d.ts.map +1 -0
- package/dist/shell/nav-items.d.ts +34 -0
- package/dist/shell/nav-items.d.ts.map +1 -0
- package/dist/shell/search-command.d.ts +12 -0
- package/dist/shell/search-command.d.ts.map +1 -0
- package/dist/shell/section-nav.d.ts +13 -0
- package/dist/shell/section-nav.d.ts.map +1 -0
- package/dist/shell/user-menu.d.ts +25 -0
- package/dist/shell/user-menu.d.ts.map +1 -0
- package/dist/tailwind.d.ts +4 -4
- package/dist/tailwind.d.ts.map +1 -1
- package/package.json +24 -21
- package/src/agent/activity-label.ts +63 -0
- package/src/agent/agent-chat.tsx +237 -0
- package/src/agent/agent-context-provider.tsx +92 -0
- package/src/agent/agent-execution-trace.tsx +316 -0
- package/src/agent/agent-panel.tsx +79 -0
- package/src/agent/agent-surface-state.ts +113 -0
- package/src/agent/agent-surface.tsx +363 -0
- package/src/agent/agent.css +231 -0
- package/src/agent/bash/bash-tool-view.tsx +288 -0
- package/src/agent/bash/data.ts +137 -0
- package/src/agent/bash/interpret.ts +769 -0
- package/src/agent/bash/renderers.tsx +503 -0
- package/src/agent/bash/shell.ts +195 -0
- package/src/agent/components/activity-status.tsx +86 -0
- package/src/agent/components/agent-thread-switcher.tsx +346 -0
- package/src/agent/components/composer.tsx +870 -0
- package/src/agent/components/context-chips.tsx +63 -0
- package/src/agent/components/context-picker.tsx +88 -0
- package/src/agent/components/conversation-panel.tsx +352 -0
- package/src/agent/components/file-attachment-card.tsx +137 -0
- package/src/agent/components/message-parts.tsx +280 -0
- package/src/agent/components/message-view.tsx +428 -0
- package/src/agent/components/model-controls.tsx +204 -0
- package/src/agent/components/model-picker-row.tsx +136 -0
- package/src/agent/components/provider-logo.tsx +31 -0
- package/src/agent/components/provider-logos.ts +24 -0
- package/src/agent/components/reasoning-effort-slider.tsx +121 -0
- package/src/agent/components/sandbox-recovery.tsx +49 -0
- package/src/agent/components/transcript.tsx +239 -0
- package/src/agent/components/web-fetch-tool-view.tsx +69 -0
- package/src/agent/components/web-search-tool-view.tsx +37 -0
- package/src/agent/components/web-sources.tsx +159 -0
- package/src/agent/document-preview/classify.ts +55 -0
- package/src/agent/document-preview/content-policy.ts +37 -0
- package/src/agent/document-preview/content.ts +82 -0
- package/src/agent/document-preview/delimited.ts +118 -0
- package/src/agent/document-preview/document-preview-root.tsx +1017 -0
- package/src/agent/document-preview/file-size.ts +26 -0
- package/src/agent/document-preview/html.ts +67 -0
- package/src/agent/document-preview/persistence.ts +115 -0
- package/src/agent/document-preview/presentation.ts +13 -0
- package/src/agent/document-preview/rendering.ts +48 -0
- package/src/agent/document-preview/source.ts +48 -0
- package/src/agent/document-preview/state.ts +77 -0
- package/src/agent/document-preview/types.ts +36 -0
- package/src/agent/format.ts +60 -0
- package/src/agent/hooks/use-agent-conversation.ts +536 -0
- package/src/agent/hooks/use-thread-stream.ts +121 -0
- package/src/agent/i18n/en.ts +542 -0
- package/src/agent/i18n/fr.ts +574 -0
- package/src/agent/i18n/index.ts +14 -0
- package/src/agent/live-run.ts +257 -0
- package/src/agent/model-selection.ts +88 -0
- package/src/agent/object-context-title.ts +57 -0
- package/src/agent/parts.ts +119 -0
- package/src/agent/react-router.tsx +84 -0
- package/src/agent/read/interpret.ts +101 -0
- package/src/agent/read/read-tool-view.tsx +92 -0
- package/src/agent/requester-settings.ts +55 -0
- package/src/agent/run-presentation.ts +211 -0
- package/src/agent/thread-navigation.ts +11 -0
- package/src/agent/types.ts +37 -0
- package/src/agent/utils/context-display.ts +72 -0
- package/src/agent/utils/context-mention.ts +28 -0
- package/src/agent/utils/web-fetch.ts +20 -0
- package/src/agent/utils/web-search.ts +106 -0
- package/src/agent/view-file/interpret.ts +22 -0
- package/src/agent/view-file/view-file-tool-view.tsx +120 -0
- package/src/{agents.ts → agent/workspace.ts} +4 -19
- package/src/codegen.ts +61 -79
- package/src/createCustomApp.ts +155 -67
- package/src/index.ts +52 -16
- package/src/locale-messages.ts +121 -12
- package/src/locale.ts +1 -2
- package/src/metadata.ts +35 -1
- package/src/pages/canvas.css +43 -0
- package/src/pages/data/connectors.tsx +317 -0
- package/src/pages/data/datasets.tsx +731 -0
- package/src/pages/data/live-updates.ts +71 -0
- package/src/pages/data/messages.ts +349 -0
- package/src/pages/data/pipeline-canvas.tsx +288 -0
- package/src/pages/data/pipelines.tsx +710 -0
- package/src/pages/data/projections.tsx +482 -0
- package/src/pages/data/schema.tsx +62 -0
- package/src/pages/data/shared.tsx +78 -0
- package/src/pages/data/sync-button.tsx +103 -0
- package/src/pages/data/syncs.tsx +326 -0
- package/src/pages/home.tsx +64 -0
- package/src/pages/mosaic.tsx +97 -0
- package/src/pages/observability/action-run.tsx +229 -0
- package/src/pages/observability/ai-usage/calls.tsx +541 -0
- package/src/pages/observability/ai-usage/charts.tsx +126 -0
- package/src/pages/observability/ai-usage/format.ts +276 -0
- package/src/pages/observability/ai-usage/limits.tsx +629 -0
- package/src/pages/observability/ai-usage/messages.ts +446 -0
- package/src/pages/observability/ai-usage/page.tsx +814 -0
- package/src/pages/observability/live-updates.ts +19 -0
- package/src/pages/observability/logs.tsx +617 -0
- package/src/pages/observability/messages.ts +336 -0
- package/src/pages/observability/runs.tsx +732 -0
- package/src/pages/observability/workflow-run.tsx +323 -0
- package/src/pages/ontology/actions.tsx +749 -0
- package/src/pages/ontology/components/action-button.tsx +355 -0
- package/src/pages/ontology/components/action-param-null-control.tsx +35 -0
- package/src/pages/ontology/components/collection-toolbar.tsx +61 -0
- package/src/pages/ontology/components/common.tsx +60 -0
- package/src/pages/ontology/components/file-ref-upload-field.tsx +279 -0
- package/src/pages/ontology/components/object-filter-popover.tsx +311 -0
- package/src/pages/ontology/components/object-icon.tsx +133 -0
- package/src/pages/ontology/components/object-query-bar.tsx +217 -0
- package/src/pages/ontology/components/telemetry-chart.tsx +392 -0
- package/src/pages/ontology/components/telemetry-grid.tsx +137 -0
- package/src/pages/ontology/components/telemetry-tile.tsx +164 -0
- package/src/pages/ontology/components/telemetry-value.tsx +91 -0
- package/src/pages/ontology/components/usage-bar.tsx +64 -0
- package/src/pages/ontology/graph.tsx +1283 -0
- package/src/pages/ontology/hooks/object-live-updates.ts +53 -0
- package/src/pages/ontology/hooks/object-telemetry-updates.ts +45 -0
- package/src/pages/ontology/hooks/object-type-counts.ts +27 -0
- package/src/pages/ontology/hooks/rule-live-updates.ts +28 -0
- package/src/pages/ontology/hooks/workflow-live-updates.ts +20 -0
- package/src/pages/ontology/lib/action-params.ts +231 -0
- package/src/pages/ontology/lib/format-value.ts +34 -0
- package/src/pages/ontology/lib/labels.ts +50 -0
- package/src/pages/ontology/lib/live-update-keys.ts +62 -0
- package/src/pages/ontology/lib/object-query.ts +372 -0
- package/src/pages/ontology/lib/ontology-graph-layout.ts +1004 -0
- package/src/pages/ontology/lib/ontology-graph-links.ts +15 -0
- package/src/pages/ontology/lib/telemetry-history.ts +56 -0
- package/src/pages/ontology/lib/time.ts +23 -0
- package/src/pages/ontology/lib/user-preferences.ts +52 -0
- package/src/pages/ontology/object-page.tsx +1029 -0
- package/src/pages/ontology/object-type.tsx +910 -0
- package/src/pages/ontology/object-types.tsx +240 -0
- package/src/pages/ontology/objects.tsx +938 -0
- package/src/pages/ontology/rules.tsx +805 -0
- package/src/pages/ontology/workflow.tsx +1485 -0
- package/src/pages/ontology/workflows/agent-execution-panel.tsx +340 -0
- package/src/pages/ontology/workflows/intervention-panel.tsx +261 -0
- package/src/pages/ontology/workflows/node-execution-panel.tsx +86 -0
- package/src/pages/ontology/workflows/request-run-dialog.tsx +197 -0
- package/src/pages/ontology/workflows/run-debug-section.tsx +54 -0
- package/src/pages/ontology/workflows/run-input-form.tsx +900 -0
- package/src/pages/ontology/workflows/run-progress.tsx +83 -0
- package/src/pages/ontology/workflows/schema-shape.tsx +206 -0
- package/src/pages/ontology/workflows/status-badge.tsx +15 -0
- package/src/pages/ontology/workflows/utils.ts +107 -0
- package/src/pages/ontology/workflows/workflow-card.tsx +48 -0
- package/src/pages/ontology/workflows.tsx +143 -0
- package/src/pages/routes.ts +48 -0
- package/src/pages/section-page.tsx +272 -0
- package/src/pages/section-ui.tsx +771 -0
- package/src/pages/settings/controls.tsx +721 -0
- package/src/pages/settings/developers.tsx +163 -0
- package/src/pages/settings/members.tsx +1018 -0
- package/src/pages/settings/messages.ts +551 -0
- package/src/pages/settings/personal.tsx +97 -0
- package/src/pages/settings/service-accounts.tsx +623 -0
- package/src/pages/settings/sessions.tsx +183 -0
- package/src/pages/values.tsx +700 -0
- package/src/pages.ts +56 -0
- package/src/runtime.ts +0 -3
- package/src/sections/catalog.ts +181 -0
- package/src/sections/counts.ts +33 -0
- package/src/sections/sections.tsx +257 -0
- package/src/server.ts +19 -0
- package/src/session.ts +29 -0
- package/src/shell/agent-dock.tsx +32 -0
- package/src/shell/app-shell.tsx +142 -0
- package/src/shell/brand.tsx +47 -0
- package/src/shell/nav-items.tsx +136 -0
- package/src/shell/search-command.tsx +158 -0
- package/src/shell/section-nav.tsx +61 -0
- package/src/shell/user-menu.tsx +206 -0
- package/src/tailwind.ts +4 -4
- package/dist/agents.d.ts +0 -11
- package/dist/agents.d.ts.map +0 -1
- package/dist/agents.js +0 -41
- package/dist/agents.js.map +0 -10
- package/dist/auth.js +0 -3
- package/dist/auth.js.map +0 -9
- package/dist/browser.d.ts +0 -3
- package/dist/browser.d.ts.map +0 -1
- package/dist/browser.js +0 -9
- package/dist/browser.js.map +0 -9
- package/dist/chunk-cftmy40z.js +0 -70
- package/dist/chunk-cftmy40z.js.map +0 -10
- package/dist/chunk-e1gj8c1a.js +0 -8
- package/dist/chunk-e1gj8c1a.js.map +0 -10
- package/src/browser.ts +0 -2
|
@@ -0,0 +1,910 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getObjectTypeOptions,
|
|
3
|
+
listObjectTypesOptions,
|
|
4
|
+
listProjectionsOptions,
|
|
5
|
+
} from "@sixb/client/hooks"
|
|
6
|
+
import {
|
|
7
|
+
Badge,
|
|
8
|
+
Button,
|
|
9
|
+
Card,
|
|
10
|
+
Table,
|
|
11
|
+
TableBody,
|
|
12
|
+
TableCell,
|
|
13
|
+
TableHead,
|
|
14
|
+
TableHeader,
|
|
15
|
+
TableRow,
|
|
16
|
+
Tabs,
|
|
17
|
+
TabsContent,
|
|
18
|
+
TabsList,
|
|
19
|
+
TabsTrigger,
|
|
20
|
+
} from "@sixb/ui/components"
|
|
21
|
+
import { cn } from "@sixb/ui/lib/utils"
|
|
22
|
+
import { useQuery } from "@tanstack/react-query"
|
|
23
|
+
import { Box, ChevronRight, LayoutGrid, Network } from "lucide-react"
|
|
24
|
+
import { Fragment, type ReactNode, useMemo } from "react"
|
|
25
|
+
import { Link, useNavigate, useParams, useSearchParams } from "react-router-dom"
|
|
26
|
+
import { graphTypeHref, objectsOfTypeHref, objectTypeHref } from "../routes"
|
|
27
|
+
import { DetailFallback, SectionPage } from "../section-page"
|
|
28
|
+
import { LetterAvatar } from "./components/common"
|
|
29
|
+
import { humanizeIdentifier } from "./lib/labels"
|
|
30
|
+
|
|
31
|
+
const TAB_VALUES = ["properties", "vectors", "links", "actions", "projections"] as const
|
|
32
|
+
type TabValue = (typeof TAB_VALUES)[number]
|
|
33
|
+
const DEFAULT_TAB: TabValue = "properties"
|
|
34
|
+
|
|
35
|
+
function isTabValue(value: string | null): value is TabValue {
|
|
36
|
+
return value !== null && (TAB_VALUES as readonly string[]).includes(value)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** One object type: what it inherits and what extends it, then its schema by tab. */
|
|
40
|
+
export function OntologyObjectTypePage() {
|
|
41
|
+
const typeId = useParams().objectTypeId ?? ""
|
|
42
|
+
const navigate = useNavigate()
|
|
43
|
+
const [searchParams, setSearchParams] = useSearchParams()
|
|
44
|
+
const selectType = (nextTypeId: string) => navigate(objectTypeHref(nextTypeId))
|
|
45
|
+
|
|
46
|
+
const tabParam = searchParams.get("tab")
|
|
47
|
+
const activeTab: TabValue = isTabValue(tabParam) ? tabParam : DEFAULT_TAB
|
|
48
|
+
|
|
49
|
+
const setActiveTab = (next: string) => {
|
|
50
|
+
setSearchParams(
|
|
51
|
+
(prev) => {
|
|
52
|
+
const params = new URLSearchParams(prev)
|
|
53
|
+
if (next === DEFAULT_TAB) {
|
|
54
|
+
params.delete("tab")
|
|
55
|
+
} else {
|
|
56
|
+
params.set("tab", next)
|
|
57
|
+
}
|
|
58
|
+
return params
|
|
59
|
+
},
|
|
60
|
+
{ replace: true }
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const typeQuery = useQuery({
|
|
65
|
+
...getObjectTypeOptions({ path: { objectTypeId: typeId } }),
|
|
66
|
+
retry: false,
|
|
67
|
+
})
|
|
68
|
+
const objectType = typeQuery.data
|
|
69
|
+
|
|
70
|
+
const { data: allTypes = [] } = useQuery(listObjectTypesOptions())
|
|
71
|
+
const { data: projections } = useQuery(listProjectionsOptions())
|
|
72
|
+
|
|
73
|
+
const { ancestors, subtypes } = useMemo(() => {
|
|
74
|
+
if (!objectType) return { ancestors: [], subtypes: [] }
|
|
75
|
+
const byId = new Map(allTypes.map((t) => [t.id, t]))
|
|
76
|
+
const ancestors: typeof allTypes = []
|
|
77
|
+
let cursor = objectType.extends
|
|
78
|
+
while (cursor) {
|
|
79
|
+
const parent = byId.get(cursor)
|
|
80
|
+
if (!parent) break
|
|
81
|
+
ancestors.unshift(parent)
|
|
82
|
+
cursor = parent.extends
|
|
83
|
+
}
|
|
84
|
+
const subtypes = allTypes.filter((t) => t.extends === objectType.id)
|
|
85
|
+
return { ancestors, subtypes }
|
|
86
|
+
}, [objectType, allTypes])
|
|
87
|
+
|
|
88
|
+
const typeProjections = useMemo(() => {
|
|
89
|
+
if (!projections || !typeId) return { object: [], link: [], telemetry: [] }
|
|
90
|
+
return {
|
|
91
|
+
object: projections.objectProjections.filter((p) => p.objectTypeId === typeId),
|
|
92
|
+
link: projections.linkProjections.filter(
|
|
93
|
+
(p) => p.sourceObjectTypeId === typeId || p.targetObjectTypeId === typeId
|
|
94
|
+
),
|
|
95
|
+
telemetry: projections.telemetryProjections.filter((p) => p.objectTypeId === typeId),
|
|
96
|
+
}
|
|
97
|
+
}, [projections, typeId])
|
|
98
|
+
|
|
99
|
+
const projectionCount =
|
|
100
|
+
typeProjections.object.length + typeProjections.link.length + typeProjections.telemetry.length
|
|
101
|
+
const resolvedTab: TabValue =
|
|
102
|
+
activeTab === "projections" && projectionCount === 0 ? DEFAULT_TAB : activeTab
|
|
103
|
+
|
|
104
|
+
const back = { href: "/ontology/object-types", label: "Object types" }
|
|
105
|
+
if (!objectType) {
|
|
106
|
+
return (
|
|
107
|
+
<DetailFallback
|
|
108
|
+
section="ontology"
|
|
109
|
+
page="object-types"
|
|
110
|
+
back={back}
|
|
111
|
+
name={humanizeIdentifier(typeId)}
|
|
112
|
+
id={typeId}
|
|
113
|
+
icon={LayoutGrid}
|
|
114
|
+
error={typeQuery.error}
|
|
115
|
+
/>
|
|
116
|
+
)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const staticProps = objectType.properties.filter((p) => p.mode !== "telemetry")
|
|
120
|
+
const telemetryProps = objectType.properties.filter((p) => p.mode === "telemetry")
|
|
121
|
+
const vectorProfiles = Object.entries(objectType.search?.vectors ?? {})
|
|
122
|
+
const displayTitle = humanizeIdentifier(objectType.name || objectType.id)
|
|
123
|
+
|
|
124
|
+
return (
|
|
125
|
+
<SectionPage
|
|
126
|
+
section="ontology"
|
|
127
|
+
page="object-types"
|
|
128
|
+
width="wide"
|
|
129
|
+
back={back}
|
|
130
|
+
icon={<LetterAvatar label={displayTitle} size="md" />}
|
|
131
|
+
title={displayTitle}
|
|
132
|
+
description={objectType.description}
|
|
133
|
+
actions={
|
|
134
|
+
<>
|
|
135
|
+
<Button variant="outline" size="sm" asChild>
|
|
136
|
+
<Link to={objectsOfTypeHref(objectType.id)}>
|
|
137
|
+
<Box /> View objects
|
|
138
|
+
</Link>
|
|
139
|
+
</Button>
|
|
140
|
+
<Button variant="outline" size="sm" asChild>
|
|
141
|
+
<Link to={graphTypeHref(objectType.id)}>
|
|
142
|
+
<Network /> Show in graph
|
|
143
|
+
</Link>
|
|
144
|
+
</Button>
|
|
145
|
+
</>
|
|
146
|
+
}
|
|
147
|
+
>
|
|
148
|
+
{ancestors.length > 0 || subtypes.length > 0 ? (
|
|
149
|
+
<div className="-mt-4 space-y-2">
|
|
150
|
+
{/* Inheritance chain */}
|
|
151
|
+
{ancestors.length > 0 ? (
|
|
152
|
+
<div className="flex flex-wrap items-center gap-1.5 text-xs text-muted-foreground">
|
|
153
|
+
<span className="font-medium uppercase tracking-wider text-[11px]">Inherits</span>
|
|
154
|
+
<div className="flex flex-wrap items-center gap-1">
|
|
155
|
+
{ancestors.map((ancestor, index) => (
|
|
156
|
+
<Fragment key={ancestor.id}>
|
|
157
|
+
<Button
|
|
158
|
+
variant="link"
|
|
159
|
+
className="h-auto p-0 text-xs"
|
|
160
|
+
onClick={() => selectType(ancestor.id)}
|
|
161
|
+
>
|
|
162
|
+
{humanizeIdentifier(ancestor.name || ancestor.id)}
|
|
163
|
+
</Button>
|
|
164
|
+
{index < ancestors.length - 1 ? (
|
|
165
|
+
<ChevronRight className="h-3 w-3 text-muted-foreground/60" />
|
|
166
|
+
) : null}
|
|
167
|
+
</Fragment>
|
|
168
|
+
))}
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
) : null}
|
|
172
|
+
|
|
173
|
+
{/* Subtypes */}
|
|
174
|
+
{subtypes.length > 0 ? (
|
|
175
|
+
<div className="flex flex-wrap items-center gap-1.5 text-xs text-muted-foreground">
|
|
176
|
+
<span className="font-medium uppercase tracking-wider text-[11px]">Extended by</span>
|
|
177
|
+
<div className="flex flex-wrap items-center gap-2">
|
|
178
|
+
{subtypes.map((subtype) => (
|
|
179
|
+
<Button
|
|
180
|
+
key={subtype.id}
|
|
181
|
+
variant="link"
|
|
182
|
+
className="h-auto p-0 text-xs"
|
|
183
|
+
onClick={() => selectType(subtype.id)}
|
|
184
|
+
>
|
|
185
|
+
{humanizeIdentifier(subtype.name || subtype.id)}
|
|
186
|
+
</Button>
|
|
187
|
+
))}
|
|
188
|
+
</div>
|
|
189
|
+
</div>
|
|
190
|
+
) : null}
|
|
191
|
+
</div>
|
|
192
|
+
) : null}
|
|
193
|
+
|
|
194
|
+
{/* Tabs */}
|
|
195
|
+
<Tabs value={resolvedTab} onValueChange={setActiveTab}>
|
|
196
|
+
<div className="relative">
|
|
197
|
+
<div className="overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden overscroll-x-contain pr-8 sm:pr-0">
|
|
198
|
+
<TabsList variant="line" className="min-w-max">
|
|
199
|
+
<TabsTrigger value="properties">
|
|
200
|
+
Properties
|
|
201
|
+
<Count value={objectType.properties.length} />
|
|
202
|
+
</TabsTrigger>
|
|
203
|
+
<TabsTrigger value="vectors">
|
|
204
|
+
Vectors
|
|
205
|
+
<Count value={vectorProfiles.length} />
|
|
206
|
+
</TabsTrigger>
|
|
207
|
+
<TabsTrigger value="links">
|
|
208
|
+
Links
|
|
209
|
+
<Count value={objectType.links.length} />
|
|
210
|
+
</TabsTrigger>
|
|
211
|
+
<TabsTrigger value="actions">
|
|
212
|
+
Actions
|
|
213
|
+
<Count value={objectType.actions.length} />
|
|
214
|
+
</TabsTrigger>
|
|
215
|
+
{projectionCount > 0 ? (
|
|
216
|
+
<TabsTrigger value="projections">
|
|
217
|
+
Projections
|
|
218
|
+
<Count value={projectionCount} />
|
|
219
|
+
</TabsTrigger>
|
|
220
|
+
) : null}
|
|
221
|
+
</TabsList>
|
|
222
|
+
</div>
|
|
223
|
+
<div
|
|
224
|
+
aria-hidden="true"
|
|
225
|
+
className="pointer-events-none absolute inset-y-0 right-0 w-8 bg-gradient-to-l from-background to-transparent sm:hidden"
|
|
226
|
+
/>
|
|
227
|
+
</div>
|
|
228
|
+
|
|
229
|
+
{/* Properties */}
|
|
230
|
+
<TabsContent value="properties" className="space-y-6 pt-4">
|
|
231
|
+
{staticProps.length > 0 ? (
|
|
232
|
+
<PropertiesSection title="Static properties" properties={staticProps} />
|
|
233
|
+
) : null}
|
|
234
|
+
{telemetryProps.length > 0 ? (
|
|
235
|
+
<PropertiesSection title="Telemetry properties" properties={telemetryProps} />
|
|
236
|
+
) : null}
|
|
237
|
+
{objectType.properties.length === 0 ? (
|
|
238
|
+
<EmptySection text="No properties defined." />
|
|
239
|
+
) : null}
|
|
240
|
+
</TabsContent>
|
|
241
|
+
|
|
242
|
+
<TabsContent value="vectors" className="space-y-3 pt-4">
|
|
243
|
+
{vectorProfiles.length === 0 ? (
|
|
244
|
+
<EmptySection text="No vector profiles defined." />
|
|
245
|
+
) : (
|
|
246
|
+
<>
|
|
247
|
+
<p className="text-sm text-muted-foreground">
|
|
248
|
+
Each profile combines its source properties into one embedding per object.
|
|
249
|
+
</p>
|
|
250
|
+
{vectorProfiles.map(([name, profile]) => (
|
|
251
|
+
<Card key={name} className="min-w-0 space-y-4 p-4">
|
|
252
|
+
<h3 className="break-all font-mono text-sm font-medium text-foreground">
|
|
253
|
+
{name}
|
|
254
|
+
</h3>
|
|
255
|
+
<div className="space-y-1.5">
|
|
256
|
+
<SectionLabel>Source properties · in order</SectionLabel>
|
|
257
|
+
<ol className="flex flex-wrap gap-2">
|
|
258
|
+
{profile.source.map((propertyId, index) => (
|
|
259
|
+
<li key={propertyId} className="min-w-0 max-w-full">
|
|
260
|
+
<Badge variant="outline" className="max-w-full whitespace-normal">
|
|
261
|
+
<span className="mr-1 text-muted-foreground">{index + 1}.</span>
|
|
262
|
+
<span className="break-all font-mono text-xs">{propertyId}</span>
|
|
263
|
+
</Badge>
|
|
264
|
+
</li>
|
|
265
|
+
))}
|
|
266
|
+
</ol>
|
|
267
|
+
</div>
|
|
268
|
+
<dl className="grid gap-4 text-xs sm:grid-cols-[1fr_2fr_auto]">
|
|
269
|
+
<div className="min-w-0 space-y-1">
|
|
270
|
+
<dt className="text-muted-foreground">Provider</dt>
|
|
271
|
+
<dd className="break-all font-mono">{profile.model.providerId}</dd>
|
|
272
|
+
</div>
|
|
273
|
+
<div className="min-w-0 space-y-1">
|
|
274
|
+
<dt className="text-muted-foreground">Model</dt>
|
|
275
|
+
<dd className="break-all font-mono">{profile.model.modelId}</dd>
|
|
276
|
+
</div>
|
|
277
|
+
<div className="space-y-1">
|
|
278
|
+
<dt className="text-muted-foreground">Dimensions</dt>
|
|
279
|
+
<dd className="tabular-nums">{profile.model.dimensions}</dd>
|
|
280
|
+
</div>
|
|
281
|
+
</dl>
|
|
282
|
+
</Card>
|
|
283
|
+
))}
|
|
284
|
+
</>
|
|
285
|
+
)}
|
|
286
|
+
</TabsContent>
|
|
287
|
+
|
|
288
|
+
{/* Links */}
|
|
289
|
+
<TabsContent value="links" className="pt-4">
|
|
290
|
+
{objectType.links.length === 0 ? (
|
|
291
|
+
<EmptySection text="No links defined." />
|
|
292
|
+
) : (
|
|
293
|
+
<Card className="overflow-hidden p-0">
|
|
294
|
+
<Table>
|
|
295
|
+
<TableHeader>
|
|
296
|
+
<TableRow>
|
|
297
|
+
<TableHead>Name</TableHead>
|
|
298
|
+
<TableHead>Target</TableHead>
|
|
299
|
+
<TableHead>Cardinality</TableHead>
|
|
300
|
+
<TableHead className="hidden md:table-cell">Description</TableHead>
|
|
301
|
+
</TableRow>
|
|
302
|
+
</TableHeader>
|
|
303
|
+
<TableBody>
|
|
304
|
+
{objectType.links.map((link) => {
|
|
305
|
+
const targets = Array.isArray(link.targetObjectTypeId)
|
|
306
|
+
? link.targetObjectTypeId
|
|
307
|
+
: [link.targetObjectTypeId]
|
|
308
|
+
return (
|
|
309
|
+
<TableRow key={link.id}>
|
|
310
|
+
<TableCell>
|
|
311
|
+
<span className="font-mono text-xs text-foreground">
|
|
312
|
+
{humanizeIdentifier(link.name || link.id)}
|
|
313
|
+
</span>
|
|
314
|
+
</TableCell>
|
|
315
|
+
<TableCell>
|
|
316
|
+
<div className="flex flex-wrap items-center gap-2">
|
|
317
|
+
{targets.map((targetId) =>
|
|
318
|
+
targetId === "*" ? (
|
|
319
|
+
<span
|
|
320
|
+
key={targetId}
|
|
321
|
+
className="text-xs italic text-muted-foreground"
|
|
322
|
+
>
|
|
323
|
+
any type
|
|
324
|
+
</span>
|
|
325
|
+
) : (
|
|
326
|
+
<Button
|
|
327
|
+
key={targetId}
|
|
328
|
+
variant="link"
|
|
329
|
+
className="h-auto p-0 font-mono text-xs"
|
|
330
|
+
onClick={() => selectType(targetId)}
|
|
331
|
+
>
|
|
332
|
+
{targetId}
|
|
333
|
+
</Button>
|
|
334
|
+
)
|
|
335
|
+
)}
|
|
336
|
+
</div>
|
|
337
|
+
</TableCell>
|
|
338
|
+
<TableCell>
|
|
339
|
+
{link.cardinality ? (
|
|
340
|
+
<Badge variant="outline" className="text-[10px]">
|
|
341
|
+
{link.cardinality}
|
|
342
|
+
</Badge>
|
|
343
|
+
) : (
|
|
344
|
+
<span className="text-xs text-muted-foreground/50">—</span>
|
|
345
|
+
)}
|
|
346
|
+
</TableCell>
|
|
347
|
+
<TableCell className="hidden text-xs text-muted-foreground md:table-cell">
|
|
348
|
+
{link.description || <span className="text-muted-foreground/50">—</span>}
|
|
349
|
+
</TableCell>
|
|
350
|
+
</TableRow>
|
|
351
|
+
)
|
|
352
|
+
})}
|
|
353
|
+
</TableBody>
|
|
354
|
+
</Table>
|
|
355
|
+
</Card>
|
|
356
|
+
)}
|
|
357
|
+
</TabsContent>
|
|
358
|
+
|
|
359
|
+
{/* Actions */}
|
|
360
|
+
<TabsContent value="actions" className="space-y-3 pt-4">
|
|
361
|
+
{objectType.actions.length === 0 ? (
|
|
362
|
+
<EmptySection text="No actions defined." />
|
|
363
|
+
) : (
|
|
364
|
+
objectType.actions.map((action) => (
|
|
365
|
+
<Card key={action.id} className="space-y-3 p-4">
|
|
366
|
+
<div className="space-y-1">
|
|
367
|
+
<div className="flex flex-wrap items-baseline gap-x-2 gap-y-1">
|
|
368
|
+
<h3 className="font-mono text-sm font-medium text-foreground">{action.id}</h3>
|
|
369
|
+
{action.params.length === 0 ? (
|
|
370
|
+
<span className="text-xs text-muted-foreground">no parameters</span>
|
|
371
|
+
) : null}
|
|
372
|
+
</div>
|
|
373
|
+
{action.description ? (
|
|
374
|
+
<p className="text-xs leading-5 text-muted-foreground">{action.description}</p>
|
|
375
|
+
) : null}
|
|
376
|
+
</div>
|
|
377
|
+
|
|
378
|
+
{action.params.length > 0 ? (
|
|
379
|
+
<div className="space-y-1.5 rounded-md border border-border bg-muted/40 p-3">
|
|
380
|
+
<p className="text-[10px] font-semibold uppercase tracking-wider text-muted-foreground">
|
|
381
|
+
Parameters
|
|
382
|
+
</p>
|
|
383
|
+
<ul className="space-y-1">
|
|
384
|
+
{action.params.map((param) => (
|
|
385
|
+
<li
|
|
386
|
+
key={param.id}
|
|
387
|
+
className="flex flex-wrap items-baseline gap-x-2 gap-y-1 font-mono text-xs"
|
|
388
|
+
>
|
|
389
|
+
<span className="text-foreground">{param.id}</span>
|
|
390
|
+
<span className="text-muted-foreground/50">:</span>
|
|
391
|
+
<SchemaType schema={param.schema} />
|
|
392
|
+
{param.required ? (
|
|
393
|
+
<Badge variant="outline" className="font-sans text-[9px]">
|
|
394
|
+
required
|
|
395
|
+
</Badge>
|
|
396
|
+
) : null}
|
|
397
|
+
{param.description ? (
|
|
398
|
+
<span className="font-sans text-[11px] text-muted-foreground">
|
|
399
|
+
{param.description}
|
|
400
|
+
</span>
|
|
401
|
+
) : null}
|
|
402
|
+
</li>
|
|
403
|
+
))}
|
|
404
|
+
</ul>
|
|
405
|
+
</div>
|
|
406
|
+
) : null}
|
|
407
|
+
</Card>
|
|
408
|
+
))
|
|
409
|
+
)}
|
|
410
|
+
</TabsContent>
|
|
411
|
+
|
|
412
|
+
{/* Projections */}
|
|
413
|
+
{projectionCount > 0 ? (
|
|
414
|
+
<TabsContent value="projections" className="space-y-6 pt-4">
|
|
415
|
+
{typeProjections.object.length > 0 ? (
|
|
416
|
+
<section className="space-y-2">
|
|
417
|
+
<h3 className="text-[11px] font-semibold uppercase tracking-wider text-muted-foreground">
|
|
418
|
+
Object projections
|
|
419
|
+
</h3>
|
|
420
|
+
<div className="space-y-3">
|
|
421
|
+
{typeProjections.object.map((proj) => (
|
|
422
|
+
<Card key={proj.id} className="space-y-4 p-4">
|
|
423
|
+
<ProjectionHeader id={proj.id} datasetId={proj.datasetId} />
|
|
424
|
+
<PropertyMappings entries={Object.entries(proj.properties)} />
|
|
425
|
+
<ForeignKeys links={proj.links} onSelectType={selectType} />
|
|
426
|
+
</Card>
|
|
427
|
+
))}
|
|
428
|
+
</div>
|
|
429
|
+
</section>
|
|
430
|
+
) : null}
|
|
431
|
+
|
|
432
|
+
{typeProjections.link.length > 0 ? (
|
|
433
|
+
<section className="space-y-2">
|
|
434
|
+
<h3 className="text-[11px] font-semibold uppercase tracking-wider text-muted-foreground">
|
|
435
|
+
Link projections
|
|
436
|
+
</h3>
|
|
437
|
+
<div className="space-y-3">
|
|
438
|
+
{typeProjections.link.map((proj) => (
|
|
439
|
+
<Card key={proj.id} className="space-y-3 p-4">
|
|
440
|
+
<ProjectionHeader id={proj.id} datasetId={proj.datasetId} />
|
|
441
|
+
|
|
442
|
+
<div className="space-y-1.5">
|
|
443
|
+
<SectionLabel>Join</SectionLabel>
|
|
444
|
+
<div className="flex flex-wrap items-baseline gap-1.5 font-mono text-xs">
|
|
445
|
+
<Button
|
|
446
|
+
variant="link"
|
|
447
|
+
className="h-auto p-0 font-mono text-xs"
|
|
448
|
+
onClick={() => selectType(proj.sourceObjectTypeId)}
|
|
449
|
+
>
|
|
450
|
+
{proj.sourceObjectTypeId}
|
|
451
|
+
</Button>
|
|
452
|
+
<span className="text-muted-foreground/60">.{proj.sourceField}</span>
|
|
453
|
+
<span aria-hidden="true" className="text-muted-foreground/40">
|
|
454
|
+
→
|
|
455
|
+
</span>
|
|
456
|
+
<Button
|
|
457
|
+
variant="link"
|
|
458
|
+
className="h-auto p-0 font-mono text-xs"
|
|
459
|
+
onClick={() => selectType(proj.targetObjectTypeId)}
|
|
460
|
+
>
|
|
461
|
+
{proj.targetObjectTypeId}
|
|
462
|
+
</Button>
|
|
463
|
+
<span className="text-muted-foreground/60">.{proj.targetField}</span>
|
|
464
|
+
</div>
|
|
465
|
+
</div>
|
|
466
|
+
</Card>
|
|
467
|
+
))}
|
|
468
|
+
</div>
|
|
469
|
+
</section>
|
|
470
|
+
) : null}
|
|
471
|
+
|
|
472
|
+
{typeProjections.telemetry.length > 0 ? (
|
|
473
|
+
<section className="space-y-2">
|
|
474
|
+
<h3 className="text-[11px] font-semibold uppercase tracking-wider text-muted-foreground">
|
|
475
|
+
Telemetry projections
|
|
476
|
+
</h3>
|
|
477
|
+
<div className="space-y-3">
|
|
478
|
+
{typeProjections.telemetry.map((proj) => (
|
|
479
|
+
<Card key={proj.id} className="space-y-4 p-4">
|
|
480
|
+
<ProjectionHeader id={proj.id} datasetId={proj.datasetId} />
|
|
481
|
+
<div className="space-y-1.5">
|
|
482
|
+
<SectionLabel>Point mapping</SectionLabel>
|
|
483
|
+
<dl className="grid grid-cols-[max-content_max-content_minmax(0,1fr)] items-baseline gap-x-3 gap-y-1 font-mono text-xs">
|
|
484
|
+
<TelemetryMappingRow label="object" column={proj.objectIdField} />
|
|
485
|
+
<TelemetryMappingRow label="at" column={proj.atField} />
|
|
486
|
+
{Object.entries(proj.properties).map(([propertyId, mapping]) => (
|
|
487
|
+
<Fragment key={propertyId}>
|
|
488
|
+
<TelemetryMappingRow label={propertyId} column={mapping.valueField} />
|
|
489
|
+
{mapping.unitField ? (
|
|
490
|
+
<TelemetryMappingRow
|
|
491
|
+
label={`${propertyId} unit`}
|
|
492
|
+
column={mapping.unitField}
|
|
493
|
+
/>
|
|
494
|
+
) : null}
|
|
495
|
+
</Fragment>
|
|
496
|
+
))}
|
|
497
|
+
</dl>
|
|
498
|
+
</div>
|
|
499
|
+
</Card>
|
|
500
|
+
))}
|
|
501
|
+
</div>
|
|
502
|
+
</section>
|
|
503
|
+
) : null}
|
|
504
|
+
</TabsContent>
|
|
505
|
+
) : null}
|
|
506
|
+
</Tabs>
|
|
507
|
+
</SectionPage>
|
|
508
|
+
)
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
function Count({ value }: { value: number }) {
|
|
512
|
+
return (
|
|
513
|
+
<span
|
|
514
|
+
className={cn(
|
|
515
|
+
"ml-1.5 inline-flex items-center justify-center rounded bg-muted px-1.5 text-[10px] font-medium text-muted-foreground tabular-nums",
|
|
516
|
+
value === 0 && "opacity-50"
|
|
517
|
+
)}
|
|
518
|
+
>
|
|
519
|
+
{value}
|
|
520
|
+
</span>
|
|
521
|
+
)
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
function PropertiesSection({
|
|
525
|
+
title,
|
|
526
|
+
properties,
|
|
527
|
+
}: {
|
|
528
|
+
title: string
|
|
529
|
+
properties: {
|
|
530
|
+
id: string
|
|
531
|
+
name: string
|
|
532
|
+
description?: string
|
|
533
|
+
mode?: string
|
|
534
|
+
required?: boolean
|
|
535
|
+
nullable?: boolean
|
|
536
|
+
primary?: boolean
|
|
537
|
+
schema?: unknown
|
|
538
|
+
}[]
|
|
539
|
+
}) {
|
|
540
|
+
const anyDescriptions = properties.some((p) => p.description)
|
|
541
|
+
return (
|
|
542
|
+
<section className="space-y-2">
|
|
543
|
+
<h3 className="text-[11px] font-semibold uppercase tracking-wider text-muted-foreground">
|
|
544
|
+
{title}
|
|
545
|
+
</h3>
|
|
546
|
+
<Card className="overflow-hidden p-0">
|
|
547
|
+
<Table>
|
|
548
|
+
<TableHeader>
|
|
549
|
+
<TableRow>
|
|
550
|
+
<TableHead>Name</TableHead>
|
|
551
|
+
<TableHead>Type</TableHead>
|
|
552
|
+
{anyDescriptions ? (
|
|
553
|
+
<TableHead className="hidden md:table-cell">Description</TableHead>
|
|
554
|
+
) : null}
|
|
555
|
+
<TableHead className="text-right">Flags</TableHead>
|
|
556
|
+
</TableRow>
|
|
557
|
+
</TableHeader>
|
|
558
|
+
<TableBody>
|
|
559
|
+
{properties.map((prop) => (
|
|
560
|
+
<TableRow key={prop.id}>
|
|
561
|
+
<TableCell className="align-top">
|
|
562
|
+
<div className="flex items-center gap-2">
|
|
563
|
+
<span className="font-mono text-xs text-foreground">{prop.id}</span>
|
|
564
|
+
{prop.primary ? (
|
|
565
|
+
<Badge variant="secondary" className="text-[9px]">
|
|
566
|
+
primary
|
|
567
|
+
</Badge>
|
|
568
|
+
) : null}
|
|
569
|
+
</div>
|
|
570
|
+
</TableCell>
|
|
571
|
+
<TableCell className="align-top">
|
|
572
|
+
<SchemaType schema={prop.schema} />
|
|
573
|
+
</TableCell>
|
|
574
|
+
{anyDescriptions ? (
|
|
575
|
+
<TableCell className="hidden align-top text-xs text-muted-foreground md:table-cell">
|
|
576
|
+
{prop.description || <span className="text-muted-foreground/50">—</span>}
|
|
577
|
+
</TableCell>
|
|
578
|
+
) : null}
|
|
579
|
+
<TableCell className="text-right align-top">
|
|
580
|
+
<div className="inline-flex gap-1">
|
|
581
|
+
{prop.required ? (
|
|
582
|
+
<Badge variant="outline" className="text-[9px]">
|
|
583
|
+
required
|
|
584
|
+
</Badge>
|
|
585
|
+
) : null}
|
|
586
|
+
{prop.nullable ? (
|
|
587
|
+
<Badge variant="outline" className="text-[9px]">
|
|
588
|
+
nullable
|
|
589
|
+
</Badge>
|
|
590
|
+
) : null}
|
|
591
|
+
</div>
|
|
592
|
+
</TableCell>
|
|
593
|
+
</TableRow>
|
|
594
|
+
))}
|
|
595
|
+
</TableBody>
|
|
596
|
+
</Table>
|
|
597
|
+
</Card>
|
|
598
|
+
</section>
|
|
599
|
+
)
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
function EmptySection({ text }: { text: string }) {
|
|
603
|
+
return (
|
|
604
|
+
<Card className="overflow-hidden p-8 text-center">
|
|
605
|
+
<p className="text-sm text-muted-foreground">{text}</p>
|
|
606
|
+
</Card>
|
|
607
|
+
)
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
function ProjectionHeader({ id, datasetId }: { id: string; datasetId: string }) {
|
|
611
|
+
return (
|
|
612
|
+
<div className="flex flex-wrap items-baseline gap-2">
|
|
613
|
+
<span className="font-mono text-sm font-medium text-foreground">{id}</span>
|
|
614
|
+
<span className="text-xs text-muted-foreground">from</span>
|
|
615
|
+
<code className="font-mono text-xs text-foreground">{datasetId}</code>
|
|
616
|
+
</div>
|
|
617
|
+
)
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
function SectionLabel({ children }: { children: ReactNode }) {
|
|
621
|
+
return (
|
|
622
|
+
<p className="text-[10px] font-semibold uppercase tracking-wider text-muted-foreground">
|
|
623
|
+
{children}
|
|
624
|
+
</p>
|
|
625
|
+
)
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
function TelemetryMappingRow({ label, column }: { label: string; column: string }) {
|
|
629
|
+
return (
|
|
630
|
+
<Fragment>
|
|
631
|
+
<dt className="text-foreground">{label}</dt>
|
|
632
|
+
<span aria-hidden="true" className="text-muted-foreground/40">
|
|
633
|
+
←
|
|
634
|
+
</span>
|
|
635
|
+
<dd className="truncate text-muted-foreground">{column}</dd>
|
|
636
|
+
</Fragment>
|
|
637
|
+
)
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
function PropertyMappings({ entries }: { entries: [string, string][] }) {
|
|
641
|
+
if (entries.length === 0) return null
|
|
642
|
+
const twoUp = entries.length >= 5
|
|
643
|
+
return (
|
|
644
|
+
<div className="space-y-1.5">
|
|
645
|
+
<SectionLabel>Property mappings</SectionLabel>
|
|
646
|
+
<dl
|
|
647
|
+
className={cn(
|
|
648
|
+
"grid items-baseline gap-x-3 gap-y-1 font-mono text-xs",
|
|
649
|
+
"grid-cols-[max-content_max-content_minmax(0,1fr)]",
|
|
650
|
+
twoUp &&
|
|
651
|
+
"md:grid-cols-[max-content_max-content_minmax(0,1fr)_max-content_max-content_minmax(0,1fr)] md:gap-x-10"
|
|
652
|
+
)}
|
|
653
|
+
>
|
|
654
|
+
{entries.map(([propId, column]) => (
|
|
655
|
+
<Fragment key={propId}>
|
|
656
|
+
<dt className="text-foreground">{propId}</dt>
|
|
657
|
+
<span aria-hidden="true" className="text-muted-foreground/40">
|
|
658
|
+
←
|
|
659
|
+
</span>
|
|
660
|
+
<dd className="truncate text-muted-foreground">{column}</dd>
|
|
661
|
+
</Fragment>
|
|
662
|
+
))}
|
|
663
|
+
</dl>
|
|
664
|
+
</div>
|
|
665
|
+
)
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
function ForeignKeys({
|
|
669
|
+
links,
|
|
670
|
+
onSelectType,
|
|
671
|
+
}: {
|
|
672
|
+
links: Record<
|
|
673
|
+
string,
|
|
674
|
+
{ sourcePropertyId?: string; sourceField?: string; targetObjectTypeId: string }
|
|
675
|
+
>
|
|
676
|
+
onSelectType: (id: string) => void
|
|
677
|
+
}) {
|
|
678
|
+
const entries = Object.entries(links)
|
|
679
|
+
if (entries.length === 0) return null
|
|
680
|
+
return (
|
|
681
|
+
<div className="space-y-1.5">
|
|
682
|
+
<SectionLabel>Foreign keys</SectionLabel>
|
|
683
|
+
<dl className="grid grid-cols-[max-content_max-content_max-content_max-content_max-content] items-baseline gap-x-2 gap-y-1 font-mono text-xs">
|
|
684
|
+
{entries.map(([linkId, fk]) => (
|
|
685
|
+
<Fragment key={linkId}>
|
|
686
|
+
<dt className="text-foreground">{linkId}</dt>
|
|
687
|
+
<span aria-hidden="true" className="text-muted-foreground/40">
|
|
688
|
+
→
|
|
689
|
+
</span>
|
|
690
|
+
<dd>
|
|
691
|
+
<Button
|
|
692
|
+
variant="link"
|
|
693
|
+
className="h-auto p-0 font-mono text-xs"
|
|
694
|
+
onClick={() => onSelectType(fk.targetObjectTypeId)}
|
|
695
|
+
>
|
|
696
|
+
{fk.targetObjectTypeId}
|
|
697
|
+
</Button>
|
|
698
|
+
</dd>
|
|
699
|
+
<span aria-hidden="true" className="text-muted-foreground/40">
|
|
700
|
+
via
|
|
701
|
+
</span>
|
|
702
|
+
<dd className="text-muted-foreground">{formatForeignKeySource(fk)}</dd>
|
|
703
|
+
</Fragment>
|
|
704
|
+
))}
|
|
705
|
+
</dl>
|
|
706
|
+
</div>
|
|
707
|
+
)
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
function formatForeignKeySource(fk: { sourcePropertyId?: string; sourceField?: string }): string {
|
|
711
|
+
return fk.sourcePropertyId ?? fk.sourceField ?? "unknown"
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
function isSchemaRecord(value: unknown): value is Record<string, unknown> {
|
|
715
|
+
return typeof value === "object" && value !== null && !Array.isArray(value)
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* A schema renders on a single (wrapping) line when it is a primitive, an
|
|
720
|
+
* enum, or a container whose element is itself inline. Objects — and any
|
|
721
|
+
* container of objects — expand into a stacked tree instead, so their fields
|
|
722
|
+
* always indent from a single, consistent left edge.
|
|
723
|
+
*/
|
|
724
|
+
function isInlineSchema(schema: unknown): boolean {
|
|
725
|
+
if (typeof schema === "string") return true
|
|
726
|
+
if (!isSchemaRecord(schema) || typeof schema.type !== "string") return true
|
|
727
|
+
switch (schema.type) {
|
|
728
|
+
case "object":
|
|
729
|
+
return false
|
|
730
|
+
case "array":
|
|
731
|
+
return isInlineSchema(schema.items)
|
|
732
|
+
case "map":
|
|
733
|
+
return isInlineSchema(schema.valueSchema)
|
|
734
|
+
case "valueTypeRef":
|
|
735
|
+
return schema._resolved === undefined || isInlineSchema(schema._resolved)
|
|
736
|
+
default:
|
|
737
|
+
return true
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* Renders an ontology property schema in a compact, readable form.
|
|
743
|
+
*
|
|
744
|
+
* Primitives render as their bare type name. Complex schemas expand:
|
|
745
|
+
* enums list their allowed values as chips, objects show their fields,
|
|
746
|
+
* arrays/maps show their element types, and value-type refs show the
|
|
747
|
+
* referenced id (plus the resolved schema when codegen populated it).
|
|
748
|
+
*/
|
|
749
|
+
function SchemaType({ schema }: { schema: unknown }): ReactNode {
|
|
750
|
+
if (typeof schema === "string") {
|
|
751
|
+
return <SchemaPrimitive>{schema}</SchemaPrimitive>
|
|
752
|
+
}
|
|
753
|
+
if (!isSchemaRecord(schema) || typeof schema.type !== "string") {
|
|
754
|
+
return <SchemaPrimitive>unknown</SchemaPrimitive>
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
switch (schema.type) {
|
|
758
|
+
case "enum":
|
|
759
|
+
return <EnumType schema={schema} />
|
|
760
|
+
case "object":
|
|
761
|
+
return <ObjectType schema={schema} />
|
|
762
|
+
case "array":
|
|
763
|
+
return (
|
|
764
|
+
<SchemaContainer
|
|
765
|
+
head={<SchemaKeyword>array</SchemaKeyword>}
|
|
766
|
+
lead="of"
|
|
767
|
+
child={schema.items}
|
|
768
|
+
/>
|
|
769
|
+
)
|
|
770
|
+
case "map":
|
|
771
|
+
return (
|
|
772
|
+
<SchemaContainer
|
|
773
|
+
head={
|
|
774
|
+
<>
|
|
775
|
+
<SchemaKeyword>map</SchemaKeyword>
|
|
776
|
+
<SchemaPrimitive>string</SchemaPrimitive>
|
|
777
|
+
</>
|
|
778
|
+
}
|
|
779
|
+
lead="→"
|
|
780
|
+
child={schema.valueSchema}
|
|
781
|
+
/>
|
|
782
|
+
)
|
|
783
|
+
case "valueTypeRef":
|
|
784
|
+
return (
|
|
785
|
+
<SchemaContainer
|
|
786
|
+
head={
|
|
787
|
+
<span className="font-mono text-xs text-foreground">{String(schema.valueTypeId)}</span>
|
|
788
|
+
}
|
|
789
|
+
lead={schema._resolved === undefined ? undefined : "ref →"}
|
|
790
|
+
child={schema._resolved}
|
|
791
|
+
/>
|
|
792
|
+
)
|
|
793
|
+
default:
|
|
794
|
+
return <SchemaPrimitive>{schema.type}</SchemaPrimitive>
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* Lays out a container schema (`array`, `map`, `valueTypeRef`) as `<head> lead
|
|
800
|
+
* <child>`. When the child is inline it stays on one wrapping line; when the
|
|
801
|
+
* child is a block (an object), the head sits on its own line with the child
|
|
802
|
+
* indented beneath it — never vertically centered against a tall block.
|
|
803
|
+
*/
|
|
804
|
+
function SchemaContainer({
|
|
805
|
+
head,
|
|
806
|
+
lead,
|
|
807
|
+
child,
|
|
808
|
+
}: {
|
|
809
|
+
head: ReactNode
|
|
810
|
+
lead?: string
|
|
811
|
+
child: unknown
|
|
812
|
+
}) {
|
|
813
|
+
if (child === undefined) {
|
|
814
|
+
return <span className="inline-flex flex-wrap items-center gap-1.5">{head}</span>
|
|
815
|
+
}
|
|
816
|
+
if (isInlineSchema(child)) {
|
|
817
|
+
return (
|
|
818
|
+
<span className="inline-flex flex-wrap items-center gap-1.5">
|
|
819
|
+
{head}
|
|
820
|
+
{lead ? <SchemaLead>{lead}</SchemaLead> : null}
|
|
821
|
+
<SchemaType schema={child} />
|
|
822
|
+
</span>
|
|
823
|
+
)
|
|
824
|
+
}
|
|
825
|
+
return (
|
|
826
|
+
<div className="space-y-1">
|
|
827
|
+
<span className="inline-flex flex-wrap items-center gap-1.5">
|
|
828
|
+
{head}
|
|
829
|
+
{lead ? <SchemaLead>{lead}</SchemaLead> : null}
|
|
830
|
+
</span>
|
|
831
|
+
<SchemaNest>
|
|
832
|
+
<SchemaType schema={child} />
|
|
833
|
+
</SchemaNest>
|
|
834
|
+
</div>
|
|
835
|
+
)
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
function SchemaPrimitive({ children }: { children: ReactNode }) {
|
|
839
|
+
return <span className="font-mono text-xs text-muted-foreground">{children}</span>
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
function SchemaLead({ children }: { children: ReactNode }) {
|
|
843
|
+
return <span className="text-[10px] font-medium text-muted-foreground/70">{children}</span>
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
function SchemaNest({ children }: { children: ReactNode }) {
|
|
847
|
+
return <div className="border-l border-border pl-3">{children}</div>
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
function SchemaKeyword({ children }: { children: ReactNode }) {
|
|
851
|
+
return (
|
|
852
|
+
<span className="inline-flex items-center rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] font-medium text-muted-foreground">
|
|
853
|
+
{children}
|
|
854
|
+
</span>
|
|
855
|
+
)
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
function EnumType({ schema }: { schema: Record<string, unknown> }) {
|
|
859
|
+
const values = Array.isArray(schema.values) ? schema.values : []
|
|
860
|
+
const valueType = typeof schema.valueType === "string" ? schema.valueType : null
|
|
861
|
+
return (
|
|
862
|
+
<span className="inline-flex flex-wrap items-center gap-1">
|
|
863
|
+
<SchemaKeyword>enum</SchemaKeyword>
|
|
864
|
+
{valueType ? <SchemaLead>{valueType}</SchemaLead> : null}
|
|
865
|
+
{values.map((value, index) => (
|
|
866
|
+
<span
|
|
867
|
+
key={index}
|
|
868
|
+
className="inline-flex items-center rounded border border-border bg-background px-1.5 py-0.5 font-mono text-[10px] text-foreground"
|
|
869
|
+
>
|
|
870
|
+
{String(value)}
|
|
871
|
+
</span>
|
|
872
|
+
))}
|
|
873
|
+
</span>
|
|
874
|
+
)
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
function ObjectType({ schema }: { schema: Record<string, unknown> }) {
|
|
878
|
+
const properties = isSchemaRecord(schema.properties) ? schema.properties : {}
|
|
879
|
+
const entries = Object.entries(properties)
|
|
880
|
+
return (
|
|
881
|
+
<div className="space-y-1">
|
|
882
|
+
<SchemaKeyword>object</SchemaKeyword>
|
|
883
|
+
{entries.length > 0 ? (
|
|
884
|
+
<SchemaNest>
|
|
885
|
+
<div className="space-y-1.5">
|
|
886
|
+
{entries.map(([name, field]) => {
|
|
887
|
+
const fieldSchema = isSchemaRecord(field) ? field.schema : field
|
|
888
|
+
const required = isSchemaRecord(field) && field.required === true
|
|
889
|
+
const inline = isInlineSchema(fieldSchema)
|
|
890
|
+
return (
|
|
891
|
+
<div key={name} className="space-y-1">
|
|
892
|
+
<div className="flex flex-wrap items-baseline gap-1.5">
|
|
893
|
+
<span className="font-mono text-xs text-foreground">{name}</span>
|
|
894
|
+
{required ? <SchemaLead>required</SchemaLead> : null}
|
|
895
|
+
{inline ? <SchemaType schema={fieldSchema} /> : null}
|
|
896
|
+
</div>
|
|
897
|
+
{inline ? null : (
|
|
898
|
+
<SchemaNest>
|
|
899
|
+
<SchemaType schema={fieldSchema} />
|
|
900
|
+
</SchemaNest>
|
|
901
|
+
)}
|
|
902
|
+
</div>
|
|
903
|
+
)
|
|
904
|
+
})}
|
|
905
|
+
</div>
|
|
906
|
+
</SchemaNest>
|
|
907
|
+
) : null}
|
|
908
|
+
</div>
|
|
909
|
+
)
|
|
910
|
+
}
|