@sixb/app 0.2.1 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/activity-label.d.ts.map +1 -1
- package/dist/agent/agent-chat.d.ts +9 -2
- package/dist/agent/agent-chat.d.ts.map +1 -1
- package/dist/agent/agent-panel.d.ts +9 -1
- package/dist/agent/agent-panel.d.ts.map +1 -1
- package/dist/agent/agent-surface.d.ts.map +1 -1
- package/dist/agent/artifact-card.d.ts +3 -1
- package/dist/agent/artifact-card.d.ts.map +1 -1
- package/dist/agent/artifact-panel.d.ts +7 -1
- package/dist/agent/artifact-panel.d.ts.map +1 -1
- package/dist/agent/background/background-tool-row.d.ts.map +1 -1
- package/dist/agent/background/interpret.d.ts +1 -1
- package/dist/agent/background/interpret.d.ts.map +1 -1
- package/dist/agent/components/composer-place.d.ts +3 -1
- package/dist/agent/components/composer-place.d.ts.map +1 -1
- package/dist/agent/components/composer.d.ts +20 -1
- package/dist/agent/components/composer.d.ts.map +1 -1
- package/dist/agent/components/context-chips.d.ts.map +1 -1
- package/dist/agent/components/context-meter.d.ts +1 -1
- package/dist/agent/components/conversation-panel.d.ts +7 -2
- package/dist/agent/components/conversation-panel.d.ts.map +1 -1
- package/dist/agent/components/message-parts.d.ts +3 -1
- package/dist/agent/components/message-parts.d.ts.map +1 -1
- package/dist/agent/components/thread-artifacts-menu.d.ts.map +1 -1
- package/dist/agent/components/transcript.d.ts +5 -0
- package/dist/agent/components/transcript.d.ts.map +1 -1
- package/dist/agent/composer-insertion.d.ts +24 -0
- package/dist/agent/composer-insertion.d.ts.map +1 -0
- package/dist/agent/delegation/agent-exchange.d.ts +16 -0
- package/dist/agent/delegation/agent-exchange.d.ts.map +1 -0
- package/dist/agent/delegation/child-card.d.ts +3 -3
- package/dist/agent/delegation/child-card.d.ts.map +1 -1
- package/dist/agent/delegation/child-parts.d.ts +1 -10
- package/dist/agent/delegation/child-parts.d.ts.map +1 -1
- package/dist/agent/delegation/child-work.d.ts.map +1 -1
- package/dist/agent/delegation/interpret.d.ts +4 -10
- package/dist/agent/delegation/interpret.d.ts.map +1 -1
- package/dist/agent/delegation/use-children.d.ts +5 -5
- package/dist/agent/delegation/use-children.d.ts.map +1 -1
- package/dist/agent/file-edits/file-edit-tool-view.d.ts +10 -0
- package/dist/agent/file-edits/file-edit-tool-view.d.ts.map +1 -0
- package/dist/agent/file-edits/interpret.d.ts +25 -0
- package/dist/agent/file-edits/interpret.d.ts.map +1 -0
- package/dist/agent/hooks/use-agent-conversation.d.ts +16 -4
- package/dist/agent/hooks/use-agent-conversation.d.ts.map +1 -1
- package/dist/agent/hooks/use-new-thread-place.d.ts +39 -17
- package/dist/agent/hooks/use-new-thread-place.d.ts.map +1 -1
- package/dist/agent/hooks/use-thread-lists.d.ts.map +1 -1
- package/dist/agent/i18n/en.d.ts +59 -4
- package/dist/agent/i18n/en.d.ts.map +1 -1
- package/dist/agent/i18n/fr.d.ts.map +1 -1
- package/dist/agent/i18n/index.d.ts +96 -8
- package/dist/agent/i18n/index.d.ts.map +1 -1
- package/dist/agent/message-agent/interpret.d.ts +2 -2
- package/dist/agent/message-agent/interpret.d.ts.map +1 -1
- package/dist/agent/publish-artifact/interpret.d.ts +8 -2
- package/dist/agent/publish-artifact/interpret.d.ts.map +1 -1
- package/dist/agent/publish-artifact/open-artifact-tool-view.d.ts +9 -0
- package/dist/agent/publish-artifact/open-artifact-tool-view.d.ts.map +1 -0
- package/dist/agent/publish-artifact/publish-artifact-tool-view.d.ts +4 -2
- package/dist/agent/publish-artifact/publish-artifact-tool-view.d.ts.map +1 -1
- package/dist/agent/publish-artifact/use-live-publishes.d.ts +3 -3
- package/dist/agent/publish-artifact/use-live-publishes.d.ts.map +1 -1
- package/dist/agent/questions/interpret.d.ts +31 -0
- package/dist/agent/questions/interpret.d.ts.map +1 -0
- package/dist/agent/questions/question-card.d.ts +16 -0
- package/dist/agent/questions/question-card.d.ts.map +1 -0
- package/dist/agent/questions/question-composer.d.ts +15 -0
- package/dist/agent/questions/question-composer.d.ts.map +1 -0
- package/dist/agent/read/interpret.d.ts +8 -1
- package/dist/agent/read/interpret.d.ts.map +1 -1
- package/dist/agent/read/read-tool-view.d.ts.map +1 -1
- package/dist/agent/tool-views/built-in.d.ts.map +1 -1
- package/dist/agent/types.d.ts +3 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/waits.d.ts +14 -0
- package/dist/agent/waits.d.ts.map +1 -0
- package/dist/artifacts/artifact-page.d.ts.map +1 -1
- package/dist/artifacts/artifact-viewer.d.ts +16 -0
- package/dist/artifacts/artifact-viewer.d.ts.map +1 -0
- package/dist/artifacts/card-details.d.ts +1 -1
- package/dist/artifacts/card-details.d.ts.map +1 -1
- package/dist/artifacts/card-preview.d.ts.map +1 -1
- package/dist/artifacts/comments-context.d.ts +48 -0
- package/dist/artifacts/comments-context.d.ts.map +1 -0
- package/dist/artifacts/edit-session.d.ts +17 -7
- package/dist/artifacts/edit-session.d.ts.map +1 -1
- package/dist/artifacts/file-source.d.ts.map +1 -1
- package/dist/artifacts/frame.d.ts +10 -2
- package/dist/artifacts/frame.d.ts.map +1 -1
- package/dist/artifacts/guest-badge.d.ts +8 -0
- package/dist/artifacts/guest-badge.d.ts.map +1 -0
- package/dist/artifacts/held-artifact.d.ts +19 -0
- package/dist/artifacts/held-artifact.d.ts.map +1 -0
- package/dist/artifacts/holders.d.ts +10 -0
- package/dist/artifacts/holders.d.ts.map +1 -0
- package/dist/artifacts/live/boards.d.ts +15 -0
- package/dist/artifacts/live/boards.d.ts.map +1 -0
- package/dist/artifacts/live/canvas.d.ts +79 -0
- package/dist/artifacts/live/canvas.d.ts.map +1 -0
- package/dist/artifacts/live/header.d.ts +29 -0
- package/dist/artifacts/live/header.d.ts.map +1 -0
- package/dist/artifacts/live/hooks.d.ts +21 -0
- package/dist/artifacts/live/hooks.d.ts.map +1 -0
- package/dist/artifacts/live/presence.d.ts +32 -0
- package/dist/artifacts/live/presence.d.ts.map +1 -0
- package/dist/artifacts/live/session.d.ts +130 -0
- package/dist/artifacts/live/session.d.ts.map +1 -0
- package/dist/artifacts/live/view.d.ts +28 -0
- package/dist/artifacts/live/view.d.ts.map +1 -0
- package/dist/artifacts/messages.d.ts +476 -14
- package/dist/artifacts/messages.d.ts.map +1 -1
- package/dist/artifacts/page-queries.d.ts +2 -2
- package/dist/artifacts/page-queries.d.ts.map +1 -1
- package/dist/artifacts/page-state.d.ts.map +1 -1
- package/dist/artifacts/publish-edit.d.ts +24 -14
- package/dist/artifacts/publish-edit.d.ts.map +1 -1
- package/dist/artifacts/queries.d.ts +490 -9
- package/dist/artifacts/queries.d.ts.map +1 -1
- package/dist/artifacts/references/references.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/arrows.d.ts +0 -18
- package/dist/artifacts/renderers/canvas/arrows.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/board-editor.d.ts +50 -0
- package/dist/artifacts/renderers/canvas/board-editor.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/board-properties.d.ts +37 -0
- package/dist/artifacts/renderers/canvas/board-properties.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/board-source.d.ts +18 -0
- package/dist/artifacts/renderers/canvas/board-source.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/board.d.ts +77 -20
- package/dist/artifacts/renderers/canvas/board.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/canvas.d.ts +14 -4
- package/dist/artifacts/renderers/canvas/canvas.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/comment-pins.d.ts +84 -0
- package/dist/artifacts/renderers/canvas/comment-pins.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/commenting.d.ts +58 -0
- package/dist/artifacts/renderers/canvas/commenting.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/comments-panel.d.ts +27 -0
- package/dist/artifacts/renderers/canvas/comments-panel.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/comments.d.ts +56 -0
- package/dist/artifacts/renderers/canvas/comments.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/controls.d.ts +15 -4
- package/dist/artifacts/renderers/canvas/controls.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/draft.d.ts +7 -6
- package/dist/artifacts/renderers/canvas/draft.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/edit-mode.d.ts +19 -2
- package/dist/artifacts/renderers/canvas/edit-mode.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/focus.d.ts +54 -5
- package/dist/artifacts/renderers/canvas/focus.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/gestures.d.ts +46 -0
- package/dist/artifacts/renderers/canvas/gestures.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/items.d.ts +47 -4
- package/dist/artifacts/renderers/canvas/items.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/layout.d.ts +5 -8
- package/dist/artifacts/renderers/canvas/layout.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/page-resize.d.ts +21 -0
- package/dist/artifacts/renderers/canvas/page-resize.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/page-size-controls.d.ts +21 -0
- package/dist/artifacts/renderers/canvas/page-size-controls.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/page-size.d.ts +93 -0
- package/dist/artifacts/renderers/canvas/page-size.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/page-zoom.d.ts +64 -0
- package/dist/artifacts/renderers/canvas/page-zoom.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/presence.d.ts +21 -0
- package/dist/artifacts/renderers/canvas/presence.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/previews.d.ts +54 -0
- package/dist/artifacts/renderers/canvas/previews.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/renderer.d.ts +11 -2
- package/dist/artifacts/renderers/canvas/renderer.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/shown-size.d.ts +26 -0
- package/dist/artifacts/renderers/canvas/shown-size.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/thumbnail.d.ts +5 -2
- package/dist/artifacts/renderers/canvas/thumbnail.d.ts.map +1 -1
- package/dist/artifacts/version-menu.d.ts +19 -0
- package/dist/artifacts/version-menu.d.ts.map +1 -0
- package/dist/artifacts/view-context.d.ts +43 -0
- package/dist/artifacts/view-context.d.ts.map +1 -0
- package/dist/artifacts/viewer.d.ts.map +1 -1
- package/dist/build.d.ts +5 -0
- package/dist/build.d.ts.map +1 -1
- package/dist/chunk-00wggsst.js +7 -0
- package/dist/chunk-00wggsst.js.map +10 -0
- package/dist/{chunk-q69001w3.js → chunk-694m74s7.js} +7 -1
- package/dist/{chunk-q69001w3.js.map → chunk-694m74s7.js.map} +3 -3
- package/dist/{chunk-7fj9cfkw.js → chunk-970s5nkn.js} +1 -1
- package/dist/{chunk-4mprsd2n.js → chunk-fg6thecb.js} +25 -1
- package/dist/chunk-fg6thecb.js.map +10 -0
- package/dist/{chunk-ytadd0b5.js → chunk-kymx9y5e.js} +8126 -4257
- package/dist/chunk-kymx9y5e.js.map +211 -0
- package/dist/{chunk-j8g956dt.js → chunk-pxd07kvx.js} +1 -1
- package/dist/{chunk-kwbw4dyk.js → chunk-ryed2jq8.js} +1 -1
- package/dist/chunk-yrcm1pbg.js +5975 -0
- package/dist/chunk-yrcm1pbg.js.map +34 -0
- package/dist/codegen.d.ts.map +1 -1
- package/dist/createCustomApp.d.ts.map +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +932 -309
- package/dist/index.js.map +15 -10
- package/dist/locale-messages.d.ts +12 -0
- package/dist/locale-messages.d.ts.map +1 -1
- package/dist/locale.d.ts +12 -0
- package/dist/locale.d.ts.map +1 -1
- package/dist/locale.js +1 -1
- package/dist/metadata.d.ts +8 -0
- package/dist/metadata.d.ts.map +1 -1
- package/dist/pages/console/action-run.d.ts.map +1 -1
- package/dist/pages/console/data/connectors.d.ts.map +1 -1
- package/dist/pages/console/data/datasets.d.ts.map +1 -1
- package/dist/pages/console/data/lake-health.d.ts +3 -0
- package/dist/pages/console/data/lake-health.d.ts.map +1 -0
- package/dist/pages/console/data/messages.d.ts +98 -2
- package/dist/pages/console/data/messages.d.ts.map +1 -1
- package/dist/pages/console/data/pipelines.d.ts.map +1 -1
- package/dist/pages/console/data/projections.d.ts.map +1 -1
- package/dist/pages/console/data/syncs.d.ts.map +1 -1
- package/dist/pages/console/ontology/action-runs.d.ts.map +1 -1
- package/dist/pages/console/ontology/actions.d.ts.map +1 -1
- package/dist/pages/console/ontology/components/action-button.d.ts.map +1 -1
- package/dist/pages/console/ontology/components/artifact-picker.d.ts +36 -0
- package/dist/pages/console/ontology/components/artifact-picker.d.ts.map +1 -0
- package/dist/pages/console/ontology/components/object-query-bar.d.ts.map +1 -1
- package/dist/pages/console/ontology/lib/action-params.d.ts +2 -0
- package/dist/pages/console/ontology/lib/action-params.d.ts.map +1 -1
- package/dist/pages/console/ontology/lineage/properties-panel.d.ts +2 -1
- package/dist/pages/console/ontology/lineage/properties-panel.d.ts.map +1 -1
- package/dist/pages/console/ontology/object-page.d.ts.map +1 -1
- package/dist/pages/console/ontology/object-type.d.ts.map +1 -1
- package/dist/pages/console/ontology/object-types.d.ts.map +1 -1
- package/dist/pages/console/ontology/objects.d.ts.map +1 -1
- package/dist/pages/console/ontology/rules.d.ts.map +1 -1
- package/dist/pages/console/ontology/workflow.d.ts.map +1 -1
- package/dist/pages/console/ontology/workflows/run-input-form.d.ts.map +1 -1
- package/dist/pages/console/ontology/workflows/schema-shape.d.ts.map +1 -1
- package/dist/pages/console/ontology/workflows.d.ts.map +1 -1
- package/dist/pages/console/skeletons.d.ts +30 -0
- package/dist/pages/console/skeletons.d.ts.map +1 -0
- package/dist/pages/console/workflow-run.d.ts.map +1 -1
- package/dist/pages/section-page.d.ts +11 -1
- package/dist/pages/section-page.d.ts.map +1 -1
- package/dist/pages/section-ui.d.ts +25 -3
- package/dist/pages/section-ui.d.ts.map +1 -1
- package/dist/pages/settings/activity/calendar.d.ts.map +1 -1
- package/dist/pages/settings/activity/connections.d.ts.map +1 -1
- package/dist/pages/settings/activity/page.d.ts.map +1 -1
- package/dist/pages/settings/activity/thread.d.ts.map +1 -1
- package/dist/pages/settings/activity/timeline.d.ts +2 -0
- package/dist/pages/settings/activity/timeline.d.ts.map +1 -1
- package/dist/pages/settings/controls.d.ts +4 -0
- package/dist/pages/settings/controls.d.ts.map +1 -1
- package/dist/pages/settings/members.d.ts.map +1 -1
- package/dist/pages/settings/memory-history.d.ts +2 -0
- package/dist/pages/settings/memory-history.d.ts.map +1 -1
- package/dist/pages/settings/memory.d.ts.map +1 -1
- package/dist/pages/settings/service-accounts.d.ts.map +1 -1
- package/dist/pages/settings/sessions.d.ts.map +1 -1
- package/dist/pages/settings/usage/breakdown.d.ts.map +1 -1
- package/dist/pages/settings/usage/limits.d.ts.map +1 -1
- package/dist/pages/settings/usage/messages.d.ts +0 -2
- package/dist/pages/settings/usage/messages.d.ts.map +1 -1
- package/dist/pages/settings/usage/runs.d.ts +8 -2
- package/dist/pages/settings/usage/runs.d.ts.map +1 -1
- package/dist/pages/settings/usage/spend-chart.d.ts.map +1 -1
- package/dist/pages/settings/usage/spend-model.d.ts +5 -0
- package/dist/pages/settings/usage/spend-model.d.ts.map +1 -1
- package/dist/pages/values.d.ts +6 -0
- package/dist/pages/values.d.ts.map +1 -1
- package/dist/pages.d.ts +4 -0
- package/dist/pages.d.ts.map +1 -1
- package/dist/pages.js +8188 -4841
- package/dist/pages.js.map +56 -47
- package/dist/sections/catalog.d.ts.map +1 -1
- package/dist/sections/sections.d.ts.map +1 -1
- package/dist/server.js +294 -23
- package/dist/server.js.map +8 -7
- package/dist/service-worker.d.ts +39 -0
- package/dist/service-worker.d.ts.map +1 -0
- package/dist/shared-session.d.ts +25 -0
- package/dist/shared-session.d.ts.map +1 -0
- package/dist/shell/app-return.d.ts +35 -0
- package/dist/shell/app-return.d.ts.map +1 -0
- package/dist/shell/app-shell.d.ts +1 -1
- package/dist/shell/app-shell.d.ts.map +1 -1
- package/dist/shell/nav-items.d.ts +2 -0
- package/dist/shell/nav-items.d.ts.map +1 -1
- package/dist/shell/phone/back.d.ts +6 -0
- package/dist/shell/phone/back.d.ts.map +1 -0
- package/dist/shell/phone/launch.d.ts +7 -0
- package/dist/shell/phone/launch.d.ts.map +1 -0
- package/dist/shell/phone/more-sheet.d.ts +36 -0
- package/dist/shell/phone/more-sheet.d.ts.map +1 -0
- package/dist/shell/phone/phone-foundations.d.ts +9 -0
- package/dist/shell/phone/phone-foundations.d.ts.map +1 -0
- package/dist/shell/phone/pull-to-refresh.d.ts +9 -0
- package/dist/shell/phone/pull-to-refresh.d.ts.map +1 -0
- package/dist/shell/phone/routes.d.ts +12 -0
- package/dist/shell/phone/routes.d.ts.map +1 -0
- package/dist/shell/phone/screen-motion.d.ts +11 -0
- package/dist/shell/phone/screen-motion.d.ts.map +1 -0
- package/dist/shell/phone/scroll-restoration.d.ts +7 -0
- package/dist/shell/phone/scroll-restoration.d.ts.map +1 -0
- package/dist/shell/phone/startup-image.d.ts +17 -0
- package/dist/shell/phone/startup-image.d.ts.map +1 -0
- package/dist/shell/phone/tab-bar.d.ts +14 -0
- package/dist/shell/phone/tab-bar.d.ts.map +1 -0
- package/dist/shell/phone/top-bar.d.ts +24 -0
- package/dist/shell/phone/top-bar.d.ts.map +1 -0
- package/dist/shell/search-command.d.ts +3 -1
- package/dist/shell/search-command.d.ts.map +1 -1
- package/dist/shell/user-menu.d.ts +2 -0
- package/dist/shell/user-menu.d.ts.map +1 -1
- package/package.json +8 -5
- package/src/agent/activity-label.ts +6 -1
- package/src/agent/agent-chat.tsx +52 -8
- package/src/agent/agent-panel.tsx +12 -0
- package/src/agent/agent-surface.tsx +4 -0
- package/src/agent/artifact-card.tsx +84 -16
- package/src/agent/artifact-panel.tsx +63 -43
- package/src/agent/background/background-tool-row.tsx +24 -10
- package/src/agent/background/interpret.ts +60 -51
- package/src/agent/components/agent-message-body.tsx +1 -1
- package/src/agent/components/composer-place.tsx +77 -53
- package/src/agent/components/composer.tsx +92 -7
- package/src/agent/components/context-chips.tsx +72 -2
- package/src/agent/components/conversation-panel.tsx +30 -10
- package/src/agent/components/message-parts.tsx +29 -6
- package/src/agent/components/thread-artifacts-menu.tsx +22 -5
- package/src/agent/components/transcript.tsx +45 -27
- package/src/agent/composer-insertion.ts +36 -0
- package/src/agent/delegation/agent-exchange.tsx +53 -0
- package/src/agent/delegation/child-card.tsx +6 -40
- package/src/agent/delegation/child-parts.tsx +1 -84
- package/src/agent/delegation/child-work.tsx +19 -5
- package/src/agent/delegation/interpret.ts +33 -54
- package/src/agent/delegation/model.ts +1 -1
- package/src/agent/file-edits/file-edit-tool-view.tsx +126 -0
- package/src/agent/file-edits/interpret.ts +120 -0
- package/src/agent/hooks/use-agent-conversation.ts +61 -10
- package/src/agent/hooks/use-new-thread-place.ts +149 -25
- package/src/agent/i18n/en.ts +60 -4
- package/src/agent/i18n/fr.ts +51 -4
- package/src/agent/message-agent/interpret.ts +4 -3
- package/src/agent/publish-artifact/interpret.ts +37 -6
- package/src/agent/publish-artifact/open-artifact-tool-view.tsx +49 -0
- package/src/agent/publish-artifact/publish-artifact-tool-view.tsx +14 -8
- package/src/agent/publish-artifact/use-live-publishes.ts +7 -11
- package/src/agent/questions/interpret.ts +90 -0
- package/src/agent/questions/question-card.tsx +57 -0
- package/src/agent/questions/question-composer.tsx +257 -0
- package/src/agent/react-router.tsx +2 -2
- package/src/agent/read/interpret.ts +34 -1
- package/src/agent/read/read-tool-view.tsx +20 -4
- package/src/agent/tool-views/built-in.tsx +22 -8
- package/src/agent/types.ts +4 -0
- package/src/agent/waits.ts +50 -0
- package/src/artifacts/artifact-page.tsx +42 -17
- package/src/artifacts/artifact-viewer.tsx +56 -0
- package/src/artifacts/artifacts.css +116 -0
- package/src/artifacts/card-details.ts +2 -2
- package/src/artifacts/card-preview.tsx +17 -3
- package/src/artifacts/comments-context.ts +125 -0
- package/src/artifacts/edit-session.tsx +21 -7
- package/src/artifacts/file-source.ts +10 -3
- package/src/artifacts/frame.tsx +53 -14
- package/src/artifacts/gallery.tsx +9 -11
- package/src/artifacts/guest-badge.tsx +21 -0
- package/src/artifacts/held-artifact.tsx +241 -0
- package/src/artifacts/holders.tsx +170 -0
- package/src/artifacts/live/boards.ts +95 -0
- package/src/artifacts/live/canvas.ts +402 -0
- package/src/artifacts/live/header.tsx +137 -0
- package/src/artifacts/live/hooks.ts +94 -0
- package/src/artifacts/live/presence.ts +147 -0
- package/src/artifacts/live/session.ts +520 -0
- package/src/artifacts/live/view.ts +81 -0
- package/src/artifacts/messages.ts +469 -24
- package/src/artifacts/page-queries.ts +2 -3
- package/src/artifacts/page-state.ts +16 -7
- package/src/artifacts/publish-edit.ts +50 -22
- package/src/artifacts/queries.ts +108 -10
- package/src/artifacts/references/references.tsx +6 -9
- package/src/artifacts/renderers/canvas/arrows.tsx +12 -39
- package/src/artifacts/renderers/canvas/board-editor.tsx +839 -0
- package/src/artifacts/renderers/canvas/board-properties.tsx +488 -0
- package/src/artifacts/renderers/canvas/board-source.ts +110 -0
- package/src/artifacts/renderers/canvas/board.tsx +373 -35
- package/src/artifacts/renderers/canvas/canvas.tsx +441 -75
- package/src/artifacts/renderers/canvas/comment-pins.tsx +465 -0
- package/src/artifacts/renderers/canvas/commenting.tsx +319 -0
- package/src/artifacts/renderers/canvas/comments-panel.tsx +574 -0
- package/src/artifacts/renderers/canvas/comments.ts +225 -0
- package/src/artifacts/renderers/canvas/controls.tsx +64 -30
- package/src/artifacts/renderers/canvas/draft.ts +41 -50
- package/src/artifacts/renderers/canvas/edit-mode.tsx +145 -20
- package/src/artifacts/renderers/canvas/focus.tsx +321 -26
- package/src/artifacts/renderers/canvas/gestures.ts +265 -0
- package/src/artifacts/renderers/canvas/items.tsx +179 -52
- package/src/artifacts/renderers/canvas/layout.ts +99 -47
- package/src/artifacts/renderers/canvas/page-resize.tsx +542 -0
- package/src/artifacts/renderers/canvas/page-size-controls.tsx +193 -0
- package/src/artifacts/renderers/canvas/page-size.ts +218 -0
- package/src/artifacts/renderers/canvas/page-zoom.ts +280 -0
- package/src/artifacts/renderers/canvas/presence.tsx +184 -0
- package/src/artifacts/renderers/canvas/previews.ts +127 -0
- package/src/artifacts/renderers/canvas/renderer.tsx +87 -22
- package/src/artifacts/renderers/canvas/shown-size.ts +105 -0
- package/src/artifacts/renderers/canvas/thumbnail.tsx +56 -15
- package/src/artifacts/renderers/canvas/toolbar.tsx +1 -1
- package/src/artifacts/renderers/slides/slides.tsx +1 -1
- package/src/artifacts/version-menu.tsx +438 -0
- package/src/artifacts/view-context.ts +102 -0
- package/src/artifacts/viewer.tsx +219 -147
- package/src/build.ts +96 -11
- package/src/codegen.ts +83 -5
- package/src/createCustomApp.ts +20 -7
- package/src/index.ts +14 -0
- package/src/locale-messages.ts +24 -0
- package/src/metadata.ts +12 -0
- package/src/pages/console/action-run.tsx +20 -0
- package/src/pages/console/data/connectors.tsx +27 -3
- package/src/pages/console/data/datasets.tsx +30 -1
- package/src/pages/console/data/lake-health.tsx +299 -0
- package/src/pages/console/data/messages.ts +143 -2
- package/src/pages/console/data/pipelines.tsx +91 -3
- package/src/pages/console/data/projections.tsx +23 -4
- package/src/pages/console/data/syncs.tsx +39 -2
- package/src/pages/console/ontology/action-runs.tsx +8 -2
- package/src/pages/console/ontology/actions.tsx +39 -15
- package/src/pages/console/ontology/components/action-button.tsx +10 -0
- package/src/pages/console/ontology/components/artifact-picker.tsx +522 -0
- package/src/pages/console/ontology/components/object-query-bar.tsx +21 -5
- package/src/pages/console/ontology/lib/action-params.ts +10 -0
- package/src/pages/console/ontology/lineage/properties-panel.tsx +32 -24
- package/src/pages/console/ontology/object-page.tsx +2 -0
- package/src/pages/console/ontology/object-type.tsx +73 -14
- package/src/pages/console/ontology/object-types.tsx +56 -7
- package/src/pages/console/ontology/objects.tsx +167 -19
- package/src/pages/console/ontology/rules.tsx +186 -30
- package/src/pages/console/ontology/workflow.tsx +130 -74
- package/src/pages/console/ontology/workflows/run-input-form.tsx +21 -2
- package/src/pages/console/ontology/workflows/schema-shape.tsx +3 -0
- package/src/pages/console/ontology/workflows.tsx +34 -21
- package/src/pages/console/skeletons.tsx +99 -0
- package/src/pages/console/workflow-run.tsx +20 -0
- package/src/pages/section-page.tsx +37 -7
- package/src/pages/section-ui.tsx +96 -13
- package/src/pages/settings/activity/calendar.tsx +13 -6
- package/src/pages/settings/activity/connections.tsx +26 -9
- package/src/pages/settings/activity/page.tsx +31 -4
- package/src/pages/settings/activity/thread.tsx +32 -18
- package/src/pages/settings/activity/timeline.tsx +39 -0
- package/src/pages/settings/controls.tsx +19 -1
- package/src/pages/settings/developers.tsx +2 -2
- package/src/pages/settings/members.tsx +42 -9
- package/src/pages/settings/memory-history.tsx +76 -10
- package/src/pages/settings/memory.tsx +47 -5
- package/src/pages/settings/service-accounts.tsx +7 -2
- package/src/pages/settings/sessions.tsx +6 -2
- package/src/pages/settings/usage/breakdown.tsx +62 -2
- package/src/pages/settings/usage/limits.tsx +45 -3
- package/src/pages/settings/usage/messages.ts +0 -2
- package/src/pages/settings/usage/page.tsx +99 -52
- package/src/pages/settings/usage/runs.tsx +105 -8
- package/src/pages/settings/usage/spend-chart.tsx +79 -45
- package/src/pages/settings/usage/spend-model.ts +16 -0
- package/src/pages/values.tsx +72 -6
- package/src/pages.ts +4 -0
- package/src/sections/catalog.ts +6 -0
- package/src/sections/sections.tsx +2 -0
- package/src/service-worker.ts +176 -0
- package/src/shared-session.ts +73 -0
- package/src/shell/app-return.ts +115 -0
- package/src/shell/app-shell.tsx +125 -27
- package/src/shell/nav-items.tsx +2 -0
- package/src/shell/phone/back.ts +16 -0
- package/src/shell/phone/launch.ts +6 -0
- package/src/shell/phone/more-sheet.tsx +249 -0
- package/src/shell/phone/phone-foundations.tsx +43 -0
- package/src/shell/phone/phone.css +660 -0
- package/src/shell/phone/pull-to-refresh.tsx +201 -0
- package/src/shell/phone/routes.ts +34 -0
- package/src/shell/phone/screen-motion.ts +292 -0
- package/src/shell/phone/scroll-restoration.tsx +70 -0
- package/src/shell/phone/startup-image.ts +119 -0
- package/src/shell/phone/tab-bar.tsx +95 -0
- package/src/shell/phone/top-bar.tsx +195 -0
- package/src/shell/search-command.tsx +30 -14
- package/src/shell/user-menu.tsx +2 -1
- package/dist/chunk-4j3c3p72.js +0 -1487
- package/dist/chunk-4j3c3p72.js.map +0 -18
- package/dist/chunk-4mprsd2n.js.map +0 -10
- package/dist/chunk-ytadd0b5.js.map +0 -188
- /package/dist/{chunk-7fj9cfkw.js.map → chunk-970s5nkn.js.map} +0 -0
- /package/dist/{chunk-j8g956dt.js.map → chunk-pxd07kvx.js.map} +0 -0
- /package/dist/{chunk-kwbw4dyk.js.map → chunk-ryed2jq8.js.map} +0 -0
|
@@ -2,6 +2,8 @@ import type { AgentChild } from "@sixb/client"
|
|
|
2
2
|
import { type AgentConversationMessage, normalizedTool } from "../conversation"
|
|
3
3
|
import type { AgentMessages } from "../i18n/en"
|
|
4
4
|
import { type NormalizedPart, type NormalizedTool, toolResultValue } from "../parts"
|
|
5
|
+
import { askedText, isAskTool } from "../questions/interpret"
|
|
6
|
+
import { isCommandId, isStop, namedIds, waitsForChildren } from "../waits"
|
|
5
7
|
|
|
6
8
|
// What the parent's own parts say about the sub-agents it delegated to: which it spawned, what it
|
|
7
9
|
// told or answered each, and what each asked. A reader of the thread always has them, even without
|
|
@@ -24,13 +26,7 @@ export interface SpawnedChild {
|
|
|
24
26
|
readonly pending: boolean
|
|
25
27
|
}
|
|
26
28
|
|
|
27
|
-
/**
|
|
28
|
-
export interface ChildExchange {
|
|
29
|
-
readonly kind: "told" | "asked" | "answered"
|
|
30
|
-
readonly text: string
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/** What `wait_agent` last said about one of a child's runs. */
|
|
29
|
+
/** What `wait`, or a `stop`, last said about one of a child's runs. */
|
|
34
30
|
export interface WaitedChild {
|
|
35
31
|
readonly status: string
|
|
36
32
|
readonly text?: string
|
|
@@ -41,7 +37,6 @@ export interface WaitedChild {
|
|
|
41
37
|
export interface ThreadDelegation {
|
|
42
38
|
/** The turn that spawned each child. */
|
|
43
39
|
readonly spawnedBy: ReadonlyMap<string, string | null>
|
|
44
|
-
readonly exchanges: ReadonlyMap<string, readonly ChildExchange[]>
|
|
45
40
|
/** By the id of the run waited on: a child's first run, or one that continued it. */
|
|
46
41
|
readonly waited: ReadonlyMap<string, WaitedChild>
|
|
47
42
|
/**
|
|
@@ -93,7 +88,8 @@ export interface DelegationTurn {
|
|
|
93
88
|
readonly tools: readonly NormalizedTool[]
|
|
94
89
|
}
|
|
95
90
|
|
|
96
|
-
|
|
91
|
+
/** Earlier threads hold `wait_agent`; a `wait` or a `stop` for commands alone is left out. */
|
|
92
|
+
const DELEGATION_TOOLS = new Set(["spawn_agent", "message_agent", "wait", "stop", "wait_agent"])
|
|
97
93
|
|
|
98
94
|
/** The delegation calls of each reply, oldest first, the one streaming last. */
|
|
99
95
|
export function delegationTurns(
|
|
@@ -109,28 +105,15 @@ export function delegationTurns(
|
|
|
109
105
|
}
|
|
110
106
|
|
|
111
107
|
/**
|
|
112
|
-
* Read the thread's sub-agents from its turns, oldest first, the one streaming now last.
|
|
113
|
-
*
|
|
108
|
+
* Read the thread's sub-agents from its turns, oldest first, the one streaming now last. What
|
|
109
|
+
* passed between the Agent and a child reads in the child's panel, from its own thread.
|
|
114
110
|
*/
|
|
115
111
|
export function readThreadDelegation(turns: readonly DelegationTurn[]): ThreadDelegation {
|
|
116
112
|
const spawnedBy = new Map<string, string | null>()
|
|
117
|
-
const exchanges = new Map<string, ChildExchange[]>()
|
|
118
113
|
const waited = new Map<string, WaitedChild>()
|
|
119
114
|
const owners = new Map<string, string>()
|
|
120
115
|
const ownersByTurn = new Map<string, ReadonlyMap<string, string>>()
|
|
121
116
|
|
|
122
|
-
const add = (key: string, exchange: ChildExchange) => {
|
|
123
|
-
const owner = owners.get(key)
|
|
124
|
-
if (!owner) return
|
|
125
|
-
const list = exchanges.get(owner) ?? []
|
|
126
|
-
// A question is listed by every wait until it is answered: it reads once.
|
|
127
|
-
const repeated = list.some(
|
|
128
|
-
(earlier) => earlier.kind === exchange.kind && earlier.text === exchange.text
|
|
129
|
-
)
|
|
130
|
-
if (exchange.kind === "asked" && repeated) return
|
|
131
|
-
exchanges.set(owner, [...list, exchange])
|
|
132
|
-
}
|
|
133
|
-
|
|
134
117
|
const read = (runId: string | null, tool: NormalizedTool) => {
|
|
135
118
|
const child = spawnedChild(tool)
|
|
136
119
|
if (child && !child.pending) {
|
|
@@ -139,28 +122,15 @@ export function readThreadDelegation(turns: readonly DelegationTurn[]): ThreadDe
|
|
|
139
122
|
return
|
|
140
123
|
}
|
|
141
124
|
|
|
142
|
-
if (tool
|
|
143
|
-
const input = isRecord(tool.input) ? tool.input : {}
|
|
144
|
-
const output = toolResultValue(tool.output)
|
|
145
|
-
if (typeof input.key !== "string" || typeof input.text !== "string") return
|
|
146
|
-
const kind = isRecord(output) && output.delivery === "answer" ? "answered" : "told"
|
|
147
|
-
add(input.key.trim(), { kind, text: input.text.trim() })
|
|
148
|
-
return
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
if (tool.toolName !== "wait_agent" || tool.state !== "output-available") return
|
|
125
|
+
if (!waitsForChildren(tool) || tool.state !== "output-available") return
|
|
152
126
|
const output = toolResultValue(tool.output)
|
|
153
127
|
if (!isRecord(output)) return
|
|
154
128
|
|
|
155
|
-
for (const question of Array.isArray(output.questions) ? output.questions : []) {
|
|
156
|
-
if (!isRecord(question)) continue
|
|
157
|
-
if (typeof question.key !== "string" || typeof question.text !== "string") continue
|
|
158
|
-
add(question.key, { kind: "asked", text: question.text.trim() })
|
|
159
|
-
}
|
|
160
129
|
for (const result of Array.isArray(output.results) ? output.results : []) {
|
|
161
130
|
if (!isRecord(result) || typeof result.runId !== "string") continue
|
|
162
131
|
if (typeof result.status !== "string") continue
|
|
163
|
-
|
|
132
|
+
// Named by its key, as `wait` takes it, or by its run id, as `wait_agent` did.
|
|
133
|
+
waited.set(owners.get(result.runId) ?? result.runId, {
|
|
164
134
|
status: result.status,
|
|
165
135
|
...(typeof result.text === "string" ? { text: result.text } : {}),
|
|
166
136
|
...(isRecord(result.error) && typeof result.error.message === "string"
|
|
@@ -177,7 +147,6 @@ export function readThreadDelegation(turns: readonly DelegationTurn[]): ThreadDe
|
|
|
177
147
|
|
|
178
148
|
return {
|
|
179
149
|
spawnedBy,
|
|
180
|
-
exchanges,
|
|
181
150
|
waited,
|
|
182
151
|
ownerOf: (key, runId) =>
|
|
183
152
|
(runId ? ownersByTurn.get(runId) : undefined)?.get(key) ?? owners.get(key),
|
|
@@ -273,14 +242,13 @@ export function childTitle(key: string): string {
|
|
|
273
242
|
return words ? `${words.charAt(0).toUpperCase()}${words.slice(1)}` : key
|
|
274
243
|
}
|
|
275
244
|
|
|
276
|
-
/** The question a child at work waits on, from its live parts: its `
|
|
245
|
+
/** The question a child at work waits on, from its live parts: its `ask` call in flight. */
|
|
277
246
|
export function liveQuestion(parts: readonly NormalizedPart[]): string | null {
|
|
278
247
|
for (let index = parts.length - 1; index >= 0; index -= 1) {
|
|
279
248
|
const part = parts[index]
|
|
280
|
-
if (part?.kind !== "tool" || part.tool.toolName
|
|
249
|
+
if (part?.kind !== "tool" || !isAskTool(part.tool.toolName)) continue
|
|
281
250
|
if (part.tool.state !== "input-available") return null
|
|
282
|
-
|
|
283
|
-
return typeof input.question === "string" ? input.question.trim() : null
|
|
251
|
+
return askedText(part.tool.input) || null
|
|
284
252
|
}
|
|
285
253
|
return null
|
|
286
254
|
}
|
|
@@ -294,11 +262,14 @@ export function formatWorked(ms: number, messages: AgentMessages["delegation"]):
|
|
|
294
262
|
return messages.hours(Math.floor(minutes / 60), minutes % 60)
|
|
295
263
|
}
|
|
296
264
|
|
|
297
|
-
/**
|
|
265
|
+
/**
|
|
266
|
+
* The children a `wait` or a `stop` names, by title: `wait` takes their keys, `wait_agent` took
|
|
267
|
+
* run ids, titled when the parts spawned them. Its background commands are not children.
|
|
268
|
+
*/
|
|
298
269
|
function waitedKeys(tool: NormalizedTool, keys: ReadonlyMap<string, string>): readonly string[] {
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
270
|
+
return namedIds(tool)
|
|
271
|
+
.filter((id) => !isCommandId(id))
|
|
272
|
+
.map((id) => keys.get(id) ?? (tool.toolName === "wait_agent" ? "" : childTitle(id)))
|
|
302
273
|
}
|
|
303
274
|
|
|
304
275
|
/**
|
|
@@ -330,13 +301,11 @@ export function describeDelegationTool(
|
|
|
330
301
|
}
|
|
331
302
|
}
|
|
332
303
|
|
|
333
|
-
if (tool.toolName
|
|
334
|
-
|
|
335
|
-
const question = typeof input.question === "string" ? input.question.trim() : ""
|
|
336
|
-
return { title: labels.askedAgent(question), running: labels.states.asking }
|
|
304
|
+
if (isAskTool(tool.toolName)) {
|
|
305
|
+
return { title: labels.askedAgent(askedText(tool.input)), running: labels.states.asking }
|
|
337
306
|
}
|
|
338
307
|
|
|
339
|
-
if (tool
|
|
308
|
+
if (waitsForChildren(tool)) {
|
|
340
309
|
const keys = new Map<string, string>()
|
|
341
310
|
for (const part of parts) {
|
|
342
311
|
if (part.kind !== "tool") continue
|
|
@@ -345,6 +314,16 @@ export function describeDelegationTool(
|
|
|
345
314
|
}
|
|
346
315
|
const waitedFor = waitedKeys(tool, keys)
|
|
347
316
|
const named = waitedFor.every(Boolean) ? waitedFor : []
|
|
317
|
+
if (isStop(tool)) {
|
|
318
|
+
const name = named[0] ?? ""
|
|
319
|
+
if (tool.state === "output-error") {
|
|
320
|
+
const failed = labels.stopAgentFailed(name)
|
|
321
|
+
return { title: failed, running: failed }
|
|
322
|
+
}
|
|
323
|
+
return tool.state === "output-available"
|
|
324
|
+
? { title: labels.stoppedAgent(name), running: labels.stoppedAgent(name) }
|
|
325
|
+
: { title: labels.stoppingAgent(name), running: labels.stoppingAgent(name) }
|
|
326
|
+
}
|
|
348
327
|
const waiting =
|
|
349
328
|
named.length === 1
|
|
350
329
|
? labels.waitingFor(named[0] ?? "")
|
|
@@ -224,7 +224,7 @@ function shortName(name: string): string {
|
|
|
224
224
|
return `${(word > LINE_NAME_LENGTH / 2 ? cut.slice(0, word) : cut).replace(/[\s,.:;-]+$/, "")}…`
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
/** What `
|
|
227
|
+
/** What `wait`, or a `stop`, last said of any of the child's runs. */
|
|
228
228
|
function waitedFor(
|
|
229
229
|
waited: ReadonlyMap<string, WaitedChild>,
|
|
230
230
|
child: SpawnedChild,
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@sixb/ui/components"
|
|
2
|
+
import { cn } from "@sixb/ui/lib/utils"
|
|
3
|
+
import { ChevronRight, FilePen, FilePlus } from "lucide-react"
|
|
4
|
+
import { ActivityStatusText } from "../components/activity-status"
|
|
5
|
+
import { useAgentMessages } from "../i18n"
|
|
6
|
+
import type { NormalizedTool } from "../parts"
|
|
7
|
+
import { type DiffLine, describeEdit, describeWrite, type FileEditDescription } from "./interpret"
|
|
8
|
+
|
|
9
|
+
/** A change the agent made to part of a file: its name and `+3 −1`, opening to the diff. */
|
|
10
|
+
export function EditToolView({ tool }: { tool: NormalizedTool }) {
|
|
11
|
+
const messages = useAgentMessages()
|
|
12
|
+
return (
|
|
13
|
+
<FileEditRow tool={tool} description={describeEdit(tool, messages)} icon={FilePen} counts />
|
|
14
|
+
)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** A file the agent created or replaced whole: its name and lines, opening to what it wrote. */
|
|
18
|
+
export function WriteToolView({ tool }: { tool: NormalizedTool }) {
|
|
19
|
+
const messages = useAgentMessages()
|
|
20
|
+
return <FileEditRow tool={tool} description={describeWrite(tool, messages)} icon={FilePlus} />
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function FileEditRow({
|
|
24
|
+
tool,
|
|
25
|
+
description,
|
|
26
|
+
icon: Icon,
|
|
27
|
+
counts = false,
|
|
28
|
+
}: {
|
|
29
|
+
tool: NormalizedTool
|
|
30
|
+
description: FileEditDescription
|
|
31
|
+
icon: typeof FilePen
|
|
32
|
+
/** Show the lines added and removed, in the diff's colors, rather than the detail text. */
|
|
33
|
+
counts?: boolean
|
|
34
|
+
}) {
|
|
35
|
+
const running = tool.state === "input-streaming" || tool.state === "input-available"
|
|
36
|
+
const error = tool.state === "output-error"
|
|
37
|
+
const label = error
|
|
38
|
+
? description.failedTitle
|
|
39
|
+
: running
|
|
40
|
+
? description.runningTitle
|
|
41
|
+
: description.title
|
|
42
|
+
|
|
43
|
+
if (running) {
|
|
44
|
+
return (
|
|
45
|
+
<div className="flex w-fit max-w-full items-center gap-1.5 text-[13px] leading-normal text-muted-foreground">
|
|
46
|
+
<Icon className="size-3.5 shrink-0" />
|
|
47
|
+
<ActivityStatusText label={label} className="font-medium shimmer" />
|
|
48
|
+
</div>
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<Collapsible>
|
|
54
|
+
<CollapsibleTrigger className="group flex w-fit max-w-full items-center gap-1.5 text-[13px] leading-normal text-muted-foreground transition-colors hover:text-foreground">
|
|
55
|
+
<Icon className="size-3.5 shrink-0" />
|
|
56
|
+
<span className="min-w-0 truncate font-medium">{label}</span>
|
|
57
|
+
{error || !description.detail ? null : counts ? (
|
|
58
|
+
<span className="shrink-0 font-mono text-[11px] tabular-nums">
|
|
59
|
+
<span className="text-emerald-600 dark:text-emerald-400">+{description.added}</span>{" "}
|
|
60
|
+
<span className="text-red-600 dark:text-red-400">−{description.removed}</span>
|
|
61
|
+
</span>
|
|
62
|
+
) : (
|
|
63
|
+
<span className="min-w-0 shrink truncate text-muted-foreground/60">
|
|
64
|
+
{description.detail}
|
|
65
|
+
</span>
|
|
66
|
+
)}
|
|
67
|
+
<ChevronRight className="size-3.5 shrink-0 opacity-0 transition-all group-hover:opacity-100 group-focus-visible:opacity-100 group-data-[state=open]:rotate-90 group-data-[state=open]:opacity-100" />
|
|
68
|
+
</CollapsibleTrigger>
|
|
69
|
+
<CollapsibleContent>
|
|
70
|
+
<div className="mt-3 min-w-0 space-y-2 text-xs">
|
|
71
|
+
{description.path ? (
|
|
72
|
+
<p className="truncate font-mono text-[10px] text-muted-foreground/60">
|
|
73
|
+
{description.path}
|
|
74
|
+
</p>
|
|
75
|
+
) : null}
|
|
76
|
+
{error ? (
|
|
77
|
+
<pre className="scrollbar-thin max-h-60 overflow-auto rounded bg-muted/50 p-2 text-[11px] leading-relaxed text-foreground">
|
|
78
|
+
{tool.errorText?.trim()}
|
|
79
|
+
</pre>
|
|
80
|
+
) : (
|
|
81
|
+
<DiffBlock lines={description.lines} />
|
|
82
|
+
)}
|
|
83
|
+
</div>
|
|
84
|
+
</CollapsibleContent>
|
|
85
|
+
</Collapsible>
|
|
86
|
+
)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const LINE_CLASS: Record<DiffLine["kind"], string> = {
|
|
90
|
+
hunk: "text-muted-foreground/60",
|
|
91
|
+
added: "bg-emerald-500/10 text-emerald-700 dark:text-emerald-300",
|
|
92
|
+
removed: "bg-red-500/10 text-red-700 dark:text-red-300",
|
|
93
|
+
context: "text-foreground/80",
|
|
94
|
+
note: "text-muted-foreground/60 italic",
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const LINE_MARK: Record<DiffLine["kind"], string> = {
|
|
98
|
+
hunk: "",
|
|
99
|
+
added: "+",
|
|
100
|
+
removed: "−",
|
|
101
|
+
context: " ",
|
|
102
|
+
note: "",
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function DiffBlock({ lines }: { lines: readonly DiffLine[] }) {
|
|
106
|
+
return (
|
|
107
|
+
<pre className="scrollbar-thin max-h-72 overflow-auto rounded bg-muted/50 py-1.5 text-[11px] leading-relaxed">
|
|
108
|
+
{lines.map((line, index) => (
|
|
109
|
+
<div
|
|
110
|
+
// Lines of one diff never reorder: the index is their identity.
|
|
111
|
+
key={index}
|
|
112
|
+
className={cn("flex min-w-max gap-2 px-2", LINE_CLASS[line.kind])}
|
|
113
|
+
>
|
|
114
|
+
{line.kind === "hunk" || line.kind === "note" ? (
|
|
115
|
+
<span>{line.text}</span>
|
|
116
|
+
) : (
|
|
117
|
+
<>
|
|
118
|
+
<span className="w-2 shrink-0 select-none opacity-70">{LINE_MARK[line.kind]}</span>
|
|
119
|
+
<span>{line.text || " "}</span>
|
|
120
|
+
</>
|
|
121
|
+
)}
|
|
122
|
+
</div>
|
|
123
|
+
))}
|
|
124
|
+
</pre>
|
|
125
|
+
)
|
|
126
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { type AgentMessages, en } from "../i18n/en"
|
|
2
|
+
import type { NormalizedTool } from "../parts"
|
|
3
|
+
|
|
4
|
+
/** One line of the unified diff `edit` returns. */
|
|
5
|
+
export interface DiffLine {
|
|
6
|
+
readonly kind: "hunk" | "added" | "removed" | "context" | "note"
|
|
7
|
+
readonly text: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface FileEditDescription {
|
|
11
|
+
/** The path the call named, or empty until it streams in. */
|
|
12
|
+
readonly path: string
|
|
13
|
+
readonly title: string
|
|
14
|
+
readonly runningTitle: string
|
|
15
|
+
readonly failedTitle: string
|
|
16
|
+
/** `+3 −1` for an edit, the line count for a write, once it has a result. */
|
|
17
|
+
readonly detail?: string
|
|
18
|
+
readonly added: number
|
|
19
|
+
readonly removed: number
|
|
20
|
+
/** The edit's diff, or the written file's contents as added lines. */
|
|
21
|
+
readonly lines: readonly DiffLine[]
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function describeEdit(
|
|
25
|
+
tool: Pick<NormalizedTool, "input" | "output">,
|
|
26
|
+
messages: AgentMessages = en
|
|
27
|
+
): FileEditDescription {
|
|
28
|
+
const m = messages.edit
|
|
29
|
+
const path = stringField(tool.input, "path") ?? stringField(tool.output, "path") ?? ""
|
|
30
|
+
const name = fileName(path)
|
|
31
|
+
const diff = stringField(tool.output, "diff")
|
|
32
|
+
const lines = diff === undefined ? [] : parseDiff(diff)
|
|
33
|
+
|
|
34
|
+
// The diff is cut on a large edit, so the edit counts its lines; an output stored before it
|
|
35
|
+
// did carries only the diff.
|
|
36
|
+
const added =
|
|
37
|
+
numberField(tool.output, "added") ?? lines.filter((line) => line.kind === "added").length
|
|
38
|
+
const removed =
|
|
39
|
+
numberField(tool.output, "removed") ?? lines.filter((line) => line.kind === "removed").length
|
|
40
|
+
|
|
41
|
+
return {
|
|
42
|
+
path,
|
|
43
|
+
title: m.title(name),
|
|
44
|
+
runningTitle: m.running(name),
|
|
45
|
+
failedTitle: m.failed(name),
|
|
46
|
+
...(diff === undefined ? {} : { detail: `+${added} −${removed}` }),
|
|
47
|
+
added,
|
|
48
|
+
removed,
|
|
49
|
+
lines,
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function describeWrite(
|
|
54
|
+
tool: Pick<NormalizedTool, "input" | "output">,
|
|
55
|
+
messages: AgentMessages = en
|
|
56
|
+
): FileEditDescription {
|
|
57
|
+
const m = messages.write
|
|
58
|
+
const path = stringField(tool.input, "path") ?? stringField(tool.output, "path") ?? ""
|
|
59
|
+
const name = fileName(path)
|
|
60
|
+
const content = stringField(tool.input, "content")
|
|
61
|
+
const created = booleanField(tool.output, "created")
|
|
62
|
+
const lineCount = numberField(tool.output, "lines")
|
|
63
|
+
const lines: DiffLine[] =
|
|
64
|
+
content === undefined
|
|
65
|
+
? []
|
|
66
|
+
: contentLines(content).map((text) => ({ kind: "added" as const, text }))
|
|
67
|
+
return {
|
|
68
|
+
path,
|
|
69
|
+
title: created === false ? m.replaced(name) : m.created(name),
|
|
70
|
+
runningTitle: m.running(name),
|
|
71
|
+
failedTitle: m.failed(name),
|
|
72
|
+
...(lineCount === undefined ? {} : { detail: m.lines(lineCount) }),
|
|
73
|
+
added: lines.length,
|
|
74
|
+
removed: 0,
|
|
75
|
+
lines,
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** A unified diff's lines by kind; `… 3 more hunks` and anything unexpected are notes. */
|
|
80
|
+
export function parseDiff(diff: string): DiffLine[] {
|
|
81
|
+
const lines = diff.endsWith("\n") ? diff.slice(0, -1).split("\n") : diff.split("\n")
|
|
82
|
+
return lines.map((line): DiffLine => {
|
|
83
|
+
if (line.startsWith("@@")) return { kind: "hunk", text: line }
|
|
84
|
+
if (line.startsWith("+")) return { kind: "added", text: line.slice(1) }
|
|
85
|
+
if (line.startsWith("-")) return { kind: "removed", text: line.slice(1) }
|
|
86
|
+
if (line.startsWith(" ")) return { kind: "context", text: line.slice(1) }
|
|
87
|
+
return { kind: "note", text: line }
|
|
88
|
+
})
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const MAX_CONTENT_LINES = 400
|
|
92
|
+
|
|
93
|
+
function contentLines(content: string): string[] {
|
|
94
|
+
if (content === "") return []
|
|
95
|
+
const lines = (content.endsWith("\n") ? content.slice(0, -1) : content).split("\n")
|
|
96
|
+
return lines.length > MAX_CONTENT_LINES ? lines.slice(0, MAX_CONTENT_LINES) : lines
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function fileName(path: string): string {
|
|
100
|
+
return path.split("/").filter(Boolean).at(-1) ?? ""
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function stringField(value: unknown, key: string): string | undefined {
|
|
104
|
+
const field = isRecord(value) ? value[key] : undefined
|
|
105
|
+
return typeof field === "string" ? field : undefined
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function numberField(value: unknown, key: string): number | undefined {
|
|
109
|
+
const field = isRecord(value) ? value[key] : undefined
|
|
110
|
+
return typeof field === "number" && Number.isInteger(field) ? field : undefined
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function booleanField(value: unknown, key: string): boolean | undefined {
|
|
114
|
+
const field = isRecord(value) ? value[key] : undefined
|
|
115
|
+
return typeof field === "boolean" ? field : undefined
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
119
|
+
return typeof value === "object" && value !== null && !Array.isArray(value)
|
|
120
|
+
}
|
|
@@ -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,
|
|
@@ -61,6 +62,8 @@ import {
|
|
|
61
62
|
preferenceWithReasoning,
|
|
62
63
|
resolveModelSelection,
|
|
63
64
|
} from "../model-selection"
|
|
65
|
+
import { openQuestion } from "../questions/interpret"
|
|
66
|
+
import type { QuestionComposerProps } from "../questions/question-composer"
|
|
64
67
|
import { type RequesterSettings, sendWithRequesterSettings } from "../requester-settings"
|
|
65
68
|
import {
|
|
66
69
|
CONTEXT_LIMIT_EXCEEDED,
|
|
@@ -83,8 +86,18 @@ import {
|
|
|
83
86
|
threadOwner,
|
|
84
87
|
userPrincipal,
|
|
85
88
|
} from "../sharing"
|
|
86
|
-
import type {
|
|
87
|
-
|
|
89
|
+
import type {
|
|
90
|
+
AgentContextEntryInput,
|
|
91
|
+
AgentFileRef,
|
|
92
|
+
AgentRun,
|
|
93
|
+
AgentThreadSandboxParams,
|
|
94
|
+
LanguageModel,
|
|
95
|
+
} from "../types"
|
|
96
|
+
import {
|
|
97
|
+
ComputerUnavailableError,
|
|
98
|
+
type NewThreadPlaceBody,
|
|
99
|
+
useNewThreadPlace,
|
|
100
|
+
} from "./use-new-thread-place"
|
|
88
101
|
import { useAgentThreadLists } from "./use-thread-lists"
|
|
89
102
|
import { useThreadStream } from "./use-thread-stream"
|
|
90
103
|
|
|
@@ -114,6 +127,12 @@ export interface UseAgentConversationInput {
|
|
|
114
127
|
readonly threadId: string | null
|
|
115
128
|
/** The first message created a thread; show it from now on. */
|
|
116
129
|
readonly onThreadCreated: (threadId: string) => void
|
|
130
|
+
/**
|
|
131
|
+
* The sandbox the conversation the next message creates works in, as the project's sandbox
|
|
132
|
+
* declares its params, such as a repository and a branch. Such a conversation runs in the cloud,
|
|
133
|
+
* so the composer offers no other place. An open thread keeps the sandbox it was created with.
|
|
134
|
+
*/
|
|
135
|
+
readonly newThreadSandbox?: AgentThreadSandboxParams
|
|
117
136
|
}
|
|
118
137
|
|
|
119
138
|
/** The parts of {@link ComposerProps} a conversation decides; the page adds the rest. */
|
|
@@ -143,6 +162,8 @@ export type ConversationComposerProps = Pick<
|
|
|
143
162
|
| "draftAttachments"
|
|
144
163
|
| "draftContext"
|
|
145
164
|
| "draftNonce"
|
|
165
|
+
| "insertion"
|
|
166
|
+
| "onInserted"
|
|
146
167
|
| "approvalMode"
|
|
147
168
|
| "onApprovalModeChange"
|
|
148
169
|
| "awaitingApproval"
|
|
@@ -175,7 +196,11 @@ const MESSAGES_LOAD_ERROR: AgentConversationMessagesError = { code: "load" }
|
|
|
175
196
|
* both render it, by spreading `transcriptProps` and `composerProps` or by drawing `messages` and
|
|
176
197
|
* `turn` themselves.
|
|
177
198
|
*/
|
|
178
|
-
export function useAgentConversation({
|
|
199
|
+
export function useAgentConversation({
|
|
200
|
+
threadId,
|
|
201
|
+
onThreadCreated,
|
|
202
|
+
newThreadSandbox,
|
|
203
|
+
}: UseAgentConversationInput) {
|
|
179
204
|
const agentMessages = useAgentMessages()
|
|
180
205
|
const labels = agentMessages.chat
|
|
181
206
|
const queryClient = useQueryClient()
|
|
@@ -184,7 +209,7 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
|
|
|
184
209
|
waiting: newThreadPlaceWaiting,
|
|
185
210
|
computerId: desktopComputerId,
|
|
186
211
|
resolveBody: resolvePlaceBody,
|
|
187
|
-
} = useNewThreadPlace()
|
|
212
|
+
} = useNewThreadPlace(threadId === null)
|
|
188
213
|
const desktopComputer = useDesktop()?.computer
|
|
189
214
|
// Asking for a folder can take as long as the person does: the composer holds meanwhile.
|
|
190
215
|
const [resolvingPlace, setResolvingPlace] = useState(false)
|
|
@@ -214,9 +239,11 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
|
|
|
214
239
|
// A held call changed: its card, and the thread list's count of what waits for the reader. Its
|
|
215
240
|
// turn's runs follow from their own events.
|
|
216
241
|
onApprovalActivity: (event) => void refreshApprovals(event.threadId),
|
|
217
|
-
//
|
|
218
|
-
//
|
|
242
|
+
// The reader's sixb opened or closed in a folder: the places a new conversation can run follow,
|
|
243
|
+
// and so does the open conversation's badge, should it run there. So do its background
|
|
244
|
+
// commands, which may run where it ran before it moved.
|
|
219
245
|
onComputerActivity: (event) => {
|
|
246
|
+
void queryClient.invalidateQueries({ queryKey: listAgentComputersQueryKey() })
|
|
220
247
|
const place = thread?.computer
|
|
221
248
|
const here = place?.id === event.computerId && place.folder === event.folder
|
|
222
249
|
if (threadId && (here || thread?.backgroundCommands)) void refreshThread(threadId)
|
|
@@ -228,6 +255,7 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
|
|
|
228
255
|
// On every (re)subscription: catch up with what changed while the socket was away.
|
|
229
256
|
onSubscribed: () => {
|
|
230
257
|
void queryClient.invalidateQueries({ queryKey: listAgentApprovalsQueryKey() })
|
|
258
|
+
void queryClient.invalidateQueries({ queryKey: listAgentComputersQueryKey() })
|
|
231
259
|
void (threadId === null ? refreshThreads() : refreshThread(threadId))
|
|
232
260
|
},
|
|
233
261
|
})
|
|
@@ -545,8 +573,13 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
|
|
|
545
573
|
}
|
|
546
574
|
|
|
547
575
|
if (!currentAgent) return
|
|
548
|
-
|
|
549
|
-
const
|
|
576
|
+
// A conversation with a sandbox runs in the cloud: there is no folder to ask for.
|
|
577
|
+
const sandbox = newThreadSandbox
|
|
578
|
+
let place: NewThreadPlaceBody | null = {}
|
|
579
|
+
if (!sandbox) {
|
|
580
|
+
setResolvingPlace(true)
|
|
581
|
+
place = await resolvePlaceBody().finally(() => setResolvingPlace(false))
|
|
582
|
+
}
|
|
550
583
|
if (!place) {
|
|
551
584
|
// They cancelled choosing a folder: nothing was sent, and their message goes back.
|
|
552
585
|
setDraftReseed((current) => ({ text, attachments, context, nonce: current.nonce + 1 }))
|
|
@@ -554,7 +587,7 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
|
|
|
554
587
|
}
|
|
555
588
|
const title = deriveTitle(text, attachments)
|
|
556
589
|
const created = await createThread.mutateAsync({
|
|
557
|
-
body: { ...(title ? { title } : {}), ...place },
|
|
590
|
+
body: { ...(title ? { title } : {}), ...place, ...(sandbox ? { sandbox } : {}) },
|
|
558
591
|
})
|
|
559
592
|
createdThreadId = created.thread.id
|
|
560
593
|
setPendingUser({
|
|
@@ -1067,6 +1100,19 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
|
|
|
1067
1100
|
}
|
|
1068
1101
|
}, [computer, backgroundCommands, runsOnComputer, threadId])
|
|
1069
1102
|
|
|
1103
|
+
// The Agent's open question takes the composer's place until it is answered or set aside, to
|
|
1104
|
+
// reply in words of one's own.
|
|
1105
|
+
const [questionSetAside, setQuestionSetAside] = useState<string | null>(null)
|
|
1106
|
+
const asked = threadId !== null ? openQuestion(messages, turn) : null
|
|
1107
|
+
const asking = asked !== null && questionSetAside !== asked.messageKey ? asked : null
|
|
1108
|
+
const questionProps: QuestionComposerProps | null = asking
|
|
1109
|
+
? {
|
|
1110
|
+
questions: asking.questions,
|
|
1111
|
+
onAnswer: (text) => void send(text, [], []),
|
|
1112
|
+
onDismiss: () => setQuestionSetAside(asking.messageKey),
|
|
1113
|
+
}
|
|
1114
|
+
: null
|
|
1115
|
+
|
|
1070
1116
|
const transcriptProps: TranscriptProps = {
|
|
1071
1117
|
threadId,
|
|
1072
1118
|
messages,
|
|
@@ -1097,7 +1143,7 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
|
|
|
1097
1143
|
|
|
1098
1144
|
const composerProps: ConversationComposerProps = {
|
|
1099
1145
|
onSend: send,
|
|
1100
|
-
...(threadId === null && (newThreadPlace || newThreadPlaceWaiting)
|
|
1146
|
+
...(threadId === null && !newThreadSandbox && (newThreadPlace || newThreadPlaceWaiting)
|
|
1101
1147
|
? { newThreadPlace: newThreadPlace ?? "waiting" }
|
|
1102
1148
|
: {}),
|
|
1103
1149
|
error: currentSendError
|
|
@@ -1230,6 +1276,11 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
|
|
|
1230
1276
|
transcriptProps,
|
|
1231
1277
|
/** Spread into `<Composer>`, then add the page's own props such as `placeholder`. */
|
|
1232
1278
|
composerProps,
|
|
1279
|
+
/**
|
|
1280
|
+
* Spread into `<QuestionComposer>` while set, in the composer's place: the Agent's question,
|
|
1281
|
+
* until the reader answers it or sets it aside.
|
|
1282
|
+
*/
|
|
1283
|
+
questionProps,
|
|
1233
1284
|
/** Spread into `<SandboxRecovery>` while set: the composer stays disabled until it is resolved. */
|
|
1234
1285
|
sandboxRecoveryProps,
|
|
1235
1286
|
/** Where the reader's own conversation runs on their computer, for its badge. */
|