@sixb/app 0.2.0 → 0.2.3
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/assets/connector-icons/README.md +1 -0
- package/assets/connector-icons/fleetio.ico +0 -0
- package/dist/agent/activity-label.d.ts.map +1 -1
- package/dist/agent/agent-chat.d.ts +9 -2
- package/dist/agent/agent-chat.d.ts.map +1 -1
- package/dist/agent/agent-panel.d.ts +9 -1
- package/dist/agent/agent-panel.d.ts.map +1 -1
- package/dist/agent/agent-surface.d.ts.map +1 -1
- package/dist/agent/artifact-card.d.ts +3 -1
- package/dist/agent/artifact-card.d.ts.map +1 -1
- package/dist/agent/artifact-panel.d.ts +7 -1
- package/dist/agent/artifact-panel.d.ts.map +1 -1
- package/dist/agent/background/background-card.d.ts +10 -0
- package/dist/agent/background/background-card.d.ts.map +1 -0
- package/dist/agent/background/background-tool-row.d.ts +9 -0
- package/dist/agent/background/background-tool-row.d.ts.map +1 -0
- package/dist/agent/background/context.d.ts +23 -0
- package/dist/agent/background/context.d.ts.map +1 -0
- package/dist/agent/background/interpret.d.ts +116 -0
- package/dist/agent/background/interpret.d.ts.map +1 -0
- package/dist/agent/bash/bash-tool-view.d.ts.map +1 -1
- package/dist/agent/bash/interpret.d.ts +4 -0
- package/dist/agent/bash/interpret.d.ts.map +1 -1
- package/dist/agent/components/composer-menu.d.ts +3 -1
- package/dist/agent/components/composer-menu.d.ts.map +1 -1
- package/dist/agent/components/composer-place.d.ts +13 -0
- package/dist/agent/components/composer-place.d.ts.map +1 -0
- package/dist/agent/components/composer.d.ts +23 -1
- package/dist/agent/components/composer.d.ts.map +1 -1
- package/dist/agent/components/computer-place.d.ts +3 -1
- package/dist/agent/components/computer-place.d.ts.map +1 -1
- package/dist/agent/components/context-chips.d.ts.map +1 -1
- package/dist/agent/components/context-meter.d.ts +1 -1
- package/dist/agent/components/conversation-panel.d.ts +3 -1
- package/dist/agent/components/conversation-panel.d.ts.map +1 -1
- package/dist/agent/components/message-parts.d.ts +3 -1
- package/dist/agent/components/message-parts.d.ts.map +1 -1
- package/dist/agent/components/thread-artifacts-menu.d.ts.map +1 -1
- package/dist/agent/components/transcript.d.ts +6 -0
- package/dist/agent/components/transcript.d.ts.map +1 -1
- package/dist/agent/components/web-fetch-tool-view.d.ts.map +1 -1
- package/dist/agent/composer-insertion.d.ts +24 -0
- package/dist/agent/composer-insertion.d.ts.map +1 -0
- package/dist/agent/delegation/child-parts.d.ts +2 -0
- package/dist/agent/delegation/child-parts.d.ts.map +1 -1
- package/dist/agent/delegation/use-children.d.ts +5 -5
- package/dist/agent/delegation/use-children.d.ts.map +1 -1
- package/dist/agent/hooks/use-agent-conversation.d.ts +24 -4
- package/dist/agent/hooks/use-agent-conversation.d.ts.map +1 -1
- package/dist/agent/hooks/use-new-thread-place.d.ts +70 -0
- package/dist/agent/hooks/use-new-thread-place.d.ts.map +1 -0
- package/dist/agent/hooks/use-thread-lists.d.ts +40 -0
- package/dist/agent/hooks/use-thread-lists.d.ts.map +1 -1
- package/dist/agent/i18n/en.d.ts +74 -0
- package/dist/agent/i18n/en.d.ts.map +1 -1
- package/dist/agent/i18n/fr.d.ts.map +1 -1
- package/dist/agent/i18n/index.d.ts +126 -0
- package/dist/agent/i18n/index.d.ts.map +1 -1
- package/dist/agent/observed-conversation.d.ts.map +1 -1
- package/dist/agent/publish-artifact/interpret.d.ts +8 -2
- package/dist/agent/publish-artifact/interpret.d.ts.map +1 -1
- package/dist/agent/publish-artifact/open-artifact-tool-view.d.ts +9 -0
- package/dist/agent/publish-artifact/open-artifact-tool-view.d.ts.map +1 -0
- package/dist/agent/publish-artifact/publish-artifact-tool-view.d.ts +4 -2
- package/dist/agent/publish-artifact/publish-artifact-tool-view.d.ts.map +1 -1
- package/dist/agent/publish-artifact/use-live-publishes.d.ts +3 -3
- package/dist/agent/publish-artifact/use-live-publishes.d.ts.map +1 -1
- package/dist/agent/tool-views/built-in.d.ts.map +1 -1
- package/dist/agent/types.d.ts +3 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/utils/web-fetch.d.ts +33 -1
- package/dist/agent/utils/web-fetch.d.ts.map +1 -1
- package/dist/agent/utils/web-search.d.ts +14 -2
- package/dist/agent/utils/web-search.d.ts.map +1 -1
- package/dist/artifacts/artifact-page.d.ts.map +1 -1
- package/dist/artifacts/artifact-viewer.d.ts +16 -0
- package/dist/artifacts/artifact-viewer.d.ts.map +1 -0
- package/dist/artifacts/card-details.d.ts +1 -1
- package/dist/artifacts/card-details.d.ts.map +1 -1
- package/dist/artifacts/card-preview.d.ts.map +1 -1
- package/dist/artifacts/comments-context.d.ts +48 -0
- package/dist/artifacts/comments-context.d.ts.map +1 -0
- package/dist/artifacts/edit-session.d.ts +6 -6
- package/dist/artifacts/edit-session.d.ts.map +1 -1
- package/dist/artifacts/file-source.d.ts.map +1 -1
- package/dist/artifacts/frame.d.ts +10 -2
- package/dist/artifacts/frame.d.ts.map +1 -1
- package/dist/artifacts/guest-badge.d.ts +8 -0
- package/dist/artifacts/guest-badge.d.ts.map +1 -0
- package/dist/artifacts/held-artifact.d.ts +19 -0
- package/dist/artifacts/held-artifact.d.ts.map +1 -0
- package/dist/artifacts/holders.d.ts +10 -0
- package/dist/artifacts/holders.d.ts.map +1 -0
- package/dist/artifacts/live/boards.d.ts +15 -0
- package/dist/artifacts/live/boards.d.ts.map +1 -0
- package/dist/artifacts/live/canvas.d.ts +79 -0
- package/dist/artifacts/live/canvas.d.ts.map +1 -0
- package/dist/artifacts/live/header.d.ts +29 -0
- package/dist/artifacts/live/header.d.ts.map +1 -0
- package/dist/artifacts/live/hooks.d.ts +21 -0
- package/dist/artifacts/live/hooks.d.ts.map +1 -0
- package/dist/artifacts/live/presence.d.ts +32 -0
- package/dist/artifacts/live/presence.d.ts.map +1 -0
- package/dist/artifacts/live/session.d.ts +130 -0
- package/dist/artifacts/live/session.d.ts.map +1 -0
- package/dist/artifacts/live/view.d.ts +28 -0
- package/dist/artifacts/live/view.d.ts.map +1 -0
- package/dist/artifacts/messages.d.ts +424 -14
- package/dist/artifacts/messages.d.ts.map +1 -1
- package/dist/artifacts/page-queries.d.ts +2 -2
- package/dist/artifacts/page-queries.d.ts.map +1 -1
- package/dist/artifacts/page-state.d.ts.map +1 -1
- package/dist/artifacts/publish-edit.d.ts +24 -14
- package/dist/artifacts/publish-edit.d.ts.map +1 -1
- package/dist/artifacts/queries.d.ts +490 -9
- package/dist/artifacts/queries.d.ts.map +1 -1
- package/dist/artifacts/references/references.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/arrows.d.ts +0 -18
- package/dist/artifacts/renderers/canvas/arrows.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/board-editor.d.ts +43 -0
- package/dist/artifacts/renderers/canvas/board-editor.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/board-properties.d.ts +37 -0
- package/dist/artifacts/renderers/canvas/board-properties.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/board-source.d.ts +18 -0
- package/dist/artifacts/renderers/canvas/board-source.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/board.d.ts +64 -19
- package/dist/artifacts/renderers/canvas/board.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/canvas.d.ts +13 -4
- package/dist/artifacts/renderers/canvas/canvas.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/comment-pins.d.ts +84 -0
- package/dist/artifacts/renderers/canvas/comment-pins.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/commenting.d.ts +58 -0
- package/dist/artifacts/renderers/canvas/commenting.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/comments-panel.d.ts +27 -0
- package/dist/artifacts/renderers/canvas/comments-panel.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/comments.d.ts +56 -0
- package/dist/artifacts/renderers/canvas/comments.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/draft.d.ts +7 -6
- package/dist/artifacts/renderers/canvas/draft.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/edit-mode.d.ts +19 -2
- package/dist/artifacts/renderers/canvas/edit-mode.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/focus.d.ts +40 -5
- package/dist/artifacts/renderers/canvas/focus.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/items.d.ts +47 -4
- package/dist/artifacts/renderers/canvas/items.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/layout.d.ts +5 -8
- package/dist/artifacts/renderers/canvas/layout.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/presence.d.ts +21 -0
- package/dist/artifacts/renderers/canvas/presence.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/previews.d.ts +54 -0
- package/dist/artifacts/renderers/canvas/previews.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/renderer.d.ts +11 -2
- package/dist/artifacts/renderers/canvas/renderer.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/thumbnail.d.ts +5 -2
- package/dist/artifacts/renderers/canvas/thumbnail.d.ts.map +1 -1
- package/dist/artifacts/version-menu.d.ts +19 -0
- package/dist/artifacts/version-menu.d.ts.map +1 -0
- package/dist/artifacts/view-context.d.ts +43 -0
- package/dist/artifacts/view-context.d.ts.map +1 -0
- package/dist/artifacts/viewer.d.ts.map +1 -1
- package/dist/build.d.ts +5 -0
- package/dist/build.d.ts.map +1 -1
- package/dist/{chunk-fw2bm6dq.js → chunk-001c4gnk.js} +8086 -3870
- package/dist/chunk-001c4gnk.js.map +204 -0
- package/dist/chunk-00wggsst.js +7 -0
- package/dist/chunk-00wggsst.js.map +10 -0
- package/dist/chunk-5crvhjp2.js +4704 -0
- package/dist/chunk-5crvhjp2.js.map +28 -0
- package/dist/{chunk-q69001w3.js → chunk-694m74s7.js} +7 -1
- package/dist/{chunk-q69001w3.js.map → chunk-694m74s7.js.map} +3 -3
- package/dist/{chunk-4mprsd2n.js → chunk-fg6thecb.js} +25 -1
- package/dist/chunk-fg6thecb.js.map +10 -0
- package/dist/{chunk-j9653e83.js → chunk-fwb9mxwm.js} +1 -1
- package/dist/{chunk-km25essq.js → chunk-kes4ygmz.js} +1 -1
- package/dist/{chunk-kwbw4dyk.js → chunk-ryed2jq8.js} +1 -1
- package/dist/codegen.d.ts.map +1 -1
- package/dist/createCustomApp.d.ts.map +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +930 -309
- package/dist/index.js.map +15 -10
- package/dist/locale-messages.d.ts +12 -0
- package/dist/locale-messages.d.ts.map +1 -1
- package/dist/locale.d.ts +12 -0
- package/dist/locale.d.ts.map +1 -1
- package/dist/locale.js +1 -1
- package/dist/metadata.d.ts +8 -0
- package/dist/metadata.d.ts.map +1 -1
- package/dist/pages/console/action-run.d.ts.map +1 -1
- package/dist/pages/console/data/connectors.d.ts.map +1 -1
- package/dist/pages/console/data/datasets.d.ts.map +1 -1
- package/dist/pages/console/data/lake-health.d.ts +3 -0
- package/dist/pages/console/data/lake-health.d.ts.map +1 -0
- package/dist/pages/console/data/messages.d.ts +98 -2
- package/dist/pages/console/data/messages.d.ts.map +1 -1
- package/dist/pages/console/data/pipelines.d.ts.map +1 -1
- package/dist/pages/console/data/projections.d.ts.map +1 -1
- package/dist/pages/console/data/shared.d.ts.map +1 -1
- package/dist/pages/console/data/syncs.d.ts.map +1 -1
- package/dist/pages/console/ontology/action-runs.d.ts.map +1 -1
- package/dist/pages/console/ontology/actions.d.ts.map +1 -1
- package/dist/pages/console/ontology/components/action-button.d.ts.map +1 -1
- package/dist/pages/console/ontology/components/artifact-picker.d.ts +36 -0
- package/dist/pages/console/ontology/components/artifact-picker.d.ts.map +1 -0
- package/dist/pages/console/ontology/components/object-query-bar.d.ts.map +1 -1
- package/dist/pages/console/ontology/lib/action-params.d.ts +2 -0
- package/dist/pages/console/ontology/lib/action-params.d.ts.map +1 -1
- package/dist/pages/console/ontology/lineage/properties-panel.d.ts +2 -1
- package/dist/pages/console/ontology/lineage/properties-panel.d.ts.map +1 -1
- package/dist/pages/console/ontology/object-page.d.ts.map +1 -1
- package/dist/pages/console/ontology/object-type.d.ts.map +1 -1
- package/dist/pages/console/ontology/object-types.d.ts.map +1 -1
- package/dist/pages/console/ontology/objects.d.ts.map +1 -1
- package/dist/pages/console/ontology/rules.d.ts.map +1 -1
- package/dist/pages/console/ontology/workflow.d.ts.map +1 -1
- package/dist/pages/console/ontology/workflows/run-input-form.d.ts.map +1 -1
- package/dist/pages/console/ontology/workflows/schema-shape.d.ts.map +1 -1
- package/dist/pages/console/ontology/workflows.d.ts.map +1 -1
- package/dist/pages/console/skeletons.d.ts +30 -0
- package/dist/pages/console/skeletons.d.ts.map +1 -0
- package/dist/pages/console/workflow-run.d.ts.map +1 -1
- package/dist/pages/section-page.d.ts +11 -1
- package/dist/pages/section-page.d.ts.map +1 -1
- package/dist/pages/section-ui.d.ts +25 -3
- package/dist/pages/section-ui.d.ts.map +1 -1
- package/dist/pages/settings/activity/calendar.d.ts.map +1 -1
- package/dist/pages/settings/activity/connections.d.ts.map +1 -1
- package/dist/pages/settings/activity/page.d.ts.map +1 -1
- package/dist/pages/settings/activity/thread.d.ts.map +1 -1
- package/dist/pages/settings/activity/timeline.d.ts +2 -0
- package/dist/pages/settings/activity/timeline.d.ts.map +1 -1
- package/dist/pages/settings/controls.d.ts +4 -0
- package/dist/pages/settings/controls.d.ts.map +1 -1
- package/dist/pages/settings/members.d.ts.map +1 -1
- package/dist/pages/settings/memory-history.d.ts +2 -0
- package/dist/pages/settings/memory-history.d.ts.map +1 -1
- package/dist/pages/settings/memory.d.ts.map +1 -1
- package/dist/pages/settings/service-accounts.d.ts.map +1 -1
- package/dist/pages/settings/sessions.d.ts.map +1 -1
- package/dist/pages/settings/usage/breakdown.d.ts.map +1 -1
- package/dist/pages/settings/usage/limits.d.ts.map +1 -1
- package/dist/pages/settings/usage/messages.d.ts +2 -2
- package/dist/pages/settings/usage/messages.d.ts.map +1 -1
- package/dist/pages/settings/usage/runs.d.ts +8 -2
- package/dist/pages/settings/usage/runs.d.ts.map +1 -1
- package/dist/pages/settings/usage/spend-chart.d.ts.map +1 -1
- package/dist/pages/settings/usage/spend-model.d.ts +5 -0
- package/dist/pages/settings/usage/spend-model.d.ts.map +1 -1
- package/dist/pages/values.d.ts +6 -0
- package/dist/pages/values.d.ts.map +1 -1
- package/dist/pages.d.ts +4 -0
- package/dist/pages.d.ts.map +1 -1
- package/dist/pages.js +8195 -4841
- package/dist/pages.js.map +58 -49
- package/dist/sections/catalog.d.ts.map +1 -1
- package/dist/sections/sections.d.ts.map +1 -1
- package/dist/server.js +294 -23
- package/dist/server.js.map +8 -7
- package/dist/service-worker.d.ts +39 -0
- package/dist/service-worker.d.ts.map +1 -0
- package/dist/shared-session.d.ts +25 -0
- package/dist/shared-session.d.ts.map +1 -0
- package/dist/shell/app-return.d.ts +35 -0
- package/dist/shell/app-return.d.ts.map +1 -0
- package/dist/shell/app-shell.d.ts +1 -1
- package/dist/shell/app-shell.d.ts.map +1 -1
- package/dist/shell/nav-items.d.ts +2 -0
- package/dist/shell/nav-items.d.ts.map +1 -1
- package/dist/shell/phone/back.d.ts +6 -0
- package/dist/shell/phone/back.d.ts.map +1 -0
- package/dist/shell/phone/launch.d.ts +7 -0
- package/dist/shell/phone/launch.d.ts.map +1 -0
- package/dist/shell/phone/more-sheet.d.ts +36 -0
- package/dist/shell/phone/more-sheet.d.ts.map +1 -0
- package/dist/shell/phone/phone-foundations.d.ts +9 -0
- package/dist/shell/phone/phone-foundations.d.ts.map +1 -0
- package/dist/shell/phone/pull-to-refresh.d.ts +9 -0
- package/dist/shell/phone/pull-to-refresh.d.ts.map +1 -0
- package/dist/shell/phone/routes.d.ts +12 -0
- package/dist/shell/phone/routes.d.ts.map +1 -0
- package/dist/shell/phone/screen-motion.d.ts +11 -0
- package/dist/shell/phone/screen-motion.d.ts.map +1 -0
- package/dist/shell/phone/scroll-restoration.d.ts +7 -0
- package/dist/shell/phone/scroll-restoration.d.ts.map +1 -0
- package/dist/shell/phone/startup-image.d.ts +17 -0
- package/dist/shell/phone/startup-image.d.ts.map +1 -0
- package/dist/shell/phone/tab-bar.d.ts +14 -0
- package/dist/shell/phone/tab-bar.d.ts.map +1 -0
- package/dist/shell/phone/top-bar.d.ts +24 -0
- package/dist/shell/phone/top-bar.d.ts.map +1 -0
- package/dist/shell/search-command.d.ts +3 -1
- package/dist/shell/search-command.d.ts.map +1 -1
- package/dist/shell/user-menu.d.ts +2 -0
- package/dist/shell/user-menu.d.ts.map +1 -1
- package/package.json +8 -5
- package/src/agent/activity-label.ts +6 -2
- package/src/agent/agent-chat.tsx +51 -8
- package/src/agent/agent-panel.tsx +12 -0
- package/src/agent/agent-surface.tsx +4 -0
- package/src/agent/agent.css +18 -0
- package/src/agent/artifact-card.tsx +84 -16
- package/src/agent/artifact-panel.tsx +63 -43
- package/src/agent/background/background-card.tsx +308 -0
- package/src/agent/background/background-tool-row.tsx +58 -0
- package/src/agent/background/context.ts +26 -0
- package/src/agent/background/interpret.ts +356 -0
- package/src/agent/bash/bash-tool-view.tsx +9 -4
- package/src/agent/bash/interpret.ts +21 -3
- package/src/agent/components/agent-message-body.tsx +1 -1
- package/src/agent/components/composer-menu.tsx +4 -1
- package/src/agent/components/composer-place.tsx +168 -0
- package/src/agent/components/composer.tsx +101 -3
- package/src/agent/components/computer-place.tsx +18 -1
- package/src/agent/components/context-chips.tsx +72 -2
- package/src/agent/components/conversation-panel.tsx +3 -2
- package/src/agent/components/message-parts.tsx +6 -1
- package/src/agent/components/thread-artifacts-menu.tsx +22 -5
- package/src/agent/components/transcript.tsx +33 -1
- package/src/agent/components/web-fetch-tool-view.tsx +94 -29
- package/src/agent/composer-insertion.ts +36 -0
- package/src/agent/delegation/child-parts.tsx +1 -1
- package/src/agent/hooks/use-agent-conversation.ts +101 -8
- package/src/agent/hooks/use-new-thread-place.ts +294 -0
- package/src/agent/i18n/en.ts +70 -3
- package/src/agent/i18n/fr.ts +70 -3
- package/src/agent/observed-conversation.tsx +3 -0
- package/src/agent/publish-artifact/interpret.ts +27 -5
- package/src/agent/publish-artifact/open-artifact-tool-view.tsx +49 -0
- package/src/agent/publish-artifact/publish-artifact-tool-view.tsx +14 -8
- package/src/agent/publish-artifact/use-live-publishes.ts +7 -11
- package/src/agent/react-router.tsx +2 -2
- package/src/agent/tool-views/built-in.tsx +29 -11
- package/src/agent/types.ts +4 -0
- package/src/agent/utils/web-fetch.ts +89 -10
- package/src/agent/utils/web-search.ts +67 -28
- package/src/artifacts/artifact-page.tsx +42 -17
- package/src/artifacts/artifact-viewer.tsx +56 -0
- package/src/artifacts/artifacts.css +80 -0
- package/src/artifacts/card-details.ts +2 -2
- package/src/artifacts/card-preview.tsx +17 -3
- package/src/artifacts/comments-context.ts +125 -0
- package/src/artifacts/edit-session.tsx +6 -6
- package/src/artifacts/file-source.ts +10 -3
- package/src/artifacts/frame.tsx +50 -12
- package/src/artifacts/gallery.tsx +9 -11
- package/src/artifacts/guest-badge.tsx +21 -0
- package/src/artifacts/held-artifact.tsx +241 -0
- package/src/artifacts/holders.tsx +170 -0
- package/src/artifacts/live/boards.ts +95 -0
- package/src/artifacts/live/canvas.ts +402 -0
- package/src/artifacts/live/header.tsx +137 -0
- package/src/artifacts/live/hooks.ts +94 -0
- package/src/artifacts/live/presence.ts +147 -0
- package/src/artifacts/live/session.ts +520 -0
- package/src/artifacts/live/view.ts +81 -0
- package/src/artifacts/messages.ts +415 -24
- package/src/artifacts/page-queries.ts +2 -3
- package/src/artifacts/page-state.ts +16 -7
- package/src/artifacts/publish-edit.ts +50 -22
- package/src/artifacts/queries.ts +108 -10
- package/src/artifacts/references/references.tsx +6 -9
- package/src/artifacts/renderers/canvas/arrows.tsx +12 -39
- package/src/artifacts/renderers/canvas/board-editor.tsx +817 -0
- package/src/artifacts/renderers/canvas/board-properties.tsx +488 -0
- package/src/artifacts/renderers/canvas/board-source.ts +110 -0
- package/src/artifacts/renderers/canvas/board.tsx +309 -33
- package/src/artifacts/renderers/canvas/canvas.tsx +387 -72
- package/src/artifacts/renderers/canvas/comment-pins.tsx +465 -0
- package/src/artifacts/renderers/canvas/commenting.tsx +319 -0
- package/src/artifacts/renderers/canvas/comments-panel.tsx +574 -0
- package/src/artifacts/renderers/canvas/comments.ts +225 -0
- package/src/artifacts/renderers/canvas/draft.ts +41 -50
- package/src/artifacts/renderers/canvas/edit-mode.tsx +145 -20
- package/src/artifacts/renderers/canvas/focus.tsx +175 -24
- package/src/artifacts/renderers/canvas/items.tsx +179 -52
- package/src/artifacts/renderers/canvas/layout.ts +99 -47
- package/src/artifacts/renderers/canvas/presence.tsx +184 -0
- package/src/artifacts/renderers/canvas/previews.ts +127 -0
- package/src/artifacts/renderers/canvas/renderer.tsx +87 -22
- package/src/artifacts/renderers/canvas/thumbnail.tsx +56 -15
- package/src/artifacts/renderers/canvas/toolbar.tsx +1 -1
- package/src/artifacts/renderers/slides/slides.tsx +1 -1
- package/src/artifacts/version-menu.tsx +438 -0
- package/src/artifacts/view-context.ts +102 -0
- package/src/artifacts/viewer.tsx +205 -147
- package/src/build.ts +96 -11
- package/src/codegen.ts +83 -5
- package/src/createCustomApp.ts +20 -7
- package/src/index.ts +12 -0
- package/src/locale-messages.ts +24 -0
- package/src/metadata.ts +12 -0
- package/src/pages/console/action-run.tsx +20 -0
- package/src/pages/console/data/connectors.tsx +27 -3
- package/src/pages/console/data/datasets.tsx +30 -1
- package/src/pages/console/data/lake-health.tsx +299 -0
- package/src/pages/console/data/messages.ts +143 -2
- package/src/pages/console/data/pipelines.tsx +91 -3
- package/src/pages/console/data/projections.tsx +23 -4
- package/src/pages/console/data/shared.tsx +1 -0
- package/src/pages/console/data/syncs.tsx +39 -2
- package/src/pages/console/ontology/action-runs.tsx +8 -2
- package/src/pages/console/ontology/actions.tsx +39 -15
- package/src/pages/console/ontology/components/action-button.tsx +10 -0
- package/src/pages/console/ontology/components/artifact-picker.tsx +522 -0
- package/src/pages/console/ontology/components/object-query-bar.tsx +21 -5
- package/src/pages/console/ontology/lib/action-params.ts +10 -0
- package/src/pages/console/ontology/lineage/properties-panel.tsx +32 -24
- package/src/pages/console/ontology/object-page.tsx +2 -0
- package/src/pages/console/ontology/object-type.tsx +73 -14
- package/src/pages/console/ontology/object-types.tsx +56 -7
- package/src/pages/console/ontology/objects.tsx +167 -19
- package/src/pages/console/ontology/rules.tsx +186 -30
- package/src/pages/console/ontology/workflow.tsx +130 -74
- package/src/pages/console/ontology/workflows/run-input-form.tsx +21 -2
- package/src/pages/console/ontology/workflows/schema-shape.tsx +3 -0
- package/src/pages/console/ontology/workflows.tsx +34 -21
- package/src/pages/console/skeletons.tsx +99 -0
- package/src/pages/console/workflow-run.tsx +20 -0
- package/src/pages/section-page.tsx +37 -7
- package/src/pages/section-ui.tsx +96 -13
- package/src/pages/settings/activity/calendar.tsx +13 -6
- package/src/pages/settings/activity/connections.tsx +26 -9
- package/src/pages/settings/activity/page.tsx +31 -4
- package/src/pages/settings/activity/thread.tsx +32 -18
- package/src/pages/settings/activity/timeline.tsx +39 -0
- package/src/pages/settings/controls.tsx +19 -1
- package/src/pages/settings/developers.tsx +2 -2
- package/src/pages/settings/members.tsx +42 -9
- package/src/pages/settings/memory-history.tsx +76 -10
- package/src/pages/settings/memory.tsx +47 -5
- package/src/pages/settings/service-accounts.tsx +7 -2
- package/src/pages/settings/sessions.tsx +6 -2
- package/src/pages/settings/usage/breakdown.tsx +62 -2
- package/src/pages/settings/usage/limits.tsx +45 -3
- package/src/pages/settings/usage/messages.ts +2 -2
- package/src/pages/settings/usage/page.tsx +99 -52
- package/src/pages/settings/usage/runs.tsx +105 -8
- package/src/pages/settings/usage/spend-chart.tsx +79 -45
- package/src/pages/settings/usage/spend-model.ts +17 -0
- package/src/pages/values.tsx +72 -6
- package/src/pages.ts +4 -0
- package/src/sections/catalog.ts +6 -0
- package/src/sections/sections.tsx +2 -0
- package/src/service-worker.ts +176 -0
- package/src/shared-session.ts +73 -0
- package/src/shell/app-return.ts +115 -0
- package/src/shell/app-shell.tsx +125 -27
- package/src/shell/nav-items.tsx +2 -0
- package/src/shell/phone/back.ts +16 -0
- package/src/shell/phone/launch.ts +6 -0
- package/src/shell/phone/more-sheet.tsx +249 -0
- package/src/shell/phone/phone-foundations.tsx +43 -0
- package/src/shell/phone/phone.css +660 -0
- package/src/shell/phone/pull-to-refresh.tsx +201 -0
- package/src/shell/phone/routes.ts +34 -0
- package/src/shell/phone/screen-motion.ts +292 -0
- package/src/shell/phone/scroll-restoration.tsx +70 -0
- package/src/shell/phone/startup-image.ts +119 -0
- package/src/shell/phone/tab-bar.tsx +95 -0
- package/src/shell/phone/top-bar.tsx +195 -0
- package/src/shell/search-command.tsx +30 -14
- package/src/shell/user-menu.tsx +2 -1
- package/dist/chunk-4mprsd2n.js.map +0 -10
- package/dist/chunk-fw2bm6dq.js.map +0 -182
- package/dist/chunk-zxthr2q5.js +0 -1487
- package/dist/chunk-zxthr2q5.js.map +0 -18
- /package/dist/{chunk-j9653e83.js.map → chunk-fwb9mxwm.js.map} +0 -0
- /package/dist/{chunk-km25essq.js.map → chunk-kes4ygmz.js.map} +0 -0
- /package/dist/{chunk-kwbw4dyk.js.map → chunk-ryed2jq8.js.map} +0 -0
|
@@ -7,7 +7,7 @@ import { ChartNoAxesCombined, Download, Info, ListFilter, TriangleAlert, X } fro
|
|
|
7
7
|
import { useMemo } from "react"
|
|
8
8
|
import { Link, useSearchParams } from "react-router-dom"
|
|
9
9
|
import { SectionPage } from "../../section-page"
|
|
10
|
-
import { PageTabs, Panel, PanelEmpty,
|
|
10
|
+
import { PageTabs, Panel, PanelEmpty, SkeletonText, useLoadFailure } from "../../section-ui"
|
|
11
11
|
import { Breakdown } from "./breakdown"
|
|
12
12
|
import { FilterMenu, useFilterLabels } from "./filter-menu"
|
|
13
13
|
import type { Overview } from "./format"
|
|
@@ -295,7 +295,10 @@ function Spend({ range, filters, onFilter, onModel, onClear, limitsHref }: Spend
|
|
|
295
295
|
) : (
|
|
296
296
|
<>
|
|
297
297
|
<Hero
|
|
298
|
-
|
|
298
|
+
// The comparison under the total and the share of all spend arrive with it.
|
|
299
|
+
loading={
|
|
300
|
+
overview.isPending || prior.isPending || (narrowed && everythingActive.isPending)
|
|
301
|
+
}
|
|
299
302
|
overview={overview.data}
|
|
300
303
|
prior={prior.data}
|
|
301
304
|
all={narrowed ? everythingActive.data : overview.data}
|
|
@@ -331,7 +334,8 @@ function Spend({ range, filters, onFilter, onModel, onClear, limitsHref }: Spend
|
|
|
331
334
|
<SpendChart
|
|
332
335
|
range={range}
|
|
333
336
|
overview={chart.data}
|
|
334
|
-
|
|
337
|
+
// Until every model's color is known, the legend would fold them into one gray entry.
|
|
338
|
+
loading={chart.isPending || everything.isPending}
|
|
335
339
|
palette={palette}
|
|
336
340
|
currency={currency}
|
|
337
341
|
filters={filters}
|
|
@@ -382,34 +386,43 @@ function Hero({
|
|
|
382
386
|
const locale = useLocale()
|
|
383
387
|
const runs = useRunsTotal(runsQuery)
|
|
384
388
|
const budget = useProjectBudget(currency)
|
|
389
|
+
// Until everything under the total is known, the hero keeps its shape with placeholders where
|
|
390
|
+
// its numbers go, so nothing moves when they arrive.
|
|
391
|
+
// A narrowed total is not what the budget counts.
|
|
392
|
+
const shownBudget = narrowed ? undefined : budget.value
|
|
393
|
+
const ready = !loading && overview !== undefined && !runs.loading && (narrowed || !budget.loading)
|
|
385
394
|
|
|
386
|
-
|
|
387
|
-
return (
|
|
388
|
-
<Panel>
|
|
389
|
-
<PanelSkeleton rows={3} />
|
|
390
|
-
</Panel>
|
|
391
|
-
)
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
const totals = overview.totals
|
|
395
|
+
const totals = overview?.totals
|
|
395
396
|
const cost = costOf(totals, currency)
|
|
396
397
|
const before = costOf(prior?.totals, currency)
|
|
397
398
|
const delta = cost - before
|
|
398
399
|
const { whole, cents } = splitMoney(cost, currency, locale)
|
|
399
400
|
const share = all ? cost / (costOf(all.totals, currency) || 1) : undefined
|
|
401
|
+
const calls = totals?.modelCallCount ?? 0
|
|
400
402
|
|
|
401
403
|
return (
|
|
402
|
-
<section className="flex flex-wrap items-end gap-x-12 gap-y-7">
|
|
404
|
+
<section aria-busy={!ready} className="flex flex-wrap items-end gap-x-12 gap-y-7">
|
|
403
405
|
<div className="min-w-0 flex-[1_1_300px]">
|
|
404
406
|
<div className="text-xs font-medium text-muted-foreground">
|
|
405
407
|
{narrowed ? messages.spentFiltered : messages.spent}
|
|
406
408
|
</div>
|
|
407
409
|
<div className="mt-2 text-[3.75rem] font-semibold leading-none tracking-[-0.04em] tabular-nums">
|
|
408
|
-
{
|
|
409
|
-
|
|
410
|
+
{ready ? (
|
|
411
|
+
<>
|
|
412
|
+
{whole}
|
|
413
|
+
<span className="text-muted-foreground/60">{cents}</span>
|
|
414
|
+
</>
|
|
415
|
+
) : (
|
|
416
|
+
<SkeletonText className="h-11 w-52 rounded-md" />
|
|
417
|
+
)}
|
|
410
418
|
</div>
|
|
411
419
|
<div className="mt-3 flex flex-wrap items-center gap-2 text-[0.8125rem] text-muted-foreground">
|
|
412
|
-
{
|
|
420
|
+
{!ready ? (
|
|
421
|
+
<>
|
|
422
|
+
<SkeletonText className="h-[22px] w-16 rounded-md" />
|
|
423
|
+
<SkeletonText className="w-32" />
|
|
424
|
+
</>
|
|
425
|
+
) : prior ? (
|
|
413
426
|
<>
|
|
414
427
|
<span className="inline-flex h-[22px] items-center rounded-md bg-muted px-2 font-medium text-foreground tabular-nums">
|
|
415
428
|
{delta >= 0 ? "↑ " : "↓ "}
|
|
@@ -418,11 +431,18 @@ function Hero({
|
|
|
418
431
|
<span>{messages.versus(priorLabel)}</span>
|
|
419
432
|
</>
|
|
420
433
|
) : null}
|
|
421
|
-
{narrowed && share !== undefined ? (
|
|
434
|
+
{ready && narrowed && share !== undefined ? (
|
|
422
435
|
<span>{messages.shareOfAll(percent(share, locale))}</span>
|
|
423
436
|
) : null}
|
|
424
437
|
</div>
|
|
425
|
-
{
|
|
438
|
+
{shownBudget && !ready ? (
|
|
439
|
+
<div className="mt-3.5 flex max-w-[380px] items-center gap-2.5 text-[0.8125rem]">
|
|
440
|
+
<span className="h-1 w-full max-w-[120px] flex-1 animate-pulse rounded-sm bg-muted" />
|
|
441
|
+
<span>
|
|
442
|
+
<SkeletonText className="w-40" />
|
|
443
|
+
</span>
|
|
444
|
+
</div>
|
|
445
|
+
) : shownBudget ? (
|
|
426
446
|
<Link
|
|
427
447
|
to={limitsHref}
|
|
428
448
|
className="mt-3.5 flex max-w-[380px] items-center gap-2.5 text-[0.8125rem] text-muted-foreground"
|
|
@@ -430,14 +450,16 @@ function Hero({
|
|
|
430
450
|
<span className="h-1 w-full max-w-[120px] flex-1 overflow-hidden rounded-sm bg-muted">
|
|
431
451
|
<span
|
|
432
452
|
className="block h-full rounded-sm bg-foreground"
|
|
433
|
-
style={{
|
|
453
|
+
style={{
|
|
454
|
+
width: `${Math.min(100, (shownBudget.used / (shownBudget.limit || 1)) * 100)}%`,
|
|
455
|
+
}}
|
|
434
456
|
/>
|
|
435
457
|
</span>
|
|
436
458
|
<span className="tabular-nums">
|
|
437
459
|
<span className="font-medium text-foreground">
|
|
438
|
-
{money(
|
|
460
|
+
{money(shownBudget.used, currency, locale)}
|
|
439
461
|
</span>{" "}
|
|
440
|
-
{messages.budgetOf(
|
|
462
|
+
{messages.budgetOf(shownBudget.limitLabel, shownBudget.month)}
|
|
441
463
|
</span>
|
|
442
464
|
</Link>
|
|
443
465
|
) : null}
|
|
@@ -445,40 +467,57 @@ function Hero({
|
|
|
445
467
|
<div className="flex flex-wrap gap-x-9 gap-y-6">
|
|
446
468
|
<Stat
|
|
447
469
|
label={messages.tokens}
|
|
448
|
-
value={compact(totals
|
|
449
|
-
detail={
|
|
470
|
+
value={ready ? compact(totals?.usage.totalTokens, locale) : undefined}
|
|
471
|
+
detail={
|
|
472
|
+
ready && totals
|
|
473
|
+
? messages.cached(percent(cachedShare(totals.usage), locale))
|
|
474
|
+
: undefined
|
|
475
|
+
}
|
|
450
476
|
/>
|
|
451
477
|
<span className="w-px self-stretch bg-border/70" />
|
|
452
478
|
<Stat
|
|
453
479
|
label={messages.calls}
|
|
454
|
-
value={
|
|
455
|
-
detail={
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
)
|
|
461
|
-
)}
|
|
480
|
+
value={ready ? calls.toLocaleString(locale) : undefined}
|
|
481
|
+
detail={
|
|
482
|
+
ready
|
|
483
|
+
? messages.perCall(fineMoney(calls > 0 ? cost / calls : 0, currency, locale))
|
|
484
|
+
: undefined
|
|
485
|
+
}
|
|
462
486
|
/>
|
|
463
487
|
<span className="w-px self-stretch bg-border/70" />
|
|
464
488
|
<Stat
|
|
465
489
|
label={messages.runs}
|
|
466
|
-
value={
|
|
467
|
-
detail={
|
|
490
|
+
value={ready ? (runs.total?.toLocaleString(locale) ?? "—") : undefined}
|
|
491
|
+
detail={
|
|
492
|
+
ready
|
|
493
|
+
? messages.perRun(fineMoney(runs.total ? cost / runs.total : 0, currency, locale))
|
|
494
|
+
: undefined
|
|
495
|
+
}
|
|
468
496
|
/>
|
|
469
497
|
</div>
|
|
470
498
|
</section>
|
|
471
499
|
)
|
|
472
500
|
}
|
|
473
501
|
|
|
474
|
-
|
|
502
|
+
/** A figure under its label. Without a value, placeholders hold its lines' heights. */
|
|
503
|
+
function Stat({
|
|
504
|
+
label,
|
|
505
|
+
value,
|
|
506
|
+
detail,
|
|
507
|
+
}: {
|
|
508
|
+
readonly label: string
|
|
509
|
+
readonly value: string | undefined
|
|
510
|
+
readonly detail: string | undefined
|
|
511
|
+
}) {
|
|
475
512
|
return (
|
|
476
513
|
<div className="flex min-w-[120px] flex-col gap-1.5">
|
|
477
514
|
<span className="text-xs font-medium text-muted-foreground">{label}</span>
|
|
478
515
|
<span className="text-[1.625rem] font-semibold leading-[1.1] tracking-[-0.02em] tabular-nums">
|
|
479
|
-
{value}
|
|
516
|
+
{value ?? <SkeletonText className="h-5 w-20 rounded-md" />}
|
|
517
|
+
</span>
|
|
518
|
+
<span className="text-[0.8125rem] text-muted-foreground tabular-nums">
|
|
519
|
+
{detail ?? <SkeletonText className="w-24" />}
|
|
480
520
|
</span>
|
|
481
|
-
<span className="text-[0.8125rem] text-muted-foreground tabular-nums">{detail}</span>
|
|
482
521
|
</div>
|
|
483
522
|
)
|
|
484
523
|
}
|
|
@@ -486,7 +525,10 @@ function Stat({ label, value, detail }: { label: string; value: string; detail:
|
|
|
486
525
|
/** This month's project-wide cost limit and what it has used, when there is one. */
|
|
487
526
|
function useProjectBudget(currency: string) {
|
|
488
527
|
const locale = useLocale()
|
|
489
|
-
const { data } = useQuery({
|
|
528
|
+
const { data, isPending } = useQuery({
|
|
529
|
+
...getAiLimitStatusOptions(limitStatusQuery),
|
|
530
|
+
retry: false,
|
|
531
|
+
})
|
|
490
532
|
const status = data?.items.find(
|
|
491
533
|
(item) =>
|
|
492
534
|
item.policy.enabled &&
|
|
@@ -494,27 +536,32 @@ function useProjectBudget(currency: string) {
|
|
|
494
536
|
item.policy.limit.meter === "cost.catalogEstimated" &&
|
|
495
537
|
item.policy.limit.amount.currency === currency
|
|
496
538
|
)
|
|
497
|
-
if (!status || status.policy.limit.meter !== "cost.catalogEstimated")
|
|
539
|
+
if (!status || status.policy.limit.meter !== "cost.catalogEstimated") {
|
|
540
|
+
return { loading: isPending, value: undefined }
|
|
541
|
+
}
|
|
498
542
|
const used =
|
|
499
543
|
status.consumption.actual.meter === "cost.catalogEstimated"
|
|
500
544
|
? Number(status.consumption.actual.amount.amountNanos) / 1e9
|
|
501
545
|
: 0
|
|
502
546
|
const limit = Number(status.policy.limit.amount.amountNanos) / 1e9
|
|
503
547
|
return {
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
548
|
+
loading: false,
|
|
549
|
+
value: {
|
|
550
|
+
used,
|
|
551
|
+
limit,
|
|
552
|
+
// A round limit reads without cents.
|
|
553
|
+
limitLabel: Number.isInteger(limit)
|
|
554
|
+
? new Intl.NumberFormat(locale, {
|
|
555
|
+
style: "currency",
|
|
556
|
+
currency,
|
|
557
|
+
maximumFractionDigits: 0,
|
|
558
|
+
}).format(limit)
|
|
559
|
+
: money(limit, currency, locale),
|
|
560
|
+
month: new Date(status.period.start).toLocaleDateString(locale, {
|
|
561
|
+
month: "long",
|
|
562
|
+
timeZone: "UTC",
|
|
563
|
+
}),
|
|
564
|
+
},
|
|
518
565
|
}
|
|
519
566
|
}
|
|
520
567
|
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
Zap,
|
|
15
15
|
} from "lucide-react"
|
|
16
16
|
import { type ReactNode, useState } from "react"
|
|
17
|
-
import {
|
|
17
|
+
import { SkeletonText } from "../../section-ui"
|
|
18
18
|
import { CallDetail } from "./call-detail"
|
|
19
19
|
import { useNames } from "./filter-menu"
|
|
20
20
|
import { useAiUsageMessages } from "./messages"
|
|
@@ -65,18 +65,21 @@ function sourceFor(type: RunType, filters: SpendFilters): string | null | undefi
|
|
|
65
65
|
return same ? filters.source : null
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* How many conversations and runs the filters keep, for the page's headline. `total` is absent
|
|
70
|
+
* while it loads and when it could not be counted.
|
|
71
|
+
*/
|
|
69
72
|
export function useRunsTotal(
|
|
70
73
|
query: {
|
|
71
74
|
readonly from: string
|
|
72
75
|
readonly to: string
|
|
73
76
|
} & ReturnType<typeof apiFilters>
|
|
74
|
-
): number | undefined {
|
|
75
|
-
const { data } = useQuery({
|
|
77
|
+
): { readonly total: number | undefined; readonly loading: boolean } {
|
|
78
|
+
const { data, isPending } = useQuery({
|
|
76
79
|
...listAiModelCallGroupsOptions({ query: { ...query, limit: "1" } }),
|
|
77
80
|
retry: false,
|
|
78
81
|
})
|
|
79
|
-
return data?.total
|
|
82
|
+
return { total: data?.total, loading: isPending }
|
|
80
83
|
}
|
|
81
84
|
|
|
82
85
|
/**
|
|
@@ -167,7 +170,17 @@ export function Runs({
|
|
|
167
170
|
<span className="text-right">{messages.columns.when}</span>
|
|
168
171
|
</div>
|
|
169
172
|
{groups.isPending && source !== null ? (
|
|
170
|
-
|
|
173
|
+
<>
|
|
174
|
+
{["w-44", "w-36", "w-52", "w-32", "w-40"].map((width) => (
|
|
175
|
+
<GroupRowSkeleton key={width} width={width} />
|
|
176
|
+
))}
|
|
177
|
+
<div
|
|
178
|
+
aria-hidden
|
|
179
|
+
className="border-t border-border/50 px-5 py-3.5 text-[0.8125rem] text-muted-foreground"
|
|
180
|
+
>
|
|
181
|
+
<SkeletonText className="w-28" />
|
|
182
|
+
</div>
|
|
183
|
+
</>
|
|
171
184
|
) : groups.isError ? (
|
|
172
185
|
<Notice>{messages.failed}</Notice>
|
|
173
186
|
) : items.length === 0 ? (
|
|
@@ -199,6 +212,81 @@ export function Runs({
|
|
|
199
212
|
)
|
|
200
213
|
}
|
|
201
214
|
|
|
215
|
+
/** A conversation or run while the list loads: `TreeRow`'s top row, with placeholders. */
|
|
216
|
+
function GroupRowSkeleton({ width }: { readonly width: string }) {
|
|
217
|
+
return (
|
|
218
|
+
<div aria-hidden className={cn(gridRow, "min-h-[60px] border-t border-border/70")}>
|
|
219
|
+
<span className="flex min-w-0 items-center gap-2">
|
|
220
|
+
<span className="size-4 shrink-0" />
|
|
221
|
+
<span className="size-7 shrink-0 animate-pulse rounded-lg bg-muted" />
|
|
222
|
+
<span className="flex min-w-0 flex-col items-start leading-[1.3]">
|
|
223
|
+
<span className="text-sm font-medium">
|
|
224
|
+
<SkeletonText className={cn("h-3", width)} />
|
|
225
|
+
</span>
|
|
226
|
+
<span className="text-xs">
|
|
227
|
+
<SkeletonText className="h-2 w-36 bg-muted/70" />
|
|
228
|
+
</span>
|
|
229
|
+
</span>
|
|
230
|
+
</span>
|
|
231
|
+
<MeasuresSkeleton models />
|
|
232
|
+
</div>
|
|
233
|
+
)
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/** A model call while an execution's calls load: `TreeRow`'s nested row, with placeholders. */
|
|
237
|
+
function CallRowSkeleton({ depth }: { readonly depth: number }) {
|
|
238
|
+
return (
|
|
239
|
+
<div aria-hidden className={cn(gridRow, "min-h-11 border-t border-border/40")}>
|
|
240
|
+
<span className="flex min-w-0 items-center gap-2" style={{ paddingLeft: depth * 26 }}>
|
|
241
|
+
<span className="size-4 shrink-0" />
|
|
242
|
+
<span className="flex w-[22px] shrink-0 justify-center">
|
|
243
|
+
<span className="size-2.5 animate-pulse rounded-[3px] bg-muted" />
|
|
244
|
+
</span>
|
|
245
|
+
<span className="text-[0.8125rem] leading-[1.3]">
|
|
246
|
+
<SkeletonText className="w-32" />
|
|
247
|
+
</span>
|
|
248
|
+
</span>
|
|
249
|
+
<MeasuresSkeleton />
|
|
250
|
+
</div>
|
|
251
|
+
)
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* The cells after a row's name: its models (a call names its model in its title instead), calls,
|
|
256
|
+
* tokens, cached share, cost and time.
|
|
257
|
+
*/
|
|
258
|
+
function MeasuresSkeleton({ models = false }: { readonly models?: boolean }) {
|
|
259
|
+
return (
|
|
260
|
+
<>
|
|
261
|
+
<span className="flex min-w-0 items-center gap-2">
|
|
262
|
+
{models ? (
|
|
263
|
+
<>
|
|
264
|
+
<span className="h-1.5 w-14 shrink-0 animate-pulse rounded-[2px] bg-muted" />
|
|
265
|
+
<span className="text-[0.78rem]">
|
|
266
|
+
<SkeletonText className="w-16" />
|
|
267
|
+
</span>
|
|
268
|
+
</>
|
|
269
|
+
) : null}
|
|
270
|
+
</span>
|
|
271
|
+
<span className="text-right text-[0.8125rem]">
|
|
272
|
+
<SkeletonText className="w-5" />
|
|
273
|
+
</span>
|
|
274
|
+
<span className="text-right text-[0.8125rem]">
|
|
275
|
+
<SkeletonText className="w-10" />
|
|
276
|
+
</span>
|
|
277
|
+
<span className="text-right text-[0.8125rem]">
|
|
278
|
+
<SkeletonText className="w-8" />
|
|
279
|
+
</span>
|
|
280
|
+
<span className="text-right text-[0.84rem]">
|
|
281
|
+
<SkeletonText className="w-12" />
|
|
282
|
+
</span>
|
|
283
|
+
<span className="text-right text-[0.78rem]">
|
|
284
|
+
<SkeletonText className="w-12" />
|
|
285
|
+
</span>
|
|
286
|
+
</>
|
|
287
|
+
)
|
|
288
|
+
}
|
|
289
|
+
|
|
202
290
|
function Notice({ children }: { readonly children: ReactNode }) {
|
|
203
291
|
return (
|
|
204
292
|
<div className="border-t border-border/50 px-5 py-10 text-center text-sm text-muted-foreground">
|
|
@@ -699,13 +787,22 @@ function Calls({
|
|
|
699
787
|
}),
|
|
700
788
|
retry: false,
|
|
701
789
|
})
|
|
702
|
-
if (isPending
|
|
790
|
+
if (isPending) {
|
|
791
|
+
// The execution says how many calls it made, so as many rows stand in for them.
|
|
792
|
+
const count =
|
|
793
|
+
group.executions.find((execution) => execution.executionId === executionId)?.modelCallCount ??
|
|
794
|
+
1
|
|
795
|
+
return Array.from({ length: Math.min(Math.max(count, 1), pageSize) }, (_, index) => (
|
|
796
|
+
<CallRowSkeleton key={index} depth={depth} />
|
|
797
|
+
))
|
|
798
|
+
}
|
|
799
|
+
if (isError) {
|
|
703
800
|
return (
|
|
704
801
|
<div
|
|
705
802
|
className="border-t border-border/40 py-3 text-[0.8125rem] text-muted-foreground"
|
|
706
803
|
style={{ paddingLeft: 20 + depth * 26 + 24 }}
|
|
707
804
|
>
|
|
708
|
-
{
|
|
805
|
+
{messages.failed}
|
|
709
806
|
</div>
|
|
710
807
|
)
|
|
711
808
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useLocale } from "@sixb/ui/lib/i18n"
|
|
2
2
|
import { cn } from "@sixb/ui/lib/utils"
|
|
3
3
|
import { useState } from "react"
|
|
4
|
+
import { SkeletonText } from "../../section-ui"
|
|
4
5
|
import type { Overview } from "./format"
|
|
5
6
|
import { useAiUsageMessages } from "./messages"
|
|
6
7
|
import { Segmented } from "./segmented"
|
|
@@ -15,6 +16,7 @@ import {
|
|
|
15
16
|
niceScale,
|
|
16
17
|
otherModelColor,
|
|
17
18
|
percent,
|
|
19
|
+
rangePeriods,
|
|
18
20
|
type SpendFilters,
|
|
19
21
|
type SpendRange,
|
|
20
22
|
} from "./spend-model"
|
|
@@ -23,6 +25,9 @@ export type Measure = "cost" | "tokens" | "calls"
|
|
|
23
25
|
|
|
24
26
|
const height = 232
|
|
25
27
|
|
|
28
|
+
// The heights of the bars that stand in while the numbers load, as fractions of the plot.
|
|
29
|
+
const placeholderBars = [0.42, 0.58, 0.36, 0.7, 0.5, 0.64, 0.46, 0.78, 0.4, 0.55, 0.32, 0.6]
|
|
30
|
+
|
|
26
31
|
interface Series {
|
|
27
32
|
readonly key: string
|
|
28
33
|
readonly name: string
|
|
@@ -71,6 +76,8 @@ export function SpendChart({
|
|
|
71
76
|
: messages.titles
|
|
72
77
|
|
|
73
78
|
const periods = overview?.series ?? []
|
|
79
|
+
// While the numbers load, the bars stand where the range's periods will put them.
|
|
80
|
+
const starts = loading ? rangePeriods(range) : periods.map((period) => period.start)
|
|
74
81
|
const measureOf = (aggregate: Aggregate) =>
|
|
75
82
|
measure === "cost"
|
|
76
83
|
? costOf(aggregate, currency)
|
|
@@ -136,7 +143,8 @@ export function SpendChart({
|
|
|
136
143
|
: Math.round(value).toLocaleString(locale)
|
|
137
144
|
const peak = max > 0 ? stacks.indexOf(max) : -1
|
|
138
145
|
const total = stacks.reduce((sum, value) => sum + value, 0)
|
|
139
|
-
const every = Math.max(1, Math.ceil(
|
|
146
|
+
const every = Math.max(1, Math.ceil(starts.length / 8))
|
|
147
|
+
const barGap = starts.length > 14 ? "gap-0.5" : "gap-1.5"
|
|
140
148
|
const picked = filters.day ? periods.findIndex((period) => period.start === filters.day) : -1
|
|
141
149
|
const modelFiltered = filters.model !== undefined
|
|
142
150
|
|
|
@@ -161,44 +169,57 @@ export function SpendChart({
|
|
|
161
169
|
</div>
|
|
162
170
|
|
|
163
171
|
<div className="mt-3.5 -ml-2 flex min-h-7 flex-wrap items-center gap-x-1 gap-y-0.5">
|
|
164
|
-
{
|
|
165
|
-
|
|
166
|
-
entry.model !== undefined &&
|
|
167
|
-
filters.provider === entry.model.providerId &&
|
|
168
|
-
filters.model === entry.model.modelId
|
|
169
|
-
const sum = entry.values.reduce((a, b) => a + b, 0)
|
|
170
|
-
const content = (
|
|
171
|
-
<>
|
|
172
|
+
{loading
|
|
173
|
+
? ["w-28", "w-20", "w-24"].map((width) => (
|
|
172
174
|
<span
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
175
|
+
key={width}
|
|
176
|
+
aria-hidden
|
|
177
|
+
className="inline-flex h-7 items-center gap-[7px] pr-2.5 pl-2 text-[0.8125rem]"
|
|
178
|
+
>
|
|
179
|
+
<span className="size-2.5 shrink-0 animate-pulse rounded-[3px] bg-muted" />
|
|
180
|
+
<SkeletonText className={width} />
|
|
181
|
+
<SkeletonText className="w-10" />
|
|
182
|
+
</span>
|
|
183
|
+
))
|
|
184
|
+
: series.map((entry) => {
|
|
185
|
+
const on =
|
|
186
|
+
entry.model !== undefined &&
|
|
187
|
+
filters.provider === entry.model.providerId &&
|
|
188
|
+
filters.model === entry.model.modelId
|
|
189
|
+
const sum = entry.values.reduce((a, b) => a + b, 0)
|
|
190
|
+
const content = (
|
|
191
|
+
<>
|
|
192
|
+
<span
|
|
193
|
+
className="size-2.5 shrink-0 rounded-[3px]"
|
|
194
|
+
style={{ background: entry.color }}
|
|
195
|
+
/>
|
|
196
|
+
<span className="text-foreground/80">{entry.name}</span>
|
|
197
|
+
<span className="font-medium tabular-nums">{sum > 0 ? format(sum) : "—"}</span>
|
|
198
|
+
</>
|
|
199
|
+
)
|
|
200
|
+
const className = cn(
|
|
201
|
+
"inline-flex h-7 items-center gap-[7px] rounded-lg pr-2.5 pl-2 text-[0.8125rem] transition-opacity",
|
|
202
|
+
(on || hoverSeries === entry.key) && "bg-muted",
|
|
203
|
+
((modelFiltered && !on) ||
|
|
204
|
+
(hoverSeries !== undefined && hoverSeries !== entry.key)) &&
|
|
205
|
+
"opacity-45"
|
|
206
|
+
)
|
|
207
|
+
return entry.model ? (
|
|
208
|
+
<button
|
|
209
|
+
key={entry.key}
|
|
210
|
+
type="button"
|
|
211
|
+
aria-pressed={on}
|
|
212
|
+
onClick={() => entry.model && onModel(entry.model)}
|
|
213
|
+
className={cn(className, "transition-colors hover:bg-muted/70")}
|
|
214
|
+
>
|
|
215
|
+
{content}
|
|
216
|
+
</button>
|
|
217
|
+
) : (
|
|
218
|
+
<span key={entry.key} className={className}>
|
|
219
|
+
{content}
|
|
220
|
+
</span>
|
|
221
|
+
)
|
|
222
|
+
})}
|
|
202
223
|
</div>
|
|
203
224
|
|
|
204
225
|
<div className="relative mt-[34px] ml-[52px]" style={{ height }}>
|
|
@@ -212,13 +233,26 @@ export function SpendChart({
|
|
|
212
233
|
style={{ bottom: ((line * step) / top) * height }}
|
|
213
234
|
>
|
|
214
235
|
<span className="absolute -top-[9px] -left-[52px] w-[42px] text-right text-[0.6875rem] text-muted-foreground tabular-nums">
|
|
215
|
-
{tick(line * step)}
|
|
236
|
+
{loading ? <SkeletonText className="h-2 w-6" /> : tick(line * step)}
|
|
216
237
|
</span>
|
|
217
238
|
</div>
|
|
218
239
|
))}
|
|
219
|
-
{loading ?
|
|
240
|
+
{loading ? (
|
|
241
|
+
<div aria-hidden className={cn("absolute inset-0 flex", barGap)}>
|
|
242
|
+
{starts.map((start, index) => (
|
|
243
|
+
<span key={start} className="flex h-full flex-1 items-end justify-center">
|
|
244
|
+
<span
|
|
245
|
+
className="block w-[44%] max-w-[46px] animate-pulse rounded-[4px_4px_1px_1px] bg-muted"
|
|
246
|
+
style={{
|
|
247
|
+
height: (placeholderBars[index % placeholderBars.length] ?? 0.5) * height,
|
|
248
|
+
}}
|
|
249
|
+
/>
|
|
250
|
+
</span>
|
|
251
|
+
))}
|
|
252
|
+
</div>
|
|
253
|
+
) : (
|
|
220
254
|
<div
|
|
221
|
-
className={cn("absolute inset-0 flex",
|
|
255
|
+
className={cn("absolute inset-0 flex", barGap)}
|
|
222
256
|
onMouseLeave={() => {
|
|
223
257
|
setHover(undefined)
|
|
224
258
|
setHoverSeries(undefined)
|
|
@@ -313,10 +347,10 @@ export function SpendChart({
|
|
|
313
347
|
</div>
|
|
314
348
|
)}
|
|
315
349
|
</div>
|
|
316
|
-
<div className={cn("mt-2.5 ml-[52px] flex",
|
|
317
|
-
{
|
|
350
|
+
<div className={cn("mt-2.5 ml-[52px] flex", barGap)}>
|
|
351
|
+
{starts.map((start, index) => (
|
|
318
352
|
<span
|
|
319
|
-
key={
|
|
353
|
+
key={start}
|
|
320
354
|
className={cn(
|
|
321
355
|
"flex-1 overflow-visible whitespace-nowrap text-center text-xs",
|
|
322
356
|
picked === index || hover === index ? "text-foreground" : "text-muted-foreground",
|
|
@@ -324,7 +358,7 @@ export function SpendChart({
|
|
|
324
358
|
)}
|
|
325
359
|
>
|
|
326
360
|
{index % every === 0 || picked === index || hover === index
|
|
327
|
-
? bucketLabel(
|
|
361
|
+
? bucketLabel(start, range.bucket, locale)
|
|
328
362
|
: ""}
|
|
329
363
|
</span>
|
|
330
364
|
))}
|
|
@@ -88,6 +88,7 @@ const modelKinds: readonly ModelKind[] = [
|
|
|
88
88
|
"transcription",
|
|
89
89
|
"speech",
|
|
90
90
|
"reranking",
|
|
91
|
+
"web-search",
|
|
91
92
|
]
|
|
92
93
|
|
|
93
94
|
export function readFilters(params: URLSearchParams): SpendFilters {
|
|
@@ -239,6 +240,22 @@ export function sharePercent(value: number, locale = "en"): string {
|
|
|
239
240
|
}).format(value)
|
|
240
241
|
}
|
|
241
242
|
|
|
243
|
+
/**
|
|
244
|
+
* Where the range's bars start, as the server buckets them: whole UTC hours or days, and weeks
|
|
245
|
+
* from Monday. The chart lays out its bars from these before their numbers arrive.
|
|
246
|
+
*/
|
|
247
|
+
export function rangePeriods(range: Pick<SpendRange, "from" | "to" | "bucket">): string[] {
|
|
248
|
+
const first = new Date(range.from)
|
|
249
|
+
first.setUTCMinutes(0, 0, 0)
|
|
250
|
+
if (range.bucket !== "hour") first.setUTCHours(0)
|
|
251
|
+
if (range.bucket === "week") first.setUTCDate(first.getUTCDate() - ((first.getUTCDay() + 6) % 7))
|
|
252
|
+
const starts: string[] = []
|
|
253
|
+
for (let at = first.getTime(); at < Date.parse(range.to); at += bucketMs(range.bucket)) {
|
|
254
|
+
starts.push(new Date(at).toISOString())
|
|
255
|
+
}
|
|
256
|
+
return starts
|
|
257
|
+
}
|
|
258
|
+
|
|
242
259
|
/** A bar's label: its hour, its day, or the week it starts. Buckets are UTC periods. */
|
|
243
260
|
export function bucketLabel(start: string, bucket: Bucket, locale = "en"): string {
|
|
244
261
|
const date = new Date(start)
|