@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
|
@@ -3,8 +3,11 @@ import {
|
|
|
3
3
|
type AgentContextInput,
|
|
4
4
|
agentContextIdentity,
|
|
5
5
|
} from "@sixb/core/agents/context"
|
|
6
|
+
import { Popover, PopoverContent, PopoverTrigger } from "@sixb/ui/components"
|
|
6
7
|
import { cn } from "@sixb/ui/lib/utils"
|
|
7
|
-
import { Box, PanelsTopLeft, X } from "lucide-react"
|
|
8
|
+
import { Box, MessageSquare, PanelsTopLeft, X } from "lucide-react"
|
|
9
|
+
import { useState } from "react"
|
|
10
|
+
import { type CommentsContextValue, readCommentsContext } from "../../artifacts/comments-context"
|
|
8
11
|
import { useAgentMessages } from "../i18n"
|
|
9
12
|
import { useAgentContextLabel } from "../object-context-title"
|
|
10
13
|
|
|
@@ -50,16 +53,23 @@ function ContextChip({
|
|
|
50
53
|
}) {
|
|
51
54
|
const messages = useAgentMessages().context
|
|
52
55
|
const label = useAgentContextLabel(context)
|
|
56
|
+
const comments = readCommentsContext(context)
|
|
53
57
|
return (
|
|
54
58
|
<span className={cn(COMPOSER_CHIP_CLASS_NAME, onRemove ? "pr-1.5" : "pr-2.5")}>
|
|
55
59
|
<span className={COMPOSER_CHIP_THUMB_CLASS_NAME}>
|
|
56
60
|
{context.kind === "object" ? (
|
|
57
61
|
<Box className="size-3" strokeWidth={2} aria-hidden="true" />
|
|
62
|
+
) : comments ? (
|
|
63
|
+
<MessageSquare className="size-3" strokeWidth={2} aria-hidden="true" />
|
|
58
64
|
) : (
|
|
59
65
|
<PanelsTopLeft className="size-3" strokeWidth={2} aria-hidden="true" />
|
|
60
66
|
)}
|
|
61
67
|
</span>
|
|
62
|
-
|
|
68
|
+
{comments ? (
|
|
69
|
+
<CommentsPreview label={label} comments={comments} />
|
|
70
|
+
) : (
|
|
71
|
+
<span className="min-w-0 flex-1 truncate">{label}</span>
|
|
72
|
+
)}
|
|
63
73
|
{onRemove ? (
|
|
64
74
|
<button
|
|
65
75
|
type="button"
|
|
@@ -73,3 +83,63 @@ function ContextChip({
|
|
|
73
83
|
</span>
|
|
74
84
|
)
|
|
75
85
|
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* A comments chip's name, which shows the comments' words on hover or on a tap: what the reader
|
|
89
|
+
* sends, never the addresses and ids the Agent reads.
|
|
90
|
+
*/
|
|
91
|
+
function CommentsPreview({
|
|
92
|
+
label,
|
|
93
|
+
comments,
|
|
94
|
+
}: {
|
|
95
|
+
readonly label: string
|
|
96
|
+
readonly comments: CommentsContextValue
|
|
97
|
+
}) {
|
|
98
|
+
const messages = useAgentMessages().context
|
|
99
|
+
const [open, setOpen] = useState(false)
|
|
100
|
+
return (
|
|
101
|
+
<Popover open={open} onOpenChange={setOpen}>
|
|
102
|
+
<PopoverTrigger asChild>
|
|
103
|
+
<button
|
|
104
|
+
type="button"
|
|
105
|
+
aria-label={messages.showComments(label)}
|
|
106
|
+
onPointerEnter={(event) => {
|
|
107
|
+
if (event.pointerType === "mouse") setOpen(true)
|
|
108
|
+
}}
|
|
109
|
+
onPointerLeave={(event) => {
|
|
110
|
+
if (event.pointerType === "mouse") setOpen(false)
|
|
111
|
+
}}
|
|
112
|
+
className="min-w-0 flex-1 truncate rounded-sm text-left outline-none focus-visible:ring-2 focus-visible:ring-ring/40"
|
|
113
|
+
>
|
|
114
|
+
{label}
|
|
115
|
+
</button>
|
|
116
|
+
</PopoverTrigger>
|
|
117
|
+
<PopoverContent
|
|
118
|
+
align="start"
|
|
119
|
+
side="top"
|
|
120
|
+
sideOffset={8}
|
|
121
|
+
className="w-80 max-w-[calc(100vw-2rem)] p-0"
|
|
122
|
+
onOpenAutoFocus={(event) => event.preventDefault()}
|
|
123
|
+
>
|
|
124
|
+
<ul
|
|
125
|
+
className="m-0 flex max-h-72 list-none flex-col gap-3 overflow-y-auto p-3"
|
|
126
|
+
data-comments-preview=""
|
|
127
|
+
>
|
|
128
|
+
{comments.comments.map((comment) => (
|
|
129
|
+
<li key={comment.id} className="flex flex-col gap-0.5">
|
|
130
|
+
<span className="text-xs font-medium text-muted-foreground">
|
|
131
|
+
{comment.author ?? messages.someone}
|
|
132
|
+
</span>
|
|
133
|
+
<span className="text-sm leading-5 text-foreground">{comment.body}</span>
|
|
134
|
+
{comment.replies.length > 0 ? (
|
|
135
|
+
<span className="text-xs text-muted-foreground">
|
|
136
|
+
{messages.replies(comment.replies.length)}
|
|
137
|
+
</span>
|
|
138
|
+
) : null}
|
|
139
|
+
</li>
|
|
140
|
+
))}
|
|
141
|
+
</ul>
|
|
142
|
+
</PopoverContent>
|
|
143
|
+
</Popover>
|
|
144
|
+
)
|
|
145
|
+
}
|
|
@@ -5,7 +5,7 @@ import type { ReactNode } from "react"
|
|
|
5
5
|
import type { ConversationComposerProps } from "../hooks/use-agent-conversation"
|
|
6
6
|
import { useAgentMessages } from "../i18n"
|
|
7
7
|
import type { Agent, AgentContextInput, AgentThread } from "../types"
|
|
8
|
-
import { Composer } from "./composer"
|
|
8
|
+
import { Composer, type ComposerProps } from "./composer"
|
|
9
9
|
import { ThreadsButton } from "./threads-button"
|
|
10
10
|
import { Transcript, type TranscriptProps } from "./transcript"
|
|
11
11
|
|
|
@@ -17,7 +17,8 @@ export interface ConversationPanelProps {
|
|
|
17
17
|
readonly readOnly?: boolean
|
|
18
18
|
readonly agent: Agent | undefined
|
|
19
19
|
readonly transcript: TranscriptProps
|
|
20
|
-
|
|
20
|
+
/** The conversation's composer, and the page's choices for a conversation not created yet. */
|
|
21
|
+
readonly composer: ConversationComposerProps & Pick<ComposerProps, "newThreadControls">
|
|
21
22
|
readonly messagesLoading: boolean
|
|
22
23
|
readonly messagesError: string | null
|
|
23
24
|
/** The selected durable thread, or null while composing a new one. */
|
|
@@ -49,6 +49,7 @@ export function AssistantBody({
|
|
|
49
49
|
parts,
|
|
50
50
|
live = false,
|
|
51
51
|
nested = false,
|
|
52
|
+
runId,
|
|
52
53
|
}: {
|
|
53
54
|
parts: readonly NormalizedPart[]
|
|
54
55
|
/** True while this body is driven by an in-flight run, so its headline shows live progress. */
|
|
@@ -58,6 +59,8 @@ export function AssistantBody({
|
|
|
58
59
|
* on the card already.
|
|
59
60
|
*/
|
|
60
61
|
nested?: boolean
|
|
62
|
+
/** The turn's run, whose restore points say what it changed in the artifacts it revised. */
|
|
63
|
+
runId?: string | null
|
|
61
64
|
}) {
|
|
62
65
|
const blocks: React.ReactNode[] = []
|
|
63
66
|
let textBuffer: string[] = []
|
|
@@ -126,7 +129,9 @@ export function AssistantBody({
|
|
|
126
129
|
flushWork(live)
|
|
127
130
|
blocks.push(<AnswerToolViews key="answer-tools" parts={parts} />)
|
|
128
131
|
const artifacts = turnArtifacts(parts)
|
|
129
|
-
if (artifacts.length > 0)
|
|
132
|
+
if (artifacts.length > 0) {
|
|
133
|
+
blocks.push(<ArtifactCards key="artifacts" artifacts={artifacts} runId={runId ?? null} />)
|
|
134
|
+
}
|
|
130
135
|
// Saving is work the reply keeps quiet about; what was remembered is the user's to see.
|
|
131
136
|
savedMemories(parts).forEach((save, index) => {
|
|
132
137
|
blocks.push(<SavedToMemory key={`memory:${index}`} {...save} />)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ListArtifactsResponse } from "@sixb/client"
|
|
1
2
|
import { listArtifactsOptions } from "@sixb/client/hooks"
|
|
2
3
|
import {
|
|
3
4
|
Button,
|
|
@@ -13,11 +14,31 @@ import { ArrowUpRight, Layers } from "lucide-react"
|
|
|
13
14
|
import { Link } from "react-router-dom"
|
|
14
15
|
import { ArtifactKindIcon } from "../../artifacts/kind-icon"
|
|
15
16
|
import { useArtifactMessages } from "../../artifacts/messages"
|
|
17
|
+
import { useArtifactVersion } from "../../artifacts/queries"
|
|
16
18
|
import type { ArtifactTarget } from "../../artifacts/target"
|
|
17
19
|
import { ARTIFACTS_HREF } from "../../pages/routes"
|
|
18
20
|
import { useArtifactPanel } from "../artifact-panel"
|
|
19
21
|
import { useAgentMessages } from "../i18n"
|
|
20
22
|
|
|
23
|
+
type ArtifactSummary = ListArtifactsResponse["artifacts"][number]
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* An artifact's kind, and its latest version once someone created it: the current version changes
|
|
27
|
+
* in place, and has no number to give yet.
|
|
28
|
+
*/
|
|
29
|
+
function ArtifactDetail({ artifact }: { readonly artifact: ArtifactSummary }) {
|
|
30
|
+
const messages = useArtifactMessages()
|
|
31
|
+
const { data } = useArtifactVersion(artifact.id, artifact.latestVersion, {
|
|
32
|
+
revision: artifact.revision,
|
|
33
|
+
})
|
|
34
|
+
return (
|
|
35
|
+
<span className="shrink-0 text-xs text-muted-foreground tabular-nums">
|
|
36
|
+
{messages.kinds[artifact.kind]}
|
|
37
|
+
{data?.frozen ? ` · ${messages.viewer.version(artifact.latestVersion)}` : null}
|
|
38
|
+
</span>
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
|
|
21
42
|
/**
|
|
22
43
|
* The artifacts the Agent published in this conversation, each one opening in the panel, and the
|
|
23
44
|
* way to every artifact in the gallery. Everyone who reads the conversation lists them: its owner,
|
|
@@ -36,7 +57,6 @@ export function ThreadArtifactsMenu({
|
|
|
36
57
|
}) {
|
|
37
58
|
const panel = useArtifactPanel()
|
|
38
59
|
const messages = useAgentMessages().artifacts
|
|
39
|
-
const artifactMessages = useArtifactMessages()
|
|
40
60
|
const { data } = useQuery({
|
|
41
61
|
...listArtifactsOptions({ query: { thread: threadId } }),
|
|
42
62
|
retry: false,
|
|
@@ -70,10 +90,7 @@ export function ThreadArtifactsMenu({
|
|
|
70
90
|
>
|
|
71
91
|
<ArtifactKindIcon kind={artifact.kind} className="size-4 text-muted-foreground" />
|
|
72
92
|
<span className="min-w-0 flex-1 truncate">{artifact.title}</span>
|
|
73
|
-
<
|
|
74
|
-
{artifactMessages.kinds[artifact.kind]} ·{" "}
|
|
75
|
-
{artifactMessages.viewer.version(artifact.latestVersion)}
|
|
76
|
-
</span>
|
|
93
|
+
<ArtifactDetail artifact={artifact} />
|
|
77
94
|
</DropdownMenuItem>
|
|
78
95
|
))}
|
|
79
96
|
{withGallery ? (
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { AgentContextInput } from "@sixb/core/agents/context"
|
|
2
|
+
import { useCallback, useState } from "react"
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Words waiting to join the composer's input, and context to join its chips, numbered so the same
|
|
6
|
+
* handed twice joins twice.
|
|
7
|
+
*/
|
|
8
|
+
export interface ComposerInsertion {
|
|
9
|
+
readonly text: string
|
|
10
|
+
readonly context?: AgentContextInput
|
|
11
|
+
readonly nonce: number
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Words an artifact hands the conversation's input, held until the composer took them: once it
|
|
16
|
+
* has, they are gone, so a composer drawn again, as when the conversation's first message replaces
|
|
17
|
+
* its welcome, does not add them a second time.
|
|
18
|
+
*/
|
|
19
|
+
export function useComposerInsertion(): {
|
|
20
|
+
readonly insertion: ComposerInsertion | undefined
|
|
21
|
+
readonly insert: (draft: { readonly text: string; readonly context?: AgentContextInput }) => void
|
|
22
|
+
readonly inserted: (nonce: number) => void
|
|
23
|
+
} {
|
|
24
|
+
const [pending, setPending] = useState<ComposerInsertion | undefined>(undefined)
|
|
25
|
+
|
|
26
|
+
const insert = useCallback(
|
|
27
|
+
(draft: { readonly text: string; readonly context?: AgentContextInput }) =>
|
|
28
|
+
setPending((current) => ({ ...draft, nonce: (current?.nonce ?? 0) + 1 })),
|
|
29
|
+
[]
|
|
30
|
+
)
|
|
31
|
+
const inserted = useCallback(
|
|
32
|
+
(nonce: number) => setPending((current) => (current?.nonce === nonce ? undefined : current)),
|
|
33
|
+
[]
|
|
34
|
+
)
|
|
35
|
+
return { insertion: pending, insert, inserted }
|
|
36
|
+
}
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
getAgentThreadOptions,
|
|
12
12
|
getAgentThreadQueryKey,
|
|
13
13
|
listAgentApprovalsQueryKey,
|
|
14
|
+
listAgentComputersQueryKey,
|
|
14
15
|
listAgentThreadApprovalsOptions,
|
|
15
16
|
listAgentThreadApprovalsQueryKey,
|
|
16
17
|
listAgentThreadMessagesOptions,
|
|
@@ -83,8 +84,18 @@ import {
|
|
|
83
84
|
threadOwner,
|
|
84
85
|
userPrincipal,
|
|
85
86
|
} from "../sharing"
|
|
86
|
-
import type {
|
|
87
|
-
|
|
87
|
+
import type {
|
|
88
|
+
AgentContextEntryInput,
|
|
89
|
+
AgentFileRef,
|
|
90
|
+
AgentRun,
|
|
91
|
+
AgentThreadSandboxParams,
|
|
92
|
+
LanguageModel,
|
|
93
|
+
} from "../types"
|
|
94
|
+
import {
|
|
95
|
+
ComputerUnavailableError,
|
|
96
|
+
type NewThreadPlaceBody,
|
|
97
|
+
useNewThreadPlace,
|
|
98
|
+
} from "./use-new-thread-place"
|
|
88
99
|
import { useAgentThreadLists } from "./use-thread-lists"
|
|
89
100
|
import { useThreadStream } from "./use-thread-stream"
|
|
90
101
|
|
|
@@ -114,6 +125,12 @@ export interface UseAgentConversationInput {
|
|
|
114
125
|
readonly threadId: string | null
|
|
115
126
|
/** The first message created a thread; show it from now on. */
|
|
116
127
|
readonly onThreadCreated: (threadId: string) => void
|
|
128
|
+
/**
|
|
129
|
+
* The sandbox the conversation the next message creates works in, as the project's sandbox
|
|
130
|
+
* declares its params, such as a repository and a branch. Such a conversation runs in the cloud,
|
|
131
|
+
* so the composer offers no other place. An open thread keeps the sandbox it was created with.
|
|
132
|
+
*/
|
|
133
|
+
readonly newThreadSandbox?: AgentThreadSandboxParams
|
|
117
134
|
}
|
|
118
135
|
|
|
119
136
|
/** The parts of {@link ComposerProps} a conversation decides; the page adds the rest. */
|
|
@@ -143,6 +160,8 @@ export type ConversationComposerProps = Pick<
|
|
|
143
160
|
| "draftAttachments"
|
|
144
161
|
| "draftContext"
|
|
145
162
|
| "draftNonce"
|
|
163
|
+
| "insertion"
|
|
164
|
+
| "onInserted"
|
|
146
165
|
| "approvalMode"
|
|
147
166
|
| "onApprovalModeChange"
|
|
148
167
|
| "awaitingApproval"
|
|
@@ -175,7 +194,11 @@ const MESSAGES_LOAD_ERROR: AgentConversationMessagesError = { code: "load" }
|
|
|
175
194
|
* both render it, by spreading `transcriptProps` and `composerProps` or by drawing `messages` and
|
|
176
195
|
* `turn` themselves.
|
|
177
196
|
*/
|
|
178
|
-
export function useAgentConversation({
|
|
197
|
+
export function useAgentConversation({
|
|
198
|
+
threadId,
|
|
199
|
+
onThreadCreated,
|
|
200
|
+
newThreadSandbox,
|
|
201
|
+
}: UseAgentConversationInput) {
|
|
179
202
|
const agentMessages = useAgentMessages()
|
|
180
203
|
const labels = agentMessages.chat
|
|
181
204
|
const queryClient = useQueryClient()
|
|
@@ -184,7 +207,7 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
|
|
|
184
207
|
waiting: newThreadPlaceWaiting,
|
|
185
208
|
computerId: desktopComputerId,
|
|
186
209
|
resolveBody: resolvePlaceBody,
|
|
187
|
-
} = useNewThreadPlace()
|
|
210
|
+
} = useNewThreadPlace(threadId === null)
|
|
188
211
|
const desktopComputer = useDesktop()?.computer
|
|
189
212
|
// Asking for a folder can take as long as the person does: the composer holds meanwhile.
|
|
190
213
|
const [resolvingPlace, setResolvingPlace] = useState(false)
|
|
@@ -214,9 +237,11 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
|
|
|
214
237
|
// A held call changed: its card, and the thread list's count of what waits for the reader. Its
|
|
215
238
|
// turn's runs follow from their own events.
|
|
216
239
|
onApprovalActivity: (event) => void refreshApprovals(event.threadId),
|
|
217
|
-
//
|
|
218
|
-
//
|
|
240
|
+
// The reader's sixb opened or closed in a folder: the places a new conversation can run follow,
|
|
241
|
+
// and so does the open conversation's badge, should it run there. So do its background
|
|
242
|
+
// commands, which may run where it ran before it moved.
|
|
219
243
|
onComputerActivity: (event) => {
|
|
244
|
+
void queryClient.invalidateQueries({ queryKey: listAgentComputersQueryKey() })
|
|
220
245
|
const place = thread?.computer
|
|
221
246
|
const here = place?.id === event.computerId && place.folder === event.folder
|
|
222
247
|
if (threadId && (here || thread?.backgroundCommands)) void refreshThread(threadId)
|
|
@@ -228,6 +253,7 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
|
|
|
228
253
|
// On every (re)subscription: catch up with what changed while the socket was away.
|
|
229
254
|
onSubscribed: () => {
|
|
230
255
|
void queryClient.invalidateQueries({ queryKey: listAgentApprovalsQueryKey() })
|
|
256
|
+
void queryClient.invalidateQueries({ queryKey: listAgentComputersQueryKey() })
|
|
231
257
|
void (threadId === null ? refreshThreads() : refreshThread(threadId))
|
|
232
258
|
},
|
|
233
259
|
})
|
|
@@ -545,8 +571,13 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
|
|
|
545
571
|
}
|
|
546
572
|
|
|
547
573
|
if (!currentAgent) return
|
|
548
|
-
|
|
549
|
-
const
|
|
574
|
+
// A conversation with a sandbox runs in the cloud: there is no folder to ask for.
|
|
575
|
+
const sandbox = newThreadSandbox
|
|
576
|
+
let place: NewThreadPlaceBody | null = {}
|
|
577
|
+
if (!sandbox) {
|
|
578
|
+
setResolvingPlace(true)
|
|
579
|
+
place = await resolvePlaceBody().finally(() => setResolvingPlace(false))
|
|
580
|
+
}
|
|
550
581
|
if (!place) {
|
|
551
582
|
// They cancelled choosing a folder: nothing was sent, and their message goes back.
|
|
552
583
|
setDraftReseed((current) => ({ text, attachments, context, nonce: current.nonce + 1 }))
|
|
@@ -554,7 +585,7 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
|
|
|
554
585
|
}
|
|
555
586
|
const title = deriveTitle(text, attachments)
|
|
556
587
|
const created = await createThread.mutateAsync({
|
|
557
|
-
body: { ...(title ? { title } : {}), ...place },
|
|
588
|
+
body: { ...(title ? { title } : {}), ...place, ...(sandbox ? { sandbox } : {}) },
|
|
558
589
|
})
|
|
559
590
|
createdThreadId = created.thread.id
|
|
560
591
|
setPendingUser({
|
|
@@ -1097,7 +1128,7 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
|
|
|
1097
1128
|
|
|
1098
1129
|
const composerProps: ConversationComposerProps = {
|
|
1099
1130
|
onSend: send,
|
|
1100
|
-
...(threadId === null && (newThreadPlace || newThreadPlaceWaiting)
|
|
1131
|
+
...(threadId === null && !newThreadSandbox && (newThreadPlace || newThreadPlaceWaiting)
|
|
1101
1132
|
? { newThreadPlace: newThreadPlace ?? "waiting" }
|
|
1102
1133
|
: {}),
|
|
1103
1134
|
error: currentSendError
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
type DesktopComputer,
|
|
3
|
+
type DesktopComputerAccess,
|
|
4
|
+
listAgentComputersOptions,
|
|
5
|
+
useDesktop,
|
|
6
|
+
} from "@sixb/client/hooks"
|
|
7
|
+
import { useQuery, useQueryClient } from "@tanstack/react-query"
|
|
2
8
|
import { useCallback, useEffect, useState } from "react"
|
|
3
9
|
|
|
4
10
|
const STORAGE_KEY = "sixb.agent.new-thread-place"
|
|
11
|
+
/** In a browser: the folder chosen last, on one of the person's computers. */
|
|
12
|
+
const ONLINE_STORAGE_KEY = "sixb.agent.new-thread-place.online"
|
|
5
13
|
|
|
6
14
|
/** The last choice, on this computer: where a new conversation starts. */
|
|
7
15
|
interface StoredPlace {
|
|
@@ -34,28 +42,40 @@ export type NewThreadPlaceBody =
|
|
|
34
42
|
readonly computer: DesktopComputer & { readonly folder: string }
|
|
35
43
|
}
|
|
36
44
|
|
|
45
|
+
/** A computer a new conversation can run on, with the folders to choose from there. */
|
|
46
|
+
export interface PlaceComputer {
|
|
47
|
+
/** Both null while what runs the agent on this computer can't start: the cloud is still a choice. */
|
|
48
|
+
readonly id: string | null
|
|
49
|
+
readonly name: string | null
|
|
50
|
+
readonly folders: readonly string[]
|
|
51
|
+
}
|
|
52
|
+
|
|
37
53
|
/** The composer's choice of where a new conversation runs. */
|
|
38
54
|
export interface NewThreadPlace {
|
|
39
|
-
/**
|
|
40
|
-
|
|
55
|
+
/**
|
|
56
|
+
* In a desktop app, this computer alone. In a browser, the person's computers with `sixb` open,
|
|
57
|
+
* which aren't the one the page is on.
|
|
58
|
+
*/
|
|
59
|
+
readonly computers: readonly PlaceComputer[]
|
|
60
|
+
/** The computers are elsewhere: what's shown names the computer as well as the folder. */
|
|
61
|
+
readonly remote: boolean
|
|
41
62
|
readonly cloud: boolean
|
|
42
|
-
/** Null before the person has chosen one: the first message asks. */
|
|
43
|
-
readonly folder: string | null
|
|
44
|
-
/** Folders chosen before, to choose from again. */
|
|
45
|
-
readonly folders: readonly string[]
|
|
63
|
+
/** Null before the person has chosen one: in a desktop app, the first message asks. */
|
|
64
|
+
readonly chosen: { readonly computer: PlaceComputer; readonly folder: string } | null
|
|
46
65
|
readonly chooseCloud: () => void
|
|
47
|
-
readonly chooseFolder: (folder: string) => void
|
|
48
|
-
/**
|
|
49
|
-
readonly pickFolder
|
|
50
|
-
|
|
51
|
-
readonly
|
|
66
|
+
readonly chooseFolder: (computer: PlaceComputer, folder: string) => void
|
|
67
|
+
/** In a desktop app: ask the person for a folder, and use it. */
|
|
68
|
+
readonly pickFolder?: () => Promise<void>
|
|
69
|
+
/** In a desktop app: take a folder back. */
|
|
70
|
+
readonly forgetFolder?: (folder: string) => void
|
|
71
|
+
/**
|
|
72
|
+
* In a desktop app: read this computer's folders again, as the menu opens. A browser's list
|
|
73
|
+
* follows the activity feed instead.
|
|
74
|
+
*/
|
|
75
|
+
readonly refreshFolders?: () => void
|
|
52
76
|
}
|
|
53
77
|
|
|
54
|
-
|
|
55
|
-
* Where a new conversation runs, in a desktop app that can run the agent here: this computer unless
|
|
56
|
-
* the person chooses the cloud. In a browser there's nothing to choose, and this says so.
|
|
57
|
-
*/
|
|
58
|
-
export function useNewThreadPlace(): {
|
|
78
|
+
export interface NewThreadPlaceState {
|
|
59
79
|
/** Null where the only place is the cloud, or until it's known that there's another. */
|
|
60
80
|
readonly place: NewThreadPlace | null
|
|
61
81
|
/** A desktop app that hasn't said yet whether it can run the agent here. */
|
|
@@ -67,8 +87,24 @@ export function useNewThreadPlace(): {
|
|
|
67
87
|
* person cancels, so that their message stays in the composer.
|
|
68
88
|
*/
|
|
69
89
|
readonly resolveBody: () => Promise<NewThreadPlaceBody | null>
|
|
70
|
-
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Where a new conversation runs. In a desktop app that can run the agent here: this computer
|
|
94
|
+
* unless the person chooses the cloud. In a browser: the cloud unless they choose a folder on one
|
|
95
|
+
* of their computers where `sixb` is open now, and there's nothing to choose while none is.
|
|
96
|
+
*
|
|
97
|
+
* `starting`: a new conversation is open. Only then does a browser list the person's computers.
|
|
98
|
+
*/
|
|
99
|
+
export function useNewThreadPlace(starting: boolean): NewThreadPlaceState {
|
|
71
100
|
const access: DesktopComputerAccess | null = useDesktop()?.computer ?? null
|
|
101
|
+
const desktop = useDesktopPlace(access)
|
|
102
|
+
const online = useOnlineComputersPlace(starting && access === null)
|
|
103
|
+
return desktop ?? online
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** In a desktop app that can run the agent here; null elsewhere. */
|
|
107
|
+
function useDesktopPlace(access: DesktopComputerAccess | null): NewThreadPlaceState | null {
|
|
72
108
|
// Undefined until the desktop app answers; null where it can't run the agent.
|
|
73
109
|
const [computer, setComputer] = useState<DesktopComputer | null | undefined>(undefined)
|
|
74
110
|
const [cannotStart, setCannotStart] = useState(false)
|
|
@@ -114,9 +150,7 @@ export function useNewThreadPlace(): {
|
|
|
114
150
|
}
|
|
115
151
|
}, [access, refreshFolders])
|
|
116
152
|
|
|
117
|
-
if (!access)
|
|
118
|
-
return { place: null, waiting: false, computerId: null, resolveBody: async () => ({}) }
|
|
119
|
-
}
|
|
153
|
+
if (!access) return null
|
|
120
154
|
|
|
121
155
|
const pick = async (): Promise<string | null> => {
|
|
122
156
|
const folder = await access.pickFolder()
|
|
@@ -146,16 +180,23 @@ export function useNewThreadPlace(): {
|
|
|
146
180
|
return { place: null, waiting: computer === undefined, computerId: null, resolveBody }
|
|
147
181
|
}
|
|
148
182
|
|
|
183
|
+
const here: PlaceComputer = {
|
|
184
|
+
id: computer?.id ?? null,
|
|
185
|
+
name: computer?.name ?? null,
|
|
186
|
+
folders: folders ?? [],
|
|
187
|
+
}
|
|
188
|
+
const folder =
|
|
189
|
+
stored.folder && (!folders || folders.includes(stored.folder)) ? stored.folder : null
|
|
149
190
|
return {
|
|
150
191
|
waiting: false,
|
|
151
192
|
computerId: computer?.id ?? null,
|
|
152
193
|
place: {
|
|
153
|
-
|
|
194
|
+
computers: [here],
|
|
195
|
+
remote: false,
|
|
154
196
|
cloud: stored.cloud,
|
|
155
|
-
|
|
156
|
-
folders: folders ?? [],
|
|
197
|
+
chosen: folder ? { computer: here, folder } : null,
|
|
157
198
|
chooseCloud: () => remember({ ...stored, cloud: true }),
|
|
158
|
-
chooseFolder: (folder) => remember({ cloud: false, folder }),
|
|
199
|
+
chooseFolder: (_here, folder) => remember({ cloud: false, folder }),
|
|
159
200
|
pickFolder: async () => {
|
|
160
201
|
await pick()
|
|
161
202
|
},
|
|
@@ -168,3 +209,86 @@ export function useNewThreadPlace(): {
|
|
|
168
209
|
resolveBody,
|
|
169
210
|
}
|
|
170
211
|
}
|
|
212
|
+
|
|
213
|
+
/** The folder a browser last chose, on one of the person's computers: null for the cloud. */
|
|
214
|
+
interface StoredOnlinePlace {
|
|
215
|
+
readonly computerId: string
|
|
216
|
+
readonly folder: string
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
function readStoredOnline(): StoredOnlinePlace | null {
|
|
220
|
+
try {
|
|
221
|
+
const stored = JSON.parse(localStorage.getItem(ONLINE_STORAGE_KEY) ?? "null") as unknown
|
|
222
|
+
if (!stored || typeof stored !== "object") return null
|
|
223
|
+
const { computerId, folder } = stored as Partial<StoredOnlinePlace>
|
|
224
|
+
return typeof computerId === "string" && typeof folder === "string"
|
|
225
|
+
? { computerId, folder }
|
|
226
|
+
: null
|
|
227
|
+
} catch {
|
|
228
|
+
return null
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
type OnlineComputer = PlaceComputer & { readonly id: string; readonly name: string }
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* In a browser: the person's computers where `sixb` is open now. A folder chosen before is the
|
|
236
|
+
* place only while it's open there: what's shown is what a message is sent to, and the cloud
|
|
237
|
+
* otherwise.
|
|
238
|
+
*/
|
|
239
|
+
function useOnlineComputersPlace(enabled: boolean): NewThreadPlaceState {
|
|
240
|
+
const queryClient = useQueryClient()
|
|
241
|
+
const listed = useQuery({ ...listAgentComputersOptions(), enabled })
|
|
242
|
+
const [stored, setStored] = useState(readStoredOnline)
|
|
243
|
+
|
|
244
|
+
const remember = useCallback((next: StoredOnlinePlace | null) => {
|
|
245
|
+
setStored(next)
|
|
246
|
+
try {
|
|
247
|
+
localStorage.setItem(ONLINE_STORAGE_KEY, JSON.stringify(next))
|
|
248
|
+
} catch {
|
|
249
|
+
// Private storage: the choice lasts as long as the page.
|
|
250
|
+
}
|
|
251
|
+
}, [])
|
|
252
|
+
|
|
253
|
+
const chosenIn = (computers: readonly OnlineComputer[]) => {
|
|
254
|
+
const computer = stored ? computers.find((known) => known.id === stored.computerId) : undefined
|
|
255
|
+
return stored && computer?.folders.includes(stored.folder)
|
|
256
|
+
? { computer, folder: stored.folder }
|
|
257
|
+
: null
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// Before the list arrives, a message waits for it rather than going to the cloud by default.
|
|
261
|
+
const resolveBody = async (): Promise<NewThreadPlaceBody> => {
|
|
262
|
+
if (!enabled || !stored) return {}
|
|
263
|
+
const computers = await queryClient
|
|
264
|
+
.ensureQueryData(listAgentComputersOptions())
|
|
265
|
+
.then(({ computers }) => computers)
|
|
266
|
+
.catch(() => [])
|
|
267
|
+
const chosen = chosenIn(computers)
|
|
268
|
+
if (!chosen) return {}
|
|
269
|
+
const { id, name } = chosen.computer
|
|
270
|
+
return { runsOn: "computer", computer: { id, name, folder: chosen.folder } }
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
const computers = listed.data?.computers ?? []
|
|
274
|
+
if (!enabled || computers.length === 0) {
|
|
275
|
+
return { place: null, waiting: false, computerId: null, resolveBody }
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
const chosen = chosenIn(computers)
|
|
279
|
+
return {
|
|
280
|
+
waiting: false,
|
|
281
|
+
computerId: null,
|
|
282
|
+
place: {
|
|
283
|
+
computers,
|
|
284
|
+
remote: true,
|
|
285
|
+
cloud: chosen === null,
|
|
286
|
+
chosen,
|
|
287
|
+
chooseCloud: () => remember(null),
|
|
288
|
+
chooseFolder: (computer, folder) => {
|
|
289
|
+
if (computer.id) remember({ computerId: computer.id, folder })
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
resolveBody,
|
|
293
|
+
}
|
|
294
|
+
}
|
package/src/agent/i18n/en.ts
CHANGED
|
@@ -124,6 +124,10 @@ export const en = {
|
|
|
124
124
|
searching: "Searching…",
|
|
125
125
|
empty: (query: string) => `No objects found for “${query}”`,
|
|
126
126
|
remove: (label: string) => `Remove ${label} context`,
|
|
127
|
+
/** A chip of comments: what shows them, and a comment the project cannot name the author of. */
|
|
128
|
+
showComments: (label: string) => `Show ${label}`,
|
|
129
|
+
someone: "Someone",
|
|
130
|
+
replies: (count: number) => (count === 1 ? "1 reply" : `${count} replies`),
|
|
127
131
|
/** A context entry with no readable name. */
|
|
128
132
|
unnamed: "Context",
|
|
129
133
|
},
|
|
@@ -772,6 +776,16 @@ export const en = {
|
|
|
772
776
|
publishing: (title: string) => `Publishing ${title || "an artifact"}`,
|
|
773
777
|
published: (title: string) => `Published ${title || "an artifact"}`,
|
|
774
778
|
publishFailed: (title: string) => `Couldn't publish ${title || "an artifact"}`,
|
|
779
|
+
/** An `update_artifact` call, which changes an artifact's current version. */
|
|
780
|
+
updating: (title: string) => `Updating ${title || "an artifact"}`,
|
|
781
|
+
updated: (title: string) => `Updated ${title || "an artifact"}`,
|
|
782
|
+
updateFailed: (title: string) => `Couldn't update ${title || "an artifact"}`,
|
|
783
|
+
/** An `open_artifact` call, which installs an artifact for the agent to read or revise. */
|
|
784
|
+
opening: (title: string) => `Opening ${title || "an artifact"}`,
|
|
785
|
+
opened: (title: string) => `Opened ${title || "an artifact"}`,
|
|
786
|
+
openFailed: (title: string) => `Couldn't open ${title || "an artifact"}`,
|
|
787
|
+
/** A revised artifact whose structure stayed as it was: what changed is within it. */
|
|
788
|
+
changed: "Updated",
|
|
775
789
|
open: (title: string) => `Open ${title}`,
|
|
776
790
|
/** Labels the cards of what one response published. */
|
|
777
791
|
cards: "Published in this response",
|
package/src/agent/i18n/fr.ts
CHANGED
|
@@ -117,6 +117,9 @@ export const fr: Translation<AgentMessages> = {
|
|
|
117
117
|
searching: "Recherche…",
|
|
118
118
|
empty: (query) => `Aucun objet trouvé pour ${quoted(query)}`,
|
|
119
119
|
remove: (label) => `Retirer le contexte ${label}`,
|
|
120
|
+
showComments: (label) => `Afficher ${label}`,
|
|
121
|
+
someone: "Quelqu’un",
|
|
122
|
+
replies: (count) => (count === 1 ? "1 réponse" : `${count} réponses`),
|
|
120
123
|
unnamed: "Contexte",
|
|
121
124
|
},
|
|
122
125
|
models: {
|
|
@@ -820,6 +823,15 @@ export const fr: Translation<AgentMessages> = {
|
|
|
820
823
|
published: (title) => (title ? `${title} publié` : "Artefact publié"),
|
|
821
824
|
publishFailed: (title) =>
|
|
822
825
|
title ? `Impossible de publier ${title}` : "Impossible de publier l’artefact",
|
|
826
|
+
updating: (title) => (title ? `Mise à jour de ${title}` : "Mise à jour d’un artefact"),
|
|
827
|
+
updated: (title) => (title ? `${title} mis à jour` : "Artefact mis à jour"),
|
|
828
|
+
updateFailed: (title) =>
|
|
829
|
+
title ? `Impossible de mettre à jour ${title}` : "Impossible de mettre à jour l’artefact",
|
|
830
|
+
opening: (title) => (title ? `Ouverture de ${title}` : "Ouverture d’un artefact"),
|
|
831
|
+
opened: (title) => (title ? `${title} ouvert` : "Artefact ouvert"),
|
|
832
|
+
openFailed: (title) =>
|
|
833
|
+
title ? `Impossible d’ouvrir ${title}` : "Impossible d’ouvrir l’artefact",
|
|
834
|
+
changed: "Mis à jour",
|
|
823
835
|
open: (title) => `Ouvrir ${title}`,
|
|
824
836
|
cards: "Publié dans cette réponse",
|
|
825
837
|
close: "Fermer",
|