@sixb/app 0.2.1 → 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/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/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 +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/composer-insertion.d.ts +24 -0
- package/dist/agent/composer-insertion.d.ts.map +1 -0
- 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 +10 -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 +14 -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 +20 -0
- package/dist/agent/i18n/index.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/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-ytadd0b5.js → chunk-001c4gnk.js} +6871 -3756
- 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-j8g956dt.js → chunk-fwb9mxwm.js} +1 -1
- package/dist/{chunk-7fj9cfkw.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/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/agent-chat.tsx +51 -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/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 +3 -2
- package/src/agent/components/message-parts.tsx +6 -1
- package/src/agent/components/thread-artifacts-menu.tsx +22 -5
- package/src/agent/composer-insertion.ts +36 -0
- package/src/agent/hooks/use-agent-conversation.ts +41 -10
- package/src/agent/hooks/use-new-thread-place.ts +149 -25
- package/src/agent/i18n/en.ts +14 -0
- package/src/agent/i18n/fr.ts +12 -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 +3 -0
- package/src/agent/types.ts +4 -0
- 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/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-j8g956dt.js.map → chunk-fwb9mxwm.js.map} +0 -0
- /package/dist/{chunk-7fj9cfkw.js.map → chunk-kes4ygmz.js.map} +0 -0
- /package/dist/{chunk-kwbw4dyk.js.map → chunk-ryed2jq8.js.map} +0 -0
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
getArtifactOptions,
|
|
3
|
+
getArtifactRestorePointOptions,
|
|
4
|
+
listArtifactRestorePointsOptions,
|
|
5
|
+
} from "@sixb/client/hooks"
|
|
2
6
|
import { cn } from "@sixb/ui/lib/utils"
|
|
3
7
|
import { useQuery } from "@tanstack/react-query"
|
|
4
8
|
import { ChevronRight } from "lucide-react"
|
|
@@ -7,6 +11,7 @@ import { versionChanges } from "../artifacts/card-details"
|
|
|
7
11
|
import { ArtifactCardFace, ArtifactLabel } from "../artifacts/card-preview"
|
|
8
12
|
import { ArtifactKindIcon } from "../artifacts/kind-icon"
|
|
9
13
|
import { useArtifactMessages } from "../artifacts/messages"
|
|
14
|
+
import { useArtifactVersion } from "../artifacts/queries"
|
|
10
15
|
import { artifactHref } from "../pages/routes"
|
|
11
16
|
import { useArtifactPanel } from "./artifact-panel"
|
|
12
17
|
import { useAgentMessages } from "./i18n"
|
|
@@ -15,8 +20,15 @@ import type { PublishedArtifact, TurnArtifact } from "./publish-artifact/interpr
|
|
|
15
20
|
/**
|
|
16
21
|
* What one response published, on the answer's reading path: a card for each artifact it created,
|
|
17
22
|
* side by side, and a line for each one it revised, since its card is already in the conversation.
|
|
23
|
+
* `runId` is the response's run, whose restore points say what it changed.
|
|
18
24
|
*/
|
|
19
|
-
export function ArtifactCards({
|
|
25
|
+
export function ArtifactCards({
|
|
26
|
+
artifacts,
|
|
27
|
+
runId,
|
|
28
|
+
}: {
|
|
29
|
+
readonly artifacts: readonly TurnArtifact[]
|
|
30
|
+
readonly runId: string | null
|
|
31
|
+
}) {
|
|
20
32
|
const messages = useAgentMessages().artifacts
|
|
21
33
|
if (artifacts.length === 0) return null
|
|
22
34
|
const created = artifacts.filter((artifact) => artifact.created)
|
|
@@ -36,7 +48,7 @@ export function ArtifactCards({ artifacts }: { readonly artifacts: readonly Turn
|
|
|
36
48
|
<ul className="flex flex-col gap-2">
|
|
37
49
|
{revised.map((artifact) => (
|
|
38
50
|
<li key={artifact.artifactId} className="min-w-0">
|
|
39
|
-
<ArtifactRevision artifact={artifact} />
|
|
51
|
+
<ArtifactRevision artifact={artifact} runId={runId} />
|
|
40
52
|
</li>
|
|
41
53
|
))}
|
|
42
54
|
</ul>
|
|
@@ -68,15 +80,25 @@ function ArtifactCard({ artifact }: { readonly artifact: PublishedArtifact }) {
|
|
|
68
80
|
)
|
|
69
81
|
}
|
|
70
82
|
|
|
71
|
-
/**
|
|
72
|
-
|
|
83
|
+
/**
|
|
84
|
+
* An artifact this response revised, and what it changed: its structure before the response, as
|
|
85
|
+
* its restore point keeps it, against its structure after. A response from before restore points
|
|
86
|
+
* published a version, compared with the one before it.
|
|
87
|
+
*/
|
|
88
|
+
function ArtifactRevision({
|
|
89
|
+
artifact,
|
|
90
|
+
runId,
|
|
91
|
+
}: {
|
|
92
|
+
readonly artifact: PublishedArtifact
|
|
93
|
+
readonly runId: string | null
|
|
94
|
+
}) {
|
|
73
95
|
const artifactMessages = useArtifactMessages()
|
|
96
|
+
const messages = useAgentMessages().artifacts
|
|
74
97
|
const selected = useIsOpen(artifact)
|
|
75
|
-
const
|
|
76
|
-
const previous = useVersion(artifact.artifactId, artifact.version - 1)
|
|
98
|
+
const change = useTurnChange(artifact, runId)
|
|
77
99
|
const changes =
|
|
78
|
-
|
|
79
|
-
? versionChanges(
|
|
100
|
+
change.before && change.after
|
|
101
|
+
? versionChanges(change.before, change.after, artifactMessages)
|
|
80
102
|
: []
|
|
81
103
|
return (
|
|
82
104
|
<OpenArtifact
|
|
@@ -86,10 +108,15 @@ function ArtifactRevision({ artifact }: { readonly artifact: PublishedArtifact }
|
|
|
86
108
|
>
|
|
87
109
|
<ArtifactLabel
|
|
88
110
|
title={artifact.title}
|
|
89
|
-
detail={
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
111
|
+
detail={
|
|
112
|
+
artifact.open === undefined
|
|
113
|
+
? [artifactMessages.viewer.versionLabel(artifact.version), ...changes.slice(0, 2)].join(
|
|
114
|
+
" · "
|
|
115
|
+
)
|
|
116
|
+
: changes.length > 0
|
|
117
|
+
? changes.slice(0, 2).join(" · ")
|
|
118
|
+
: messages.changed
|
|
119
|
+
}
|
|
93
120
|
icon={
|
|
94
121
|
<span className="flex size-9 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground">
|
|
95
122
|
<ArtifactKindIcon kind={artifact.kind} className="size-4" />
|
|
@@ -161,11 +188,52 @@ function OpenArtifact({
|
|
|
161
188
|
)
|
|
162
189
|
}
|
|
163
190
|
|
|
164
|
-
/** A version of an artifact
|
|
191
|
+
/** A version of an artifact, read again while it is open and changes. */
|
|
165
192
|
function useVersion(artifactId: string, version: number) {
|
|
193
|
+
return useArtifactVersion(artifactId, version, { enabled: version >= 1 })
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
type Outlined = Parameters<typeof versionChanges>[0]
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* What a response changed in an artifact: `before`, the restore point taken before its first
|
|
200
|
+
* write, and `after`, the next one taken, before the turn that followed, else the version as it
|
|
201
|
+
* is now. A response from before restore points published a version: the one before it is
|
|
202
|
+
* `before`. Either is undefined until read, or when the restore point is gone, as the oldest are,
|
|
203
|
+
* or the reader may not list them.
|
|
204
|
+
*/
|
|
205
|
+
function useTurnChange(
|
|
206
|
+
artifact: PublishedArtifact,
|
|
207
|
+
runId: string | null
|
|
208
|
+
): { readonly before?: Outlined; readonly after?: Outlined } {
|
|
209
|
+
const { artifactId } = artifact
|
|
210
|
+
const legacy = artifact.open === undefined
|
|
211
|
+
|
|
212
|
+
const points = useQuery({
|
|
213
|
+
...listArtifactRestorePointsOptions({ path: { artifactId } }),
|
|
214
|
+
enabled: !legacy && runId !== null,
|
|
215
|
+
retry: false,
|
|
216
|
+
})
|
|
217
|
+
const list = points.data?.restorePoints ?? []
|
|
218
|
+
// Newest first: the one after the turn's is the one before it in the list.
|
|
219
|
+
const index = list.findIndex((point) => point.reason === "turn" && point.turnRunId === runId)
|
|
220
|
+
const turn = index >= 0 ? list[index] : undefined
|
|
221
|
+
const next = index > 0 ? list[index - 1] : undefined
|
|
222
|
+
|
|
223
|
+
const before = useRestorePoint(artifactId, turn?.revision)
|
|
224
|
+
const afterPoint = useRestorePoint(artifactId, next?.revision)
|
|
225
|
+
const current = useVersion(artifactId, legacy || turn ? artifact.version : 0)
|
|
226
|
+
const previous = useVersion(artifactId, legacy ? artifact.version - 1 : 0)
|
|
227
|
+
|
|
228
|
+
if (legacy) return { before: previous.data, after: current.data }
|
|
229
|
+
return { before: before.data, after: next ? afterPoint.data : current.data }
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/** A restore point's content, which never changes; nothing when `revision` is undefined. */
|
|
233
|
+
function useRestorePoint(artifactId: string, revision: number | undefined) {
|
|
166
234
|
return useQuery({
|
|
167
|
-
...
|
|
168
|
-
enabled:
|
|
235
|
+
...getArtifactRestorePointOptions({ path: { artifactId, revision: String(revision ?? 0) } }),
|
|
236
|
+
enabled: revision !== undefined,
|
|
169
237
|
staleTime: Number.POSITIVE_INFINITY,
|
|
170
238
|
retry: false,
|
|
171
239
|
})
|
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
type ViewerTarget,
|
|
33
33
|
viewerTargetKey,
|
|
34
34
|
} from "../artifacts/target"
|
|
35
|
+
import { type AgentDraft, AgentDraftContext } from "../artifacts/view-context"
|
|
35
36
|
import { Viewer } from "../artifacts/viewer"
|
|
36
37
|
import {
|
|
37
38
|
type ArtifactPanelPresentation,
|
|
@@ -102,6 +103,11 @@ export interface ArtifactPanelRootProps {
|
|
|
102
103
|
readonly onRouteTargetChange?: (target: ArtifactTarget | null) => void
|
|
103
104
|
/** Offer each artifact's own page, to open or to copy a link to. Off for an observer. */
|
|
104
105
|
readonly pageLinks?: boolean
|
|
106
|
+
/**
|
|
107
|
+
* Puts words in the conversation's input, as an artifact asks the Agent something: the panel
|
|
108
|
+
* closes when it covers the conversation, so the reader sees them there. None for an observer.
|
|
109
|
+
*/
|
|
110
|
+
readonly onAgentDraft?: (draft: AgentDraft) => void
|
|
105
111
|
}
|
|
106
112
|
|
|
107
113
|
/**
|
|
@@ -118,6 +124,7 @@ export function ArtifactPanelRoot({
|
|
|
118
124
|
routeTarget = null,
|
|
119
125
|
onRouteTargetChange,
|
|
120
126
|
pageLinks = true,
|
|
127
|
+
onAgentDraft,
|
|
121
128
|
}: ArtifactPanelRootProps) {
|
|
122
129
|
const messages = useAgentMessages().artifacts
|
|
123
130
|
const idPrefix = useId()
|
|
@@ -219,52 +226,65 @@ export function ArtifactPanelRoot({
|
|
|
219
226
|
/>
|
|
220
227
|
) : null
|
|
221
228
|
|
|
229
|
+
const agentDraft = useMemo(
|
|
230
|
+
() =>
|
|
231
|
+
onAgentDraft
|
|
232
|
+
? (draft: AgentDraft) => {
|
|
233
|
+
onAgentDraft(draft)
|
|
234
|
+
if (presentation !== "panel") close()
|
|
235
|
+
}
|
|
236
|
+
: null,
|
|
237
|
+
[onAgentDraft, presentation, close]
|
|
238
|
+
)
|
|
239
|
+
|
|
222
240
|
return (
|
|
223
241
|
<ArtifactPanelContext.Provider value={value}>
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
<DialogContent
|
|
242
|
-
showCloseButton={false}
|
|
243
|
-
onEscapeKeyDown={leaveEscapeToDeck}
|
|
244
|
-
className="flex h-[calc(100dvh-1rem)] max-h-none w-[calc(100vw-1rem)] max-w-none flex-col gap-0 overflow-hidden rounded-xl p-0 sm:h-[min(88vh,56rem)] sm:w-[min(92vw,72rem)] sm:max-w-[min(92vw,72rem)]"
|
|
242
|
+
<AgentDraftContext.Provider value={agentDraft}>
|
|
243
|
+
{/* A stable parent keeps composer drafts and scroll position across dock and page. */}
|
|
244
|
+
<ArtifactWorkspace
|
|
245
|
+
idPrefix={idPrefix}
|
|
246
|
+
revealKey={
|
|
247
|
+
presentation === "panel" && target ? `${panelTargetKey(target)}:${revealCount}` : null
|
|
248
|
+
}
|
|
249
|
+
viewer={presentation === "panel" ? viewer : null}
|
|
250
|
+
>
|
|
251
|
+
{/* An artifact a reply shows or links to opens here, beside the conversation. */}
|
|
252
|
+
<ArtifactReferencesProvider open={open}>{children}</ArtifactReferencesProvider>
|
|
253
|
+
</ArtifactWorkspace>
|
|
254
|
+
<Dialog
|
|
255
|
+
open={presentation === "dialog" && target !== null}
|
|
256
|
+
onOpenChange={(nextOpen) => {
|
|
257
|
+
if (!nextOpen) close()
|
|
258
|
+
}}
|
|
245
259
|
>
|
|
246
|
-
<
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
{messages.
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
260
|
+
<DialogContent
|
|
261
|
+
showCloseButton={false}
|
|
262
|
+
onEscapeKeyDown={leaveEscapeToDeck}
|
|
263
|
+
className="flex h-[calc(100dvh-1rem)] max-h-none w-[calc(100vw-1rem)] max-w-none flex-col gap-0 overflow-hidden rounded-xl p-0 sm:h-[min(88vh,56rem)] sm:w-[min(92vw,72rem)] sm:max-w-[min(92vw,72rem)]"
|
|
264
|
+
>
|
|
265
|
+
<DialogTitle className="sr-only">{messages.dialogTitle}</DialogTitle>
|
|
266
|
+
<DialogDescription className="sr-only">{messages.dialogDescription}</DialogDescription>
|
|
267
|
+
{presentation === "dialog" ? viewer : null}
|
|
268
|
+
</DialogContent>
|
|
269
|
+
</Dialog>
|
|
270
|
+
{presentation === "canvas" && overlayHost && viewer
|
|
271
|
+
? createPortal(
|
|
272
|
+
<section
|
|
273
|
+
role="dialog"
|
|
274
|
+
aria-modal="false"
|
|
275
|
+
aria-label={messages.dialogTitle}
|
|
276
|
+
aria-describedby={`${idPrefix}-canvas-description`}
|
|
277
|
+
className="pointer-events-auto flex h-full min-h-0 w-full min-w-0 flex-col overflow-hidden rounded-xl border border-border bg-background shadow-2xl motion-safe:animate-in motion-safe:fade-in motion-safe:slide-in-from-right-2 motion-safe:duration-200"
|
|
278
|
+
>
|
|
279
|
+
<p id={`${idPrefix}-canvas-description`} className="sr-only">
|
|
280
|
+
{messages.canvasDescription}
|
|
281
|
+
</p>
|
|
282
|
+
{viewer}
|
|
283
|
+
</section>,
|
|
284
|
+
overlayHost
|
|
285
|
+
)
|
|
286
|
+
: null}
|
|
287
|
+
</AgentDraftContext.Provider>
|
|
268
288
|
</ArtifactPanelContext.Provider>
|
|
269
289
|
)
|
|
270
290
|
}
|
|
@@ -27,7 +27,7 @@ export function AgentMessageBody({ message }: AgentMessageBodyProps) {
|
|
|
27
27
|
return (
|
|
28
28
|
<>
|
|
29
29
|
{message.id === null ? <LivePublishes runId={message.runId} parts={parts} /> : null}
|
|
30
|
-
<AssistantBody parts={parts} live={message.status === "streaming"} />
|
|
30
|
+
<AssistantBody parts={parts} live={message.status === "streaming"} runId={message.runId} />
|
|
31
31
|
</>
|
|
32
32
|
)
|
|
33
33
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cn } from "@sixb/ui/lib/utils"
|
|
2
2
|
import { ChevronDown, Cloud, Folder, FolderPlus, Laptop, X } from "lucide-react"
|
|
3
|
-
import { useState } from "react"
|
|
3
|
+
import { Fragment, useState } from "react"
|
|
4
4
|
import type { NewThreadPlace } from "../hooks/use-new-thread-place"
|
|
5
5
|
import { useAgentMessages } from "../i18n"
|
|
6
6
|
import {
|
|
@@ -21,7 +21,9 @@ function folderName(folder: string): string {
|
|
|
21
21
|
/**
|
|
22
22
|
* Where a new conversation runs, as a quiet line under the input: set once for the conversation, and
|
|
23
23
|
* the thing a person most needs to see before sending, so it isn't among the per-message settings.
|
|
24
|
-
* Its menu holds
|
|
24
|
+
* Its menu holds each computer's folders and the cloud. In a desktop app, those are the folders
|
|
25
|
+
* chosen before on this computer, with a way to choose another. In a browser, they are the folders
|
|
26
|
+
* `sixb` is open in now, on each of the person's computers.
|
|
25
27
|
*/
|
|
26
28
|
export function ComposerPlace({
|
|
27
29
|
place,
|
|
@@ -32,17 +34,26 @@ export function ComposerPlace({
|
|
|
32
34
|
}) {
|
|
33
35
|
const messages = useAgentMessages().computer
|
|
34
36
|
const [open, setOpen] = useState(false)
|
|
35
|
-
const { cloud,
|
|
36
|
-
const name = cloud
|
|
37
|
+
const { cloud, chosen, forgetFolder } = place
|
|
38
|
+
const name = cloud
|
|
39
|
+
? messages.cloud
|
|
40
|
+
: chosen
|
|
41
|
+
? folderName(chosen.folder)
|
|
42
|
+
: messages.chooseFolderShort
|
|
37
43
|
const Icon = cloud ? Cloud : Laptop
|
|
38
|
-
const path =
|
|
44
|
+
const path =
|
|
45
|
+
!cloud && chosen
|
|
46
|
+
? place.remote && chosen.computer.name
|
|
47
|
+
? `${chosen.computer.name} · ${shownFolder(chosen.folder)}`
|
|
48
|
+
: shownFolder(chosen.folder)
|
|
49
|
+
: null
|
|
39
50
|
const described = path ?? name
|
|
40
51
|
|
|
41
52
|
return (
|
|
42
53
|
<ComposerMenu
|
|
43
54
|
open={open}
|
|
44
55
|
onOpenChange={(next) => {
|
|
45
|
-
if (next) place.refreshFolders()
|
|
56
|
+
if (next) place.refreshFolders?.()
|
|
46
57
|
setOpen(next)
|
|
47
58
|
}}
|
|
48
59
|
title={messages.placeTitle}
|
|
@@ -75,54 +86,67 @@ export function ComposerPlace({
|
|
|
75
86
|
}
|
|
76
87
|
>
|
|
77
88
|
<ComposerMenuScroll>
|
|
78
|
-
{place.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
89
|
+
{place.computers.map((computer) => (
|
|
90
|
+
<Fragment key={computer.id ?? "here"}>
|
|
91
|
+
{computer.name ? <ComposerMenuHeader>{computer.name}</ComposerMenuHeader> : null}
|
|
92
|
+
{computer.folders.map((known) => (
|
|
93
|
+
<div key={known} className="group/row relative">
|
|
94
|
+
<button
|
|
95
|
+
type="button"
|
|
96
|
+
className={cn(
|
|
97
|
+
COMPOSER_MENU_ROW_CLASS_NAME,
|
|
98
|
+
forgetFolder && "pr-9",
|
|
99
|
+
!cloud &&
|
|
100
|
+
chosen?.computer.id === computer.id &&
|
|
101
|
+
chosen.folder === known &&
|
|
102
|
+
COMPOSER_MENU_ROW_SELECTED_CLASS_NAME
|
|
103
|
+
)}
|
|
104
|
+
title={shownFolder(known)}
|
|
105
|
+
onClick={() => {
|
|
106
|
+
place.chooseFolder(computer, known)
|
|
107
|
+
setOpen(false)
|
|
108
|
+
}}
|
|
109
|
+
>
|
|
110
|
+
<Folder className="size-4 shrink-0" strokeWidth={1.9} aria-hidden="true" />
|
|
111
|
+
<span className="flex min-w-0 flex-1 flex-col gap-px">
|
|
112
|
+
<span className="truncate font-medium text-foreground">
|
|
113
|
+
{folderName(known)}
|
|
114
|
+
</span>
|
|
115
|
+
<span className="truncate text-xs leading-4 text-muted-foreground">
|
|
116
|
+
{shownFolder(known)}
|
|
117
|
+
</span>
|
|
118
|
+
</span>
|
|
119
|
+
</button>
|
|
120
|
+
{forgetFolder ? (
|
|
121
|
+
<button
|
|
122
|
+
type="button"
|
|
123
|
+
aria-label={messages.forgetFolder(shownFolder(known))}
|
|
124
|
+
title={messages.forgetFolder(shownFolder(known))}
|
|
125
|
+
className="absolute top-1/2 right-1.5 flex size-7 -translate-y-1/2 items-center justify-center rounded-full text-muted-foreground opacity-0 outline-none transition-opacity hover:bg-black/[0.05] focus-visible:opacity-100 group-hover/row:opacity-100 dark:hover:bg-white/[0.08]"
|
|
126
|
+
onClick={() => forgetFolder(known)}
|
|
127
|
+
>
|
|
128
|
+
<X className="size-3.5" strokeWidth={2.2} aria-hidden="true" />
|
|
129
|
+
</button>
|
|
130
|
+
) : null}
|
|
131
|
+
</div>
|
|
132
|
+
))}
|
|
133
|
+
</Fragment>
|
|
112
134
|
))}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
135
|
+
{place.pickFolder ? (
|
|
136
|
+
<button
|
|
137
|
+
type="button"
|
|
138
|
+
className={COMPOSER_MENU_ROW_CLASS_NAME}
|
|
139
|
+
onClick={() => {
|
|
140
|
+
setOpen(false)
|
|
141
|
+
void place.pickFolder?.()
|
|
142
|
+
}}
|
|
143
|
+
>
|
|
144
|
+
<FolderPlus className="size-4 shrink-0" strokeWidth={1.9} aria-hidden="true" />
|
|
145
|
+
<span className="min-w-0 flex-1 font-medium text-foreground">
|
|
146
|
+
{messages.chooseFolder}
|
|
147
|
+
</span>
|
|
148
|
+
</button>
|
|
149
|
+
) : null}
|
|
126
150
|
<ComposerMenuDivider strong />
|
|
127
151
|
<button
|
|
128
152
|
type="button"
|
|
@@ -34,6 +34,7 @@ import {
|
|
|
34
34
|
import {
|
|
35
35
|
type ClipboardEvent,
|
|
36
36
|
type KeyboardEvent,
|
|
37
|
+
type ReactNode,
|
|
37
38
|
useCallback,
|
|
38
39
|
useEffect,
|
|
39
40
|
useLayoutEffect,
|
|
@@ -119,6 +120,19 @@ export interface ComposerProps {
|
|
|
119
120
|
/** Exact context snapshot to restore after a failed send. */
|
|
120
121
|
readonly draftContext?: readonly AgentContextEntryInput[]
|
|
121
122
|
readonly draftNonce?: number
|
|
123
|
+
/**
|
|
124
|
+
* What an artifact hands the conversation, such as the comments the reader asks the Agent to
|
|
125
|
+
* act on, each time `nonce` changes to a non-zero value: its context joins the chips, replacing
|
|
126
|
+
* one of the same identity, and its words start an empty input, the reader's own kept. Nothing
|
|
127
|
+
* is sent.
|
|
128
|
+
*/
|
|
129
|
+
readonly insertion?: {
|
|
130
|
+
readonly text: string
|
|
131
|
+
readonly context?: AgentContextInput
|
|
132
|
+
readonly nonce: number
|
|
133
|
+
}
|
|
134
|
+
/** The insertion of that `nonce` joined the input: its holder lets it go. */
|
|
135
|
+
readonly onInserted?: (nonce: number) => void
|
|
122
136
|
/** Ambient context offered for the next turn. Explicit @ selections remain composer-local. */
|
|
123
137
|
readonly ambientContext?: readonly AgentContextInput[]
|
|
124
138
|
/** Scope drag/drop and overlays to an embedded panel instead of the whole viewport. */
|
|
@@ -146,6 +160,11 @@ export interface ComposerProps {
|
|
|
146
160
|
readonly contextMeter?: ContextMeterProps
|
|
147
161
|
/** Where a new conversation runs, where there's a choice; "waiting" until that's known. */
|
|
148
162
|
readonly newThreadPlace?: NewThreadPlace | "waiting"
|
|
163
|
+
/**
|
|
164
|
+
* The page's own choices for the conversation the next message creates, such as its repository,
|
|
165
|
+
* at the end of the line under the input.
|
|
166
|
+
*/
|
|
167
|
+
readonly newThreadControls?: ReactNode
|
|
149
168
|
}
|
|
150
169
|
|
|
151
170
|
type ComposerAttachment =
|
|
@@ -217,6 +236,8 @@ export function Composer({
|
|
|
217
236
|
draftAttachments,
|
|
218
237
|
draftContext,
|
|
219
238
|
draftNonce,
|
|
239
|
+
insertion,
|
|
240
|
+
onInserted,
|
|
220
241
|
ambientContext = [],
|
|
221
242
|
compact = false,
|
|
222
243
|
approvalMode,
|
|
@@ -226,6 +247,7 @@ export function Composer({
|
|
|
226
247
|
commands = [],
|
|
227
248
|
contextMeter,
|
|
228
249
|
newThreadPlace,
|
|
250
|
+
newThreadControls,
|
|
229
251
|
}: ComposerProps) {
|
|
230
252
|
const agentMessages = useAgentMessages()
|
|
231
253
|
const messages = agentMessages.composer
|
|
@@ -369,6 +391,29 @@ export function Composer({
|
|
|
369
391
|
textareaRef.current?.focus()
|
|
370
392
|
}, [draftNonce])
|
|
371
393
|
|
|
394
|
+
// What an artifact hands the input: its context as a chip, its words in an empty input, the
|
|
395
|
+
// caret after what the input holds.
|
|
396
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: added only when the nonce changes
|
|
397
|
+
useEffect(() => {
|
|
398
|
+
if (!insertion?.nonce) return
|
|
399
|
+
const { context, text } = insertion
|
|
400
|
+
if (context) {
|
|
401
|
+
const identity = agentContextIdentity(context)
|
|
402
|
+
setContextEntries((current) => [
|
|
403
|
+
...current.filter((entry) => agentContextIdentity(entry.context) !== identity),
|
|
404
|
+
{ context, origin: "explicit" },
|
|
405
|
+
])
|
|
406
|
+
}
|
|
407
|
+
setValue((current) => (current.trim() ? current : text))
|
|
408
|
+
onInserted?.(insertion.nonce)
|
|
409
|
+
requestAnimationFrame(() => {
|
|
410
|
+
const input = textareaRef.current
|
|
411
|
+
if (!input) return
|
|
412
|
+
input.focus()
|
|
413
|
+
input.setSelectionRange(input.value.length, input.value.length)
|
|
414
|
+
})
|
|
415
|
+
}, [insertion?.nonce])
|
|
416
|
+
|
|
372
417
|
// However a dictation ends, the focus returns to the input, the caret after any transcript.
|
|
373
418
|
useEffect(() => {
|
|
374
419
|
const wasDictating = wasDictatingRef.current
|
|
@@ -409,8 +454,7 @@ export function Composer({
|
|
|
409
454
|
// Grow the textarea to fit its content, up to a max height where it starts scrolling.
|
|
410
455
|
// Keep overflow hidden until the content actually exceeds the cap so an empty input does not
|
|
411
456
|
// render a scrollbar in browsers configured to always show scroll bars.
|
|
412
|
-
|
|
413
|
-
useLayoutEffect(() => {
|
|
457
|
+
const measure = () => {
|
|
414
458
|
const el = textareaRef.current
|
|
415
459
|
if (!el) return
|
|
416
460
|
if (!expanded) inlineWidthRef.current = el.clientWidth
|
|
@@ -421,7 +465,34 @@ export function Composer({
|
|
|
421
465
|
el.style.height = "auto"
|
|
422
466
|
el.style.overflowY = el.scrollHeight > MAX_HEIGHT_PX ? "auto" : "hidden"
|
|
423
467
|
el.style.height = `${Math.min(el.scrollHeight, MAX_HEIGHT_PX)}px`
|
|
424
|
-
}
|
|
468
|
+
}
|
|
469
|
+
const measureRef = useRef(measure)
|
|
470
|
+
measureRef.current = measure
|
|
471
|
+
|
|
472
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: re-measure whenever the text changes
|
|
473
|
+
useLayoutEffect(measure, [value, attachments.length, contextEntries.length, expanded])
|
|
474
|
+
|
|
475
|
+
// The row's width changes without the text changing: the model label settles after the first
|
|
476
|
+
// render, or the window resizes. A height measured at the old width would keep a wrapped
|
|
477
|
+
// placeholder's two lines.
|
|
478
|
+
useEffect(() => {
|
|
479
|
+
const el = textareaRef.current
|
|
480
|
+
if (!el) return
|
|
481
|
+
let width = el.clientWidth
|
|
482
|
+
let frame = 0
|
|
483
|
+
// Measuring resizes the textarea, so it waits a frame rather than resize inside the callback.
|
|
484
|
+
const observer = new ResizeObserver(() => {
|
|
485
|
+
if (el.clientWidth === width) return
|
|
486
|
+
width = el.clientWidth
|
|
487
|
+
cancelAnimationFrame(frame)
|
|
488
|
+
frame = requestAnimationFrame(() => measureRef.current())
|
|
489
|
+
})
|
|
490
|
+
observer.observe(el)
|
|
491
|
+
return () => {
|
|
492
|
+
observer.disconnect()
|
|
493
|
+
cancelAnimationFrame(frame)
|
|
494
|
+
}
|
|
495
|
+
}, [])
|
|
425
496
|
|
|
426
497
|
const submit = () => {
|
|
427
498
|
if (!canSend) return
|
|
@@ -844,6 +915,9 @@ export function Composer({
|
|
|
844
915
|
<div
|
|
845
916
|
data-dragging={draggingFiles || undefined}
|
|
846
917
|
data-expanded={expanded || undefined}
|
|
918
|
+
// The composer focuses itself on arrival and after each answer; on a phone that raises
|
|
919
|
+
// the keyboard only after a tap on it (TouchViewport).
|
|
920
|
+
data-focus-on-tap=""
|
|
847
921
|
className="group/composer sixb-composer-surface relative flex flex-wrap items-end gap-0.5 rounded-[30px] p-2.5 data-[expanded]:gap-y-1 data-[expanded]:rounded-[26px]"
|
|
848
922
|
>
|
|
849
923
|
{/* The draft on one line, to tell when it stops fitting there. */}
|
|
@@ -1009,12 +1083,23 @@ export function Composer({
|
|
|
1009
1083
|
)}
|
|
1010
1084
|
</div>
|
|
1011
1085
|
</div>
|
|
1012
|
-
{newThreadPlace ? (
|
|
1086
|
+
{newThreadPlace || newThreadControls ? (
|
|
1013
1087
|
// Its height held from the first render: the composer doesn't move when the place arrives.
|
|
1014
|
-
<div
|
|
1015
|
-
|
|
1088
|
+
<div
|
|
1089
|
+
data-slot="composer-place"
|
|
1090
|
+
className="mt-1.5 flex h-7 min-w-0 items-center gap-2 px-3.5"
|
|
1091
|
+
>
|
|
1092
|
+
{newThreadPlace && newThreadPlace !== "waiting" ? (
|
|
1016
1093
|
<ComposerPlace place={newThreadPlace} disabled={disabled || pending} />
|
|
1017
|
-
)}
|
|
1094
|
+
) : null}
|
|
1095
|
+
{newThreadControls ? (
|
|
1096
|
+
<div
|
|
1097
|
+
data-slot="composer-new-thread-controls"
|
|
1098
|
+
className="ml-auto flex min-w-0 items-center"
|
|
1099
|
+
>
|
|
1100
|
+
{newThreadControls}
|
|
1101
|
+
</div>
|
|
1102
|
+
) : null}
|
|
1018
1103
|
</div>
|
|
1019
1104
|
) : null}
|
|
1020
1105
|
<span className="sr-only" aria-live="polite">
|