@sixb/app 0.1.13 → 0.1.15
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/README.md +6 -0
- package/dist/agent/activity-label.d.ts.map +1 -1
- package/dist/agent/agent-chat.d.ts +1 -1
- package/dist/agent/agent-chat.d.ts.map +1 -1
- package/dist/agent/agent-context-provider.d.ts +1 -0
- package/dist/agent/agent-context-provider.d.ts.map +1 -1
- package/dist/agent/approvals.d.ts +110 -0
- package/dist/agent/approvals.d.ts.map +1 -0
- package/dist/agent/artifact-panel.d.ts +11 -7
- package/dist/agent/artifact-panel.d.ts.map +1 -1
- package/dist/agent/bash/bash-tool-view.d.ts +13 -0
- package/dist/agent/bash/bash-tool-view.d.ts.map +1 -1
- package/dist/agent/bash/interpret.d.ts +46 -2
- package/dist/agent/bash/interpret.d.ts.map +1 -1
- package/dist/agent/bash/model-media-view.d.ts +14 -0
- package/dist/agent/bash/model-media-view.d.ts.map +1 -0
- package/dist/agent/bash/shell.d.ts.map +1 -1
- package/dist/agent/components/agent-message-body.d.ts +21 -0
- package/dist/agent/components/agent-message-body.d.ts.map +1 -0
- package/dist/agent/components/agent-thread-switcher.d.ts +22 -1
- package/dist/agent/components/agent-thread-switcher.d.ts.map +1 -1
- package/dist/agent/components/approval-card.d.ts +17 -0
- package/dist/agent/components/approval-card.d.ts.map +1 -0
- package/dist/agent/components/approval-mode-chip.d.ts +17 -0
- package/dist/agent/components/approval-mode-chip.d.ts.map +1 -0
- package/dist/agent/components/auto-model-chip.d.ts +24 -0
- package/dist/agent/components/auto-model-chip.d.ts.map +1 -0
- package/dist/agent/components/composer.d.ts +21 -2
- package/dist/agent/components/composer.d.ts.map +1 -1
- package/dist/agent/components/context-chips.d.ts +4 -2
- package/dist/agent/components/context-chips.d.ts.map +1 -1
- package/dist/agent/components/conversation-panel.d.ts +13 -55
- package/dist/agent/components/conversation-panel.d.ts.map +1 -1
- package/dist/agent/components/message-parts.d.ts +17 -3
- package/dist/agent/components/message-parts.d.ts.map +1 -1
- package/dist/agent/components/message-view.d.ts +19 -21
- package/dist/agent/components/message-view.d.ts.map +1 -1
- package/dist/agent/components/model-controls.d.ts +8 -2
- package/dist/agent/components/model-controls.d.ts.map +1 -1
- package/dist/agent/components/model-picker-row.d.ts +5 -1
- package/dist/agent/components/model-picker-row.d.ts.map +1 -1
- package/dist/agent/components/participant-input.d.ts +29 -0
- package/dist/agent/components/participant-input.d.ts.map +1 -0
- package/dist/agent/components/provider-logo.d.ts +5 -4
- package/dist/agent/components/provider-logo.d.ts.map +1 -1
- package/dist/agent/components/reasoning-effort-slider.d.ts +8 -7
- package/dist/agent/components/reasoning-effort-slider.d.ts.map +1 -1
- package/dist/agent/components/sandbox-recovery.d.ts +8 -2
- package/dist/agent/components/sandbox-recovery.d.ts.map +1 -1
- package/dist/agent/components/shared-thread-notice.d.ts +10 -0
- package/dist/agent/components/shared-thread-notice.d.ts.map +1 -0
- package/dist/agent/components/thread-artifacts-menu.d.ts +8 -2
- package/dist/agent/components/thread-artifacts-menu.d.ts.map +1 -1
- package/dist/agent/components/thread-people.d.ts +24 -0
- package/dist/agent/components/thread-people.d.ts.map +1 -0
- package/dist/agent/components/transcript.d.ts +22 -29
- package/dist/agent/components/transcript.d.ts.map +1 -1
- package/dist/agent/conversation.d.ts +201 -0
- package/dist/agent/conversation.d.ts.map +1 -0
- package/dist/agent/delegation/child-card.d.ts +19 -0
- package/dist/agent/delegation/child-card.d.ts.map +1 -0
- package/dist/agent/delegation/child-cards.d.ts +9 -0
- package/dist/agent/delegation/child-cards.d.ts.map +1 -0
- package/dist/agent/delegation/child-group.d.ts +14 -0
- package/dist/agent/delegation/child-group.d.ts.map +1 -0
- package/dist/agent/delegation/child-parts.d.ts +50 -0
- package/dist/agent/delegation/child-parts.d.ts.map +1 -0
- package/dist/agent/delegation/child-work.d.ts +31 -0
- package/dist/agent/delegation/child-work.d.ts.map +1 -0
- package/dist/agent/delegation/context.d.ts +22 -0
- package/dist/agent/delegation/context.d.ts.map +1 -0
- package/dist/agent/delegation/interpret.d.ts +104 -0
- package/dist/agent/delegation/interpret.d.ts.map +1 -0
- package/dist/agent/delegation/model.d.ts +52 -0
- package/dist/agent/delegation/model.d.ts.map +1 -0
- package/dist/agent/delegation/use-children.d.ts +1007 -0
- package/dist/agent/delegation/use-children.d.ts.map +1 -0
- package/dist/agent/hooks/use-agent-conversation.d.ts +692 -131
- package/dist/agent/hooks/use-agent-conversation.d.ts.map +1 -1
- package/dist/agent/hooks/use-thread-sharing.d.ts +35 -0
- package/dist/agent/hooks/use-thread-sharing.d.ts.map +1 -0
- package/dist/agent/i18n/en.d.ts +313 -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 +608 -0
- package/dist/agent/i18n/index.d.ts.map +1 -1
- package/dist/agent/live-run.d.ts.map +1 -1
- package/dist/agent/memory-paths.d.ts +18 -0
- package/dist/agent/memory-paths.d.ts.map +1 -0
- package/dist/agent/message-agent/interpret.d.ts +21 -0
- package/dist/agent/message-agent/interpret.d.ts.map +1 -0
- package/dist/agent/message-authors.d.ts +56 -0
- package/dist/agent/message-authors.d.ts.map +1 -0
- package/dist/agent/model-selection.d.ts +10 -0
- package/dist/agent/model-selection.d.ts.map +1 -1
- package/dist/agent/observed-conversation.d.ts +26 -0
- package/dist/agent/observed-conversation.d.ts.map +1 -0
- package/dist/agent/observed-thread.d.ts +9 -0
- package/dist/agent/observed-thread.d.ts.map +1 -0
- package/dist/agent/parts.d.ts +5 -0
- package/dist/agent/parts.d.ts.map +1 -1
- package/dist/agent/publish-artifact/use-live-publishes.d.ts +5 -2
- package/dist/agent/publish-artifact/use-live-publishes.d.ts.map +1 -1
- package/dist/agent/read/interpret.d.ts +2 -0
- package/dist/agent/read/interpret.d.ts.map +1 -1
- package/dist/agent/run-presentation.d.ts +11 -0
- package/dist/agent/run-presentation.d.ts.map +1 -1
- package/dist/agent/sharing.d.ts +42 -0
- package/dist/agent/sharing.d.ts.map +1 -0
- package/dist/agent/tool-views/built-in.d.ts +5 -0
- package/dist/agent/tool-views/built-in.d.ts.map +1 -0
- package/dist/agent/tool-views/define.d.ts +79 -0
- package/dist/agent/tool-views/define.d.ts.map +1 -0
- package/dist/agent/tool-views/registry.d.ts +28 -0
- package/dist/agent/tool-views/registry.d.ts.map +1 -0
- package/dist/agent/utils/radio-group.d.ts +11 -0
- package/dist/agent/utils/radio-group.d.ts.map +1 -0
- package/dist/artifacts/card-details.d.ts.map +1 -1
- package/dist/artifacts/card-preview.d.ts.map +1 -1
- package/dist/artifacts/downloads.d.ts +26 -0
- package/dist/artifacts/downloads.d.ts.map +1 -0
- package/dist/artifacts/edit-session.d.ts +36 -0
- package/dist/artifacts/edit-session.d.ts.map +1 -0
- package/dist/artifacts/file-source.d.ts +27 -1
- package/dist/artifacts/file-source.d.ts.map +1 -1
- package/dist/artifacts/file-type-icon.d.ts +14 -0
- package/dist/artifacts/file-type-icon.d.ts.map +1 -0
- package/dist/artifacts/frame-embeds.d.ts +20 -0
- package/dist/artifacts/frame-embeds.d.ts.map +1 -0
- package/dist/artifacts/frame.d.ts +12 -1
- package/dist/artifacts/frame.d.ts.map +1 -1
- package/dist/artifacts/gallery.d.ts.map +1 -1
- package/dist/artifacts/history.d.ts +15 -0
- package/dist/artifacts/history.d.ts.map +1 -0
- package/dist/artifacts/kind-icon.d.ts +7 -0
- package/dist/artifacts/kind-icon.d.ts.map +1 -1
- package/dist/artifacts/messages.d.ts +518 -4
- package/dist/artifacts/messages.d.ts.map +1 -1
- package/dist/artifacts/page-queries.d.ts +22 -0
- package/dist/artifacts/page-queries.d.ts.map +1 -0
- package/dist/artifacts/page-state.d.ts +21 -0
- package/dist/artifacts/page-state.d.ts.map +1 -0
- package/dist/artifacts/people.d.ts +12 -0
- package/dist/artifacts/people.d.ts.map +1 -0
- package/dist/artifacts/person-avatar.d.ts +23 -0
- package/dist/artifacts/person-avatar.d.ts.map +1 -0
- package/dist/artifacts/publish-edit.d.ts +29 -0
- package/dist/artifacts/publish-edit.d.ts.map +1 -0
- package/dist/artifacts/queries.d.ts +77 -1
- 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 +21 -0
- package/dist/artifacts/renderers/canvas/arrows.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/board.d.ts +54 -0
- package/dist/artifacts/renderers/canvas/board.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/canvas.d.ts +27 -0
- package/dist/artifacts/renderers/canvas/canvas.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/controls.d.ts +8 -0
- package/dist/artifacts/renderers/canvas/controls.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/draft.d.ts +77 -0
- package/dist/artifacts/renderers/canvas/draft.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/edit-mode.d.ts +55 -0
- package/dist/artifacts/renderers/canvas/edit-mode.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/editing.d.ts +40 -0
- package/dist/artifacts/renderers/canvas/editing.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/focus.d.ts +15 -0
- package/dist/artifacts/renderers/canvas/focus.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/items.d.ts +13 -0
- package/dist/artifacts/renderers/canvas/items.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/layout.d.ts +46 -0
- package/dist/artifacts/renderers/canvas/layout.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/renderer.d.ts +13 -0
- package/dist/artifacts/renderers/canvas/renderer.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/thumbnail.d.ts +10 -0
- package/dist/artifacts/renderers/canvas/thumbnail.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/toolbar.d.ts +15 -0
- package/dist/artifacts/renderers/canvas/toolbar.d.ts.map +1 -0
- package/dist/artifacts/renderers/notice.d.ts.map +1 -1
- package/dist/artifacts/renderers/page.d.ts +34 -0
- package/dist/artifacts/renderers/page.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/cell-editor.d.ts +21 -0
- package/dist/artifacts/renderers/sheet/cell-editor.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/cells.d.ts +93 -0
- package/dist/artifacts/renderers/sheet/cells.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/chart-data.d.ts +27 -7
- package/dist/artifacts/renderers/sheet/chart-data.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/chart-icon.d.ts +5 -0
- package/dist/artifacts/renderers/sheet/chart-icon.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/chart-locked.d.ts +9 -0
- package/dist/artifacts/renderers/sheet/chart-locked.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/chart.d.ts +2 -1
- package/dist/artifacts/renderers/sheet/chart.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/column-format.d.ts +28 -0
- package/dist/artifacts/renderers/sheet/column-format.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/column-menu.d.ts +51 -0
- package/dist/artifacts/renderers/sheet/column-menu.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/downloads.d.ts +10 -0
- package/dist/artifacts/renderers/sheet/downloads.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/draft.d.ts +131 -0
- package/dist/artifacts/renderers/sheet/draft.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/filter-panel.d.ts +20 -0
- package/dist/artifacts/renderers/sheet/filter-panel.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/filter.d.ts +40 -0
- package/dist/artifacts/renderers/sheet/filter.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/find-bar.d.ts +42 -0
- package/dist/artifacts/renderers/sheet/find-bar.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/find.d.ts +18 -0
- package/dist/artifacts/renderers/sheet/find.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/fit.d.ts +15 -0
- package/dist/artifacts/renderers/sheet/fit.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/format.d.ts +14 -6
- package/dist/artifacts/renderers/sheet/format.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/frame.d.ts +69 -0
- package/dist/artifacts/renderers/sheet/frame.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/grid.d.ts +69 -6
- package/dist/artifacts/renderers/sheet/grid.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/highlight.d.ts +32 -0
- package/dist/artifacts/renderers/sheet/highlight.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/input.d.ts +30 -0
- package/dist/artifacts/renderers/sheet/input.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/locked.d.ts +17 -0
- package/dist/artifacts/renderers/sheet/locked.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/mini-chart.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/model.d.ts +26 -4
- package/dist/artifacts/renderers/sheet/model.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/selection.d.ts +30 -6
- package/dist/artifacts/renderers/sheet/selection.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/sheet.d.ts +5 -5
- package/dist/artifacts/renderers/sheet/sheet.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/totals.d.ts +16 -0
- package/dist/artifacts/renderers/sheet/totals.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/view.d.ts +44 -0
- package/dist/artifacts/renderers/sheet/view.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/workbook.d.ts +23 -3
- package/dist/artifacts/renderers/sheet/workbook.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/xlsx.d.ts +18 -0
- package/dist/artifacts/renderers/sheet/xlsx.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/zip.d.ts +12 -0
- package/dist/artifacts/renderers/sheet/zip.d.ts.map +1 -0
- package/dist/artifacts/renderers/slides/slides.d.ts.map +1 -1
- package/dist/artifacts/tones.d.ts +4 -0
- package/dist/artifacts/tones.d.ts.map +1 -0
- package/dist/artifacts/viewer.d.ts +2 -0
- package/dist/artifacts/viewer.d.ts.map +1 -1
- package/dist/auth.d.ts +6 -1
- package/dist/auth.d.ts.map +1 -1
- package/dist/{chunk-gn3k23q5.js → chunk-53z5653y.js} +64 -3
- package/dist/chunk-53z5653y.js.map +11 -0
- package/dist/{chunk-3schcf10.js → chunk-736c9akn.js} +1 -1
- package/dist/{chunk-g3f4cm8x.js → chunk-k4epnkcr.js} +1 -1
- package/dist/{chunk-c7gy61rx.js → chunk-n0cxwvej.js} +165 -4
- package/dist/chunk-n0cxwvej.js.map +10 -0
- package/dist/chunk-qh1panvd.js +1487 -0
- package/dist/chunk-qh1panvd.js.map +18 -0
- package/dist/{chunk-ng0hdnrq.js → chunk-sw3pyqgy.js} +3 -1
- package/dist/chunk-sw3pyqgy.js.map +10 -0
- package/dist/chunk-twjs2sb9.js +29401 -0
- package/dist/chunk-twjs2sb9.js.map +176 -0
- package/dist/codegen.d.ts.map +1 -1
- package/dist/createCustomApp.d.ts +1 -0
- package/dist/createCustomApp.d.ts.map +1 -1
- package/dist/index.d.ts +18 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +51 -9
- package/dist/index.js.map +6 -6
- package/dist/locale-messages.d.ts +1 -0
- package/dist/locale-messages.d.ts.map +1 -1
- package/dist/locale.d.ts +1 -0
- package/dist/locale.d.ts.map +1 -1
- package/dist/locale.js +1 -1
- package/dist/metadata.d.ts.map +1 -1
- package/dist/pages/observability/action-run.d.ts.map +1 -1
- package/dist/pages/observability/activity/messages.d.ts +14 -0
- package/dist/pages/observability/activity/messages.d.ts.map +1 -1
- package/dist/pages/observability/activity/thread.d.ts +6 -0
- package/dist/pages/observability/activity/thread.d.ts.map +1 -0
- package/dist/pages/observability/activity/timeline.d.ts.map +1 -1
- package/dist/pages/observability/ai-usage/calls.d.ts.map +1 -1
- package/dist/pages/observability/ai-usage/format.d.ts +16 -5
- package/dist/pages/observability/ai-usage/format.d.ts.map +1 -1
- package/dist/pages/observability/ai-usage/kinds.d.ts +40 -0
- package/dist/pages/observability/ai-usage/kinds.d.ts.map +1 -0
- package/dist/pages/observability/ai-usage/messages.d.ts +74 -12
- package/dist/pages/observability/ai-usage/messages.d.ts.map +1 -1
- package/dist/pages/observability/ai-usage/page.d.ts.map +1 -1
- package/dist/pages/observability/messages.d.ts +4 -0
- package/dist/pages/observability/messages.d.ts.map +1 -1
- package/dist/pages/ontology/actions.d.ts.map +1 -1
- package/dist/pages/ontology/components/action-button.d.ts +6 -0
- package/dist/pages/ontology/components/action-button.d.ts.map +1 -1
- package/dist/pages/ontology/components/user-picker.d.ts +37 -0
- package/dist/pages/ontology/components/user-picker.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/run-input-form.d.ts.map +1 -1
- package/dist/pages/routes.d.ts +2 -0
- package/dist/pages/routes.d.ts.map +1 -1
- package/dist/pages/section-page.d.ts +13 -0
- package/dist/pages/section-page.d.ts.map +1 -1
- package/dist/pages/section-ui.d.ts.map +1 -1
- 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-contents.d.ts +30 -0
- package/dist/pages/settings/memory-contents.d.ts.map +1 -0
- package/dist/pages/settings/memory-entries.d.ts +42 -0
- package/dist/pages/settings/memory-entries.d.ts.map +1 -0
- package/dist/pages/settings/memory-files.d.ts +49 -0
- package/dist/pages/settings/memory-files.d.ts.map +1 -0
- package/dist/pages/settings/memory-history.d.ts +8 -0
- package/dist/pages/settings/memory-history.d.ts.map +1 -0
- package/dist/pages/settings/memory.d.ts +21 -0
- package/dist/pages/settings/memory.d.ts.map +1 -0
- package/dist/pages/settings/messages.d.ts +206 -0
- package/dist/pages/settings/messages.d.ts.map +1 -1
- package/dist/pages/settings/personal.d.ts +2 -2
- package/dist/pages/settings/personal.d.ts.map +1 -1
- package/dist/pages/settings/sessions.d.ts.map +1 -1
- package/dist/pages/values.d.ts +1 -0
- package/dist/pages/values.d.ts.map +1 -1
- package/dist/pages.d.ts +13 -16
- package/dist/pages.d.ts.map +1 -1
- package/dist/pages.js +6766 -4391
- package/dist/pages.js.map +34 -28
- package/dist/sections/catalog.d.ts.map +1 -1
- package/dist/sections/sections.d.ts.map +1 -1
- package/dist/server.js +79 -44
- package/dist/server.js.map +5 -5
- package/package.json +4 -4
- package/src/agent/activity-label.ts +17 -2
- package/src/agent/agent-chat.tsx +81 -111
- package/src/agent/agent-context-provider.tsx +1 -0
- package/src/agent/agent-panel.tsx +4 -0
- package/src/agent/agent-surface.tsx +4 -0
- package/src/agent/agent.css +115 -3
- package/src/agent/approvals.ts +267 -0
- package/src/agent/artifact-panel.tsx +131 -46
- package/src/agent/bash/bash-tool-view.tsx +98 -6
- package/src/agent/bash/interpret.ts +265 -3
- package/src/agent/bash/model-media-view.tsx +474 -0
- package/src/agent/bash/shell.ts +3 -2
- package/src/agent/components/activity-status.tsx +1 -1
- package/src/agent/components/agent-message-body.tsx +56 -0
- package/src/agent/components/agent-threads.tsx +377 -0
- package/src/agent/components/approval-card.tsx +849 -0
- package/src/agent/components/approval-mode-chip.tsx +120 -0
- package/src/agent/components/auto-model-chip.tsx +219 -0
- package/src/agent/components/composer-menu.tsx +185 -0
- package/src/agent/components/composer.tsx +95 -30
- package/src/agent/components/context-chips.tsx +6 -7
- package/src/agent/components/conversation-panel.tsx +38 -180
- package/src/agent/components/file-attachment-card.tsx +5 -2
- package/src/agent/components/message-parts.tsx +190 -59
- package/src/agent/components/message-view.tsx +289 -228
- package/src/agent/components/model-controls.tsx +162 -128
- package/src/agent/components/model-picker-row.tsx +50 -11
- package/src/agent/components/participant-input.tsx +293 -0
- package/src/agent/components/provider-logo.tsx +6 -1
- package/src/agent/components/reasoning-effort-slider.tsx +37 -35
- package/src/agent/components/sandbox-recovery.tsx +24 -5
- package/src/agent/components/shared-thread-notice.tsx +34 -0
- package/src/agent/components/thread-artifacts-menu.tsx +29 -12
- package/src/agent/components/thread-people.tsx +551 -0
- package/src/agent/components/threads-button.tsx +70 -0
- package/src/agent/components/transcript.tsx +343 -147
- package/src/agent/conversation.ts +658 -0
- package/src/agent/delegation/child-card.tsx +338 -0
- package/src/agent/delegation/child-cards.tsx +141 -0
- package/src/agent/delegation/child-group.tsx +231 -0
- package/src/agent/delegation/child-parts.tsx +286 -0
- package/src/agent/delegation/child-work.tsx +198 -0
- package/src/agent/delegation/context.ts +28 -0
- package/src/agent/delegation/interpret.ts +379 -0
- package/src/agent/delegation/model.ts +235 -0
- package/src/agent/delegation/use-children.ts +235 -0
- package/src/agent/hooks/use-agent-conversation.ts +803 -125
- package/src/agent/hooks/use-people-suggestions.ts +90 -0
- package/src/agent/hooks/use-thread-lists.ts +77 -0
- package/src/agent/hooks/use-thread-sharing.ts +197 -0
- package/src/agent/i18n/en.ts +355 -20
- package/src/agent/i18n/fr.ts +371 -32
- package/src/agent/live-run.ts +23 -40
- package/src/agent/memory-paths.ts +41 -0
- package/src/agent/message-agent/interpret.ts +60 -0
- package/src/agent/message-authors.ts +115 -0
- package/src/agent/model-selection.ts +15 -0
- package/src/agent/observed-conversation.tsx +210 -0
- package/src/agent/observed-thread.ts +13 -0
- package/src/agent/parts.ts +23 -0
- package/src/agent/publish-artifact/use-live-publishes.ts +5 -2
- package/src/agent/react-router.tsx +48 -5
- package/src/agent/read/interpret.ts +18 -0
- package/src/agent/read/read-tool-view.tsx +2 -2
- package/src/agent/run-presentation.ts +41 -1
- package/src/agent/sharing.ts +95 -0
- package/src/agent/thread-navigation.ts +16 -0
- package/src/agent/thread-pages.ts +24 -0
- package/src/agent/tool-views/built-in.tsx +56 -0
- package/src/agent/tool-views/define.ts +150 -0
- package/src/agent/tool-views/registry.tsx +125 -0
- package/src/agent/utils/radio-group.ts +29 -0
- package/src/artifacts/artifacts.css +96 -0
- package/src/artifacts/card-details.ts +9 -1
- package/src/artifacts/card-preview.tsx +23 -12
- package/src/artifacts/downloads.tsx +130 -0
- package/src/artifacts/edit-session.tsx +115 -0
- package/src/artifacts/file-source.ts +94 -4
- package/src/artifacts/file-type-icon.tsx +114 -0
- package/src/artifacts/frame-embeds.tsx +113 -0
- package/src/artifacts/frame.tsx +143 -19
- package/src/artifacts/gallery.tsx +3 -0
- package/src/artifacts/history.ts +42 -0
- package/src/artifacts/kind-icon.tsx +31 -1
- package/src/artifacts/messages.ts +601 -16
- package/src/artifacts/page-queries.ts +80 -0
- package/src/artifacts/page-state.ts +211 -0
- package/src/artifacts/people.ts +19 -0
- package/src/artifacts/person-avatar.tsx +40 -0
- package/src/artifacts/publish-edit.ts +90 -0
- package/src/artifacts/queries.ts +242 -5
- package/src/artifacts/references/references.tsx +219 -18
- package/src/artifacts/renderers/canvas/arrows.tsx +134 -0
- package/src/artifacts/renderers/canvas/board.tsx +108 -0
- package/src/artifacts/renderers/canvas/canvas.tsx +195 -0
- package/src/artifacts/renderers/canvas/controls.tsx +75 -0
- package/src/artifacts/renderers/canvas/draft.ts +322 -0
- package/src/artifacts/renderers/canvas/edit-mode.tsx +301 -0
- package/src/artifacts/renderers/canvas/editing.tsx +187 -0
- package/src/artifacts/renderers/canvas/focus.tsx +128 -0
- package/src/artifacts/renderers/canvas/items.tsx +380 -0
- package/src/artifacts/renderers/canvas/layout.ts +132 -0
- package/src/artifacts/renderers/canvas/renderer.tsx +110 -0
- package/src/artifacts/renderers/canvas/thumbnail.tsx +144 -0
- package/src/artifacts/renderers/canvas/toolbar.tsx +316 -0
- package/src/artifacts/renderers/notice.tsx +3 -1
- package/src/artifacts/renderers/page.tsx +152 -0
- package/src/artifacts/renderers/sheet/cell-editor.tsx +125 -0
- package/src/artifacts/renderers/sheet/cells.tsx +462 -0
- package/src/artifacts/renderers/sheet/chart-data.ts +124 -14
- package/src/artifacts/renderers/sheet/chart-icon.ts +18 -0
- package/src/artifacts/renderers/sheet/chart-locked.tsx +30 -0
- package/src/artifacts/renderers/sheet/chart.tsx +153 -3
- package/src/artifacts/renderers/sheet/column-format.tsx +413 -0
- package/src/artifacts/renderers/sheet/column-menu.tsx +198 -0
- package/src/artifacts/renderers/sheet/downloads.tsx +88 -0
- package/src/artifacts/renderers/sheet/draft.ts +589 -0
- package/src/artifacts/renderers/sheet/filter-panel.tsx +255 -0
- package/src/artifacts/renderers/sheet/filter.ts +182 -0
- package/src/artifacts/renderers/sheet/find-bar.tsx +177 -0
- package/src/artifacts/renderers/sheet/find.ts +50 -0
- package/src/artifacts/renderers/sheet/fit.ts +54 -0
- package/src/artifacts/renderers/sheet/format.ts +48 -7
- package/src/artifacts/renderers/sheet/frame.tsx +531 -0
- package/src/artifacts/renderers/sheet/grid.tsx +1266 -287
- package/src/artifacts/renderers/sheet/highlight.ts +83 -0
- package/src/artifacts/renderers/sheet/input.ts +191 -0
- package/src/artifacts/renderers/sheet/locked.ts +112 -0
- package/src/artifacts/renderers/sheet/mini-chart.tsx +72 -4
- package/src/artifacts/renderers/sheet/model.ts +69 -8
- package/src/artifacts/renderers/sheet/selection.ts +136 -9
- package/src/artifacts/renderers/sheet/sheet.tsx +440 -264
- package/src/artifacts/renderers/sheet/totals.ts +54 -0
- package/src/artifacts/renderers/sheet/view.ts +96 -0
- package/src/artifacts/renderers/sheet/workbook.ts +107 -8
- package/src/artifacts/renderers/sheet/xlsx.ts +516 -0
- package/src/artifacts/renderers/sheet/zip.ts +108 -0
- package/src/artifacts/renderers/slides/slides.tsx +3 -55
- package/src/artifacts/tones.ts +14 -0
- package/src/artifacts/viewer.tsx +915 -96
- package/src/auth.ts +8 -2
- package/src/codegen.ts +29 -12
- package/src/createCustomApp.ts +72 -24
- package/src/index.ts +76 -2
- package/src/locale-messages.ts +2 -0
- package/src/metadata.ts +16 -3
- package/src/pages/home.tsx +3 -1
- package/src/pages/observability/action-run.tsx +5 -1
- package/src/pages/observability/activity/messages.ts +16 -0
- package/src/pages/observability/activity/thread.tsx +150 -0
- package/src/pages/observability/activity/timeline.tsx +40 -3
- package/src/pages/observability/ai-usage/calls.tsx +63 -19
- package/src/pages/observability/ai-usage/format.ts +61 -8
- package/src/pages/observability/ai-usage/kinds.tsx +156 -0
- package/src/pages/observability/ai-usage/messages.ts +91 -14
- package/src/pages/observability/ai-usage/page.tsx +157 -48
- package/src/pages/observability/messages.ts +3 -0
- package/src/pages/ontology/actions.tsx +25 -4
- package/src/pages/ontology/components/action-button.tsx +53 -17
- package/src/pages/ontology/components/user-picker.tsx +161 -0
- package/src/pages/ontology/object-type.tsx +6 -0
- package/src/pages/ontology/workflows/run-input-form.tsx +12 -1
- package/src/pages/routes.ts +5 -0
- package/src/pages/section-page.tsx +27 -0
- package/src/pages/section-ui.tsx +3 -2
- package/src/pages/settings/controls.tsx +10 -2
- package/src/pages/settings/members.tsx +1 -5
- package/src/pages/settings/memory-contents.tsx +173 -0
- package/src/pages/settings/memory-entries.ts +112 -0
- package/src/pages/settings/memory-files.ts +195 -0
- package/src/pages/settings/memory-history.tsx +560 -0
- package/src/pages/settings/memory.tsx +993 -0
- package/src/pages/settings/messages.ts +231 -2
- package/src/pages/settings/personal.tsx +247 -27
- package/src/pages/settings/service-accounts.tsx +1 -1
- package/src/pages/settings/sessions.tsx +1 -4
- package/src/pages/values.tsx +88 -11
- package/src/pages.ts +21 -27
- package/src/sections/catalog.ts +18 -1
- package/src/sections/sections.tsx +2 -0
- package/src/shell/agent-dock.tsx +4 -2
- package/dist/chunk-c7gy61rx.js.map +0 -10
- package/dist/chunk-gn3k23q5.js.map +0 -10
- package/dist/chunk-ng0hdnrq.js.map +0 -10
- package/dist/chunk-xxpdn63v.js +0 -15018
- package/dist/chunk-xxpdn63v.js.map +0 -105
- package/src/agent/agents-page.ts +0 -7
- package/src/agent/components/agent-thread-switcher.tsx +0 -346
- /package/dist/{chunk-3schcf10.js.map → chunk-736c9akn.js.map} +0 -0
- /package/dist/{chunk-g3f4cm8x.js.map → chunk-k4epnkcr.js.map} +0 -0
package/src/auth.ts
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
export type AuthExperienceState =
|
|
2
2
|
| { readonly kind: "signIn" }
|
|
3
3
|
| { readonly kind: "checkEmail" }
|
|
4
|
-
| {
|
|
4
|
+
| {
|
|
5
|
+
readonly kind: "confirm"
|
|
6
|
+
readonly email?: string
|
|
7
|
+
/** The link creates the person's account: ask for their name and pass it to `confirmSignIn`. */
|
|
8
|
+
readonly firstSignIn?: true
|
|
9
|
+
}
|
|
5
10
|
| { readonly kind: "invalidLink" }
|
|
6
11
|
| { readonly kind: "error" }
|
|
7
12
|
|
|
8
13
|
export interface AuthExperienceActions {
|
|
9
14
|
requestMagicLink(email: string): void
|
|
10
|
-
|
|
15
|
+
/** `displayName` names a new account; it is ignored when the person already has one. */
|
|
16
|
+
confirmSignIn(input?: { readonly displayName?: string }): void
|
|
11
17
|
restartSignIn(): void
|
|
12
18
|
}
|
|
13
19
|
|
package/src/codegen.ts
CHANGED
|
@@ -364,8 +364,10 @@ const actions: AuthExperienceActions = {
|
|
|
364
364
|
requestMagicLink(email) {
|
|
365
365
|
submit("requestMagicLink", { email })
|
|
366
366
|
},
|
|
367
|
-
confirmSignIn() {
|
|
368
|
-
|
|
367
|
+
confirmSignIn(input) {
|
|
368
|
+
// Pages often pass this straight to onClick, which hands over the click event, not a name.
|
|
369
|
+
const displayName = typeof input?.displayName === "string" ? input.displayName : undefined
|
|
370
|
+
submit("confirmSignIn", displayName === undefined ? {} : { displayName })
|
|
369
371
|
},
|
|
370
372
|
restartSignIn() {
|
|
371
373
|
window.location.assign(bootstrap.signInUrl)
|
|
@@ -497,13 +499,19 @@ export async function generateAppEntry(
|
|
|
497
499
|
.map((path) => `import ${JSON.stringify(relativeTo(generatedDir, path))}`)
|
|
498
500
|
.join("\n")
|
|
499
501
|
const sections = options.sections ?? false
|
|
500
|
-
// The namespace import reads the optional `visibility`
|
|
501
|
-
// that leaves
|
|
502
|
-
const layoutImport =
|
|
503
|
-
?
|
|
504
|
-
:
|
|
505
|
-
|
|
506
|
-
|
|
502
|
+
// The namespace import reads the optional `visibility` and `toolViews` exports without naming
|
|
503
|
+
// them, so a layout that leaves them out still bundles without a missing-export warning.
|
|
504
|
+
const layoutImport = hasLayout
|
|
505
|
+
? `import RootLayout, * as rootLayoutModule from ${JSON.stringify(layoutRel)}\n`
|
|
506
|
+
: ""
|
|
507
|
+
// How every chat in the app shows the project's tools, from the same layout. Shared links too:
|
|
508
|
+
// they render the same layout, and any chat in it.
|
|
509
|
+
const toolViewsImport = hasLayout
|
|
510
|
+
? `import { AgentToolViewsProvider } from "@sixb/app/pages"\n`
|
|
511
|
+
: ""
|
|
512
|
+
const toolViewsSetup = hasLayout
|
|
513
|
+
? `const toolViews = Reflect.get(rootLayoutModule, "toolViews")`
|
|
514
|
+
: ""
|
|
507
515
|
// A project with no `app/` of its own gets the default shell: its user menu is the way into every
|
|
508
516
|
// section. Pages without a layout keep rendering bare, as they did before the built-in pages.
|
|
509
517
|
const defaultShell = sections && !hasLayout && !options.projectPages
|
|
@@ -520,8 +528,16 @@ export async function generateAppEntry(
|
|
|
520
528
|
? `<SectionsProvider visibility={visibility} enabled={!basename}>`
|
|
521
529
|
: ""
|
|
522
530
|
const sectionsEnd = sections ? "</SectionsProvider>" : ""
|
|
523
|
-
const layoutWrapperStart = hasLayout
|
|
524
|
-
|
|
531
|
+
const layoutWrapperStart = hasLayout
|
|
532
|
+
? "<AgentToolViewsProvider views={toolViews}><RootLayout>"
|
|
533
|
+
: defaultShell
|
|
534
|
+
? "<AppShell>"
|
|
535
|
+
: "<>"
|
|
536
|
+
const layoutWrapperEnd = hasLayout
|
|
537
|
+
? "</RootLayout></AgentToolViewsProvider>"
|
|
538
|
+
: defaultShell
|
|
539
|
+
? "</AppShell>"
|
|
540
|
+
: "</>"
|
|
525
541
|
const runtimeConfigScript = options.apiBaseUrl
|
|
526
542
|
? renderCustomAppRuntimeScript({
|
|
527
543
|
api: { baseUrl: options.apiBaseUrl },
|
|
@@ -550,7 +566,7 @@ import {
|
|
|
550
566
|
SixbEventsProvider,
|
|
551
567
|
} from "@sixb/client/hooks"
|
|
552
568
|
import { LocaleProvider, useAppMessages } from "@sixb/app/locale"
|
|
553
|
-
${sectionsImport}import { activityRoutePaths, routePaths, routes } from "./routes"
|
|
569
|
+
${sectionsImport}${toolViewsImport}import { activityRoutePaths, routePaths, routes } from "./routes"
|
|
554
570
|
${globalsCssImport}
|
|
555
571
|
${layoutImport}
|
|
556
572
|
|
|
@@ -905,6 +921,7 @@ function RoutedErrorBoundary({
|
|
|
905
921
|
|
|
906
922
|
const appRoutes = [...routes, { path: "*", element: <NotFoundView /> }]
|
|
907
923
|
${sectionsSetup}
|
|
924
|
+
${toolViewsSetup}
|
|
908
925
|
|
|
909
926
|
const routePatterns = routePaths.map((path) => ({ path }))
|
|
910
927
|
const recordedRoutePaths = new Set(activityRoutePaths)
|
package/src/createCustomApp.ts
CHANGED
|
@@ -64,6 +64,7 @@ export interface CustomAppStartOptions {
|
|
|
64
64
|
|
|
65
65
|
export interface CustomAppServer {
|
|
66
66
|
host: string
|
|
67
|
+
/** The port it listens on: the one it bound when asked for port 0. */
|
|
67
68
|
port: number
|
|
68
69
|
url: string
|
|
69
70
|
stop(): Promise<void>
|
|
@@ -87,7 +88,6 @@ export interface CustomAppInstance {
|
|
|
87
88
|
type BunServeRoutes = NonNullable<Parameters<typeof Bun.serve>[0]["routes"]>
|
|
88
89
|
type BunServeRoute = BunServeRoutes[string]
|
|
89
90
|
const packageRoot = resolve(import.meta.dir, "..")
|
|
90
|
-
const builtInAgentRoutePaths = ["/agents", "/agents/new/:agentId", "/agents/:threadId"] as const
|
|
91
91
|
// The shell parts a layout imports from `@sixb/app` style themselves with the same Tailwind build.
|
|
92
92
|
const shellSourcePath = join(packageRoot, "src", "shell")
|
|
93
93
|
const builtInPageModule = "@sixb/app/pages"
|
|
@@ -402,10 +402,12 @@ export async function createCustomApp(options: CreateCustomAppOptions): Promise<
|
|
|
402
402
|
"/": spaHtmlRoute(() => internalOrigin, {
|
|
403
403
|
shellRoute: privateAppShellRoute,
|
|
404
404
|
transformHtml: withRuntime,
|
|
405
|
+
apiBaseUrl,
|
|
405
406
|
}),
|
|
406
407
|
"/*": spaHtmlRoute(() => internalOrigin, {
|
|
407
408
|
shellRoute: privateAppShellRoute,
|
|
408
409
|
transformHtml: withRuntime,
|
|
410
|
+
apiBaseUrl,
|
|
409
411
|
}),
|
|
410
412
|
},
|
|
411
413
|
}) as Parameters<typeof Bun.serve>[0]
|
|
@@ -456,7 +458,8 @@ export async function createCustomApp(options: CreateCustomAppOptions): Promise<
|
|
|
456
458
|
}
|
|
457
459
|
|
|
458
460
|
server = Bun.serve(serveOptions(htmlBundle))
|
|
459
|
-
|
|
461
|
+
const boundPort = server.port ?? port
|
|
462
|
+
internalOrigin = devServerInternalOrigin(host, boundPort)
|
|
460
463
|
|
|
461
464
|
// .ts/.tsx edits can change Tailwind's scanned classes and .css edits
|
|
462
465
|
// change the stylesheet source, so both regenerate the entry and
|
|
@@ -514,8 +517,8 @@ export async function createCustomApp(options: CreateCustomAppOptions): Promise<
|
|
|
514
517
|
|
|
515
518
|
return {
|
|
516
519
|
host,
|
|
517
|
-
port,
|
|
518
|
-
url: `http://${displayHost}:${
|
|
520
|
+
port: boundPort,
|
|
521
|
+
url: `http://${displayHost}:${boundPort}`,
|
|
519
522
|
watchesSources: watcher !== null,
|
|
520
523
|
async stop() {
|
|
521
524
|
stopping = true
|
|
@@ -634,7 +637,7 @@ export async function createCustomApp(options: CreateCustomAppOptions): Promise<
|
|
|
634
637
|
}
|
|
635
638
|
|
|
636
639
|
if (url.pathname === "/" || url.pathname === "") {
|
|
637
|
-
return htmlResponse(req, indexHtml)
|
|
640
|
+
return htmlResponse(req, indexHtml, runtimeApiBaseUrl)
|
|
638
641
|
}
|
|
639
642
|
|
|
640
643
|
const resolvedPath = resolveStaticPath(outdir, url.pathname)
|
|
@@ -645,7 +648,7 @@ export async function createCustomApp(options: CreateCustomAppOptions): Promise<
|
|
|
645
648
|
const directFile = Bun.file(resolvedPath)
|
|
646
649
|
if (await directFile.exists()) {
|
|
647
650
|
if (resolvedPath === indexPath) {
|
|
648
|
-
return htmlResponse(req, indexHtml)
|
|
651
|
+
return htmlResponse(req, indexHtml, runtimeApiBaseUrl)
|
|
649
652
|
}
|
|
650
653
|
return staticFileResponse(req, resolvedPath, staticAssetHeaders(url.pathname))
|
|
651
654
|
}
|
|
@@ -657,7 +660,7 @@ export async function createCustomApp(options: CreateCustomAppOptions): Promise<
|
|
|
657
660
|
const htmlFile = Bun.file(`${resolvedPath}.html`)
|
|
658
661
|
if (await htmlFile.exists()) {
|
|
659
662
|
if (`${resolvedPath}.html` === indexPath) {
|
|
660
|
-
return htmlResponse(req, indexHtml)
|
|
663
|
+
return htmlResponse(req, indexHtml, runtimeApiBaseUrl)
|
|
661
664
|
}
|
|
662
665
|
return fileResponse(req, htmlFile)
|
|
663
666
|
}
|
|
@@ -667,16 +670,17 @@ export async function createCustomApp(options: CreateCustomAppOptions): Promise<
|
|
|
667
670
|
return fileResponse(req, nestedIndexFile)
|
|
668
671
|
}
|
|
669
672
|
|
|
670
|
-
return htmlResponse(req, indexHtml)
|
|
673
|
+
return htmlResponse(req, indexHtml, runtimeApiBaseUrl)
|
|
671
674
|
},
|
|
672
675
|
})
|
|
673
676
|
|
|
674
677
|
const displayHost = host === "0.0.0.0" ? "localhost" : host
|
|
678
|
+
const boundPort = server.port ?? port
|
|
675
679
|
|
|
676
680
|
return {
|
|
677
681
|
host,
|
|
678
|
-
port,
|
|
679
|
-
url: `http://${displayHost}:${
|
|
682
|
+
port: boundPort,
|
|
683
|
+
url: `http://${displayHost}:${boundPort}`,
|
|
680
684
|
async stop() {
|
|
681
685
|
server.stop(true)
|
|
682
686
|
},
|
|
@@ -725,12 +729,20 @@ export class AppPackagesMissingError extends Error {
|
|
|
725
729
|
function builtInRoutesFor(routes: readonly PageRoute[]): BuiltInRouteManifestEntry[] {
|
|
726
730
|
const projectRoutePatterns = new Set(routes.map((route) => routePatternKey(route.path)))
|
|
727
731
|
const builtInRoutes: BuiltInRouteManifestEntry[] = [
|
|
728
|
-
|
|
729
|
-
|
|
732
|
+
{ path: "/threads", moduleSpecifier: builtInPageModule, exportName: "ThreadsPage" },
|
|
733
|
+
{
|
|
734
|
+
path: "/threads/:threadId",
|
|
730
735
|
moduleSpecifier: builtInPageModule,
|
|
731
|
-
exportName: "
|
|
732
|
-
}
|
|
733
|
-
|
|
736
|
+
exportName: "ThreadPage",
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
path: "/agents/:threadId",
|
|
740
|
+
moduleSpecifier: builtInPageModule,
|
|
741
|
+
exportName: "AgentThreadRedirect",
|
|
742
|
+
// It only sends the reader on; the conversation it opens records the view.
|
|
743
|
+
recordsActivity: false,
|
|
744
|
+
},
|
|
745
|
+
// Home starts threads that continue under /threads, so it ships with them.
|
|
734
746
|
{ path: "/", moduleSpecifier: builtInPageModule, exportName: "HomePage" },
|
|
735
747
|
// Every object has a page, outside any section: grants decide who reads it.
|
|
736
748
|
{
|
|
@@ -1049,15 +1061,48 @@ function injectRuntimeConfig(
|
|
|
1049
1061
|
return `${script}\n${html}`
|
|
1050
1062
|
}
|
|
1051
1063
|
|
|
1052
|
-
function htmlResponse(request: Request, html: string): Response {
|
|
1064
|
+
function htmlResponse(request: Request, html: string, apiBaseUrl: string | undefined): Response {
|
|
1053
1065
|
return new Response(request.method === "HEAD" ? null : html, {
|
|
1054
1066
|
headers: {
|
|
1055
1067
|
"content-type": "text/html; charset=utf-8",
|
|
1056
1068
|
"cache-control": "no-store",
|
|
1069
|
+
"content-security-policy": appContentSecurityPolicy(request, apiBaseUrl),
|
|
1057
1070
|
},
|
|
1058
1071
|
})
|
|
1059
1072
|
}
|
|
1060
1073
|
|
|
1074
|
+
/**
|
|
1075
|
+
* The policy of the app's own page: it frames only what the API serves, its artifacts' frames.
|
|
1076
|
+
* A page in one reads its queries' rows as the reader; its frame opens no window, and the frame's
|
|
1077
|
+
* policy keeps what it loads to its files and a few CDNs. This keeps the frame's navigations on the
|
|
1078
|
+
* API's origin too, so a page's code cannot send what it reads to another site in an address.
|
|
1079
|
+
*
|
|
1080
|
+
* It is the only directive: what a project's own pages load is theirs, but a frame they embed from
|
|
1081
|
+
* another site is refused too.
|
|
1082
|
+
*/
|
|
1083
|
+
function appContentSecurityPolicy(request: Request, apiBaseUrl: string | undefined): string {
|
|
1084
|
+
return `frame-src ${frameSource(request, apiBaseUrl)}`
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
/** Where an artifact frame comes from: the API's origin, `'self'` when it is the page's own. */
|
|
1088
|
+
function frameSource(request: Request, apiBaseUrl: string | undefined): string {
|
|
1089
|
+
const { requestOrigin, apiOrigin } = resolveOrigins(request, apiBaseUrl)
|
|
1090
|
+
return apiOrigin === requestOrigin ? "'self'" : apiOrigin
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
function resolveOrigins(
|
|
1094
|
+
request: Request,
|
|
1095
|
+
apiBaseUrl: string | undefined
|
|
1096
|
+
): { readonly requestOrigin: string; readonly apiOrigin: string } {
|
|
1097
|
+
const requestOrigin = new URL(request.url).origin
|
|
1098
|
+
try {
|
|
1099
|
+
return { requestOrigin, apiOrigin: new URL(apiBaseUrl ?? requestOrigin, requestOrigin).origin }
|
|
1100
|
+
} catch {
|
|
1101
|
+
// The browser client reports an invalid runtime URL. Keep the document policy fail-closed.
|
|
1102
|
+
return { requestOrigin, apiOrigin: requestOrigin }
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1061
1106
|
function sharedHtmlResponse(
|
|
1062
1107
|
request: Request,
|
|
1063
1108
|
html: string,
|
|
@@ -1078,13 +1123,7 @@ function secureSharedHtml(
|
|
|
1078
1123
|
options: { readonly apiBaseUrl?: string }
|
|
1079
1124
|
): { readonly html: string; readonly headers: Record<string, string> } {
|
|
1080
1125
|
const nonce = randomBytes(18).toString("base64url")
|
|
1081
|
-
const requestOrigin =
|
|
1082
|
-
let apiOrigin = requestOrigin
|
|
1083
|
-
try {
|
|
1084
|
-
apiOrigin = new URL(options.apiBaseUrl ?? requestOrigin, requestOrigin).origin
|
|
1085
|
-
} catch {
|
|
1086
|
-
// The browser client reports an invalid runtime URL. Keep the document policy fail-closed.
|
|
1087
|
-
}
|
|
1126
|
+
const { requestOrigin, apiOrigin } = resolveOrigins(request, options.apiBaseUrl)
|
|
1088
1127
|
|
|
1089
1128
|
const apiSources = apiOrigin === requestOrigin ? [] : [apiOrigin]
|
|
1090
1129
|
const connectSources = ["'self'", ...apiSources]
|
|
@@ -1104,6 +1143,7 @@ function secureSharedHtml(
|
|
|
1104
1143
|
`media-src ${fileSources.join(" ")}`,
|
|
1105
1144
|
"font-src 'self' data: https:",
|
|
1106
1145
|
`connect-src ${connectSources.join(" ")}`,
|
|
1146
|
+
`frame-src ${frameSource(request, options.apiBaseUrl)}`,
|
|
1107
1147
|
"manifest-src 'none'",
|
|
1108
1148
|
].join("; ")
|
|
1109
1149
|
|
|
@@ -1280,7 +1320,11 @@ function devServerInternalOrigin(host: string, port: number): string {
|
|
|
1280
1320
|
|
|
1281
1321
|
function spaHtmlRoute(
|
|
1282
1322
|
internalOrigin: () => string,
|
|
1283
|
-
options: {
|
|
1323
|
+
options: {
|
|
1324
|
+
readonly shellRoute?: string
|
|
1325
|
+
readonly transformHtml?: (html: string) => string
|
|
1326
|
+
readonly apiBaseUrl?: string
|
|
1327
|
+
} = {}
|
|
1284
1328
|
): BunServeRoute {
|
|
1285
1329
|
return getHeadRoute(async (request) => {
|
|
1286
1330
|
const publicUrl = new URL(request.url)
|
|
@@ -1313,6 +1357,10 @@ function spaHtmlRoute(
|
|
|
1313
1357
|
const responseHeaders = new Headers(bundleResponse.headers)
|
|
1314
1358
|
responseHeaders.delete("content-length")
|
|
1315
1359
|
responseHeaders.delete("etag")
|
|
1360
|
+
responseHeaders.set(
|
|
1361
|
+
"content-security-policy",
|
|
1362
|
+
appContentSecurityPolicy(request, options.apiBaseUrl)
|
|
1363
|
+
)
|
|
1316
1364
|
if (request.method === "HEAD") {
|
|
1317
1365
|
return new Response(null, {
|
|
1318
1366
|
status: bundleResponse.status,
|
package/src/index.ts
CHANGED
|
@@ -11,13 +11,87 @@
|
|
|
11
11
|
|
|
12
12
|
export { agentContext } from "@sixb/core/agents/context"
|
|
13
13
|
export type { ModelReasoningLevel } from "@sixb/core/models"
|
|
14
|
-
export {
|
|
14
|
+
export {
|
|
15
|
+
AgentContextProvider,
|
|
16
|
+
useAgentContext,
|
|
17
|
+
useRegisteredAgentContext,
|
|
18
|
+
} from "./agent/agent-context-provider"
|
|
15
19
|
export { AgentPanel, type AgentPanelProps } from "./agent/agent-panel"
|
|
16
20
|
export { AgentSurface, type AgentSurfaceMode, type AgentSurfaceProps } from "./agent/agent-surface"
|
|
17
21
|
export { setAgentSurfaceMode } from "./agent/agent-surface-state"
|
|
22
|
+
export {
|
|
23
|
+
type AgentApproval,
|
|
24
|
+
type AgentApprovalDecided,
|
|
25
|
+
type AgentApprovalDecision,
|
|
26
|
+
AgentApprovalDecisionError,
|
|
27
|
+
type AgentApprovalDecisionFailure,
|
|
28
|
+
type AgentApprovalMode,
|
|
29
|
+
} from "./agent/approvals"
|
|
30
|
+
export { ArtifactPanelRoot, type ArtifactPanelRootProps } from "./agent/artifact-panel"
|
|
31
|
+
export {
|
|
32
|
+
AgentMessageBody,
|
|
33
|
+
type AgentMessageBodyProps,
|
|
34
|
+
AgentToolPart,
|
|
35
|
+
type AgentToolPartProps,
|
|
36
|
+
} from "./agent/components/agent-message-body"
|
|
37
|
+
export {
|
|
38
|
+
AgentThreads,
|
|
39
|
+
type AgentThreadsProps,
|
|
40
|
+
} from "./agent/components/agent-threads"
|
|
18
41
|
export { Composer, type ComposerProps } from "./agent/components/composer"
|
|
42
|
+
export { ContextChips, type ContextChipsProps } from "./agent/components/context-chips"
|
|
43
|
+
export {
|
|
44
|
+
ContextPicker,
|
|
45
|
+
type ContextPickerProps,
|
|
46
|
+
type ContextPickerResult,
|
|
47
|
+
} from "./agent/components/context-picker"
|
|
48
|
+
export { ModelControls, type ModelControlsProps } from "./agent/components/model-controls"
|
|
49
|
+
export { ProviderLogo, type ProviderLogoProps } from "./agent/components/provider-logo"
|
|
50
|
+
export {
|
|
51
|
+
ReasoningEffortSlider,
|
|
52
|
+
type ReasoningEffortSliderProps,
|
|
53
|
+
} from "./agent/components/reasoning-effort-slider"
|
|
54
|
+
export { SandboxRecovery, type SandboxRecoveryProps } from "./agent/components/sandbox-recovery"
|
|
55
|
+
export { ThreadArtifactsMenu } from "./agent/components/thread-artifacts-menu"
|
|
56
|
+
export {
|
|
57
|
+
ThreadsButton,
|
|
58
|
+
type ThreadsButtonProps,
|
|
59
|
+
} from "./agent/components/threads-button"
|
|
60
|
+
export { Transcript, type TranscriptProps } from "./agent/components/transcript"
|
|
61
|
+
export type {
|
|
62
|
+
AgentConversationAuthor,
|
|
63
|
+
AgentConversationDiagnostic,
|
|
64
|
+
AgentConversationFile,
|
|
65
|
+
AgentConversationMessage,
|
|
66
|
+
AgentConversationPart,
|
|
67
|
+
AgentConversationToolPart,
|
|
68
|
+
AgentConversationTurn,
|
|
69
|
+
AgentFileSource,
|
|
70
|
+
} from "./agent/conversation"
|
|
71
|
+
export {
|
|
72
|
+
type AgentConversation,
|
|
73
|
+
type AgentConversationMessagesError,
|
|
74
|
+
type AgentConversationSendError,
|
|
75
|
+
type ConversationComposerProps,
|
|
76
|
+
type UseAgentConversationInput,
|
|
77
|
+
useAgentConversation,
|
|
78
|
+
} from "./agent/hooks/use-agent-conversation"
|
|
19
79
|
export { AgentChatPage, type AgentChatPageProps } from "./agent/react-router"
|
|
20
|
-
export
|
|
80
|
+
export {
|
|
81
|
+
type AgentToolView,
|
|
82
|
+
type AgentToolViewPlacement,
|
|
83
|
+
type AgentToolViewProps,
|
|
84
|
+
defineAgentToolView,
|
|
85
|
+
} from "./agent/tool-views/define"
|
|
86
|
+
export type {
|
|
87
|
+
AgentContextEntryInput,
|
|
88
|
+
AgentFileRef,
|
|
89
|
+
AgentMessage,
|
|
90
|
+
AgentRun,
|
|
91
|
+
AgentThread,
|
|
92
|
+
LanguageModel,
|
|
93
|
+
} from "./agent/types"
|
|
94
|
+
export type { ArtifactTarget } from "./artifacts/target"
|
|
21
95
|
export type { AuthExperienceActions, AuthExperienceProps, AuthExperienceState } from "./auth"
|
|
22
96
|
export type { AppMetadata } from "./metadata"
|
|
23
97
|
export { SyncButton, type SyncButtonProps } from "./pages/data/sync-button"
|
package/src/locale-messages.ts
CHANGED
|
@@ -75,6 +75,7 @@ export const en = {
|
|
|
75
75
|
pages: {
|
|
76
76
|
personal: "Personal",
|
|
77
77
|
developers: "Developers",
|
|
78
|
+
memory: "Memory",
|
|
78
79
|
members: "Members",
|
|
79
80
|
"service-accounts": "Service accounts",
|
|
80
81
|
},
|
|
@@ -171,6 +172,7 @@ export const fr: Translation<AppMessages> = {
|
|
|
171
172
|
pages: {
|
|
172
173
|
personal: "Personnel",
|
|
173
174
|
developers: "Développeurs",
|
|
175
|
+
memory: "Mémoire",
|
|
174
176
|
members: "Membres",
|
|
175
177
|
"service-accounts": "Comptes de service",
|
|
176
178
|
},
|
package/src/metadata.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { createHash } from "node:crypto"
|
|
2
2
|
import { readFile, stat } from "node:fs/promises"
|
|
3
3
|
import { createRequire } from "node:module"
|
|
4
|
-
import { extname, join } from "node:path"
|
|
4
|
+
import { dirname, extname, join, sep } from "node:path"
|
|
5
5
|
import { pathToFileURL } from "node:url"
|
|
6
|
+
import { agentToolViews } from "./agent/tool-views/define"
|
|
6
7
|
import { sectionIds } from "./sections/catalog"
|
|
7
8
|
|
|
8
9
|
export interface AppMetadata {
|
|
@@ -123,14 +124,26 @@ async function loadConfiguredMetadata(layoutPath: string): Promise<AppMetadata>
|
|
|
123
124
|
// Bun currently canonicalizes file-URL query strings in its module cache.
|
|
124
125
|
// Explicit invalidation makes the source fingerprint a reliable dev cache
|
|
125
126
|
// buster while retaining a normal file URL and relative import behavior.
|
|
126
|
-
|
|
127
|
+
// The layout's own imports are cached too: the tool views it lists live in
|
|
128
|
+
// their own files, and a view fixed after a failed check must be read again.
|
|
129
|
+
const appDir = dirname(metadataRequire.resolve(layoutPath)) + sep
|
|
130
|
+
for (const modulePath of Object.keys(metadataRequire.cache)) {
|
|
131
|
+
if (modulePath.startsWith(appDir)) delete metadataRequire.cache[modulePath]
|
|
132
|
+
}
|
|
133
|
+
|
|
127
134
|
url.searchParams.set("sixb-metadata", sourceHash)
|
|
128
135
|
const layoutModule = (await import(url.href)) as {
|
|
129
136
|
readonly metadata?: unknown
|
|
130
137
|
readonly visibility?: unknown
|
|
138
|
+
readonly toolViews?: unknown
|
|
131
139
|
}
|
|
132
|
-
// The browser reads `visibility` itself; checking
|
|
140
|
+
// The browser reads `visibility` and `toolViews` itself; checking them here makes a mistake
|
|
141
|
+
// fail the build.
|
|
133
142
|
validateVisibility(layoutModule.visibility, layoutPath)
|
|
143
|
+
agentToolViews(
|
|
144
|
+
layoutModule.toolViews,
|
|
145
|
+
(detail) => new Error(`[SixbCustomApp] Invalid toolViews in ${layoutPath}: ${detail}`)
|
|
146
|
+
)
|
|
134
147
|
|
|
135
148
|
if (layoutModule.metadata === undefined) {
|
|
136
149
|
return {}
|
package/src/pages/home.tsx
CHANGED
|
@@ -3,6 +3,7 @@ import { useQuery } from "@tanstack/react-query"
|
|
|
3
3
|
import { useState } from "react"
|
|
4
4
|
import { useNavigate } from "react-router-dom"
|
|
5
5
|
import { AgentChat } from "../agent/agent-chat"
|
|
6
|
+
import { THREADS_PATH, threadPath } from "../agent/thread-navigation"
|
|
6
7
|
import { useAppMessages } from "../locale"
|
|
7
8
|
import { readDocumentIdentity } from "../shell/brand"
|
|
8
9
|
import { Mosaic } from "./mosaic"
|
|
@@ -27,7 +28,8 @@ export function HomePage() {
|
|
|
27
28
|
threadId={null}
|
|
28
29
|
welcomeContent={<Welcome />}
|
|
29
30
|
onNavigateHome={() => navigate("/")}
|
|
30
|
-
onNavigateThread={(threadId) => navigate(
|
|
31
|
+
onNavigateThread={(threadId) => navigate(threadPath(threadId))}
|
|
32
|
+
onOpenThreads={() => navigate(THREADS_PATH)}
|
|
31
33
|
/>
|
|
32
34
|
) : (
|
|
33
35
|
<Empty />
|
|
@@ -145,7 +145,11 @@ export function ObservabilityActionRunPage() {
|
|
|
145
145
|
|
|
146
146
|
{run.error ? (
|
|
147
147
|
<PageSection
|
|
148
|
-
title={
|
|
148
|
+
title={
|
|
149
|
+
run.error.code === "action.rejected"
|
|
150
|
+
? messages.action.rejected
|
|
151
|
+
: messages.action.failedIn(messages.action.phases[run.error.details.phase])
|
|
152
|
+
}
|
|
149
153
|
>
|
|
150
154
|
<Panel>
|
|
151
155
|
<div className="px-5 py-4">
|
|
@@ -79,6 +79,14 @@ export const en = {
|
|
|
79
79
|
count: (count: number, formatted: string) =>
|
|
80
80
|
plural("en", count, { one: "1 step", other: `${formatted} steps` }),
|
|
81
81
|
},
|
|
82
|
+
openConversation: "Open the conversation, read-only",
|
|
83
|
+
},
|
|
84
|
+
thread: {
|
|
85
|
+
untitled: "Untitled conversation",
|
|
86
|
+
denied:
|
|
87
|
+
"Reading other users' conversations takes can.observe(agent.threads) in one of your roles.",
|
|
88
|
+
by: (name: string) => `${name}'s conversation`,
|
|
89
|
+
readOnly: "Read-only",
|
|
82
90
|
},
|
|
83
91
|
connection: {
|
|
84
92
|
label: "Connection",
|
|
@@ -208,6 +216,14 @@ export const fr: Translation<ActivityMessages> = {
|
|
|
208
216
|
count: (count: number, formatted: string) =>
|
|
209
217
|
plural("fr", count, { one: `${formatted} étape`, other: `${formatted} étapes` }),
|
|
210
218
|
},
|
|
219
|
+
openConversation: "Ouvrir la conversation, en lecture seule",
|
|
220
|
+
},
|
|
221
|
+
thread: {
|
|
222
|
+
untitled: "Conversation sans titre",
|
|
223
|
+
denied:
|
|
224
|
+
"Lire les conversations des autres utilisateurs demande can.observe(agent.threads) dans l’un de vos rôles.",
|
|
225
|
+
by: (name: string) => `Conversation de ${name}`,
|
|
226
|
+
readOnly: "Lecture seule",
|
|
211
227
|
},
|
|
212
228
|
connection: {
|
|
213
229
|
label: "Connexion",
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { getObservedAgentThreadOptions } from "@sixb/client/hooks"
|
|
2
|
+
import { useQuery } from "@tanstack/react-query"
|
|
3
|
+
import { Bot } from "lucide-react"
|
|
4
|
+
import { useCallback, useMemo } from "react"
|
|
5
|
+
import { useLocation, useParams, useSearchParams } from "react-router-dom"
|
|
6
|
+
import { ThreadArtifactsMenu } from "../../../agent/components/thread-artifacts-menu"
|
|
7
|
+
import {
|
|
8
|
+
ObservedConversation,
|
|
9
|
+
observedThreadPollMs,
|
|
10
|
+
useObservedAuthors,
|
|
11
|
+
} from "../../../agent/observed-conversation"
|
|
12
|
+
import {
|
|
13
|
+
type ArtifactTarget,
|
|
14
|
+
artifactTargetFromSearch,
|
|
15
|
+
withArtifactTarget,
|
|
16
|
+
} from "../../../artifacts/target"
|
|
17
|
+
import { SectionPage, SectionWorkspace, WorkspaceHeader } from "../../section-page"
|
|
18
|
+
import {
|
|
19
|
+
IconTile,
|
|
20
|
+
MetaDot,
|
|
21
|
+
Panel,
|
|
22
|
+
PanelEmpty,
|
|
23
|
+
PanelSkeleton,
|
|
24
|
+
Pill,
|
|
25
|
+
useLoadFailure,
|
|
26
|
+
useNumbers,
|
|
27
|
+
} from "../../section-ui"
|
|
28
|
+
import { useActivityMessages } from "./messages"
|
|
29
|
+
|
|
30
|
+
const ACTIVITY_HREF = "/observability/activity"
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Observability › Activity › a conversation: someone else's thread with the Agent, read-only, with
|
|
34
|
+
* `can.observe(agent.threads)`. It never joins the reader's own threads.
|
|
35
|
+
*/
|
|
36
|
+
export function ObservabilityAgentThreadPage() {
|
|
37
|
+
const messages = useActivityMessages()
|
|
38
|
+
const { count } = useNumbers()
|
|
39
|
+
const threadId = useParams().threadId ?? ""
|
|
40
|
+
const location = useLocation()
|
|
41
|
+
const back = { href: backHref(location.state), label: messages.title }
|
|
42
|
+
|
|
43
|
+
const threadQuery = useQuery({
|
|
44
|
+
...getObservedAgentThreadOptions({ path: { threadId } }),
|
|
45
|
+
retry: false,
|
|
46
|
+
refetchInterval: (query) =>
|
|
47
|
+
observedThreadPollMs(query.state.status, query.state.data?.activeRunId),
|
|
48
|
+
})
|
|
49
|
+
const thread = threadQuery.data
|
|
50
|
+
const authors = useObservedAuthors(threadId)
|
|
51
|
+
const failure = useLoadFailure(threadQuery.error, {
|
|
52
|
+
id: threadId,
|
|
53
|
+
denied: messages.thread.denied,
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
// The open artifact lives in `?artifact=&v=&part=`, as on the agent's own page. Opening one keeps
|
|
57
|
+
// the state that leads back to the visit.
|
|
58
|
+
const [searchParams, setSearchParams] = useSearchParams()
|
|
59
|
+
const searchKey = searchParams.toString()
|
|
60
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: the key stands for the parameters.
|
|
61
|
+
const artifactTarget = useMemo(() => artifactTargetFromSearch(searchParams), [searchKey])
|
|
62
|
+
const onArtifactTargetChange = useCallback(
|
|
63
|
+
(target: ArtifactTarget | null) => {
|
|
64
|
+
setSearchParams((current) => withArtifactTarget(current, target), {
|
|
65
|
+
replace: target === null,
|
|
66
|
+
state: location.state,
|
|
67
|
+
})
|
|
68
|
+
},
|
|
69
|
+
[setSearchParams, location.state]
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
if (!thread || threadQuery.isError) {
|
|
73
|
+
return (
|
|
74
|
+
<SectionPage
|
|
75
|
+
section="observability"
|
|
76
|
+
page="activity"
|
|
77
|
+
back={back}
|
|
78
|
+
title={threadQuery.error ? failure.title : messages.thread.untitled}
|
|
79
|
+
>
|
|
80
|
+
<Panel>
|
|
81
|
+
{threadQuery.error ? (
|
|
82
|
+
<PanelEmpty
|
|
83
|
+
tone="error"
|
|
84
|
+
icon={Bot}
|
|
85
|
+
title={failure.title}
|
|
86
|
+
description={failure.description}
|
|
87
|
+
/>
|
|
88
|
+
) : (
|
|
89
|
+
<PanelSkeleton rows={2} />
|
|
90
|
+
)}
|
|
91
|
+
</Panel>
|
|
92
|
+
</SectionPage>
|
|
93
|
+
)
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const owner = thread.ownerPrincipal
|
|
97
|
+
const ownerName = authors.get(`${owner.type}:${owner.id}`) ?? owner.id
|
|
98
|
+
|
|
99
|
+
return (
|
|
100
|
+
<SectionWorkspace section="observability" page="activity">
|
|
101
|
+
<WorkspaceHeader
|
|
102
|
+
back={back}
|
|
103
|
+
icon={<IconTile icon={Bot} />}
|
|
104
|
+
title={thread.title?.trim() || messages.thread.untitled}
|
|
105
|
+
meta={
|
|
106
|
+
<>
|
|
107
|
+
<span className="truncate">{messages.thread.by(ownerName)}</span>
|
|
108
|
+
<MetaDot />
|
|
109
|
+
<span className="shrink-0">
|
|
110
|
+
{messages.visit.messages(thread.messageCount, count(thread.messageCount))}
|
|
111
|
+
</span>
|
|
112
|
+
</>
|
|
113
|
+
}
|
|
114
|
+
actions={
|
|
115
|
+
<>
|
|
116
|
+
{/* The conversation's artifacts, which an observer reads too. */}
|
|
117
|
+
<ThreadArtifactsMenu
|
|
118
|
+
threadId={thread.id}
|
|
119
|
+
onOpen={onArtifactTargetChange}
|
|
120
|
+
withGallery={false}
|
|
121
|
+
/>
|
|
122
|
+
|
|
123
|
+
{/* On a phone the title needs the room; the notice under the conversation says it too. */}
|
|
124
|
+
<span className="max-sm:hidden">
|
|
125
|
+
<Pill tone="muted">{messages.thread.readOnly}</Pill>
|
|
126
|
+
</span>
|
|
127
|
+
</>
|
|
128
|
+
}
|
|
129
|
+
/>
|
|
130
|
+
{/* The workspace's height is a minimum, which a chat's scroller cannot fill by percentage. */}
|
|
131
|
+
<div className="relative min-h-0 flex-1">
|
|
132
|
+
<div className="absolute inset-0">
|
|
133
|
+
<ObservedConversation
|
|
134
|
+
thread={thread}
|
|
135
|
+
artifactTarget={artifactTarget}
|
|
136
|
+
onArtifactTargetChange={onArtifactTargetChange}
|
|
137
|
+
/>
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
</SectionWorkspace>
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/** Back to the activity view the reader came from, with its period, user and visit. */
|
|
145
|
+
function backHref(state: unknown): string {
|
|
146
|
+
const from =
|
|
147
|
+
typeof state === "object" && state !== null && "from" in state ? state.from : undefined
|
|
148
|
+
|
|
149
|
+
return typeof from === "string" && from.startsWith(ACTIVITY_HREF) ? from : ACTIVITY_HREF
|
|
150
|
+
}
|