@sixb/app 0.2.1 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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-tool-row.d.ts.map +1 -1
- package/dist/agent/background/interpret.d.ts +1 -1
- package/dist/agent/background/interpret.d.ts.map +1 -1
- package/dist/agent/components/composer-place.d.ts +3 -1
- package/dist/agent/components/composer-place.d.ts.map +1 -1
- package/dist/agent/components/composer.d.ts +20 -1
- package/dist/agent/components/composer.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 +7 -2
- 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 +5 -0
- package/dist/agent/components/transcript.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/agent-exchange.d.ts +16 -0
- package/dist/agent/delegation/agent-exchange.d.ts.map +1 -0
- package/dist/agent/delegation/child-card.d.ts +3 -3
- package/dist/agent/delegation/child-card.d.ts.map +1 -1
- package/dist/agent/delegation/child-parts.d.ts +1 -10
- package/dist/agent/delegation/child-parts.d.ts.map +1 -1
- package/dist/agent/delegation/child-work.d.ts.map +1 -1
- package/dist/agent/delegation/interpret.d.ts +4 -10
- package/dist/agent/delegation/interpret.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/file-edits/file-edit-tool-view.d.ts +10 -0
- package/dist/agent/file-edits/file-edit-tool-view.d.ts.map +1 -0
- package/dist/agent/file-edits/interpret.d.ts +25 -0
- package/dist/agent/file-edits/interpret.d.ts.map +1 -0
- package/dist/agent/hooks/use-agent-conversation.d.ts +16 -4
- package/dist/agent/hooks/use-agent-conversation.d.ts.map +1 -1
- package/dist/agent/hooks/use-new-thread-place.d.ts +39 -17
- package/dist/agent/hooks/use-new-thread-place.d.ts.map +1 -1
- package/dist/agent/hooks/use-thread-lists.d.ts.map +1 -1
- package/dist/agent/i18n/en.d.ts +59 -4
- 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 +96 -8
- package/dist/agent/i18n/index.d.ts.map +1 -1
- package/dist/agent/message-agent/interpret.d.ts +2 -2
- package/dist/agent/message-agent/interpret.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/questions/interpret.d.ts +31 -0
- package/dist/agent/questions/interpret.d.ts.map +1 -0
- package/dist/agent/questions/question-card.d.ts +16 -0
- package/dist/agent/questions/question-card.d.ts.map +1 -0
- package/dist/agent/questions/question-composer.d.ts +15 -0
- package/dist/agent/questions/question-composer.d.ts.map +1 -0
- package/dist/agent/read/interpret.d.ts +8 -1
- package/dist/agent/read/interpret.d.ts.map +1 -1
- package/dist/agent/read/read-tool-view.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/waits.d.ts +14 -0
- package/dist/agent/waits.d.ts.map +1 -0
- 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 +17 -7
- 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 +476 -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 +50 -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 +77 -20
- package/dist/artifacts/renderers/canvas/board.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/canvas.d.ts +14 -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/controls.d.ts +15 -4
- package/dist/artifacts/renderers/canvas/controls.d.ts.map +1 -1
- 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 +54 -5
- package/dist/artifacts/renderers/canvas/focus.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/gestures.d.ts +46 -0
- package/dist/artifacts/renderers/canvas/gestures.d.ts.map +1 -0
- 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/page-resize.d.ts +21 -0
- package/dist/artifacts/renderers/canvas/page-resize.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/page-size-controls.d.ts +21 -0
- package/dist/artifacts/renderers/canvas/page-size-controls.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/page-size.d.ts +93 -0
- package/dist/artifacts/renderers/canvas/page-size.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/page-zoom.d.ts +64 -0
- package/dist/artifacts/renderers/canvas/page-zoom.d.ts.map +1 -0
- 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/shown-size.d.ts +26 -0
- package/dist/artifacts/renderers/canvas/shown-size.d.ts.map +1 -0
- 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-00wggsst.js +7 -0
- package/dist/chunk-00wggsst.js.map +10 -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-7fj9cfkw.js → chunk-970s5nkn.js} +1 -1
- package/dist/{chunk-4mprsd2n.js → chunk-fg6thecb.js} +25 -1
- package/dist/chunk-fg6thecb.js.map +10 -0
- package/dist/{chunk-ytadd0b5.js → chunk-kymx9y5e.js} +8126 -4257
- package/dist/chunk-kymx9y5e.js.map +211 -0
- package/dist/{chunk-j8g956dt.js → chunk-pxd07kvx.js} +1 -1
- package/dist/{chunk-kwbw4dyk.js → chunk-ryed2jq8.js} +1 -1
- package/dist/chunk-yrcm1pbg.js +5975 -0
- package/dist/chunk-yrcm1pbg.js.map +34 -0
- package/dist/codegen.d.ts.map +1 -1
- package/dist/createCustomApp.d.ts.map +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +932 -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/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 +0 -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 +8188 -4841
- package/dist/pages.js.map +56 -47
- 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 -1
- package/src/agent/agent-chat.tsx +52 -8
- package/src/agent/agent-panel.tsx +12 -0
- package/src/agent/agent-surface.tsx +4 -0
- package/src/agent/artifact-card.tsx +84 -16
- package/src/agent/artifact-panel.tsx +63 -43
- package/src/agent/background/background-tool-row.tsx +24 -10
- package/src/agent/background/interpret.ts +60 -51
- package/src/agent/components/agent-message-body.tsx +1 -1
- package/src/agent/components/composer-place.tsx +77 -53
- package/src/agent/components/composer.tsx +92 -7
- package/src/agent/components/context-chips.tsx +72 -2
- package/src/agent/components/conversation-panel.tsx +30 -10
- package/src/agent/components/message-parts.tsx +29 -6
- package/src/agent/components/thread-artifacts-menu.tsx +22 -5
- package/src/agent/components/transcript.tsx +45 -27
- package/src/agent/composer-insertion.ts +36 -0
- package/src/agent/delegation/agent-exchange.tsx +53 -0
- package/src/agent/delegation/child-card.tsx +6 -40
- package/src/agent/delegation/child-parts.tsx +1 -84
- package/src/agent/delegation/child-work.tsx +19 -5
- package/src/agent/delegation/interpret.ts +33 -54
- package/src/agent/delegation/model.ts +1 -1
- package/src/agent/file-edits/file-edit-tool-view.tsx +126 -0
- package/src/agent/file-edits/interpret.ts +120 -0
- package/src/agent/hooks/use-agent-conversation.ts +61 -10
- package/src/agent/hooks/use-new-thread-place.ts +149 -25
- package/src/agent/i18n/en.ts +60 -4
- package/src/agent/i18n/fr.ts +51 -4
- package/src/agent/message-agent/interpret.ts +4 -3
- package/src/agent/publish-artifact/interpret.ts +37 -6
- 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/questions/interpret.ts +90 -0
- package/src/agent/questions/question-card.tsx +57 -0
- package/src/agent/questions/question-composer.tsx +257 -0
- package/src/agent/react-router.tsx +2 -2
- package/src/agent/read/interpret.ts +34 -1
- package/src/agent/read/read-tool-view.tsx +20 -4
- package/src/agent/tool-views/built-in.tsx +22 -8
- package/src/agent/types.ts +4 -0
- package/src/agent/waits.ts +50 -0
- package/src/artifacts/artifact-page.tsx +42 -17
- package/src/artifacts/artifact-viewer.tsx +56 -0
- package/src/artifacts/artifacts.css +116 -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 +21 -7
- package/src/artifacts/file-source.ts +10 -3
- package/src/artifacts/frame.tsx +53 -14
- 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 +469 -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 +839 -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 +373 -35
- package/src/artifacts/renderers/canvas/canvas.tsx +441 -75
- 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/controls.tsx +64 -30
- 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 +321 -26
- package/src/artifacts/renderers/canvas/gestures.ts +265 -0
- package/src/artifacts/renderers/canvas/items.tsx +179 -52
- package/src/artifacts/renderers/canvas/layout.ts +99 -47
- package/src/artifacts/renderers/canvas/page-resize.tsx +542 -0
- package/src/artifacts/renderers/canvas/page-size-controls.tsx +193 -0
- package/src/artifacts/renderers/canvas/page-size.ts +218 -0
- package/src/artifacts/renderers/canvas/page-zoom.ts +280 -0
- 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/shown-size.ts +105 -0
- 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 +219 -147
- package/src/build.ts +96 -11
- package/src/codegen.ts +83 -5
- package/src/createCustomApp.ts +20 -7
- package/src/index.ts +14 -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/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 +0 -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 +16 -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-4j3c3p72.js +0 -1487
- package/dist/chunk-4j3c3p72.js.map +0 -18
- package/dist/chunk-4mprsd2n.js.map +0 -10
- package/dist/chunk-ytadd0b5.js.map +0 -188
- /package/dist/{chunk-7fj9cfkw.js.map → chunk-970s5nkn.js.map} +0 -0
- /package/dist/{chunk-j8g956dt.js.map → chunk-pxd07kvx.js.map} +0 -0
- /package/dist/{chunk-kwbw4dyk.js.map → chunk-ryed2jq8.js.map} +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { NormalizedTool } from "./parts"
|
|
2
|
+
|
|
3
|
+
// `wait` and `stop` name background commands, by the `bg_` id `bash` returned, and sub-agents, by
|
|
4
|
+
// their key. Earlier threads hold the tools before them: `bash_output` and `bash_stop` for a
|
|
5
|
+
// command, `wait_agent` for sub-agents, by run id.
|
|
6
|
+
|
|
7
|
+
/** The tools that read or stop a background command, today's and earlier threads'. */
|
|
8
|
+
export const COMMAND_TOOLS: ReadonlySet<string> = new Set([
|
|
9
|
+
"wait",
|
|
10
|
+
"stop",
|
|
11
|
+
"bash_output",
|
|
12
|
+
"bash_stop",
|
|
13
|
+
])
|
|
14
|
+
|
|
15
|
+
/** What a `wait` or a `stop` names: the ids it was called with, as the model wrote them. */
|
|
16
|
+
export function namedIds(tool: Pick<NormalizedTool, "toolName" | "input">): readonly string[] {
|
|
17
|
+
const input = isRecord(tool.input) ? tool.input : {}
|
|
18
|
+
const ids = Array.isArray(input.ids)
|
|
19
|
+
? input.ids
|
|
20
|
+
: Array.isArray(input.runIds)
|
|
21
|
+
? input.runIds
|
|
22
|
+
: [input.id]
|
|
23
|
+
return ids.flatMap((id) => (typeof id === "string" && id.trim() ? [id.trim()] : []))
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** Whether an id names a background command rather than a sub-agent. */
|
|
27
|
+
export function isCommandId(id: string): boolean {
|
|
28
|
+
return id.startsWith("bg_")
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** Whether a call waits for, or stops, one of the Agent's sub-agents: its row stands for it. */
|
|
32
|
+
export function waitsForChildren(tool: Pick<NormalizedTool, "toolName" | "input">): boolean {
|
|
33
|
+
if (tool.toolName === "wait_agent") return true
|
|
34
|
+
if (tool.toolName !== "wait" && tool.toolName !== "stop") return false
|
|
35
|
+
return namedIds(tool).some((id) => !isCommandId(id))
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Whether a call reads, waits for, or stops background commands alone. */
|
|
39
|
+
export function waitsForCommandsOnly(tool: Pick<NormalizedTool, "toolName" | "input">): boolean {
|
|
40
|
+
return COMMAND_TOOLS.has(tool.toolName) && !waitsForChildren(tool)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** Whether a call stops what it names. */
|
|
44
|
+
export function isStop(tool: Pick<NormalizedTool, "toolName">): boolean {
|
|
45
|
+
return tool.toolName === "stop" || tool.toolName === "bash_stop"
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
49
|
+
return typeof value === "object" && value !== null && !Array.isArray(value)
|
|
50
|
+
}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
+
import { getProjectInfoOptions } from "@sixb/client/hooks"
|
|
2
|
+
import { useQueryClient } from "@tanstack/react-query"
|
|
1
3
|
import { useNavigate, useParams, useSearchParams } from "react-router-dom"
|
|
4
|
+
import { useCurrentUser } from "../session"
|
|
5
|
+
import { useSharedGuest } from "../shared-session"
|
|
2
6
|
import {
|
|
3
7
|
type ArtifactTarget,
|
|
4
8
|
artifactTargetFromSearch,
|
|
5
9
|
artifactTargetHref,
|
|
6
10
|
withArtifactTarget,
|
|
7
11
|
} from "./target"
|
|
12
|
+
import { type AgentDraft, AgentDraftContext, keepAgentDraft } from "./view-context"
|
|
8
13
|
import { Viewer } from "./viewer"
|
|
9
14
|
|
|
10
15
|
/**
|
|
@@ -16,6 +21,9 @@ export function ArtifactPage() {
|
|
|
16
21
|
const { artifactId } = useParams()
|
|
17
22
|
const [searchParams, setSearchParams] = useSearchParams()
|
|
18
23
|
const navigate = useNavigate()
|
|
24
|
+
const queries = useQueryClient()
|
|
25
|
+
const user = useCurrentUser()
|
|
26
|
+
const guest = useSharedGuest()
|
|
19
27
|
if (!artifactId) return null
|
|
20
28
|
|
|
21
29
|
// The artifact is the path; the version and part are parameters.
|
|
@@ -26,24 +34,41 @@ export function ArtifactPage() {
|
|
|
26
34
|
artifactId,
|
|
27
35
|
}
|
|
28
36
|
|
|
37
|
+
// Asked of the Agent from here, words wait for the conversation at home, in its input, for
|
|
38
|
+
// this person in this project.
|
|
39
|
+
const draftForAgent = (draft: AgentDraft) => {
|
|
40
|
+
void queries
|
|
41
|
+
.fetchQuery({ ...getProjectInfoOptions(), staleTime: Number.POSITIVE_INFINITY })
|
|
42
|
+
.then((project) => {
|
|
43
|
+
keepAgentDraft({ userId: user?.id ?? null, projectId: project.id, artifactId, ...draft })
|
|
44
|
+
navigate("/")
|
|
45
|
+
})
|
|
46
|
+
.catch(() => navigate("/"))
|
|
47
|
+
}
|
|
48
|
+
|
|
29
49
|
return (
|
|
30
|
-
<div className="fixed inset-0 z-50 flex flex-col bg-background text-foreground">
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
50
|
+
<div className="fixed inset-0 z-50 flex flex-col bg-background pt-[env(safe-area-inset-top,0px)] text-foreground">
|
|
51
|
+
{/* A shared link's guest has no Agent to ask. */}
|
|
52
|
+
<AgentDraftContext.Provider value={guest ? null : draftForAgent}>
|
|
53
|
+
<Viewer
|
|
54
|
+
target={target}
|
|
55
|
+
chrome={{
|
|
56
|
+
// Back to where the link was followed from, or into the app for a link opened cold:
|
|
57
|
+
// for a guest, the page their link opens.
|
|
58
|
+
onBack: () =>
|
|
59
|
+
canGoBack() ? navigate(-1) : navigate(guest ? guest.destinationPath : "/"),
|
|
60
|
+
}}
|
|
61
|
+
// A version or part of this artifact replaces the address; it is the same page.
|
|
62
|
+
onTargetChange={(next) => {
|
|
63
|
+
if (next.type !== "artifact") return
|
|
64
|
+
const nextParams = withArtifactTarget(searchParams, next)
|
|
65
|
+
nextParams.delete("artifact")
|
|
66
|
+
setSearchParams(nextParams, { replace: true })
|
|
67
|
+
}}
|
|
68
|
+
// Another artifact is another page, so back returns to this one.
|
|
69
|
+
onOpenReference={(next) => navigate(artifactTargetHref(next))}
|
|
70
|
+
/>
|
|
71
|
+
</AgentDraftContext.Provider>
|
|
47
72
|
</div>
|
|
48
73
|
)
|
|
49
74
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { isMobileViewport, useIsMobile } from "@sixb/ui/hooks"
|
|
2
|
+
import { cn } from "@sixb/ui/lib/utils"
|
|
3
|
+
import { useState } from "react"
|
|
4
|
+
import { useNavigate } from "react-router-dom"
|
|
5
|
+
import { artifactHref } from "../pages/routes"
|
|
6
|
+
import { HeldArtifactCards } from "./held-artifact"
|
|
7
|
+
import { artifactTargetHref, type ViewerTarget } from "./target"
|
|
8
|
+
import { Viewer } from "./viewer"
|
|
9
|
+
|
|
10
|
+
export interface ArtifactViewerProps {
|
|
11
|
+
/** The artifact to show, at its latest version: `object.properties.plan.id`. */
|
|
12
|
+
readonly artifactId: string
|
|
13
|
+
/** Sizes the frame; it is 34rem tall unless a class says otherwise. */
|
|
14
|
+
readonly className?: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* An artifact in place on a page of your own, such as the plan a contract holds: the viewer its
|
|
19
|
+
* own page uses, under its header, following it live, with its versions and its comments. Open full
|
|
20
|
+
* page, and an artifact it links to, go to that artifact's page.
|
|
21
|
+
*
|
|
22
|
+
* On a phone it is the artifact's card, opening its page: a canvas panned inside a page that
|
|
23
|
+
* scrolls fights the finger, and the page gives the artifact the whole screen.
|
|
24
|
+
*/
|
|
25
|
+
export function ArtifactViewer({ artifactId, className }: ArtifactViewerProps) {
|
|
26
|
+
const navigate = useNavigate()
|
|
27
|
+
// Asked of the window too: the hook answers only after the first render, too late to keep a
|
|
28
|
+
// phone from opening the live viewer.
|
|
29
|
+
const mobile = useIsMobile() || isMobileViewport()
|
|
30
|
+
const [target, setTarget] = useState<ViewerTarget>({ type: "artifact", artifactId })
|
|
31
|
+
|
|
32
|
+
// Another artifact opens at its own latest version, not at the version or part the last one was.
|
|
33
|
+
const [shown, setShown] = useState(artifactId)
|
|
34
|
+
if (shown !== artifactId) {
|
|
35
|
+
setShown(artifactId)
|
|
36
|
+
setTarget({ type: "artifact", artifactId })
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (mobile) return <HeldArtifactCards artifactIds={[artifactId]} />
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<div
|
|
43
|
+
className={cn(
|
|
44
|
+
"flex h-[34rem] min-h-0 flex-col overflow-hidden rounded-xl border border-border bg-background",
|
|
45
|
+
className
|
|
46
|
+
)}
|
|
47
|
+
>
|
|
48
|
+
<Viewer
|
|
49
|
+
target={target}
|
|
50
|
+
onTargetChange={setTarget}
|
|
51
|
+
onOpenReference={(next) => navigate(artifactTargetHref(next))}
|
|
52
|
+
chrome={{ fullPageHref: artifactHref(artifactId) }}
|
|
53
|
+
/>
|
|
54
|
+
</div>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
@@ -206,6 +206,42 @@
|
|
|
206
206
|
display: none;
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
+
/*
|
|
210
|
+
* A board the reader uses in place, running while they read the canvas (renderers/canvas/board.tsx):
|
|
211
|
+
* a soft ring while the pointer is over it, the page's own cursor inside. Holding Space, a drag
|
|
212
|
+
* across its page pans, as anywhere on the canvas.
|
|
213
|
+
*/
|
|
214
|
+
.sixb-artboard .react-flow__node-board .sixb-canvas-surface {
|
|
215
|
+
transition: box-shadow 160ms ease-out;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.sixb-artboard .sixb-canvas-surface:has(> [data-interactive]:hover) {
|
|
219
|
+
box-shadow:
|
|
220
|
+
0 0 0 calc(1.5px * var(--sixb-name-scale, 1)) color-mix(in oklab, var(--primary) 24%, transparent),
|
|
221
|
+
0 1px 2px rgb(0 0 0 / 0.05),
|
|
222
|
+
0 20px 44px -28px rgb(0 0 0 / 0.35);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/* A pan dragged across a page keeps going: the page under the pointer takes none of it. */
|
|
226
|
+
.sixb-artboard[data-panning] [data-interactive] iframe,
|
|
227
|
+
.sixb-artboard:has(.react-flow__pane.dragging) [data-interactive] iframe {
|
|
228
|
+
pointer-events: none;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.sixb-artboard[data-panning] :is(.react-flow__pane, .react-flow__node) {
|
|
232
|
+
cursor: grab;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.sixb-artboard[data-panning] :is(.react-flow__pane, .react-flow__node):active {
|
|
236
|
+
cursor: grabbing;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
@media (prefers-reduced-motion: reduce) {
|
|
240
|
+
.sixb-artboard .react-flow__node-board .sixb-canvas-surface {
|
|
241
|
+
transition: none;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
209
245
|
/* A board takes focus from the keyboard, to open it; the ring shows where focus is. */
|
|
210
246
|
.sixb-artboard .react-flow__node:focus-visible {
|
|
211
247
|
outline: 2px solid var(--ring);
|
|
@@ -266,3 +302,83 @@
|
|
|
266
302
|
.sixb-artboard .sixb-resize-line {
|
|
267
303
|
border-color: color-mix(in oklab, var(--primary) 80%, transparent) !important;
|
|
268
304
|
}
|
|
305
|
+
|
|
306
|
+
/*
|
|
307
|
+
* A canvas drawn from its live document (renderers/canvas/presence.tsx). An item someone else
|
|
308
|
+
* moves glides to where they put it, as their drag reaches here a few times a second; one the
|
|
309
|
+
* reader drags follows the pointer. Presence draws over every item.
|
|
310
|
+
*/
|
|
311
|
+
.sixb-artboard[data-live] .react-flow__node:not(.dragging) {
|
|
312
|
+
transition: transform 90ms linear;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
@media (prefers-reduced-motion: reduce) {
|
|
316
|
+
.sixb-artboard[data-live] .react-flow__node:not(.dragging) {
|
|
317
|
+
transition: none;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.sixb-artboard .react-flow__viewport-portal {
|
|
322
|
+
z-index: 2000;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/* Zoomed far out, a tile waiting for its picture is still (renderers/canvas/board.tsx). */
|
|
326
|
+
.sixb-artboard[data-far] [aria-busy] > svg {
|
|
327
|
+
animation: none;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/*
|
|
331
|
+
* A board an Agent turn is changing: a ring in the accent, and a soft light sweeping across it,
|
|
332
|
+
* faint enough to read the page through. Still, a faint tint, for who asks for less motion.
|
|
333
|
+
*/
|
|
334
|
+
.sixb-agent-board {
|
|
335
|
+
box-shadow: 0 0 0 1.5px color-mix(in oklab, var(--primary) 50%, transparent);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.sixb-agent-board::before {
|
|
339
|
+
content: "";
|
|
340
|
+
position: absolute;
|
|
341
|
+
inset: 0;
|
|
342
|
+
border-radius: inherit;
|
|
343
|
+
background: var(--primary);
|
|
344
|
+
opacity: 0.09;
|
|
345
|
+
mask-image: linear-gradient(105deg, transparent 35%, #000 50%, transparent 65%);
|
|
346
|
+
mask-size: 250% 100%;
|
|
347
|
+
mask-repeat: no-repeat;
|
|
348
|
+
animation: sixb-agent-sweep 2.6s ease-in-out infinite;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
@keyframes sixb-agent-sweep {
|
|
352
|
+
from {
|
|
353
|
+
mask-position: 100% 0;
|
|
354
|
+
}
|
|
355
|
+
to {
|
|
356
|
+
mask-position: 0% 0;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
@media (prefers-reduced-motion: reduce) {
|
|
361
|
+
.sixb-agent-board::before {
|
|
362
|
+
mask-image: none;
|
|
363
|
+
opacity: 0.05;
|
|
364
|
+
animation: none;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/*
|
|
369
|
+
* Placing a comment on a canvas (renderers/canvas/commenting.tsx): the pointer is a comment's
|
|
370
|
+
* bubble, its tip where the pin goes.
|
|
371
|
+
*/
|
|
372
|
+
.sixb-artboard[data-commenting] :is(.react-flow__pane, .react-flow__node-board) {
|
|
373
|
+
cursor:
|
|
374
|
+
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M3 21V11a8 8 0 1 1 8 8H3z' fill='%23111' stroke='white' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E")
|
|
375
|
+
3 21,
|
|
376
|
+
crosshair;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/* The board a click would comment on, outlined in the selection blue the opened board uses. */
|
|
380
|
+
.sixb-artboard[data-commenting] .react-flow__node-board:hover {
|
|
381
|
+
outline: calc(2px / var(--sixb-zoom, 1)) solid #0a84ff;
|
|
382
|
+
outline-offset: calc(4px / var(--sixb-zoom, 1));
|
|
383
|
+
border-radius: 10px;
|
|
384
|
+
}
|
|
@@ -63,8 +63,8 @@ export function fileExtension(name: string): string | undefined {
|
|
|
63
63
|
* removed. Edits within them leave no trace in the structure, so they say nothing here.
|
|
64
64
|
*/
|
|
65
65
|
export function versionChanges(
|
|
66
|
-
previous: ArtifactVersion,
|
|
67
|
-
current: ArtifactVersion,
|
|
66
|
+
previous: Pick<ArtifactVersion, "outline">,
|
|
67
|
+
current: Pick<ArtifactVersion, "outline">,
|
|
68
68
|
messages: ArtifactMessages
|
|
69
69
|
): string[] {
|
|
70
70
|
const { card } = messages
|
|
@@ -9,7 +9,8 @@ import { fileView } from "./file-view"
|
|
|
9
9
|
import { ArtifactKindIcon, type ArtifactKindName } from "./kind-icon"
|
|
10
10
|
import { useArtifactMessages } from "./messages"
|
|
11
11
|
import { type ArtifactVersion, useArtifactTheme, useFileText, versionFileSource } from "./queries"
|
|
12
|
-
import {
|
|
12
|
+
import { boardPreviewUrl, useBoardPreviews } from "./renderers/canvas/previews"
|
|
13
|
+
import { useCanvas, useCanvasMode } from "./renderers/canvas/renderer"
|
|
13
14
|
import { CanvasThumbnail } from "./renderers/canvas/thumbnail"
|
|
14
15
|
import { PageScreen } from "./renderers/page"
|
|
15
16
|
import { chartData, chartReadsLocked } from "./renderers/sheet/chart-data"
|
|
@@ -165,11 +166,24 @@ function VersionPreview({
|
|
|
165
166
|
)
|
|
166
167
|
}
|
|
167
168
|
|
|
168
|
-
/** A canvas drawn small, once its `canvas.json` is read. */
|
|
169
|
+
/** A canvas drawn small, once its `canvas.json` is read, its boards as their small pictures. */
|
|
169
170
|
function CanvasPreview({ version }: { readonly version: ArtifactVersion }) {
|
|
170
171
|
const canvas = useCanvas(version)
|
|
172
|
+
const previews = useBoardPreviews(version)
|
|
173
|
+
const mode = useCanvasMode(version)
|
|
174
|
+
|
|
175
|
+
const pictures = useMemo(
|
|
176
|
+
() =>
|
|
177
|
+
new Map(
|
|
178
|
+
Object.entries(previews).flatMap(([board, status]) =>
|
|
179
|
+
status === "ready" ? [[board, boardPreviewUrl(version, board, mode, "small")]] : []
|
|
180
|
+
)
|
|
181
|
+
),
|
|
182
|
+
[previews, version, mode]
|
|
183
|
+
)
|
|
184
|
+
|
|
171
185
|
if (canvas === undefined) return <Skeleton pulse />
|
|
172
|
-
return canvas ? <CanvasThumbnail canvas={canvas} /> : <Skeleton />
|
|
186
|
+
return canvas ? <CanvasThumbnail canvas={canvas} pictures={pictures} /> : <Skeleton />
|
|
173
187
|
}
|
|
174
188
|
|
|
175
189
|
function DocumentPreview({ version }: { readonly version: ArtifactVersion }) {
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { type AgentContextInput, MAX_AGENT_APP_STATE_ENTRY_BYTES } from "@sixb/core/agents/context"
|
|
2
|
+
import { quoteArtifactComment } from "@sixb/core/artifacts"
|
|
3
|
+
|
|
4
|
+
// The comments a reader sends the Agent, as context of their message: a chip that names how many
|
|
5
|
+
// and on what, and that shows their words; for the Agent, each comment quoted with where it is,
|
|
6
|
+
// its id and its author, as its skill reads them. What the reader reads stays words, never the
|
|
7
|
+
// addresses and ids the Agent needs.
|
|
8
|
+
|
|
9
|
+
/** What a comments context's id starts with, before the artifact's id. */
|
|
10
|
+
export const COMMENTS_CONTEXT_PREFIX = "artifact-comments:"
|
|
11
|
+
|
|
12
|
+
/** One comment as the context holds it: quoted for the Agent, its words for the chip. */
|
|
13
|
+
export interface ContextComment {
|
|
14
|
+
readonly id: string
|
|
15
|
+
readonly quote: string
|
|
16
|
+
readonly author: string | null
|
|
17
|
+
readonly body: string
|
|
18
|
+
readonly replies: readonly string[]
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** What a comments context holds. */
|
|
22
|
+
export interface CommentsContextValue {
|
|
23
|
+
readonly artifactId: string
|
|
24
|
+
readonly title: string
|
|
25
|
+
readonly comments: readonly ContextComment[]
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** What a comment brings to the context: itself and its replies, as the API gives them. */
|
|
29
|
+
interface SentComment {
|
|
30
|
+
readonly id: string
|
|
31
|
+
readonly anchor: Parameters<typeof quoteArtifactComment>[0]["anchor"]
|
|
32
|
+
readonly body: string
|
|
33
|
+
readonly authorName?: string | null
|
|
34
|
+
readonly author?: { readonly type: string }
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Room left in the context for what its id, label and description take. */
|
|
38
|
+
const CONTEXT_ROOM_BYTES = MAX_AGENT_APP_STATE_ENTRY_BYTES - 2 * 1024
|
|
39
|
+
|
|
40
|
+
/** The longest words of a comment or a reply the context keeps. */
|
|
41
|
+
const MAX_WORDS = 1_500
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The context that sends these comments to the Agent, labelled for the chip. As many as fit in a
|
|
45
|
+
* context entry go, in order; `sent` says how many.
|
|
46
|
+
*/
|
|
47
|
+
export function commentsContext(input: {
|
|
48
|
+
readonly artifactId: string
|
|
49
|
+
readonly title: string
|
|
50
|
+
readonly label: (count: number) => string
|
|
51
|
+
readonly threads: readonly {
|
|
52
|
+
readonly comment: SentComment
|
|
53
|
+
readonly replies: readonly SentComment[]
|
|
54
|
+
}[]
|
|
55
|
+
}): { readonly context: AgentContextInput; readonly sent: number } {
|
|
56
|
+
const comments: ContextComment[] = []
|
|
57
|
+
let bytes = 0
|
|
58
|
+
for (const { comment, replies } of input.threads) {
|
|
59
|
+
const body = cut(comment.body)
|
|
60
|
+
const entry: ContextComment = {
|
|
61
|
+
id: comment.id,
|
|
62
|
+
quote: quoteArtifactComment({ ...comment, body, guest: comment.author?.type === "guest" }),
|
|
63
|
+
author: comment.authorName ?? null,
|
|
64
|
+
body,
|
|
65
|
+
replies: replies.map((reply) => cut(reply.body)),
|
|
66
|
+
}
|
|
67
|
+
const size = new TextEncoder().encode(JSON.stringify(entry)).byteLength
|
|
68
|
+
if (comments.length > 0 && bytes + size > CONTEXT_ROOM_BYTES) break
|
|
69
|
+
comments.push(entry)
|
|
70
|
+
bytes += size
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const value = {
|
|
74
|
+
artifactId: input.artifactId,
|
|
75
|
+
title: input.title,
|
|
76
|
+
comments: comments.map((comment) => ({ ...comment, replies: [...comment.replies] })),
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
sent: comments.length,
|
|
80
|
+
context: {
|
|
81
|
+
kind: "app-state",
|
|
82
|
+
id: `${COMMENTS_CONTEXT_PREFIX}${input.artifactId}`,
|
|
83
|
+
label: input.label(comments.length),
|
|
84
|
+
description: `Comments the person chose on the canvas "${input.title}" (${input.artifactId}) for you to address. Each quote names where the comment is, as the canvas guide of the sixb-artifacts skill explains, then its words; replies follow it.`,
|
|
85
|
+
value,
|
|
86
|
+
},
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/** The comments a context sends, when it is a comments context; null for any other. */
|
|
91
|
+
export function readCommentsContext(context: AgentContextInput): CommentsContextValue | null {
|
|
92
|
+
if (context.kind !== "app-state" || !context.id.startsWith(COMMENTS_CONTEXT_PREFIX)) return null
|
|
93
|
+
const value = context.value
|
|
94
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) return null
|
|
95
|
+
|
|
96
|
+
const comments = (value as Record<string, unknown>).comments
|
|
97
|
+
if (!Array.isArray(comments)) return null
|
|
98
|
+
const read = comments.flatMap((comment): ContextComment[] => {
|
|
99
|
+
if (typeof comment !== "object" || comment === null || Array.isArray(comment)) return []
|
|
100
|
+
const { id, quote, author, body, replies } = comment as Record<string, unknown>
|
|
101
|
+
if (typeof id !== "string" || typeof quote !== "string" || typeof body !== "string") return []
|
|
102
|
+
return [
|
|
103
|
+
{
|
|
104
|
+
id,
|
|
105
|
+
quote,
|
|
106
|
+
author: typeof author === "string" ? author : null,
|
|
107
|
+
body,
|
|
108
|
+
replies: Array.isArray(replies)
|
|
109
|
+
? replies.filter((reply): reply is string => typeof reply === "string")
|
|
110
|
+
: [],
|
|
111
|
+
},
|
|
112
|
+
]
|
|
113
|
+
})
|
|
114
|
+
const { artifactId, title } = value as Record<string, unknown>
|
|
115
|
+
return {
|
|
116
|
+
artifactId: typeof artifactId === "string" ? artifactId : "",
|
|
117
|
+
title: typeof title === "string" ? title : "",
|
|
118
|
+
comments: read,
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function cut(words: string): string {
|
|
123
|
+
const text = words.replace(/\s+/g, " ").trim()
|
|
124
|
+
return text.length > MAX_WORDS ? `${text.slice(0, MAX_WORDS - 1)}…` : text
|
|
125
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { UpdateArtifactResponse } from "@sixb/client"
|
|
2
2
|
import { getArtifactVersionQueryKey } from "@sixb/client/hooks"
|
|
3
3
|
import type { QueryClient } from "@tanstack/react-query"
|
|
4
4
|
import { createContext, type ReactNode, useContext, useEffect } from "react"
|
|
@@ -21,6 +21,11 @@ interface EditSession {
|
|
|
21
21
|
/** Whether the reader is editing the version shown. */
|
|
22
22
|
readonly editing: boolean
|
|
23
23
|
readonly report: (draft: ArtifactDraft | null) => void
|
|
24
|
+
/**
|
|
25
|
+
* Starts editing, as the header's Edit does: absent while the reader edits already, or may not
|
|
26
|
+
* change the artifact.
|
|
27
|
+
*/
|
|
28
|
+
readonly start?: (() => void) | undefined
|
|
24
29
|
}
|
|
25
30
|
|
|
26
31
|
const EditSessionContext = createContext<EditSession>({ editing: false, report: () => {} })
|
|
@@ -28,10 +33,11 @@ const EditSessionContext = createContext<EditSession>({ editing: false, report:
|
|
|
28
33
|
export function EditSessionProvider({
|
|
29
34
|
editing,
|
|
30
35
|
report,
|
|
36
|
+
start,
|
|
31
37
|
children,
|
|
32
38
|
}: EditSession & { readonly children: ReactNode }) {
|
|
33
39
|
return (
|
|
34
|
-
<EditSessionContext.Provider value={{ editing, report }}>
|
|
40
|
+
<EditSessionContext.Provider value={{ editing, report, start }}>
|
|
35
41
|
{children}
|
|
36
42
|
</EditSessionContext.Provider>
|
|
37
43
|
)
|
|
@@ -42,6 +48,14 @@ export function useArtifactEditing(): boolean {
|
|
|
42
48
|
return useContext(EditSessionContext).editing
|
|
43
49
|
}
|
|
44
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Starts editing from within the artifact, as the header's Edit does, for a change the reader
|
|
53
|
+
* makes there; null while they edit already, or may not change it.
|
|
54
|
+
*/
|
|
55
|
+
export function useStartEditing(): (() => void) | null {
|
|
56
|
+
return useContext(EditSessionContext).start ?? null
|
|
57
|
+
}
|
|
58
|
+
|
|
45
59
|
/** Tells the viewer what the renderer's draft holds, for the header's Save. */
|
|
46
60
|
export function useReportDraft(draft: ArtifactDraft | null): void {
|
|
47
61
|
const { report } = useContext(EditSessionContext)
|
|
@@ -57,16 +71,16 @@ const MEDIA_TYPES: Readonly<Record<string, string>> = {
|
|
|
57
71
|
}
|
|
58
72
|
|
|
59
73
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
74
|
+
* Saves a draft as the artifact's latest, and fills the cache with what it saved: the version, and
|
|
75
|
+
* each file's text, the changed ones from the draft and the rest from the version edited, so it
|
|
76
|
+
* shows at once, without reading again what the reader already has.
|
|
63
77
|
*/
|
|
64
78
|
export async function saveDraft(
|
|
65
79
|
queries: QueryClient,
|
|
66
80
|
version: ArtifactVersion,
|
|
67
81
|
draft: ArtifactDraft,
|
|
68
|
-
options: { readonly
|
|
69
|
-
): Promise<
|
|
82
|
+
options: { readonly baseRevision?: number } = {}
|
|
83
|
+
): Promise<UpdateArtifactResponse> {
|
|
70
84
|
const texts = draft.files()
|
|
71
85
|
const changed = new Map(
|
|
72
86
|
[...texts].map(([path, text]) => [
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
getArtifactFileContent,
|
|
7
7
|
getObservedAgentChildFileContent,
|
|
8
8
|
getObservedAgentMessageFileContent,
|
|
9
|
+
withSharedAccess,
|
|
9
10
|
} from "@sixb/client"
|
|
10
11
|
import { useArtifactMessages } from "./messages"
|
|
11
12
|
|
|
@@ -46,8 +47,10 @@ export function artifactFileSource(input: {
|
|
|
46
47
|
readonly baseUrl?: string
|
|
47
48
|
}): FileSource {
|
|
48
49
|
const routePath = `/api/artifacts/${encodeURIComponent(input.artifactId)}/versions/${input.version}/content`
|
|
50
|
+
// An open version's file changes at its address: the cache key, its bytes' digest, gives each
|
|
51
|
+
// content its own URL, so an image the browser kept is never shown for another.
|
|
49
52
|
const url = (disposition: "inline" | "attachment") =>
|
|
50
|
-
contentUrl(routePath, { path: input.path, disposition }, input.baseUrl)
|
|
53
|
+
contentUrl(routePath, { path: input.path, disposition, v: input.fileRef.digest }, input.baseUrl)
|
|
51
54
|
return {
|
|
52
55
|
id: `artifact:${input.artifactId}@${input.version}/${input.path}`,
|
|
53
56
|
fileRef: input.fileRef,
|
|
@@ -189,11 +192,15 @@ export function useFileName(source: FileSource): string {
|
|
|
189
192
|
return source.name || messages.file
|
|
190
193
|
}
|
|
191
194
|
|
|
195
|
+
/**
|
|
196
|
+
* A file's address, as an `<img>`, a `<video>` or a download link loads it, without the client: a
|
|
197
|
+
* shared link's session names its grant in it, since such a request cannot send the header.
|
|
198
|
+
*/
|
|
192
199
|
function contentUrl(routePath: string, query: Record<string, string>, baseUrl?: string): string {
|
|
193
200
|
const params = new URLSearchParams(query)
|
|
194
201
|
const base = baseUrl ?? client.getConfig().baseUrl
|
|
195
|
-
if (!base && typeof window === "undefined") return `${routePath}?${params}`
|
|
202
|
+
if (!base && typeof window === "undefined") return withSharedAccess(`${routePath}?${params}`)
|
|
196
203
|
const url = new URL(routePath, base ?? window.location.origin)
|
|
197
204
|
url.search = params.toString()
|
|
198
|
-
return url.toString()
|
|
205
|
+
return withSharedAccess(url.toString())
|
|
199
206
|
}
|