@sixb/app 0.2.0 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/connector-icons/README.md +1 -0
- package/assets/connector-icons/fleetio.ico +0 -0
- package/dist/agent/activity-label.d.ts.map +1 -1
- package/dist/agent/agent-chat.d.ts +9 -2
- package/dist/agent/agent-chat.d.ts.map +1 -1
- package/dist/agent/agent-panel.d.ts +9 -1
- package/dist/agent/agent-panel.d.ts.map +1 -1
- package/dist/agent/agent-surface.d.ts.map +1 -1
- package/dist/agent/artifact-card.d.ts +3 -1
- package/dist/agent/artifact-card.d.ts.map +1 -1
- package/dist/agent/artifact-panel.d.ts +7 -1
- package/dist/agent/artifact-panel.d.ts.map +1 -1
- package/dist/agent/background/background-card.d.ts +10 -0
- package/dist/agent/background/background-card.d.ts.map +1 -0
- package/dist/agent/background/background-tool-row.d.ts +9 -0
- package/dist/agent/background/background-tool-row.d.ts.map +1 -0
- package/dist/agent/background/context.d.ts +23 -0
- package/dist/agent/background/context.d.ts.map +1 -0
- package/dist/agent/background/interpret.d.ts +116 -0
- package/dist/agent/background/interpret.d.ts.map +1 -0
- package/dist/agent/bash/bash-tool-view.d.ts.map +1 -1
- package/dist/agent/bash/interpret.d.ts +4 -0
- package/dist/agent/bash/interpret.d.ts.map +1 -1
- package/dist/agent/components/composer-menu.d.ts +3 -1
- package/dist/agent/components/composer-menu.d.ts.map +1 -1
- package/dist/agent/components/composer-place.d.ts +13 -0
- package/dist/agent/components/composer-place.d.ts.map +1 -0
- package/dist/agent/components/composer.d.ts +23 -1
- package/dist/agent/components/composer.d.ts.map +1 -1
- package/dist/agent/components/computer-place.d.ts +3 -1
- package/dist/agent/components/computer-place.d.ts.map +1 -1
- package/dist/agent/components/context-chips.d.ts.map +1 -1
- package/dist/agent/components/context-meter.d.ts +1 -1
- package/dist/agent/components/conversation-panel.d.ts +3 -1
- package/dist/agent/components/conversation-panel.d.ts.map +1 -1
- package/dist/agent/components/message-parts.d.ts +3 -1
- package/dist/agent/components/message-parts.d.ts.map +1 -1
- package/dist/agent/components/thread-artifacts-menu.d.ts.map +1 -1
- package/dist/agent/components/transcript.d.ts +6 -0
- package/dist/agent/components/transcript.d.ts.map +1 -1
- package/dist/agent/components/web-fetch-tool-view.d.ts.map +1 -1
- package/dist/agent/composer-insertion.d.ts +24 -0
- package/dist/agent/composer-insertion.d.ts.map +1 -0
- package/dist/agent/delegation/child-parts.d.ts +2 -0
- package/dist/agent/delegation/child-parts.d.ts.map +1 -1
- package/dist/agent/delegation/use-children.d.ts +5 -5
- package/dist/agent/delegation/use-children.d.ts.map +1 -1
- package/dist/agent/hooks/use-agent-conversation.d.ts +24 -4
- package/dist/agent/hooks/use-agent-conversation.d.ts.map +1 -1
- package/dist/agent/hooks/use-new-thread-place.d.ts +70 -0
- package/dist/agent/hooks/use-new-thread-place.d.ts.map +1 -0
- package/dist/agent/hooks/use-thread-lists.d.ts +40 -0
- package/dist/agent/hooks/use-thread-lists.d.ts.map +1 -1
- package/dist/agent/i18n/en.d.ts +74 -0
- package/dist/agent/i18n/en.d.ts.map +1 -1
- package/dist/agent/i18n/fr.d.ts.map +1 -1
- package/dist/agent/i18n/index.d.ts +126 -0
- package/dist/agent/i18n/index.d.ts.map +1 -1
- package/dist/agent/observed-conversation.d.ts.map +1 -1
- package/dist/agent/publish-artifact/interpret.d.ts +8 -2
- package/dist/agent/publish-artifact/interpret.d.ts.map +1 -1
- package/dist/agent/publish-artifact/open-artifact-tool-view.d.ts +9 -0
- package/dist/agent/publish-artifact/open-artifact-tool-view.d.ts.map +1 -0
- package/dist/agent/publish-artifact/publish-artifact-tool-view.d.ts +4 -2
- package/dist/agent/publish-artifact/publish-artifact-tool-view.d.ts.map +1 -1
- package/dist/agent/publish-artifact/use-live-publishes.d.ts +3 -3
- package/dist/agent/publish-artifact/use-live-publishes.d.ts.map +1 -1
- package/dist/agent/tool-views/built-in.d.ts.map +1 -1
- package/dist/agent/types.d.ts +3 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/utils/web-fetch.d.ts +33 -1
- package/dist/agent/utils/web-fetch.d.ts.map +1 -1
- package/dist/agent/utils/web-search.d.ts +14 -2
- package/dist/agent/utils/web-search.d.ts.map +1 -1
- package/dist/artifacts/artifact-page.d.ts.map +1 -1
- package/dist/artifacts/artifact-viewer.d.ts +16 -0
- package/dist/artifacts/artifact-viewer.d.ts.map +1 -0
- package/dist/artifacts/card-details.d.ts +1 -1
- package/dist/artifacts/card-details.d.ts.map +1 -1
- package/dist/artifacts/card-preview.d.ts.map +1 -1
- package/dist/artifacts/comments-context.d.ts +48 -0
- package/dist/artifacts/comments-context.d.ts.map +1 -0
- package/dist/artifacts/edit-session.d.ts +6 -6
- package/dist/artifacts/edit-session.d.ts.map +1 -1
- package/dist/artifacts/file-source.d.ts.map +1 -1
- package/dist/artifacts/frame.d.ts +10 -2
- package/dist/artifacts/frame.d.ts.map +1 -1
- package/dist/artifacts/guest-badge.d.ts +8 -0
- package/dist/artifacts/guest-badge.d.ts.map +1 -0
- package/dist/artifacts/held-artifact.d.ts +19 -0
- package/dist/artifacts/held-artifact.d.ts.map +1 -0
- package/dist/artifacts/holders.d.ts +10 -0
- package/dist/artifacts/holders.d.ts.map +1 -0
- package/dist/artifacts/live/boards.d.ts +15 -0
- package/dist/artifacts/live/boards.d.ts.map +1 -0
- package/dist/artifacts/live/canvas.d.ts +79 -0
- package/dist/artifacts/live/canvas.d.ts.map +1 -0
- package/dist/artifacts/live/header.d.ts +29 -0
- package/dist/artifacts/live/header.d.ts.map +1 -0
- package/dist/artifacts/live/hooks.d.ts +21 -0
- package/dist/artifacts/live/hooks.d.ts.map +1 -0
- package/dist/artifacts/live/presence.d.ts +32 -0
- package/dist/artifacts/live/presence.d.ts.map +1 -0
- package/dist/artifacts/live/session.d.ts +130 -0
- package/dist/artifacts/live/session.d.ts.map +1 -0
- package/dist/artifacts/live/view.d.ts +28 -0
- package/dist/artifacts/live/view.d.ts.map +1 -0
- package/dist/artifacts/messages.d.ts +424 -14
- package/dist/artifacts/messages.d.ts.map +1 -1
- package/dist/artifacts/page-queries.d.ts +2 -2
- package/dist/artifacts/page-queries.d.ts.map +1 -1
- package/dist/artifacts/page-state.d.ts.map +1 -1
- package/dist/artifacts/publish-edit.d.ts +24 -14
- package/dist/artifacts/publish-edit.d.ts.map +1 -1
- package/dist/artifacts/queries.d.ts +490 -9
- package/dist/artifacts/queries.d.ts.map +1 -1
- package/dist/artifacts/references/references.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/arrows.d.ts +0 -18
- package/dist/artifacts/renderers/canvas/arrows.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/board-editor.d.ts +43 -0
- package/dist/artifacts/renderers/canvas/board-editor.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/board-properties.d.ts +37 -0
- package/dist/artifacts/renderers/canvas/board-properties.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/board-source.d.ts +18 -0
- package/dist/artifacts/renderers/canvas/board-source.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/board.d.ts +64 -19
- package/dist/artifacts/renderers/canvas/board.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/canvas.d.ts +13 -4
- package/dist/artifacts/renderers/canvas/canvas.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/comment-pins.d.ts +84 -0
- package/dist/artifacts/renderers/canvas/comment-pins.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/commenting.d.ts +58 -0
- package/dist/artifacts/renderers/canvas/commenting.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/comments-panel.d.ts +27 -0
- package/dist/artifacts/renderers/canvas/comments-panel.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/comments.d.ts +56 -0
- package/dist/artifacts/renderers/canvas/comments.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/draft.d.ts +7 -6
- package/dist/artifacts/renderers/canvas/draft.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/edit-mode.d.ts +19 -2
- package/dist/artifacts/renderers/canvas/edit-mode.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/focus.d.ts +40 -5
- package/dist/artifacts/renderers/canvas/focus.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/items.d.ts +47 -4
- package/dist/artifacts/renderers/canvas/items.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/layout.d.ts +5 -8
- package/dist/artifacts/renderers/canvas/layout.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/presence.d.ts +21 -0
- package/dist/artifacts/renderers/canvas/presence.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/previews.d.ts +54 -0
- package/dist/artifacts/renderers/canvas/previews.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/renderer.d.ts +11 -2
- package/dist/artifacts/renderers/canvas/renderer.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/thumbnail.d.ts +5 -2
- package/dist/artifacts/renderers/canvas/thumbnail.d.ts.map +1 -1
- package/dist/artifacts/version-menu.d.ts +19 -0
- package/dist/artifacts/version-menu.d.ts.map +1 -0
- package/dist/artifacts/view-context.d.ts +43 -0
- package/dist/artifacts/view-context.d.ts.map +1 -0
- package/dist/artifacts/viewer.d.ts.map +1 -1
- package/dist/build.d.ts +5 -0
- package/dist/build.d.ts.map +1 -1
- package/dist/{chunk-fw2bm6dq.js → chunk-001c4gnk.js} +8086 -3870
- package/dist/chunk-001c4gnk.js.map +204 -0
- package/dist/chunk-00wggsst.js +7 -0
- package/dist/chunk-00wggsst.js.map +10 -0
- package/dist/chunk-5crvhjp2.js +4704 -0
- package/dist/chunk-5crvhjp2.js.map +28 -0
- package/dist/{chunk-q69001w3.js → chunk-694m74s7.js} +7 -1
- package/dist/{chunk-q69001w3.js.map → chunk-694m74s7.js.map} +3 -3
- package/dist/{chunk-4mprsd2n.js → chunk-fg6thecb.js} +25 -1
- package/dist/chunk-fg6thecb.js.map +10 -0
- package/dist/{chunk-j9653e83.js → chunk-fwb9mxwm.js} +1 -1
- package/dist/{chunk-km25essq.js → chunk-kes4ygmz.js} +1 -1
- package/dist/{chunk-kwbw4dyk.js → chunk-ryed2jq8.js} +1 -1
- package/dist/codegen.d.ts.map +1 -1
- package/dist/createCustomApp.d.ts.map +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +930 -309
- package/dist/index.js.map +15 -10
- package/dist/locale-messages.d.ts +12 -0
- package/dist/locale-messages.d.ts.map +1 -1
- package/dist/locale.d.ts +12 -0
- package/dist/locale.d.ts.map +1 -1
- package/dist/locale.js +1 -1
- package/dist/metadata.d.ts +8 -0
- package/dist/metadata.d.ts.map +1 -1
- package/dist/pages/console/action-run.d.ts.map +1 -1
- package/dist/pages/console/data/connectors.d.ts.map +1 -1
- package/dist/pages/console/data/datasets.d.ts.map +1 -1
- package/dist/pages/console/data/lake-health.d.ts +3 -0
- package/dist/pages/console/data/lake-health.d.ts.map +1 -0
- package/dist/pages/console/data/messages.d.ts +98 -2
- package/dist/pages/console/data/messages.d.ts.map +1 -1
- package/dist/pages/console/data/pipelines.d.ts.map +1 -1
- package/dist/pages/console/data/projections.d.ts.map +1 -1
- package/dist/pages/console/data/shared.d.ts.map +1 -1
- package/dist/pages/console/data/syncs.d.ts.map +1 -1
- package/dist/pages/console/ontology/action-runs.d.ts.map +1 -1
- package/dist/pages/console/ontology/actions.d.ts.map +1 -1
- package/dist/pages/console/ontology/components/action-button.d.ts.map +1 -1
- package/dist/pages/console/ontology/components/artifact-picker.d.ts +36 -0
- package/dist/pages/console/ontology/components/artifact-picker.d.ts.map +1 -0
- package/dist/pages/console/ontology/components/object-query-bar.d.ts.map +1 -1
- package/dist/pages/console/ontology/lib/action-params.d.ts +2 -0
- package/dist/pages/console/ontology/lib/action-params.d.ts.map +1 -1
- package/dist/pages/console/ontology/lineage/properties-panel.d.ts +2 -1
- package/dist/pages/console/ontology/lineage/properties-panel.d.ts.map +1 -1
- package/dist/pages/console/ontology/object-page.d.ts.map +1 -1
- package/dist/pages/console/ontology/object-type.d.ts.map +1 -1
- package/dist/pages/console/ontology/object-types.d.ts.map +1 -1
- package/dist/pages/console/ontology/objects.d.ts.map +1 -1
- package/dist/pages/console/ontology/rules.d.ts.map +1 -1
- package/dist/pages/console/ontology/workflow.d.ts.map +1 -1
- package/dist/pages/console/ontology/workflows/run-input-form.d.ts.map +1 -1
- package/dist/pages/console/ontology/workflows/schema-shape.d.ts.map +1 -1
- package/dist/pages/console/ontology/workflows.d.ts.map +1 -1
- package/dist/pages/console/skeletons.d.ts +30 -0
- package/dist/pages/console/skeletons.d.ts.map +1 -0
- package/dist/pages/console/workflow-run.d.ts.map +1 -1
- package/dist/pages/section-page.d.ts +11 -1
- package/dist/pages/section-page.d.ts.map +1 -1
- package/dist/pages/section-ui.d.ts +25 -3
- package/dist/pages/section-ui.d.ts.map +1 -1
- package/dist/pages/settings/activity/calendar.d.ts.map +1 -1
- package/dist/pages/settings/activity/connections.d.ts.map +1 -1
- package/dist/pages/settings/activity/page.d.ts.map +1 -1
- package/dist/pages/settings/activity/thread.d.ts.map +1 -1
- package/dist/pages/settings/activity/timeline.d.ts +2 -0
- package/dist/pages/settings/activity/timeline.d.ts.map +1 -1
- package/dist/pages/settings/controls.d.ts +4 -0
- package/dist/pages/settings/controls.d.ts.map +1 -1
- package/dist/pages/settings/members.d.ts.map +1 -1
- package/dist/pages/settings/memory-history.d.ts +2 -0
- package/dist/pages/settings/memory-history.d.ts.map +1 -1
- package/dist/pages/settings/memory.d.ts.map +1 -1
- package/dist/pages/settings/service-accounts.d.ts.map +1 -1
- package/dist/pages/settings/sessions.d.ts.map +1 -1
- package/dist/pages/settings/usage/breakdown.d.ts.map +1 -1
- package/dist/pages/settings/usage/limits.d.ts.map +1 -1
- package/dist/pages/settings/usage/messages.d.ts +2 -2
- package/dist/pages/settings/usage/messages.d.ts.map +1 -1
- package/dist/pages/settings/usage/runs.d.ts +8 -2
- package/dist/pages/settings/usage/runs.d.ts.map +1 -1
- package/dist/pages/settings/usage/spend-chart.d.ts.map +1 -1
- package/dist/pages/settings/usage/spend-model.d.ts +5 -0
- package/dist/pages/settings/usage/spend-model.d.ts.map +1 -1
- package/dist/pages/values.d.ts +6 -0
- package/dist/pages/values.d.ts.map +1 -1
- package/dist/pages.d.ts +4 -0
- package/dist/pages.d.ts.map +1 -1
- package/dist/pages.js +8195 -4841
- package/dist/pages.js.map +58 -49
- package/dist/sections/catalog.d.ts.map +1 -1
- package/dist/sections/sections.d.ts.map +1 -1
- package/dist/server.js +294 -23
- package/dist/server.js.map +8 -7
- package/dist/service-worker.d.ts +39 -0
- package/dist/service-worker.d.ts.map +1 -0
- package/dist/shared-session.d.ts +25 -0
- package/dist/shared-session.d.ts.map +1 -0
- package/dist/shell/app-return.d.ts +35 -0
- package/dist/shell/app-return.d.ts.map +1 -0
- package/dist/shell/app-shell.d.ts +1 -1
- package/dist/shell/app-shell.d.ts.map +1 -1
- package/dist/shell/nav-items.d.ts +2 -0
- package/dist/shell/nav-items.d.ts.map +1 -1
- package/dist/shell/phone/back.d.ts +6 -0
- package/dist/shell/phone/back.d.ts.map +1 -0
- package/dist/shell/phone/launch.d.ts +7 -0
- package/dist/shell/phone/launch.d.ts.map +1 -0
- package/dist/shell/phone/more-sheet.d.ts +36 -0
- package/dist/shell/phone/more-sheet.d.ts.map +1 -0
- package/dist/shell/phone/phone-foundations.d.ts +9 -0
- package/dist/shell/phone/phone-foundations.d.ts.map +1 -0
- package/dist/shell/phone/pull-to-refresh.d.ts +9 -0
- package/dist/shell/phone/pull-to-refresh.d.ts.map +1 -0
- package/dist/shell/phone/routes.d.ts +12 -0
- package/dist/shell/phone/routes.d.ts.map +1 -0
- package/dist/shell/phone/screen-motion.d.ts +11 -0
- package/dist/shell/phone/screen-motion.d.ts.map +1 -0
- package/dist/shell/phone/scroll-restoration.d.ts +7 -0
- package/dist/shell/phone/scroll-restoration.d.ts.map +1 -0
- package/dist/shell/phone/startup-image.d.ts +17 -0
- package/dist/shell/phone/startup-image.d.ts.map +1 -0
- package/dist/shell/phone/tab-bar.d.ts +14 -0
- package/dist/shell/phone/tab-bar.d.ts.map +1 -0
- package/dist/shell/phone/top-bar.d.ts +24 -0
- package/dist/shell/phone/top-bar.d.ts.map +1 -0
- package/dist/shell/search-command.d.ts +3 -1
- package/dist/shell/search-command.d.ts.map +1 -1
- package/dist/shell/user-menu.d.ts +2 -0
- package/dist/shell/user-menu.d.ts.map +1 -1
- package/package.json +8 -5
- package/src/agent/activity-label.ts +6 -2
- package/src/agent/agent-chat.tsx +51 -8
- package/src/agent/agent-panel.tsx +12 -0
- package/src/agent/agent-surface.tsx +4 -0
- package/src/agent/agent.css +18 -0
- package/src/agent/artifact-card.tsx +84 -16
- package/src/agent/artifact-panel.tsx +63 -43
- package/src/agent/background/background-card.tsx +308 -0
- package/src/agent/background/background-tool-row.tsx +58 -0
- package/src/agent/background/context.ts +26 -0
- package/src/agent/background/interpret.ts +356 -0
- package/src/agent/bash/bash-tool-view.tsx +9 -4
- package/src/agent/bash/interpret.ts +21 -3
- package/src/agent/components/agent-message-body.tsx +1 -1
- package/src/agent/components/composer-menu.tsx +4 -1
- package/src/agent/components/composer-place.tsx +168 -0
- package/src/agent/components/composer.tsx +101 -3
- package/src/agent/components/computer-place.tsx +18 -1
- package/src/agent/components/context-chips.tsx +72 -2
- package/src/agent/components/conversation-panel.tsx +3 -2
- package/src/agent/components/message-parts.tsx +6 -1
- package/src/agent/components/thread-artifacts-menu.tsx +22 -5
- package/src/agent/components/transcript.tsx +33 -1
- package/src/agent/components/web-fetch-tool-view.tsx +94 -29
- package/src/agent/composer-insertion.ts +36 -0
- package/src/agent/delegation/child-parts.tsx +1 -1
- package/src/agent/hooks/use-agent-conversation.ts +101 -8
- package/src/agent/hooks/use-new-thread-place.ts +294 -0
- package/src/agent/i18n/en.ts +70 -3
- package/src/agent/i18n/fr.ts +70 -3
- package/src/agent/observed-conversation.tsx +3 -0
- package/src/agent/publish-artifact/interpret.ts +27 -5
- package/src/agent/publish-artifact/open-artifact-tool-view.tsx +49 -0
- package/src/agent/publish-artifact/publish-artifact-tool-view.tsx +14 -8
- package/src/agent/publish-artifact/use-live-publishes.ts +7 -11
- package/src/agent/react-router.tsx +2 -2
- package/src/agent/tool-views/built-in.tsx +29 -11
- package/src/agent/types.ts +4 -0
- package/src/agent/utils/web-fetch.ts +89 -10
- package/src/agent/utils/web-search.ts +67 -28
- package/src/artifacts/artifact-page.tsx +42 -17
- package/src/artifacts/artifact-viewer.tsx +56 -0
- package/src/artifacts/artifacts.css +80 -0
- package/src/artifacts/card-details.ts +2 -2
- package/src/artifacts/card-preview.tsx +17 -3
- package/src/artifacts/comments-context.ts +125 -0
- package/src/artifacts/edit-session.tsx +6 -6
- package/src/artifacts/file-source.ts +10 -3
- package/src/artifacts/frame.tsx +50 -12
- package/src/artifacts/gallery.tsx +9 -11
- package/src/artifacts/guest-badge.tsx +21 -0
- package/src/artifacts/held-artifact.tsx +241 -0
- package/src/artifacts/holders.tsx +170 -0
- package/src/artifacts/live/boards.ts +95 -0
- package/src/artifacts/live/canvas.ts +402 -0
- package/src/artifacts/live/header.tsx +137 -0
- package/src/artifacts/live/hooks.ts +94 -0
- package/src/artifacts/live/presence.ts +147 -0
- package/src/artifacts/live/session.ts +520 -0
- package/src/artifacts/live/view.ts +81 -0
- package/src/artifacts/messages.ts +415 -24
- package/src/artifacts/page-queries.ts +2 -3
- package/src/artifacts/page-state.ts +16 -7
- package/src/artifacts/publish-edit.ts +50 -22
- package/src/artifacts/queries.ts +108 -10
- package/src/artifacts/references/references.tsx +6 -9
- package/src/artifacts/renderers/canvas/arrows.tsx +12 -39
- package/src/artifacts/renderers/canvas/board-editor.tsx +817 -0
- package/src/artifacts/renderers/canvas/board-properties.tsx +488 -0
- package/src/artifacts/renderers/canvas/board-source.ts +110 -0
- package/src/artifacts/renderers/canvas/board.tsx +309 -33
- package/src/artifacts/renderers/canvas/canvas.tsx +387 -72
- package/src/artifacts/renderers/canvas/comment-pins.tsx +465 -0
- package/src/artifacts/renderers/canvas/commenting.tsx +319 -0
- package/src/artifacts/renderers/canvas/comments-panel.tsx +574 -0
- package/src/artifacts/renderers/canvas/comments.ts +225 -0
- package/src/artifacts/renderers/canvas/draft.ts +41 -50
- package/src/artifacts/renderers/canvas/edit-mode.tsx +145 -20
- package/src/artifacts/renderers/canvas/focus.tsx +175 -24
- package/src/artifacts/renderers/canvas/items.tsx +179 -52
- package/src/artifacts/renderers/canvas/layout.ts +99 -47
- package/src/artifacts/renderers/canvas/presence.tsx +184 -0
- package/src/artifacts/renderers/canvas/previews.ts +127 -0
- package/src/artifacts/renderers/canvas/renderer.tsx +87 -22
- package/src/artifacts/renderers/canvas/thumbnail.tsx +56 -15
- package/src/artifacts/renderers/canvas/toolbar.tsx +1 -1
- package/src/artifacts/renderers/slides/slides.tsx +1 -1
- package/src/artifacts/version-menu.tsx +438 -0
- package/src/artifacts/view-context.ts +102 -0
- package/src/artifacts/viewer.tsx +205 -147
- package/src/build.ts +96 -11
- package/src/codegen.ts +83 -5
- package/src/createCustomApp.ts +20 -7
- package/src/index.ts +12 -0
- package/src/locale-messages.ts +24 -0
- package/src/metadata.ts +12 -0
- package/src/pages/console/action-run.tsx +20 -0
- package/src/pages/console/data/connectors.tsx +27 -3
- package/src/pages/console/data/datasets.tsx +30 -1
- package/src/pages/console/data/lake-health.tsx +299 -0
- package/src/pages/console/data/messages.ts +143 -2
- package/src/pages/console/data/pipelines.tsx +91 -3
- package/src/pages/console/data/projections.tsx +23 -4
- package/src/pages/console/data/shared.tsx +1 -0
- package/src/pages/console/data/syncs.tsx +39 -2
- package/src/pages/console/ontology/action-runs.tsx +8 -2
- package/src/pages/console/ontology/actions.tsx +39 -15
- package/src/pages/console/ontology/components/action-button.tsx +10 -0
- package/src/pages/console/ontology/components/artifact-picker.tsx +522 -0
- package/src/pages/console/ontology/components/object-query-bar.tsx +21 -5
- package/src/pages/console/ontology/lib/action-params.ts +10 -0
- package/src/pages/console/ontology/lineage/properties-panel.tsx +32 -24
- package/src/pages/console/ontology/object-page.tsx +2 -0
- package/src/pages/console/ontology/object-type.tsx +73 -14
- package/src/pages/console/ontology/object-types.tsx +56 -7
- package/src/pages/console/ontology/objects.tsx +167 -19
- package/src/pages/console/ontology/rules.tsx +186 -30
- package/src/pages/console/ontology/workflow.tsx +130 -74
- package/src/pages/console/ontology/workflows/run-input-form.tsx +21 -2
- package/src/pages/console/ontology/workflows/schema-shape.tsx +3 -0
- package/src/pages/console/ontology/workflows.tsx +34 -21
- package/src/pages/console/skeletons.tsx +99 -0
- package/src/pages/console/workflow-run.tsx +20 -0
- package/src/pages/section-page.tsx +37 -7
- package/src/pages/section-ui.tsx +96 -13
- package/src/pages/settings/activity/calendar.tsx +13 -6
- package/src/pages/settings/activity/connections.tsx +26 -9
- package/src/pages/settings/activity/page.tsx +31 -4
- package/src/pages/settings/activity/thread.tsx +32 -18
- package/src/pages/settings/activity/timeline.tsx +39 -0
- package/src/pages/settings/controls.tsx +19 -1
- package/src/pages/settings/developers.tsx +2 -2
- package/src/pages/settings/members.tsx +42 -9
- package/src/pages/settings/memory-history.tsx +76 -10
- package/src/pages/settings/memory.tsx +47 -5
- package/src/pages/settings/service-accounts.tsx +7 -2
- package/src/pages/settings/sessions.tsx +6 -2
- package/src/pages/settings/usage/breakdown.tsx +62 -2
- package/src/pages/settings/usage/limits.tsx +45 -3
- package/src/pages/settings/usage/messages.ts +2 -2
- package/src/pages/settings/usage/page.tsx +99 -52
- package/src/pages/settings/usage/runs.tsx +105 -8
- package/src/pages/settings/usage/spend-chart.tsx +79 -45
- package/src/pages/settings/usage/spend-model.ts +17 -0
- package/src/pages/values.tsx +72 -6
- package/src/pages.ts +4 -0
- package/src/sections/catalog.ts +6 -0
- package/src/sections/sections.tsx +2 -0
- package/src/service-worker.ts +176 -0
- package/src/shared-session.ts +73 -0
- package/src/shell/app-return.ts +115 -0
- package/src/shell/app-shell.tsx +125 -27
- package/src/shell/nav-items.tsx +2 -0
- package/src/shell/phone/back.ts +16 -0
- package/src/shell/phone/launch.ts +6 -0
- package/src/shell/phone/more-sheet.tsx +249 -0
- package/src/shell/phone/phone-foundations.tsx +43 -0
- package/src/shell/phone/phone.css +660 -0
- package/src/shell/phone/pull-to-refresh.tsx +201 -0
- package/src/shell/phone/routes.ts +34 -0
- package/src/shell/phone/screen-motion.ts +292 -0
- package/src/shell/phone/scroll-restoration.tsx +70 -0
- package/src/shell/phone/startup-image.ts +119 -0
- package/src/shell/phone/tab-bar.tsx +95 -0
- package/src/shell/phone/top-bar.tsx +195 -0
- package/src/shell/search-command.tsx +30 -14
- package/src/shell/user-menu.tsx +2 -1
- package/dist/chunk-4mprsd2n.js.map +0 -10
- package/dist/chunk-fw2bm6dq.js.map +0 -182
- package/dist/chunk-zxthr2q5.js +0 -1487
- package/dist/chunk-zxthr2q5.js.map +0 -18
- /package/dist/{chunk-j9653e83.js.map → chunk-fwb9mxwm.js.map} +0 -0
- /package/dist/{chunk-km25essq.js.map → chunk-kes4ygmz.js.map} +0 -0
- /package/dist/{chunk-kwbw4dyk.js.map → chunk-ryed2jq8.js.map} +0 -0
|
@@ -245,6 +245,8 @@ export function AgentSurface({
|
|
|
245
245
|
type="button"
|
|
246
246
|
size="icon"
|
|
247
247
|
className="fixed right-5 bottom-5 z-40 size-11 rounded-full shadow-lg max-sm:right-3 max-sm:bottom-3"
|
|
248
|
+
// A phone's shell hides it: it would sit on the tab bar, so the top bar opens the agent.
|
|
249
|
+
data-agent-launcher=""
|
|
248
250
|
aria-label={launcher}
|
|
249
251
|
title={launcher}
|
|
250
252
|
onClick={() => changeMode("dock")}
|
|
@@ -268,6 +270,8 @@ export function AgentSurface({
|
|
|
268
270
|
<aside
|
|
269
271
|
data-agent-surface={presentation}
|
|
270
272
|
data-agent-surface-resizing={resizing ? "" : undefined}
|
|
273
|
+
// On a phone the dock rests on the keyboard, rising into place as it opens (TouchViewport).
|
|
274
|
+
data-keyboard-overlay={presentation === "dock" ? "" : undefined}
|
|
271
275
|
aria-label={surfaceTitle}
|
|
272
276
|
aria-hidden={!visible}
|
|
273
277
|
inert={!visible}
|
package/src/agent/agent.css
CHANGED
|
@@ -35,6 +35,24 @@
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
/* What a fetched page said, inside its row: one reading size, headings marked by weight alone. */
|
|
39
|
+
.prose.sixb-web-fetch {
|
|
40
|
+
font-size: 13px;
|
|
41
|
+
line-height: 1.6;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.prose.sixb-web-fetch-page {
|
|
45
|
+
font-size: 12px;
|
|
46
|
+
color: var(--muted-foreground);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.prose.sixb-web-fetch :is(h1, h2, h3, h4, h5, h6) {
|
|
50
|
+
margin: 0.75em 0 0.25em;
|
|
51
|
+
font-size: inherit;
|
|
52
|
+
font-weight: 600;
|
|
53
|
+
color: inherit;
|
|
54
|
+
}
|
|
55
|
+
|
|
38
56
|
@keyframes sixb-reasoning-max {
|
|
39
57
|
0%,
|
|
40
58
|
100% {
|
|
@@ -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
|
}
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
import { Button, Collapsible, CollapsibleContent, CollapsibleTrigger } from "@sixb/ui/components"
|
|
2
|
+
import { cn } from "@sixb/ui/lib/utils"
|
|
3
|
+
import { ChevronRight, CircleCheck, CircleStop, CircleX, Square } from "lucide-react"
|
|
4
|
+
import { useEffect, useRef, useState } from "react"
|
|
5
|
+
import { useNow } from "../delegation/child-parts"
|
|
6
|
+
import { formatWorked } from "../delegation/interpret"
|
|
7
|
+
import { useAgentMessages } from "../i18n"
|
|
8
|
+
import type { AgentMessages } from "../i18n/en"
|
|
9
|
+
import type { NormalizedTool } from "../parts"
|
|
10
|
+
import { BackgroundToolRow } from "./background-tool-row"
|
|
11
|
+
import { useBackgroundCards } from "./context"
|
|
12
|
+
import {
|
|
13
|
+
type BackgroundCardState,
|
|
14
|
+
type BackgroundStart,
|
|
15
|
+
backgroundCardState,
|
|
16
|
+
backgroundStartOf,
|
|
17
|
+
} from "./interpret"
|
|
18
|
+
|
|
19
|
+
/** How many lines of what the agent read the card shows: the newest. */
|
|
20
|
+
const OUTPUT_LINES = 60
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* A command the agent started in the background, as its step in the work: the card that says how
|
|
24
|
+
* it stands, which only a reader who opens the steps sees. On its way, or outside a transcript, it
|
|
25
|
+
* is a quiet line like any other step.
|
|
26
|
+
*/
|
|
27
|
+
export function BackgroundCommandStep({ tool }: { readonly tool: NormalizedTool }) {
|
|
28
|
+
const context = useBackgroundCards()
|
|
29
|
+
const start = backgroundStartOf(tool)
|
|
30
|
+
if (!context || start?.kind !== "started") return <BackgroundToolRow tool={tool} />
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
// The steps scroll past their height: the card keeps its own rather than shrink with them.
|
|
34
|
+
<div className="min-w-0 shrink-0 overflow-hidden rounded-lg border border-border/70 bg-card text-card-foreground">
|
|
35
|
+
<BackgroundCommandCard start={start} />
|
|
36
|
+
</div>
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* One background command as it stands now: what runs, for how long or how it ended, the newest of
|
|
42
|
+
* what the agent read of its output, and, for its owner while it runs on their computer, Stop. Its
|
|
43
|
+
* calls, its `sixb`'s reports and its turn make one state (see `backgroundCardState`).
|
|
44
|
+
*/
|
|
45
|
+
function BackgroundCommandCard({ start }: { readonly start: BackgroundStart }) {
|
|
46
|
+
const context = useBackgroundCards()
|
|
47
|
+
const messages = useAgentMessages()
|
|
48
|
+
const labels = messages.background
|
|
49
|
+
const [stopAsked, setStopAsked] = useState(false)
|
|
50
|
+
const [stopFailed, setStopFailed] = useState(false)
|
|
51
|
+
const [open, setOpen] = useState(false)
|
|
52
|
+
|
|
53
|
+
const calls = start.kind === "started" ? context?.thread.commands.get(start.key) : undefined
|
|
54
|
+
const state = context
|
|
55
|
+
? backgroundCardState({
|
|
56
|
+
start,
|
|
57
|
+
...(calls ? { calls } : {}),
|
|
58
|
+
source: context.source,
|
|
59
|
+
liveRunId: context.liveRunId,
|
|
60
|
+
stopAsked,
|
|
61
|
+
})
|
|
62
|
+
: null
|
|
63
|
+
const now = useNow(state?.status === "running")
|
|
64
|
+
if (!context || !state) return null
|
|
65
|
+
|
|
66
|
+
const stop = context.stop
|
|
67
|
+
const canStop = state.canStop && stop !== undefined && start.kind === "started"
|
|
68
|
+
const askStop = () => {
|
|
69
|
+
if (!canStop || start.kind !== "started") return
|
|
70
|
+
setStopAsked(true)
|
|
71
|
+
setStopFailed(false)
|
|
72
|
+
stop({ id: start.id, startedAt: start.startedAt }).catch(() => {
|
|
73
|
+
setStopAsked(false)
|
|
74
|
+
setStopFailed(true)
|
|
75
|
+
})
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const command = firstLine(state.command)
|
|
79
|
+
const output = tail(state.output)
|
|
80
|
+
|
|
81
|
+
return (
|
|
82
|
+
<Collapsible
|
|
83
|
+
open={open}
|
|
84
|
+
onOpenChange={setOpen}
|
|
85
|
+
role="region"
|
|
86
|
+
aria-label={labels.card(command)}
|
|
87
|
+
data-background-status={state.status}
|
|
88
|
+
className="min-w-0"
|
|
89
|
+
>
|
|
90
|
+
{/* Said once per change of how it stands, never per tick of its clock. */}
|
|
91
|
+
<span className="sr-only" aria-live="polite">
|
|
92
|
+
{statusWords(state, labels)}
|
|
93
|
+
</span>
|
|
94
|
+
|
|
95
|
+
<div className="flex min-w-0 items-center gap-3 px-3 py-2.5 sm:px-3.5">
|
|
96
|
+
<StatusMark state={state} />
|
|
97
|
+
<div className="min-w-0 flex-1">
|
|
98
|
+
<p
|
|
99
|
+
className="truncate font-mono text-[12.5px] leading-5 text-foreground"
|
|
100
|
+
title={state.command}
|
|
101
|
+
>
|
|
102
|
+
{command}
|
|
103
|
+
</p>
|
|
104
|
+
<p className="truncate text-xs leading-5 text-muted-foreground tabular-nums">
|
|
105
|
+
<StatusLine state={state} now={now} messages={messages} />
|
|
106
|
+
</p>
|
|
107
|
+
</div>
|
|
108
|
+
<div className="flex shrink-0 items-center gap-1">
|
|
109
|
+
{output.lines.length > 0 ? (
|
|
110
|
+
<CollapsibleTrigger
|
|
111
|
+
aria-label={labels.output}
|
|
112
|
+
title={labels.lines(output.count)}
|
|
113
|
+
className="group flex h-6 items-center gap-0.5 rounded-md px-1.5 text-xs text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/40 data-[state=open]:text-foreground"
|
|
114
|
+
>
|
|
115
|
+
{/* A phone keeps the room for the command: the chevron says it opens. */}
|
|
116
|
+
<span className="hidden sm:inline">{labels.output}</span>
|
|
117
|
+
<ChevronRight
|
|
118
|
+
className="size-3.5 shrink-0 transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none"
|
|
119
|
+
aria-hidden="true"
|
|
120
|
+
/>
|
|
121
|
+
</CollapsibleTrigger>
|
|
122
|
+
) : null}
|
|
123
|
+
{canStop ? (
|
|
124
|
+
<Button
|
|
125
|
+
type="button"
|
|
126
|
+
variant="outline"
|
|
127
|
+
size="xs"
|
|
128
|
+
onClick={askStop}
|
|
129
|
+
title={labels.stopHint}
|
|
130
|
+
className="rounded-full px-2.5 text-muted-foreground hover:text-foreground"
|
|
131
|
+
>
|
|
132
|
+
<Square className="size-2 fill-current" aria-hidden="true" />
|
|
133
|
+
{labels.stop}
|
|
134
|
+
</Button>
|
|
135
|
+
) : null}
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
{stopFailed ? (
|
|
140
|
+
<p
|
|
141
|
+
role="alert"
|
|
142
|
+
className="-mt-1 px-3 pb-2.5 pl-10 text-xs text-destructive sm:pl-[2.875rem]"
|
|
143
|
+
>
|
|
144
|
+
{labels.stopFailed}
|
|
145
|
+
</p>
|
|
146
|
+
) : null}
|
|
147
|
+
|
|
148
|
+
{output.lines.length > 0 ? (
|
|
149
|
+
<CollapsibleContent>
|
|
150
|
+
<OutputTail lines={output.lines} />
|
|
151
|
+
{(state.truncated || output.cut) && state.outputPath ? (
|
|
152
|
+
<p className="-mt-1 truncate px-3 pb-2.5 font-mono text-[11px] text-muted-foreground/70 sm:px-3.5">
|
|
153
|
+
{labels.earlierOutput(state.outputPath)}
|
|
154
|
+
</p>
|
|
155
|
+
) : null}
|
|
156
|
+
</CollapsibleContent>
|
|
157
|
+
) : null}
|
|
158
|
+
</Collapsible>
|
|
159
|
+
)
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/** The newest output, scrolled to its end as it opens: a tail reads from the bottom. */
|
|
163
|
+
function OutputTail({ lines }: { readonly lines: readonly string[] }) {
|
|
164
|
+
const ref = useRef<HTMLPreElement>(null)
|
|
165
|
+
const text = lines.join("\n")
|
|
166
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: new output scrolls it again
|
|
167
|
+
useEffect(() => {
|
|
168
|
+
const pre = ref.current
|
|
169
|
+
if (pre) pre.scrollTop = pre.scrollHeight
|
|
170
|
+
}, [text])
|
|
171
|
+
|
|
172
|
+
return (
|
|
173
|
+
<pre
|
|
174
|
+
ref={ref}
|
|
175
|
+
className="scrollbar-thin mx-3 mb-3 max-h-56 overflow-auto overscroll-contain rounded-lg bg-muted/50 p-2.5 font-mono text-[11px] leading-relaxed whitespace-pre-wrap break-words text-foreground/90 sm:mx-3.5"
|
|
176
|
+
>
|
|
177
|
+
{text}
|
|
178
|
+
</pre>
|
|
179
|
+
)
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/** Running pulses; an end reads at a glance: done, failed, stopped. */
|
|
183
|
+
function StatusMark({ state }: { readonly state: BackgroundCardState }) {
|
|
184
|
+
const box = "flex size-4 shrink-0 items-center justify-center"
|
|
185
|
+
|
|
186
|
+
if (state.status === "running" || state.status === "starting") {
|
|
187
|
+
const live = state.status === "running" && !state.stopping
|
|
188
|
+
return (
|
|
189
|
+
<span className={box} aria-hidden="true">
|
|
190
|
+
<span className="relative flex size-2">
|
|
191
|
+
{live ? (
|
|
192
|
+
<span className="absolute inline-flex size-full animate-ping rounded-full bg-emerald-500/50 motion-reduce:hidden" />
|
|
193
|
+
) : null}
|
|
194
|
+
<span
|
|
195
|
+
className={cn(
|
|
196
|
+
"relative inline-flex size-2 rounded-full",
|
|
197
|
+
live ? "bg-emerald-500" : "animate-pulse bg-muted-foreground/40"
|
|
198
|
+
)}
|
|
199
|
+
/>
|
|
200
|
+
</span>
|
|
201
|
+
</span>
|
|
202
|
+
)
|
|
203
|
+
}
|
|
204
|
+
if (state.status === "exited") {
|
|
205
|
+
return state.exitCode === 0 || state.exitCode === undefined ? (
|
|
206
|
+
<CircleCheck
|
|
207
|
+
className="size-4 shrink-0 text-emerald-600 dark:text-emerald-400"
|
|
208
|
+
aria-hidden="true"
|
|
209
|
+
/>
|
|
210
|
+
) : (
|
|
211
|
+
<CircleX className="size-4 shrink-0 text-red-600/85 dark:text-red-400" aria-hidden="true" />
|
|
212
|
+
)
|
|
213
|
+
}
|
|
214
|
+
if (state.status === "stopped") {
|
|
215
|
+
return <CircleStop className="size-4 shrink-0 text-muted-foreground" aria-hidden="true" />
|
|
216
|
+
}
|
|
217
|
+
return (
|
|
218
|
+
<span className={box} aria-hidden="true">
|
|
219
|
+
<span className="size-2 rounded-full bg-muted-foreground/35" />
|
|
220
|
+
</span>
|
|
221
|
+
)
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/** How it stands, then for how long: `Running · 2m 14s`, `Failed · exit code 1 · 12s`. */
|
|
225
|
+
function StatusLine({
|
|
226
|
+
state,
|
|
227
|
+
now,
|
|
228
|
+
messages,
|
|
229
|
+
}: {
|
|
230
|
+
readonly state: BackgroundCardState
|
|
231
|
+
readonly now: number
|
|
232
|
+
readonly messages: AgentMessages
|
|
233
|
+
}) {
|
|
234
|
+
const labels = messages.background
|
|
235
|
+
const started = state.startedAt ? Date.parse(state.startedAt) : undefined
|
|
236
|
+
const ended = state.endedAt ? Date.parse(state.endedAt) : undefined
|
|
237
|
+
const ran =
|
|
238
|
+
started === undefined
|
|
239
|
+
? undefined
|
|
240
|
+
: state.status === "running"
|
|
241
|
+
? now - started
|
|
242
|
+
: ended === undefined
|
|
243
|
+
? undefined
|
|
244
|
+
: ended - started
|
|
245
|
+
const time = ran === undefined ? null : formatWorked(ran, messages.delegation)
|
|
246
|
+
|
|
247
|
+
const clauses: { readonly text: string; readonly tone?: "live" | "quiet" }[] = []
|
|
248
|
+
const words = statusWords(state, labels)
|
|
249
|
+
clauses.push({
|
|
250
|
+
text: words,
|
|
251
|
+
...(state.stopping || state.status === "starting" ? { tone: "live" as const } : {}),
|
|
252
|
+
})
|
|
253
|
+
if (time && !state.endedWith) clauses.push({ text: time })
|
|
254
|
+
if (state.status === "running" && !state.stopping && state.pending) {
|
|
255
|
+
clauses.push({ text: labels[state.pending], tone: "quiet" })
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
return clauses.map((clause, index) => (
|
|
259
|
+
<span key={clause.text}>
|
|
260
|
+
{index > 0 ? <span className="text-muted-foreground/50"> · </span> : null}
|
|
261
|
+
<span
|
|
262
|
+
className={cn(
|
|
263
|
+
clause.tone === "live" && "shimmer motion-reduce:animate-none",
|
|
264
|
+
clause.tone === "quiet" && "text-muted-foreground/70"
|
|
265
|
+
)}
|
|
266
|
+
>
|
|
267
|
+
{clause.text}
|
|
268
|
+
</span>
|
|
269
|
+
</span>
|
|
270
|
+
))
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
function statusWords(state: BackgroundCardState, labels: AgentMessages["background"]): string {
|
|
274
|
+
if (state.stopping) return labels.stopping
|
|
275
|
+
switch (state.status) {
|
|
276
|
+
case "starting":
|
|
277
|
+
return labels.starting
|
|
278
|
+
case "running":
|
|
279
|
+
return labels.running
|
|
280
|
+
case "exited":
|
|
281
|
+
return labels.exited(state.exitCode ?? 0)
|
|
282
|
+
case "stopped":
|
|
283
|
+
return state.endedWith === "turn"
|
|
284
|
+
? labels.stoppedWithTurn
|
|
285
|
+
: state.endedWith === "sixb"
|
|
286
|
+
? labels.stoppedWithSixb
|
|
287
|
+
: labels.stopped
|
|
288
|
+
case "unknown":
|
|
289
|
+
return state.unreachable ? labels.unreachable : labels.unknown
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/** The output's newest lines, and how many it has in all. */
|
|
294
|
+
function tail(output: string): {
|
|
295
|
+
readonly lines: readonly string[]
|
|
296
|
+
readonly count: number
|
|
297
|
+
readonly cut: boolean
|
|
298
|
+
} {
|
|
299
|
+
const trimmed = output.replace(/\s+$/, "")
|
|
300
|
+
if (!trimmed) return { lines: [], count: 0, cut: false }
|
|
301
|
+
const all = trimmed.split("\n")
|
|
302
|
+
return { lines: all.slice(-OUTPUT_LINES), count: all.length, cut: all.length > OUTPUT_LINES }
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
function firstLine(command: string): string {
|
|
306
|
+
const lines = command.trim().split("\n")
|
|
307
|
+
return (lines[0] ?? "") + (lines.length > 1 ? " …" : "")
|
|
308
|
+
}
|