@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,771 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The building blocks every built-in section page shares: page blocks, panels of hairline rows,
|
|
3
|
+
* pills, empty and loading states, the small form and copy controls, and how a run's status and
|
|
4
|
+
* failure read. Every section is made of these, so they look and behave alike.
|
|
5
|
+
*/
|
|
6
|
+
import { isSixbApiError } from "@sixb/client"
|
|
7
|
+
import {
|
|
8
|
+
Button,
|
|
9
|
+
Dialog,
|
|
10
|
+
DialogContent,
|
|
11
|
+
DialogDescription,
|
|
12
|
+
DialogHeader,
|
|
13
|
+
DialogTitle,
|
|
14
|
+
DialogTrigger,
|
|
15
|
+
} from "@sixb/ui/components"
|
|
16
|
+
import { defineMessages, type MessageTree, type Translation, useLocale } from "@sixb/ui/lib/i18n"
|
|
17
|
+
import { cn } from "@sixb/ui/lib/utils"
|
|
18
|
+
import { Check, CircleAlert, Copy, DatabaseZap } from "lucide-react"
|
|
19
|
+
import { type ComponentType, type ReactNode, useMemo, useState } from "react"
|
|
20
|
+
import { Link } from "react-router-dom"
|
|
21
|
+
|
|
22
|
+
type Icon = ComponentType<{ readonly className?: string }>
|
|
23
|
+
|
|
24
|
+
export const en = {
|
|
25
|
+
copy: "Copy",
|
|
26
|
+
copied: "Copied",
|
|
27
|
+
copyFailed: "Copying failed. Select the text and copy it by hand.",
|
|
28
|
+
unknown: "Unknown",
|
|
29
|
+
notFoundTitle: "Not found",
|
|
30
|
+
notFound: (id: string) => `Nothing is called “${id}”. It may have been renamed or removed.`,
|
|
31
|
+
unavailableTitle: "Could not load",
|
|
32
|
+
deniedTitle: "No access",
|
|
33
|
+
denied: "Your role does not allow this. Ask an admin if you should have it.",
|
|
34
|
+
tryAgain: "Try again in a moment.",
|
|
35
|
+
status: {
|
|
36
|
+
queued: "Queued",
|
|
37
|
+
running: "Running",
|
|
38
|
+
waiting: "Waiting",
|
|
39
|
+
succeeded: "Succeeded",
|
|
40
|
+
failed: "Failed",
|
|
41
|
+
cancelled: "Cancelled",
|
|
42
|
+
superseded: "Superseded",
|
|
43
|
+
},
|
|
44
|
+
unrecorded: {
|
|
45
|
+
title: (what: string) => `${what} are not recorded`,
|
|
46
|
+
description:
|
|
47
|
+
"This project's storage keeps no run history. Runs still happen; configure storage that records them to see them here.",
|
|
48
|
+
},
|
|
49
|
+
failure: {
|
|
50
|
+
viewDetails: "Details",
|
|
51
|
+
title: "What went wrong",
|
|
52
|
+
occurredAt: "Occurred",
|
|
53
|
+
upstreamStatus: "Upstream status",
|
|
54
|
+
retry: "Retry",
|
|
55
|
+
retryable: "Sixb retries this",
|
|
56
|
+
notRetryable: "Not retried",
|
|
57
|
+
redacted: "Some details were removed because they may hold secrets.",
|
|
58
|
+
truncated: "The details were cut short because they were too long.",
|
|
59
|
+
copyHint: "Copy everything to share it.",
|
|
60
|
+
},
|
|
61
|
+
} satisfies MessageTree
|
|
62
|
+
|
|
63
|
+
export const fr: Translation<typeof en> = {
|
|
64
|
+
copy: "Copier",
|
|
65
|
+
copied: "Copié",
|
|
66
|
+
copyFailed: "La copie a échoué. Sélectionnez le texte et copiez-le à la main.",
|
|
67
|
+
unknown: "Inconnu",
|
|
68
|
+
notFoundTitle: "Introuvable",
|
|
69
|
+
notFound: (id: string) => `Rien ne s’appelle « ${id} ». Il a peut-être été renommé ou supprimé.`,
|
|
70
|
+
unavailableTitle: "Chargement impossible",
|
|
71
|
+
deniedTitle: "Accès refusé",
|
|
72
|
+
denied:
|
|
73
|
+
"Votre rôle ne le permet pas. Demandez à un administrateur si vous devriez y avoir accès.",
|
|
74
|
+
tryAgain: "Réessayez dans un instant.",
|
|
75
|
+
status: {
|
|
76
|
+
queued: "En file",
|
|
77
|
+
running: "En cours",
|
|
78
|
+
waiting: "En attente",
|
|
79
|
+
succeeded: "Réussi",
|
|
80
|
+
failed: "Échec",
|
|
81
|
+
cancelled: "Annulé",
|
|
82
|
+
superseded: "Remplacé",
|
|
83
|
+
},
|
|
84
|
+
unrecorded: {
|
|
85
|
+
title: (what: string) => `${what} : non enregistrées`,
|
|
86
|
+
description:
|
|
87
|
+
"Le stockage de ce projet ne conserve pas l’historique des exécutions. Elles ont bien lieu ; configurez un stockage qui les enregistre pour les voir ici.",
|
|
88
|
+
},
|
|
89
|
+
failure: {
|
|
90
|
+
viewDetails: "Détails",
|
|
91
|
+
title: "Ce qui s’est mal passé",
|
|
92
|
+
occurredAt: "Survenu",
|
|
93
|
+
upstreamStatus: "Statut du service",
|
|
94
|
+
retry: "Nouvel essai",
|
|
95
|
+
retryable: "Sixb réessaie",
|
|
96
|
+
notRetryable: "Pas de nouvel essai",
|
|
97
|
+
redacted: "Certains détails ont été retirés car ils pouvaient contenir des secrets.",
|
|
98
|
+
truncated: "Les détails ont été tronqués car ils étaient trop longs.",
|
|
99
|
+
copyHint: "Copiez le tout pour le partager.",
|
|
100
|
+
},
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const sectionUiMessages = defineMessages<typeof en>({ en, fr })
|
|
104
|
+
const useSectionUiMessages = sectionUiMessages.useMessages
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* What the API said went wrong, for a person to read: the server's own message, or `fallback`
|
|
108
|
+
* when it gave none. The client's error message names the request and status, which is for logs.
|
|
109
|
+
*/
|
|
110
|
+
export function apiErrorMessage(error: unknown, fallback: string): string {
|
|
111
|
+
const body = isSixbApiError(error) ? error.body : error
|
|
112
|
+
if (body && typeof body === "object" && "error" in body && typeof body.error === "string") {
|
|
113
|
+
return body.error.trim() || fallback
|
|
114
|
+
}
|
|
115
|
+
return fallback
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** Counts and sizes in the reader's locale. */
|
|
119
|
+
export function useNumbers() {
|
|
120
|
+
const locale = useLocale()
|
|
121
|
+
const integer = new Intl.NumberFormat(locale)
|
|
122
|
+
return {
|
|
123
|
+
count: (value: number | undefined) => (typeof value === "number" ? integer.format(value) : "—"),
|
|
124
|
+
bytes(value: number | undefined): string {
|
|
125
|
+
if (typeof value !== "number") return "—"
|
|
126
|
+
if (value === 0) return "0 B"
|
|
127
|
+
const units = ["B", "KB", "MB", "GB", "TB"]
|
|
128
|
+
const index = Math.min(Math.floor(Math.log(value) / Math.log(1024)), units.length - 1)
|
|
129
|
+
const scaled = value / 1024 ** index
|
|
130
|
+
const digits = scaled >= 10 || index === 0 ? 0 : 1
|
|
131
|
+
return `${new Intl.NumberFormat(locale, { maximumFractionDigits: digits }).format(scaled)} ${units[index]}`
|
|
132
|
+
},
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* What to say when something could not be loaded: "Not found" for a 404, "No access" for a 403, and
|
|
138
|
+
* the server's reason otherwise. A refusal names the grant it takes rather than repeat the server's
|
|
139
|
+
* message, which is written for logs and names the principal.
|
|
140
|
+
*/
|
|
141
|
+
export function useLoadFailure(
|
|
142
|
+
error: unknown,
|
|
143
|
+
options: {
|
|
144
|
+
/** What was asked for, for "Nothing is called …". */
|
|
145
|
+
readonly id?: string
|
|
146
|
+
/** What a refused person lacks, such as "Seeing AI usage takes …". */
|
|
147
|
+
readonly denied?: string
|
|
148
|
+
/** What to say when the server gave no reason. */
|
|
149
|
+
readonly fallback?: string
|
|
150
|
+
} = {}
|
|
151
|
+
): { readonly title: string; readonly description: string } {
|
|
152
|
+
const messages = useSectionUiMessages()
|
|
153
|
+
if (isSixbApiError(error) && error.status === 404 && options.id !== undefined) {
|
|
154
|
+
return { title: messages.notFoundTitle, description: messages.notFound(options.id) }
|
|
155
|
+
}
|
|
156
|
+
if (isSixbApiError(error) && error.status === 403) {
|
|
157
|
+
return { title: messages.deniedTitle, description: options.denied ?? messages.denied }
|
|
158
|
+
}
|
|
159
|
+
return {
|
|
160
|
+
title: messages.unavailableTitle,
|
|
161
|
+
description: apiErrorMessage(error, options.fallback ?? messages.tryAgain),
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/** Dates and times in the reader's locale. */
|
|
166
|
+
export function useFormat() {
|
|
167
|
+
const locale = useLocale()
|
|
168
|
+
const unknown = useSectionUiMessages().unknown
|
|
169
|
+
return useMemo(() => {
|
|
170
|
+
const relativeFormat = new Intl.RelativeTimeFormat(locale, { numeric: "auto" })
|
|
171
|
+
const parse = (timestamp: string) => {
|
|
172
|
+
const date = new Date(timestamp)
|
|
173
|
+
return Number.isNaN(date.getTime()) ? null : date
|
|
174
|
+
}
|
|
175
|
+
return {
|
|
176
|
+
date(timestamp: string): string {
|
|
177
|
+
const date = parse(timestamp)
|
|
178
|
+
if (!date) return unknown
|
|
179
|
+
return date.toLocaleDateString(locale, { month: "short", day: "numeric", year: "numeric" })
|
|
180
|
+
},
|
|
181
|
+
dateTime(timestamp: string): string {
|
|
182
|
+
const date = parse(timestamp)
|
|
183
|
+
if (!date) return unknown
|
|
184
|
+
return date.toLocaleString(locale, { dateStyle: "medium", timeStyle: "short" })
|
|
185
|
+
},
|
|
186
|
+
/** "now", "5 minutes ago", "yesterday", in the reader's language. */
|
|
187
|
+
relative(timestamp: string): string {
|
|
188
|
+
const date = parse(timestamp)
|
|
189
|
+
if (!date) return unknown
|
|
190
|
+
const seconds = Math.round((date.getTime() - Date.now()) / 1000)
|
|
191
|
+
const minutes = Math.round(seconds / 60)
|
|
192
|
+
const hours = Math.round(minutes / 60)
|
|
193
|
+
const days = Math.round(hours / 24)
|
|
194
|
+
if (Math.abs(seconds) < 60) return relativeFormat.format(0, "second")
|
|
195
|
+
if (Math.abs(minutes) < 60) return relativeFormat.format(minutes, "minute")
|
|
196
|
+
if (Math.abs(hours) < 24) return relativeFormat.format(hours, "hour")
|
|
197
|
+
return relativeFormat.format(days, "day")
|
|
198
|
+
},
|
|
199
|
+
}
|
|
200
|
+
}, [locale, unknown])
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// ---------------------------------------------------------------------------
|
|
204
|
+
// Layout: a page is a stack of blocks, each a small heading over a panel of hairline rows.
|
|
205
|
+
// ---------------------------------------------------------------------------
|
|
206
|
+
|
|
207
|
+
/** A titled block of a section page: heading and actions over its panel. */
|
|
208
|
+
export function PageSection({
|
|
209
|
+
title,
|
|
210
|
+
description,
|
|
211
|
+
action,
|
|
212
|
+
children,
|
|
213
|
+
}: {
|
|
214
|
+
readonly title?: string
|
|
215
|
+
readonly description?: string
|
|
216
|
+
readonly action?: ReactNode
|
|
217
|
+
readonly children: ReactNode
|
|
218
|
+
}) {
|
|
219
|
+
return (
|
|
220
|
+
<section className="flex flex-col gap-3">
|
|
221
|
+
{title || action ? (
|
|
222
|
+
<div className="flex items-end justify-between gap-4">
|
|
223
|
+
<div className="min-w-0">
|
|
224
|
+
{title ? (
|
|
225
|
+
<h2 className="text-[0.9375rem] leading-6 font-semibold tracking-[-0.01em]">
|
|
226
|
+
{title}
|
|
227
|
+
</h2>
|
|
228
|
+
) : null}
|
|
229
|
+
{description ? (
|
|
230
|
+
<p className="text-[0.8125rem] leading-5 text-muted-foreground">{description}</p>
|
|
231
|
+
) : null}
|
|
232
|
+
</div>
|
|
233
|
+
{action ? <div className="flex shrink-0 items-center gap-2">{action}</div> : null}
|
|
234
|
+
</div>
|
|
235
|
+
) : null}
|
|
236
|
+
{children}
|
|
237
|
+
</section>
|
|
238
|
+
)
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/** A white card on the page's sheet. Rows inside are separated by hairlines. */
|
|
242
|
+
export function Panel({
|
|
243
|
+
toolbar,
|
|
244
|
+
footer,
|
|
245
|
+
children,
|
|
246
|
+
}: {
|
|
247
|
+
readonly toolbar?: ReactNode
|
|
248
|
+
readonly footer?: ReactNode
|
|
249
|
+
readonly children: ReactNode
|
|
250
|
+
}) {
|
|
251
|
+
return (
|
|
252
|
+
<div className="overflow-hidden rounded-xl border border-border bg-card shadow-[0_1px_2px_0_rgb(0_0_0/0.04)]">
|
|
253
|
+
{toolbar ? (
|
|
254
|
+
<div className="flex flex-wrap items-center gap-2 border-b border-border px-3 py-2.5">
|
|
255
|
+
{toolbar}
|
|
256
|
+
</div>
|
|
257
|
+
) : null}
|
|
258
|
+
<div className="divide-y divide-border">{children}</div>
|
|
259
|
+
{footer ? (
|
|
260
|
+
<div className="border-t border-border bg-muted/40 px-5 py-3 text-[0.8125rem] leading-5 text-muted-foreground">
|
|
261
|
+
{footer}
|
|
262
|
+
</div>
|
|
263
|
+
) : null}
|
|
264
|
+
</div>
|
|
265
|
+
)
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* One row of a panel: a leading mark, its text, and trailing actions. With `href` or `onClick` the
|
|
270
|
+
* row's text opens something; trailing actions stay their own targets.
|
|
271
|
+
*/
|
|
272
|
+
export function PanelRow({
|
|
273
|
+
leading,
|
|
274
|
+
title,
|
|
275
|
+
meta,
|
|
276
|
+
trailing,
|
|
277
|
+
href,
|
|
278
|
+
onClick,
|
|
279
|
+
muted,
|
|
280
|
+
children,
|
|
281
|
+
}: {
|
|
282
|
+
readonly leading?: ReactNode
|
|
283
|
+
readonly title: ReactNode
|
|
284
|
+
readonly meta?: ReactNode
|
|
285
|
+
readonly trailing?: ReactNode
|
|
286
|
+
readonly href?: string
|
|
287
|
+
readonly onClick?: () => void
|
|
288
|
+
readonly muted?: boolean
|
|
289
|
+
/**
|
|
290
|
+
* Shown under the row's text, such as a failure. Only on a row without `href` or `onClick`: a
|
|
291
|
+
* failure's Details button cannot sit inside a link or a button.
|
|
292
|
+
*/
|
|
293
|
+
readonly children?: ReactNode
|
|
294
|
+
}) {
|
|
295
|
+
const body = (
|
|
296
|
+
<>
|
|
297
|
+
{leading ? <div className="shrink-0">{leading}</div> : null}
|
|
298
|
+
<div className={cn("min-w-0 flex-1", muted && "opacity-60")}>
|
|
299
|
+
<div className="flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 text-sm font-medium">
|
|
300
|
+
{title}
|
|
301
|
+
</div>
|
|
302
|
+
{meta ? (
|
|
303
|
+
<div className="mt-0.5 flex min-w-0 flex-wrap items-center gap-x-1.5 text-[0.8125rem] text-muted-foreground">
|
|
304
|
+
{meta}
|
|
305
|
+
</div>
|
|
306
|
+
) : null}
|
|
307
|
+
{children ? <div className="mt-2 min-w-0">{children}</div> : null}
|
|
308
|
+
</div>
|
|
309
|
+
</>
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
if (href || onClick) {
|
|
313
|
+
const targetClass =
|
|
314
|
+
"flex min-w-0 flex-1 items-center gap-3.5 py-3.5 pl-4 text-left outline-none focus-visible:bg-muted/60"
|
|
315
|
+
return (
|
|
316
|
+
<div className="group flex items-center gap-3 pr-3 transition-colors hover:bg-muted/40">
|
|
317
|
+
{href ? (
|
|
318
|
+
<Link to={href} className={targetClass}>
|
|
319
|
+
{body}
|
|
320
|
+
</Link>
|
|
321
|
+
) : (
|
|
322
|
+
<button type="button" onClick={onClick} className={targetClass}>
|
|
323
|
+
{body}
|
|
324
|
+
</button>
|
|
325
|
+
)}
|
|
326
|
+
{trailing ? <div className="flex shrink-0 items-center gap-2">{trailing}</div> : null}
|
|
327
|
+
</div>
|
|
328
|
+
)
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
return (
|
|
332
|
+
<div className="flex items-center gap-3.5 px-4 py-3.5">
|
|
333
|
+
{body}
|
|
334
|
+
{trailing ? <div className="flex shrink-0 items-center gap-2">{trailing}</div> : null}
|
|
335
|
+
</div>
|
|
336
|
+
)
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/** Separates the facts on a row's second line. */
|
|
340
|
+
export function MetaDot() {
|
|
341
|
+
return (
|
|
342
|
+
<span aria-hidden className="text-muted-foreground/50">
|
|
343
|
+
·
|
|
344
|
+
</span>
|
|
345
|
+
)
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/** A small tile holding an icon, leading a row or an empty state. */
|
|
349
|
+
export function IconTile({
|
|
350
|
+
icon: Icon,
|
|
351
|
+
size = "md",
|
|
352
|
+
}: {
|
|
353
|
+
readonly icon: Icon
|
|
354
|
+
readonly size?: "md" | "lg"
|
|
355
|
+
}) {
|
|
356
|
+
return (
|
|
357
|
+
<span
|
|
358
|
+
aria-hidden
|
|
359
|
+
className={cn(
|
|
360
|
+
"flex items-center justify-center border border-border bg-background text-muted-foreground shadow-[0_1px_2px_0_rgb(0_0_0/0.04)]",
|
|
361
|
+
size === "lg" ? "size-11 rounded-xl" : "size-9 rounded-lg"
|
|
362
|
+
)}
|
|
363
|
+
>
|
|
364
|
+
<Icon className={size === "lg" ? "size-5" : "size-4"} />
|
|
365
|
+
</span>
|
|
366
|
+
)
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export type Tone = "ok" | "warn" | "error" | "info" | "muted"
|
|
370
|
+
|
|
371
|
+
const toneClasses: Record<Tone, string> = {
|
|
372
|
+
ok: "bg-emerald-500",
|
|
373
|
+
warn: "bg-amber-500",
|
|
374
|
+
error: "bg-red-500",
|
|
375
|
+
info: "bg-sky-500",
|
|
376
|
+
muted: "bg-muted-foreground/50",
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/** A short status in a quiet pill, led by a colored dot unless `tone` is omitted. */
|
|
380
|
+
export function Pill({ tone, children }: { readonly tone?: Tone; readonly children: ReactNode }) {
|
|
381
|
+
return (
|
|
382
|
+
<span className="inline-flex h-5 shrink-0 items-center gap-1.5 rounded-full border border-border bg-background px-2 text-[0.6875rem] font-medium whitespace-nowrap text-foreground/75">
|
|
383
|
+
{tone ? (
|
|
384
|
+
<span aria-hidden className={cn("size-1.5 rounded-full", toneClasses[tone])} />
|
|
385
|
+
) : null}
|
|
386
|
+
{children}
|
|
387
|
+
</span>
|
|
388
|
+
)
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/** The panel body while its rows load. */
|
|
392
|
+
export function PanelSkeleton({ rows = 3 }: { readonly rows?: number }) {
|
|
393
|
+
return (
|
|
394
|
+
<>
|
|
395
|
+
{Array.from({ length: rows }, (_, index) => (
|
|
396
|
+
<div key={index} className="flex items-center gap-3.5 px-4 py-3.5">
|
|
397
|
+
<span className="size-9 shrink-0 animate-pulse rounded-full bg-muted" />
|
|
398
|
+
<span className="flex flex-1 flex-col gap-2">
|
|
399
|
+
<span className="h-3 w-40 animate-pulse rounded bg-muted" />
|
|
400
|
+
<span className="h-2.5 w-64 max-w-full animate-pulse rounded bg-muted/70" />
|
|
401
|
+
</span>
|
|
402
|
+
</div>
|
|
403
|
+
))}
|
|
404
|
+
</>
|
|
405
|
+
)
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/** What a panel shows with nothing in it, or when it could not load. */
|
|
409
|
+
export function PanelEmpty({
|
|
410
|
+
icon,
|
|
411
|
+
title,
|
|
412
|
+
description,
|
|
413
|
+
action,
|
|
414
|
+
tone = "muted",
|
|
415
|
+
}: {
|
|
416
|
+
readonly icon: Icon
|
|
417
|
+
readonly title: string
|
|
418
|
+
readonly description?: string
|
|
419
|
+
readonly action?: ReactNode
|
|
420
|
+
readonly tone?: "muted" | "error"
|
|
421
|
+
}) {
|
|
422
|
+
return (
|
|
423
|
+
<div className="flex flex-col items-center px-6 py-12 text-center">
|
|
424
|
+
{tone === "error" ? (
|
|
425
|
+
<IconTile icon={CircleAlert} size="lg" />
|
|
426
|
+
) : (
|
|
427
|
+
<IconTile icon={icon} size="lg" />
|
|
428
|
+
)}
|
|
429
|
+
<p className="mt-4 text-sm font-medium">{title}</p>
|
|
430
|
+
{description ? (
|
|
431
|
+
<p className="mt-1 max-w-[44ch] text-[0.8125rem] leading-5 text-muted-foreground">
|
|
432
|
+
{description}
|
|
433
|
+
</p>
|
|
434
|
+
) : null}
|
|
435
|
+
{action ? <div className="mt-5">{action}</div> : null}
|
|
436
|
+
</div>
|
|
437
|
+
)
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/** Segmented tabs in a panel's toolbar, each with a count. */
|
|
441
|
+
export function ToolbarTabs<TTab extends string>({
|
|
442
|
+
tabs,
|
|
443
|
+
value,
|
|
444
|
+
onChange,
|
|
445
|
+
}: {
|
|
446
|
+
readonly tabs: readonly { readonly id: TTab; readonly label: string; readonly count?: number }[]
|
|
447
|
+
readonly value: TTab
|
|
448
|
+
readonly onChange: (tab: TTab) => void
|
|
449
|
+
}) {
|
|
450
|
+
return (
|
|
451
|
+
<div role="tablist" className="flex items-center gap-1">
|
|
452
|
+
{tabs.map((tab) => (
|
|
453
|
+
<button
|
|
454
|
+
key={tab.id}
|
|
455
|
+
type="button"
|
|
456
|
+
role="tab"
|
|
457
|
+
aria-selected={value === tab.id}
|
|
458
|
+
onClick={() => onChange(tab.id)}
|
|
459
|
+
className={cn(
|
|
460
|
+
"inline-flex h-7 items-center gap-1.5 rounded-md px-2.5 text-[0.8125rem] font-medium transition-colors",
|
|
461
|
+
value === tab.id
|
|
462
|
+
? "bg-muted text-foreground"
|
|
463
|
+
: "text-muted-foreground hover:bg-muted/60 hover:text-foreground"
|
|
464
|
+
)}
|
|
465
|
+
>
|
|
466
|
+
{tab.label}
|
|
467
|
+
{tab.count === undefined ? null : (
|
|
468
|
+
<span className="text-xs text-muted-foreground tabular-nums">{tab.count}</span>
|
|
469
|
+
)}
|
|
470
|
+
</button>
|
|
471
|
+
))}
|
|
472
|
+
</div>
|
|
473
|
+
)
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/** A form field: label, control, optional hint. */
|
|
477
|
+
export function Field({
|
|
478
|
+
label,
|
|
479
|
+
htmlFor,
|
|
480
|
+
hint,
|
|
481
|
+
children,
|
|
482
|
+
}: {
|
|
483
|
+
readonly label: ReactNode
|
|
484
|
+
readonly htmlFor?: string
|
|
485
|
+
readonly hint?: ReactNode
|
|
486
|
+
readonly children: ReactNode
|
|
487
|
+
}) {
|
|
488
|
+
return (
|
|
489
|
+
<div className="flex flex-col gap-2">
|
|
490
|
+
{htmlFor ? (
|
|
491
|
+
<label htmlFor={htmlFor} className="text-[0.8125rem] font-medium">
|
|
492
|
+
{label}
|
|
493
|
+
</label>
|
|
494
|
+
) : (
|
|
495
|
+
<span className="text-[0.8125rem] font-medium">{label}</span>
|
|
496
|
+
)}
|
|
497
|
+
{children}
|
|
498
|
+
{hint ? <p className="text-xs leading-4 text-muted-foreground">{hint}</p> : null}
|
|
499
|
+
</div>
|
|
500
|
+
)
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/** Copies `value`, says so for a moment, and explains when the browser refuses. */
|
|
504
|
+
export function CopyButton({
|
|
505
|
+
value,
|
|
506
|
+
compact = false,
|
|
507
|
+
}: {
|
|
508
|
+
readonly value: string
|
|
509
|
+
/** Only the icon, named by its tooltip, for a spot beside an id or a value. */
|
|
510
|
+
readonly compact?: boolean
|
|
511
|
+
}) {
|
|
512
|
+
const messages = useSectionUiMessages()
|
|
513
|
+
const [state, setState] = useState<"idle" | "copied" | "failed">("idle")
|
|
514
|
+
|
|
515
|
+
const copy = async () => {
|
|
516
|
+
try {
|
|
517
|
+
await navigator.clipboard.writeText(value)
|
|
518
|
+
setState("copied")
|
|
519
|
+
window.setTimeout(() => setState("idle"), 1600)
|
|
520
|
+
} catch {
|
|
521
|
+
setState("failed")
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
return (
|
|
526
|
+
<Button
|
|
527
|
+
type="button"
|
|
528
|
+
variant="ghost"
|
|
529
|
+
size={compact ? "icon-xs" : "sm"}
|
|
530
|
+
onClick={copy}
|
|
531
|
+
title={
|
|
532
|
+
state === "failed"
|
|
533
|
+
? messages.copyFailed
|
|
534
|
+
: compact
|
|
535
|
+
? messages[state === "copied" ? "copied" : "copy"]
|
|
536
|
+
: undefined
|
|
537
|
+
}
|
|
538
|
+
aria-label={compact ? messages.copy : undefined}
|
|
539
|
+
className="shrink-0 text-muted-foreground"
|
|
540
|
+
>
|
|
541
|
+
{state === "copied" ? <Check /> : <Copy />}
|
|
542
|
+
{compact ? null : state === "copied" ? messages.copied : messages.copy}
|
|
543
|
+
</Button>
|
|
544
|
+
)
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
export type RunStatus =
|
|
548
|
+
| "queued"
|
|
549
|
+
| "running"
|
|
550
|
+
| "waiting"
|
|
551
|
+
| "succeeded"
|
|
552
|
+
| "failed"
|
|
553
|
+
| "cancelled"
|
|
554
|
+
| "superseded"
|
|
555
|
+
|
|
556
|
+
const statusTones: Record<RunStatus, Tone> = {
|
|
557
|
+
queued: "muted",
|
|
558
|
+
running: "info",
|
|
559
|
+
waiting: "warn",
|
|
560
|
+
succeeded: "ok",
|
|
561
|
+
failed: "error",
|
|
562
|
+
cancelled: "warn",
|
|
563
|
+
superseded: "muted",
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
/** A run's status as a pill. */
|
|
567
|
+
export function RunStatusPill({ status }: { readonly status: RunStatus }) {
|
|
568
|
+
const messages = useSectionUiMessages().status
|
|
569
|
+
return <Pill tone={statusTones[status]}>{messages[status]}</Pill>
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
/** The labels of run statuses, for a page that names one outside a pill. */
|
|
573
|
+
export function useRunStatusLabels() {
|
|
574
|
+
return useSectionUiMessages().status
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
/** An identifier as words: `sync-satellite-orbit` → "Sync satellite orbit". */
|
|
578
|
+
export function humanize(id: string): string {
|
|
579
|
+
const words = id
|
|
580
|
+
.replace(/[._-]+/g, " ")
|
|
581
|
+
.replace(/([a-z])([A-Z])/g, "$1 $2")
|
|
582
|
+
.trim()
|
|
583
|
+
return words ? words.charAt(0).toUpperCase() + words.slice(1) : id
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
/** How long something took, compactly: "<1s", "12s", "4m 30s", "2h 5m". */
|
|
587
|
+
export function formatDuration(
|
|
588
|
+
startedAt: string | undefined,
|
|
589
|
+
finishedAt: string | undefined
|
|
590
|
+
): string {
|
|
591
|
+
if (!startedAt || !finishedAt) return "—"
|
|
592
|
+
const ms = new Date(finishedAt).getTime() - new Date(startedAt).getTime()
|
|
593
|
+
if (!Number.isFinite(ms) || ms < 0) return "—"
|
|
594
|
+
if (ms < 1000) return "<1s"
|
|
595
|
+
const seconds = Math.round(ms / 1000)
|
|
596
|
+
if (seconds < 60) return `${seconds}s`
|
|
597
|
+
const minutes = Math.floor(seconds / 60)
|
|
598
|
+
if (minutes < 60) return seconds % 60 ? `${minutes}m ${seconds % 60}s` : `${minutes}m`
|
|
599
|
+
const hours = Math.floor(minutes / 60)
|
|
600
|
+
return minutes % 60 ? `${hours}h ${minutes % 60}m` : `${hours}h`
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
export function isUnrecorded(error: unknown): boolean {
|
|
604
|
+
return isSixbApiError(error) && error.status === 501
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
/** Shown when a run history is not recorded because no storage keeps it. */
|
|
608
|
+
export function UnrecordedHistory({ what }: { readonly what: string }) {
|
|
609
|
+
const messages = useSectionUiMessages().unrecorded
|
|
610
|
+
return (
|
|
611
|
+
<PanelEmpty
|
|
612
|
+
icon={DatabaseZap}
|
|
613
|
+
title={messages.title(what)}
|
|
614
|
+
description={messages.description}
|
|
615
|
+
/>
|
|
616
|
+
)
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
interface Failure {
|
|
620
|
+
readonly code: string
|
|
621
|
+
readonly message: string
|
|
622
|
+
readonly at?: string
|
|
623
|
+
readonly httpStatus?: number
|
|
624
|
+
readonly retryable?: boolean
|
|
625
|
+
readonly redacted?: boolean
|
|
626
|
+
readonly truncated?: boolean
|
|
627
|
+
readonly details?: unknown
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
/** What went wrong, in red, with its code and a dialog of everything recorded about it. */
|
|
631
|
+
export function FailureSummary({
|
|
632
|
+
failure,
|
|
633
|
+
compact = false,
|
|
634
|
+
}: {
|
|
635
|
+
readonly failure: Failure
|
|
636
|
+
/** One line, for rows; the full message is in the dialog. */
|
|
637
|
+
readonly compact?: boolean
|
|
638
|
+
}) {
|
|
639
|
+
const messages = useSectionUiMessages().failure
|
|
640
|
+
return (
|
|
641
|
+
<div className="min-w-0">
|
|
642
|
+
<p
|
|
643
|
+
className={cn(
|
|
644
|
+
"text-[0.8125rem] text-red-600 dark:text-red-400",
|
|
645
|
+
compact ? "truncate" : "break-words whitespace-pre-wrap"
|
|
646
|
+
)}
|
|
647
|
+
title={compact ? failure.message : undefined}
|
|
648
|
+
>
|
|
649
|
+
{failure.message}
|
|
650
|
+
</p>
|
|
651
|
+
<div className="mt-0.5 flex items-center gap-2">
|
|
652
|
+
<span className="truncate font-mono text-[0.6875rem] text-muted-foreground">
|
|
653
|
+
{failure.code}
|
|
654
|
+
</span>
|
|
655
|
+
<Dialog>
|
|
656
|
+
<DialogTrigger asChild>
|
|
657
|
+
<Button
|
|
658
|
+
type="button"
|
|
659
|
+
variant="link"
|
|
660
|
+
size="sm"
|
|
661
|
+
className="h-auto p-0 text-[0.6875rem] text-muted-foreground"
|
|
662
|
+
>
|
|
663
|
+
{messages.viewDetails}
|
|
664
|
+
</Button>
|
|
665
|
+
</DialogTrigger>
|
|
666
|
+
<DialogContent className="max-h-[85dvh] gap-5 overflow-y-auto sm:max-w-2xl">
|
|
667
|
+
<DialogHeader>
|
|
668
|
+
<DialogTitle>{messages.title}</DialogTitle>
|
|
669
|
+
<DialogDescription className="font-mono text-xs break-all">
|
|
670
|
+
{failure.code}
|
|
671
|
+
</DialogDescription>
|
|
672
|
+
</DialogHeader>
|
|
673
|
+
<p className="text-sm leading-6 break-words whitespace-pre-wrap text-red-600 dark:text-red-400">
|
|
674
|
+
{failure.message}
|
|
675
|
+
</p>
|
|
676
|
+
<dl className="grid grid-cols-[auto_minmax(0,1fr)] gap-x-6 gap-y-2 text-[0.8125rem]">
|
|
677
|
+
{failure.at ? (
|
|
678
|
+
<Fact label={messages.occurredAt}>
|
|
679
|
+
<span className="font-mono text-xs">{failure.at}</span>
|
|
680
|
+
</Fact>
|
|
681
|
+
) : null}
|
|
682
|
+
{failure.httpStatus !== undefined ? (
|
|
683
|
+
<Fact label={messages.upstreamStatus}>
|
|
684
|
+
<span className="font-mono text-xs">{failure.httpStatus}</span>
|
|
685
|
+
</Fact>
|
|
686
|
+
) : null}
|
|
687
|
+
{failure.retryable !== undefined ? (
|
|
688
|
+
<Fact label={messages.retry}>
|
|
689
|
+
{failure.retryable ? messages.retryable : messages.notRetryable}
|
|
690
|
+
</Fact>
|
|
691
|
+
) : null}
|
|
692
|
+
</dl>
|
|
693
|
+
{failure.details !== undefined ? (
|
|
694
|
+
<pre className="max-h-72 overflow-auto rounded-lg border border-border bg-muted/40 p-3 font-mono text-xs leading-5 break-all whitespace-pre-wrap">
|
|
695
|
+
{JSON.stringify(failure.details, null, 2)}
|
|
696
|
+
</pre>
|
|
697
|
+
) : null}
|
|
698
|
+
{failure.redacted ? (
|
|
699
|
+
<p className="text-xs text-muted-foreground">{messages.redacted}</p>
|
|
700
|
+
) : null}
|
|
701
|
+
{failure.truncated ? (
|
|
702
|
+
<p className="text-xs text-muted-foreground">{messages.truncated}</p>
|
|
703
|
+
) : null}
|
|
704
|
+
<div className="flex items-center gap-2 text-xs text-muted-foreground">
|
|
705
|
+
<CopyButton value={JSON.stringify(failure, null, 2)} />
|
|
706
|
+
{messages.copyHint}
|
|
707
|
+
</div>
|
|
708
|
+
</DialogContent>
|
|
709
|
+
</Dialog>
|
|
710
|
+
</div>
|
|
711
|
+
</div>
|
|
712
|
+
)
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
function Fact({ label, children }: { readonly label: string; readonly children: ReactNode }) {
|
|
716
|
+
return (
|
|
717
|
+
<>
|
|
718
|
+
<dt className="text-muted-foreground">{label}</dt>
|
|
719
|
+
<dd className="min-w-0">{children}</dd>
|
|
720
|
+
</>
|
|
721
|
+
)
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
/** A grid of figures at the top of a detail page, such as a run's status and duration. */
|
|
725
|
+
export function Stats({
|
|
726
|
+
items,
|
|
727
|
+
}: {
|
|
728
|
+
readonly items: readonly { readonly label: string; readonly value: ReactNode }[]
|
|
729
|
+
}) {
|
|
730
|
+
return (
|
|
731
|
+
<div className="grid grid-cols-2 overflow-hidden rounded-xl border border-border bg-card shadow-[0_1px_2px_0_rgb(0_0_0/0.04)] lg:grid-cols-4">
|
|
732
|
+
{items.map((item, index) => (
|
|
733
|
+
<div
|
|
734
|
+
key={item.label}
|
|
735
|
+
className={cn(
|
|
736
|
+
"min-w-0 border-border px-4 py-3.5 sm:px-5 sm:py-4",
|
|
737
|
+
index % 2 === 1 && "border-l",
|
|
738
|
+
index >= 2 && "border-t lg:border-t-0",
|
|
739
|
+
index % 4 !== 0 && "lg:border-l"
|
|
740
|
+
)}
|
|
741
|
+
>
|
|
742
|
+
<p className="text-xs text-muted-foreground">{item.label}</p>
|
|
743
|
+
<div className="mt-1.5 min-w-0 truncate text-[0.9375rem] font-medium tabular-nums">
|
|
744
|
+
{item.value}
|
|
745
|
+
</div>
|
|
746
|
+
</div>
|
|
747
|
+
))}
|
|
748
|
+
</div>
|
|
749
|
+
)
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
/** Label and value rows in a panel, for an item's details. */
|
|
753
|
+
export function Facts({
|
|
754
|
+
items,
|
|
755
|
+
}: {
|
|
756
|
+
readonly items: readonly { readonly label: string; readonly value: ReactNode }[]
|
|
757
|
+
}) {
|
|
758
|
+
return (
|
|
759
|
+
<>
|
|
760
|
+
{items.map((item) => (
|
|
761
|
+
<div
|
|
762
|
+
key={item.label}
|
|
763
|
+
className="grid gap-1 px-5 py-3.5 text-[0.8125rem] sm:grid-cols-[10rem_minmax(0,1fr)] sm:gap-6"
|
|
764
|
+
>
|
|
765
|
+
<span className="text-muted-foreground">{item.label}</span>
|
|
766
|
+
<span className="min-w-0 break-words">{item.value}</span>
|
|
767
|
+
</div>
|
|
768
|
+
))}
|
|
769
|
+
</>
|
|
770
|
+
)
|
|
771
|
+
}
|