@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
|
@@ -3,11 +3,13 @@ import { useArtifactMessages } from "../../artifacts/messages"
|
|
|
3
3
|
import { ActivityStatusText } from "../components/activity-status"
|
|
4
4
|
import { useAgentMessages } from "../i18n"
|
|
5
5
|
import type { NormalizedTool } from "../parts"
|
|
6
|
-
import { publishedArtifact, publishTitle } from "./interpret"
|
|
6
|
+
import { isUpdateTool, publishedArtifact, publishTitle } from "./interpret"
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* A publish in the work trace: what it published
|
|
10
|
-
*
|
|
9
|
+
* A publish in the work trace: what it published, with any warnings, or why it was refused. The
|
|
10
|
+
* answer's cards show the result; this row keeps each attempt. A write to an open version names
|
|
11
|
+
* no version: the version is the current one, which changes until someone creates it. A call from
|
|
12
|
+
* before open versions published a version for good, which it names.
|
|
11
13
|
*/
|
|
12
14
|
export function PublishArtifactToolView({ tool }: { tool: NormalizedTool }) {
|
|
13
15
|
const messages = useAgentMessages().artifacts
|
|
@@ -16,11 +18,12 @@ export function PublishArtifactToolView({ tool }: { tool: NormalizedTool }) {
|
|
|
16
18
|
const published = publishedArtifact(tool)
|
|
17
19
|
const running = tool.state === "input-streaming" || tool.state === "input-available"
|
|
18
20
|
const failed = tool.state === "output-error"
|
|
21
|
+
const update = isUpdateTool(tool.toolName)
|
|
19
22
|
const label = failed
|
|
20
|
-
? messages.publishFailed(title)
|
|
23
|
+
? (update ? messages.updateFailed : messages.publishFailed)(title)
|
|
21
24
|
: running
|
|
22
|
-
? messages.publishing(title)
|
|
23
|
-
: messages.published(title)
|
|
25
|
+
? (update ? messages.updating : messages.publishing)(title)
|
|
26
|
+
: (update ? messages.updated : messages.published)(title)
|
|
24
27
|
|
|
25
28
|
return (
|
|
26
29
|
<div className="min-w-0 space-y-1">
|
|
@@ -31,7 +34,7 @@ export function PublishArtifactToolView({ tool }: { tool: NormalizedTool }) {
|
|
|
31
34
|
) : (
|
|
32
35
|
<span className="min-w-0 truncate font-medium">{label}</span>
|
|
33
36
|
)}
|
|
34
|
-
{published ? (
|
|
37
|
+
{published && published.open === undefined ? (
|
|
35
38
|
<span className="shrink-0 text-muted-foreground/60 tabular-nums">
|
|
36
39
|
· {versionLabel(published.version)}
|
|
37
40
|
</span>
|
|
@@ -59,5 +62,8 @@ export function PublishArtifactToolView({ tool }: { tool: NormalizedTool }) {
|
|
|
59
62
|
/** The refusal the Agent received, without the harness's prefix. */
|
|
60
63
|
function refusal(errorText: string): string {
|
|
61
64
|
// [SixbAgentWorker] on refusals recorded before the harness had a package of its own.
|
|
62
|
-
return errorText.replace(
|
|
65
|
+
return errorText.replace(
|
|
66
|
+
/^\[SixbAgent(?:Worker)?\] (?:publish_artifact(?:_version)?|update_artifact) refused: /,
|
|
67
|
+
""
|
|
68
|
+
)
|
|
63
69
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getArtifactQueryKey } from "@sixb/client/hooks"
|
|
2
1
|
import { isMobileViewport } from "@sixb/ui/hooks"
|
|
3
2
|
import { useQueryClient } from "@tanstack/react-query"
|
|
4
3
|
import { useEffect, useRef } from "react"
|
|
4
|
+
import { artifactChanged } from "../../artifacts/queries"
|
|
5
5
|
import { useArtifactPanel } from "../artifact-panel"
|
|
6
6
|
import type { NormalizedPart } from "../parts"
|
|
7
7
|
import { turnArtifacts } from "./interpret"
|
|
@@ -10,9 +10,9 @@ import { turnArtifacts } from "./interpret"
|
|
|
10
10
|
const openedRuns = new Set<string>()
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* Follows what a live turn publishes: each
|
|
14
|
-
* artifacts, and the turn's first publish opens the panel on it, at its latest version so
|
|
15
|
-
*
|
|
13
|
+
* Follows what a live turn publishes: each write, by its revision, refreshes the artifact and every
|
|
14
|
+
* list of artifacts, and the turn's first publish opens the panel on it, at its latest version so
|
|
15
|
+
* the turn's later writes show in place. It opens only beside the conversation or over the app:
|
|
16
16
|
* a dialog would take the reader's focus, and the composer's, while the Agent is still working,
|
|
17
17
|
* so there the card waits to be opened.
|
|
18
18
|
*/
|
|
@@ -26,17 +26,13 @@ export function useLivePublishes(live: {
|
|
|
26
26
|
|
|
27
27
|
useEffect(() => {
|
|
28
28
|
const published = turnArtifacts(live.parts)
|
|
29
|
-
let changed = false
|
|
30
29
|
for (const artifact of published) {
|
|
31
|
-
|
|
30
|
+
// An open version keeps its number as the turn writes it: each write is its revision.
|
|
31
|
+
const key = `${artifact.artifactId}@${artifact.version}r${artifact.revision ?? ""}`
|
|
32
32
|
if (seen.current.has(key)) continue
|
|
33
33
|
seen.current.add(key)
|
|
34
|
-
|
|
35
|
-
void queryClient.invalidateQueries({
|
|
36
|
-
queryKey: getArtifactQueryKey({ path: { artifactId: artifact.artifactId } }),
|
|
37
|
-
})
|
|
34
|
+
artifactChanged(queryClient, artifact.artifactId)
|
|
38
35
|
}
|
|
39
|
-
if (changed) void queryClient.invalidateQueries({ queryKey: [{ _id: "listArtifacts" }] })
|
|
40
36
|
|
|
41
37
|
const first = published[0]
|
|
42
38
|
if (!first || !panel || !live.runId || openedRuns.has(live.runId)) return
|
|
@@ -70,7 +70,7 @@ export function AgentChatPage({
|
|
|
70
70
|
}, [navigate, normalizedRouteBase])
|
|
71
71
|
|
|
72
72
|
return (
|
|
73
|
-
<section className="fixed inset-0 z-50 flex h-
|
|
73
|
+
<section className="fixed inset-0 z-50 flex h-(--viewport-height) min-h-0 overflow-hidden bg-background pt-[env(safe-area-inset-top,0px)] text-foreground">
|
|
74
74
|
<AgentChat
|
|
75
75
|
{...props}
|
|
76
76
|
ambientContext={ambientContext ?? registeredContext}
|
|
@@ -117,7 +117,7 @@ export function AgentThreadsPage() {
|
|
|
117
117
|
const navigate = useNavigate()
|
|
118
118
|
|
|
119
119
|
return (
|
|
120
|
-
<section className="fixed inset-0 z-50 flex h-
|
|
120
|
+
<section className="fixed inset-0 z-50 flex h-(--viewport-height) min-h-0 flex-col overflow-hidden bg-background pt-[env(safe-area-inset-top,0px)] text-foreground">
|
|
121
121
|
<AgentThreads
|
|
122
122
|
className="min-h-0 flex-1"
|
|
123
123
|
onSelectThread={(threadId) => navigate(threadPath(threadId))}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { ReactNode } from "react"
|
|
2
|
+
import { BackgroundCommandStep } from "../background/background-card"
|
|
3
|
+
import { BackgroundToolRow } from "../background/background-tool-row"
|
|
4
|
+
import { isBackgroundStart } from "../background/interpret"
|
|
2
5
|
import { BashToolView } from "../bash/bash-tool-view"
|
|
3
6
|
import { WebFetchToolView } from "../components/web-fetch-tool-view"
|
|
4
7
|
import { WebSearchToolView } from "../components/web-search-tool-view"
|
|
5
8
|
import type { NormalizedTool } from "../parts"
|
|
9
|
+
import { OpenArtifactToolView } from "../publish-artifact/open-artifact-tool-view"
|
|
6
10
|
import { PublishArtifactToolView } from "../publish-artifact/publish-artifact-tool-view"
|
|
7
11
|
import { ReadToolView } from "../read/read-tool-view"
|
|
8
12
|
import { coerceWebFetchOutput } from "../utils/web-fetch"
|
|
@@ -18,22 +22,36 @@ const publishArtifact: BuiltInToolView = (tool) => <PublishArtifactToolView tool
|
|
|
18
22
|
const BUILT_IN_TOOL_VIEWS: ReadonlyMap<string, BuiltInToolView> = new Map([
|
|
19
23
|
[
|
|
20
24
|
"bash",
|
|
21
|
-
(tool) =>
|
|
22
|
-
|
|
23
|
-
tool={
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
(tool) =>
|
|
26
|
+
isBackgroundStart(tool) ? (
|
|
27
|
+
<BackgroundCommandStep tool={tool} />
|
|
28
|
+
) : (
|
|
29
|
+
<BashToolView
|
|
30
|
+
tool={{
|
|
31
|
+
state: tool.state,
|
|
32
|
+
input: tool.input,
|
|
33
|
+
inputText: tool.inputText,
|
|
34
|
+
output: tool.output,
|
|
35
|
+
errorText: tool.errorText,
|
|
36
|
+
}}
|
|
37
|
+
/>
|
|
38
|
+
),
|
|
39
|
+
],
|
|
40
|
+
// A failed read or stop keeps the inspector, which says why.
|
|
41
|
+
[
|
|
42
|
+
"bash_output",
|
|
43
|
+
(tool) => (tool.state === "output-error" ? null : <BackgroundToolRow tool={tool} />),
|
|
44
|
+
],
|
|
45
|
+
[
|
|
46
|
+
"bash_stop",
|
|
47
|
+
(tool) => (tool.state === "output-error" ? null : <BackgroundToolRow tool={tool} />),
|
|
32
48
|
],
|
|
33
49
|
["read", (tool) => <ReadToolView tool={tool} />],
|
|
34
50
|
["view_file", (tool) => <ViewFileToolView tool={tool} />],
|
|
35
51
|
["publish_artifact", publishArtifact],
|
|
52
|
+
["update_artifact", publishArtifact],
|
|
36
53
|
["publish_artifact_version", publishArtifact],
|
|
54
|
+
["open_artifact", (tool) => <OpenArtifactToolView tool={tool} />],
|
|
37
55
|
[
|
|
38
56
|
"web_fetch",
|
|
39
57
|
(tool) =>
|
package/src/agent/types.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type {
|
|
2
|
+
CreateAgentThreadData,
|
|
2
3
|
GetAgentResponse,
|
|
3
4
|
GetAgentRunResponse,
|
|
4
5
|
GetAgentThreadContextResponse,
|
|
@@ -18,6 +19,9 @@ export type Agent = GetAgentResponse
|
|
|
18
19
|
|
|
19
20
|
export type AgentThread = ListAgentThreadsResponse["threads"][number]
|
|
20
21
|
|
|
22
|
+
/** What a new conversation's sandbox is made from, as the project's sandbox declares its params. */
|
|
23
|
+
export type AgentThreadSandboxParams = NonNullable<CreateAgentThreadData["body"]["sandbox"]>
|
|
24
|
+
|
|
21
25
|
export type AgentMessage = ListAgentThreadMessagesResponse["messages"][number]
|
|
22
26
|
|
|
23
27
|
export type AgentMessagePart = AgentMessage["parts"][number]
|
|
@@ -1,18 +1,97 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { httpUrl, type WebSource, webSource } from "./web-search"
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
/** A `web_fetch` result, as the chat shows it. */
|
|
4
|
+
export interface WebFetchPage {
|
|
5
|
+
readonly source: WebSource
|
|
6
|
+
/** What the agent asked about the page. */
|
|
7
|
+
readonly question?: string
|
|
8
|
+
readonly answer?: string
|
|
9
|
+
/** The answer stopped at its length limit: its end may be missing. */
|
|
10
|
+
readonly answerTruncated: boolean
|
|
11
|
+
/** The question went unanswered: the preview stands in for the answer. */
|
|
12
|
+
readonly answerFailed: boolean
|
|
13
|
+
/** The start of the page, or all of it when it is short. */
|
|
14
|
+
readonly preview?: string
|
|
15
|
+
/**
|
|
16
|
+
* Another site the address sent the agent to, which it did not follow. Its host stays whole:
|
|
17
|
+
* `example.com` sending to `www.example.com` would otherwise read as a redirect to itself.
|
|
18
|
+
*/
|
|
19
|
+
readonly redirect?: { readonly url: string; readonly domain: string }
|
|
20
|
+
// What the server sent: shown only in the opened row.
|
|
21
|
+
readonly status?: number
|
|
22
|
+
readonly contentType?: string
|
|
23
|
+
readonly bytes?: number
|
|
24
|
+
readonly truncated: boolean
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Recognize a `web_fetch` output: Sixb's (`source`, `answer`, `preview`), and the Exa tool's that
|
|
29
|
+
* older threads stored (`title`, `url`, `content`).
|
|
30
|
+
*/
|
|
31
|
+
export function coerceWebFetchOutput(value: unknown): WebFetchPage | null {
|
|
32
|
+
if (!isRecord(value)) return null
|
|
33
|
+
|
|
34
|
+
if (typeof value.content === "string") {
|
|
35
|
+
if (typeof value.url !== "string" || typeof value.title !== "string") return null
|
|
36
|
+
|
|
37
|
+
const source = webSource(value.url, value.title, value.content)
|
|
38
|
+
if (!source) return null
|
|
39
|
+
|
|
40
|
+
return {
|
|
41
|
+
source,
|
|
42
|
+
preview: value.content,
|
|
43
|
+
answerTruncated: false,
|
|
44
|
+
answerFailed: false,
|
|
45
|
+
truncated: false,
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (!isRecord(value.source) || typeof value.source.url !== "string") return null
|
|
50
|
+
|
|
51
|
+
// The page speaks for itself in the row; its source carries no excerpt of it.
|
|
52
|
+
const source = webSource(value.source.url, text(value.source.title) ?? "", "")
|
|
53
|
+
if (!source) return null
|
|
54
|
+
|
|
55
|
+
const redirect = isRecord(value.redirect) ? httpUrl(text(value.redirect.url) ?? "") : null
|
|
56
|
+
|
|
57
|
+
return {
|
|
58
|
+
source,
|
|
59
|
+
question: text(value.question),
|
|
60
|
+
answer: text(value.answer),
|
|
61
|
+
answerTruncated: value.answerTruncated === true,
|
|
62
|
+
answerFailed: typeof value.answerError === "string",
|
|
63
|
+
preview: text(value.preview),
|
|
64
|
+
redirect: redirect ? { url: redirect.href, domain: redirect.hostname } : undefined,
|
|
65
|
+
status: count(value.status),
|
|
66
|
+
contentType: text(value.contentType),
|
|
67
|
+
bytes: count(value.bytes),
|
|
68
|
+
truncated: value.truncated === true,
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** The page a `web_fetch` read, as a source; none when it only pointed elsewhere or failed. */
|
|
73
|
+
export function webFetchSource(value: unknown): WebSource | null {
|
|
74
|
+
const page = coerceWebFetchOutput(value)
|
|
75
|
+
if (!page || page.redirect) return null
|
|
76
|
+
if (page.status !== undefined && (page.status < 200 || page.status >= 300)) return null
|
|
77
|
+
return page.source
|
|
6
78
|
}
|
|
7
79
|
|
|
8
80
|
export function webFetchUrl(input: unknown): URL | null {
|
|
9
81
|
if (!isRecord(input) || typeof input.url !== "string") return null
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
82
|
+
return httpUrl(input.url)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function webFetchQuestion(input: unknown): string | undefined {
|
|
86
|
+
return isRecord(input) ? text(input.question) : undefined
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function text(value: unknown): string | undefined {
|
|
90
|
+
return typeof value === "string" && value.trim() ? value.trim() : undefined
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function count(value: unknown): number | undefined {
|
|
94
|
+
return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : undefined
|
|
16
95
|
}
|
|
17
96
|
|
|
18
97
|
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { NormalizedPart } from "../parts"
|
|
2
|
+
import { webFetchSource } from "./web-fetch"
|
|
2
3
|
|
|
3
4
|
export interface WebSource {
|
|
4
5
|
readonly id: string
|
|
@@ -22,61 +23,89 @@ export function formatPublicationDate(value: string, locale: string): string {
|
|
|
22
23
|
}).format(new Date(value))
|
|
23
24
|
}
|
|
24
25
|
|
|
25
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Recognize a `web_search` output: Sixb's hits (`snippet`, `publishedAt`), and the Exa tool's
|
|
28
|
+
* that older threads stored (`text`, `author`, `publishedDate`).
|
|
29
|
+
*/
|
|
26
30
|
export function coerceWebSearchOutput(value: unknown): readonly WebSource[] | null {
|
|
27
31
|
if (!isRecord(value) || !Array.isArray(value.results)) return null
|
|
32
|
+
|
|
28
33
|
const sources: WebSource[] = []
|
|
29
34
|
for (const result of value.results) {
|
|
30
|
-
if (
|
|
31
|
-
!isRecord(result) ||
|
|
32
|
-
typeof result.url !== "string" ||
|
|
33
|
-
typeof result.title !== "string" ||
|
|
34
|
-
typeof result.text !== "string"
|
|
35
|
-
) {
|
|
35
|
+
if (!isRecord(result) || typeof result.url !== "string" || typeof result.title !== "string") {
|
|
36
36
|
return null
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
|
|
39
|
+
const text = typeof result.snippet === "string" ? result.snippet : result.text
|
|
40
|
+
if (typeof text !== "string") return null
|
|
41
|
+
|
|
42
|
+
const source = webSource(result.url, result.title, text)
|
|
43
|
+
if (!source) continue
|
|
44
|
+
|
|
42
45
|
sources.push({
|
|
43
|
-
|
|
44
|
-
url: url.href,
|
|
45
|
-
domain: url.hostname.replace(/^www\./, ""),
|
|
46
|
-
faviconUrl: new URL("/favicon.ico", url.origin).href,
|
|
47
|
-
title: compact(result.title) || url.hostname,
|
|
48
|
-
excerpt: excerpt(result.text),
|
|
46
|
+
...source,
|
|
49
47
|
author: typeof result.author === "string" ? compact(result.author) : undefined,
|
|
50
|
-
publishedDate: publicationDate(result.publishedDate),
|
|
48
|
+
publishedDate: publicationDate(result.publishedAt ?? result.publishedDate),
|
|
51
49
|
})
|
|
52
50
|
}
|
|
51
|
+
|
|
53
52
|
// Invalid links are not evidence that a search returned zero results. Keep the inspector.
|
|
54
53
|
return value.results.length > 0 && sources.length === 0 ? null : sources
|
|
55
54
|
}
|
|
56
55
|
|
|
56
|
+
/** A page as a source, or null when its link is not a plain web address. */
|
|
57
|
+
export function webSource(url: string, title: string, text: string): WebSource | null {
|
|
58
|
+
const parsed = httpUrl(url)
|
|
59
|
+
if (!parsed) return null
|
|
60
|
+
|
|
61
|
+
const page = new URL(parsed)
|
|
62
|
+
page.hash = ""
|
|
63
|
+
return {
|
|
64
|
+
id: page.href,
|
|
65
|
+
url: parsed.href,
|
|
66
|
+
domain: displayDomain(parsed),
|
|
67
|
+
faviconUrl: new URL("/favicon.ico", parsed.origin).href,
|
|
68
|
+
title: compact(title) || fileName(parsed) || parsed.hostname,
|
|
69
|
+
excerpt: excerpt(text),
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** A host as people read it: without the `www.` prefix. */
|
|
74
|
+
export function displayDomain(url: URL): string {
|
|
75
|
+
return url.hostname.replace(/^www\./, "")
|
|
76
|
+
}
|
|
77
|
+
|
|
57
78
|
export function webSearchQuery(input: unknown): string | undefined {
|
|
58
79
|
return isRecord(input) && typeof input.query === "string" ? input.query.trim() : undefined
|
|
59
80
|
}
|
|
60
81
|
|
|
61
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* Keep provider order and the first occurrence; separate pages on one domain remain separate. A
|
|
84
|
+
* page the agent read counts too, unless it only pointed elsewhere.
|
|
85
|
+
*/
|
|
62
86
|
export function collectWebSources(parts: readonly NormalizedPart[]): readonly WebSource[] {
|
|
63
87
|
const sources = new Map<string, WebSource>()
|
|
88
|
+
const add = (source: WebSource) => {
|
|
89
|
+
if (!sources.has(source.id)) sources.set(source.id, source)
|
|
90
|
+
}
|
|
91
|
+
|
|
64
92
|
for (const part of parts) {
|
|
65
|
-
if (
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
part.tool.
|
|
69
|
-
) {
|
|
70
|
-
continue
|
|
93
|
+
if (part.kind !== "tool" || part.tool.state !== "output-available") continue
|
|
94
|
+
|
|
95
|
+
if (part.tool.toolName === "web_search") {
|
|
96
|
+
for (const source of coerceWebSearchOutput(part.tool.output) ?? []) add(source)
|
|
71
97
|
}
|
|
72
|
-
|
|
73
|
-
|
|
98
|
+
|
|
99
|
+
if (part.tool.toolName === "web_fetch") {
|
|
100
|
+
const source = webFetchSource(part.tool.output)
|
|
101
|
+
if (source) add(source)
|
|
74
102
|
}
|
|
75
103
|
}
|
|
76
104
|
return [...sources.values()]
|
|
77
105
|
}
|
|
78
106
|
|
|
79
|
-
|
|
107
|
+
/** A plain web address: http or https, with no credentials in it. */
|
|
108
|
+
export function httpUrl(value: string): URL | null {
|
|
80
109
|
try {
|
|
81
110
|
const url = new URL(value)
|
|
82
111
|
if (!["http:", "https:"].includes(url.protocol) || url.username || url.password) return null
|
|
@@ -86,6 +115,16 @@ function httpUrl(value: string): URL | null {
|
|
|
86
115
|
}
|
|
87
116
|
}
|
|
88
117
|
|
|
118
|
+
/** The last segment of a URL's path, decoded: what a PDF or an image without a title is called. */
|
|
119
|
+
function fileName(url: URL): string {
|
|
120
|
+
const segment = url.pathname.slice(url.pathname.lastIndexOf("/") + 1)
|
|
121
|
+
try {
|
|
122
|
+
return compact(decodeURIComponent(segment))
|
|
123
|
+
} catch {
|
|
124
|
+
return compact(segment)
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
89
128
|
function compact(value: string): string {
|
|
90
129
|
return value.replace(/\s+/g, " ").trim()
|
|
91
130
|
}
|
|
@@ -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
|
+
}
|
|
@@ -266,3 +266,83 @@
|
|
|
266
266
|
.sixb-artboard .sixb-resize-line {
|
|
267
267
|
border-color: color-mix(in oklab, var(--primary) 80%, transparent) !important;
|
|
268
268
|
}
|
|
269
|
+
|
|
270
|
+
/*
|
|
271
|
+
* A canvas drawn from its live document (renderers/canvas/presence.tsx). An item someone else
|
|
272
|
+
* moves glides to where they put it, as their drag reaches here a few times a second; one the
|
|
273
|
+
* reader drags follows the pointer. Presence draws over every item.
|
|
274
|
+
*/
|
|
275
|
+
.sixb-artboard[data-live] .react-flow__node:not(.dragging) {
|
|
276
|
+
transition: transform 90ms linear;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
@media (prefers-reduced-motion: reduce) {
|
|
280
|
+
.sixb-artboard[data-live] .react-flow__node:not(.dragging) {
|
|
281
|
+
transition: none;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.sixb-artboard .react-flow__viewport-portal {
|
|
286
|
+
z-index: 2000;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/* Zoomed far out, a tile waiting for its picture is still (renderers/canvas/board.tsx). */
|
|
290
|
+
.sixb-artboard[data-far] [aria-busy] > svg {
|
|
291
|
+
animation: none;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/*
|
|
295
|
+
* A board an Agent turn is changing: a ring in the accent, and a soft light sweeping across it,
|
|
296
|
+
* faint enough to read the page through. Still, a faint tint, for who asks for less motion.
|
|
297
|
+
*/
|
|
298
|
+
.sixb-agent-board {
|
|
299
|
+
box-shadow: 0 0 0 1.5px color-mix(in oklab, var(--primary) 50%, transparent);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.sixb-agent-board::before {
|
|
303
|
+
content: "";
|
|
304
|
+
position: absolute;
|
|
305
|
+
inset: 0;
|
|
306
|
+
border-radius: inherit;
|
|
307
|
+
background: var(--primary);
|
|
308
|
+
opacity: 0.09;
|
|
309
|
+
mask-image: linear-gradient(105deg, transparent 35%, #000 50%, transparent 65%);
|
|
310
|
+
mask-size: 250% 100%;
|
|
311
|
+
mask-repeat: no-repeat;
|
|
312
|
+
animation: sixb-agent-sweep 2.6s ease-in-out infinite;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
@keyframes sixb-agent-sweep {
|
|
316
|
+
from {
|
|
317
|
+
mask-position: 100% 0;
|
|
318
|
+
}
|
|
319
|
+
to {
|
|
320
|
+
mask-position: 0% 0;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
@media (prefers-reduced-motion: reduce) {
|
|
325
|
+
.sixb-agent-board::before {
|
|
326
|
+
mask-image: none;
|
|
327
|
+
opacity: 0.05;
|
|
328
|
+
animation: none;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/*
|
|
333
|
+
* Placing a comment on a canvas (renderers/canvas/commenting.tsx): the pointer is a comment's
|
|
334
|
+
* bubble, its tip where the pin goes.
|
|
335
|
+
*/
|
|
336
|
+
.sixb-artboard[data-commenting] :is(.react-flow__pane, .react-flow__node-board) {
|
|
337
|
+
cursor:
|
|
338
|
+
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")
|
|
339
|
+
3 21,
|
|
340
|
+
crosshair;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/* The board a click would comment on, outlined in the selection blue the opened board uses. */
|
|
344
|
+
.sixb-artboard[data-commenting] .react-flow__node-board:hover {
|
|
345
|
+
outline: calc(2px / var(--sixb-zoom, 1)) solid #0a84ff;
|
|
346
|
+
outline-offset: calc(4px / var(--sixb-zoom, 1));
|
|
347
|
+
border-radius: 10px;
|
|
348
|
+
}
|