@sixb/app 0.1.13 → 0.1.14
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-0yb22w6m.js +1487 -0
- package/dist/chunk-0yb22w6m.js.map +18 -0
- package/dist/{chunk-c7gy61rx.js → chunk-1rhht9y0.js} +165 -4
- package/dist/chunk-1rhht9y0.js.map +10 -0
- package/dist/{chunk-gn3k23q5.js → chunk-53z5653y.js} +64 -3
- package/dist/chunk-53z5653y.js.map +11 -0
- package/dist/chunk-aes17xmx.js +29190 -0
- package/dist/chunk-aes17xmx.js.map +172 -0
- package/dist/{chunk-g3f4cm8x.js → chunk-k4epnkcr.js} +1 -1
- package/dist/{chunk-ng0hdnrq.js → chunk-sw3pyqgy.js} +3 -1
- package/dist/chunk-sw3pyqgy.js.map +10 -0
- package/dist/{chunk-3schcf10.js → chunk-vtp6nk44.js} +1 -1
- 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 +40 -7
- package/dist/index.js.map +3 -3
- 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 +6729 -4370
- package/dist/pages.js.map +32 -26
- package/dist/sections/catalog.d.ts.map +1 -1
- package/dist/sections/sections.d.ts.map +1 -1
- package/dist/server.js +68 -39
- 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 +92 -104
- package/src/agent/agent-context-provider.tsx +1 -0
- package/src/agent/agent.css +82 -0
- package/src/agent/approvals.ts +268 -0
- package/src/agent/artifact-panel.tsx +22 -13
- 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/agent-message-body.tsx +56 -0
- package/src/agent/components/agent-thread-switcher.tsx +216 -43
- package/src/agent/components/approval-card.tsx +840 -0
- package/src/agent/components/approval-mode-chip.tsx +227 -0
- package/src/agent/components/auto-model-chip.tsx +283 -0
- package/src/agent/components/composer.tsx +73 -3
- package/src/agent/components/context-chips.tsx +5 -6
- package/src/agent/components/conversation-panel.tsx +27 -149
- package/src/agent/components/message-parts.tsx +169 -54
- package/src/agent/components/message-view.tsx +114 -167
- package/src/agent/components/model-controls.tsx +29 -3
- package/src/agent/components/model-picker-row.tsx +22 -4
- package/src/agent/components/participant-input.tsx +165 -0
- package/src/agent/components/provider-logo.tsx +6 -1
- package/src/agent/components/reasoning-effort-slider.tsx +10 -8
- 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 +521 -0
- package/src/agent/components/transcript.tsx +314 -147
- package/src/agent/conversation.ts +634 -0
- package/src/agent/delegation/child-card.tsx +398 -0
- package/src/agent/delegation/child-cards.tsx +144 -0
- package/src/agent/delegation/child-group.tsx +150 -0
- package/src/agent/delegation/child-parts.tsx +321 -0
- package/src/agent/delegation/child-work.tsx +244 -0
- package/src/agent/delegation/context.ts +28 -0
- package/src/agent/delegation/interpret.ts +407 -0
- package/src/agent/delegation/model.ts +159 -0
- package/src/agent/delegation/use-children.ts +235 -0
- package/src/agent/hooks/use-agent-conversation.ts +856 -93
- package/src/agent/hooks/use-thread-sharing.ts +197 -0
- package/src/agent/i18n/en.ts +322 -0
- package/src/agent/i18n/fr.ts +334 -0
- 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/read/interpret.ts +18 -0
- package/src/agent/read/read-tool-view.tsx +2 -2
- package/src/agent/run-presentation.ts +37 -1
- package/src/agent/sharing.ts +95 -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 +59 -18
- package/src/index.ts +72 -2
- package/src/locale-messages.ts +2 -0
- package/src/metadata.ts +16 -3
- 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 +61 -18
- 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 +559 -0
- package/src/pages/settings/memory.tsx +993 -0
- package/src/pages/settings/messages.ts +232 -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 +65 -10
- package/src/pages.ts +16 -26
- package/src/sections/catalog.ts +18 -1
- package/src/sections/sections.tsx +2 -0
- 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/dist/{chunk-g3f4cm8x.js.map → chunk-k4epnkcr.js.map} +0 -0
- /package/dist/{chunk-3schcf10.js.map → chunk-vtp6nk44.js.map} +0 -0
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import type { DecideAgentApprovalResponse, ListAgentThreadApprovalsResponse } from "@sixb/client"
|
|
2
|
+
import { createContext, useContext } from "react"
|
|
3
|
+
import type { AgentConversationMessage } from "./conversation"
|
|
4
|
+
import type { NormalizedPart } from "./parts"
|
|
5
|
+
import type { AgentMessage, AgentRun } from "./types"
|
|
6
|
+
|
|
7
|
+
/** A call the agent made that waits, or waited, for its requester's decision. */
|
|
8
|
+
export type AgentApproval = ListAgentThreadApprovalsResponse["approvals"][number]
|
|
9
|
+
|
|
10
|
+
export type AgentApprovalStatus = AgentApproval["status"]
|
|
11
|
+
|
|
12
|
+
/** What the agent may change without asking, from the strictest. */
|
|
13
|
+
export const AGENT_APPROVAL_MODES = ["manual", "accept-edits", "auto"] as const
|
|
14
|
+
|
|
15
|
+
export type AgentApprovalMode = (typeof AGENT_APPROVAL_MODES)[number]
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The mode Shift+Tab switches to: between Manual and Accept edits only. Auto is chosen from the menu,
|
|
19
|
+
* never reached by a key pressed in passing; from Auto, the key goes back to Manual.
|
|
20
|
+
*/
|
|
21
|
+
export function toggledApprovalMode(mode: AgentApprovalMode): AgentApprovalMode {
|
|
22
|
+
return mode === "manual" ? "accept-edits" : "manual"
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** From least to most allowed. */
|
|
26
|
+
const APPROVAL_MODE_RANK: Readonly<Record<AgentApprovalMode, number>> = {
|
|
27
|
+
manual: 0,
|
|
28
|
+
"accept-edits": 1,
|
|
29
|
+
auto: 2,
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** Whether a turn in `mode` runs this call without asking. */
|
|
33
|
+
export function approvalModeAllows(mode: AgentApprovalMode, call: AgentApproval["call"]): boolean {
|
|
34
|
+
return APPROVAL_MODE_RANK[mode] >= APPROVAL_MODE_RANK[alwaysAllowMode(call)]
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** The mode "Always allow" leaves its requester in: the least that runs such a call. */
|
|
38
|
+
export function alwaysAllowMode(call: AgentApproval["call"]): AgentApprovalMode {
|
|
39
|
+
return call.kind === "action" && call.effect === "ontology" ? "accept-edits" : "auto"
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** A turn that ended on calls waiting for its requester. It resumes once they decide. */
|
|
43
|
+
export function isAwaitingApproval(run: Pick<AgentRun, "status" | "finishReason"> | null): boolean {
|
|
44
|
+
return run?.status === "succeeded" && run.finishReason === "awaiting_approval"
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** The call a held command names, as the API answered it: enough to show it before its record. */
|
|
48
|
+
export type HeldCall =
|
|
49
|
+
| {
|
|
50
|
+
readonly id: string
|
|
51
|
+
readonly kind: "action"
|
|
52
|
+
readonly actionId: string
|
|
53
|
+
readonly subject?: { readonly objectTypeId: string; readonly primaryId: string }
|
|
54
|
+
}
|
|
55
|
+
| { readonly id: string; readonly kind: "workflow"; readonly workflowId: string }
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* The calls a `bash` output says are waiting for approval. The CLI prints the API's 202 answer as
|
|
59
|
+
* one JSON line and exits 4, but the output is the model's to shape, so every line is read and the
|
|
60
|
+
* exit code is not trusted: only the approval's record says what waits, and a line that names no
|
|
61
|
+
* record shows nothing to act on.
|
|
62
|
+
*/
|
|
63
|
+
export function heldCallsInOutput(output: unknown): HeldCall[] {
|
|
64
|
+
if (!isRecord(output) || typeof output.stdout !== "string") return []
|
|
65
|
+
|
|
66
|
+
return output.stdout.split("\n").flatMap((line): HeldCall[] => {
|
|
67
|
+
const trimmed = line.trim()
|
|
68
|
+
if (!trimmed.startsWith("{")) return []
|
|
69
|
+
|
|
70
|
+
const parsed = parseJson(trimmed)
|
|
71
|
+
if (!isRecord(parsed) || parsed.status !== "awaiting_approval") return []
|
|
72
|
+
|
|
73
|
+
const held = heldCall(parsed.approval)
|
|
74
|
+
return held ? [held] : []
|
|
75
|
+
})
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** The held calls of an assistant message's tools, in the order they were made. */
|
|
79
|
+
export function heldCallsInParts(parts: readonly NormalizedPart[]): HeldCall[] {
|
|
80
|
+
const seen = new Set<string>()
|
|
81
|
+
|
|
82
|
+
return parts.flatMap((part) => {
|
|
83
|
+
if (part.kind !== "tool" || part.tool.toolName !== "bash") return []
|
|
84
|
+
if (part.tool.state !== "output-available") return []
|
|
85
|
+
|
|
86
|
+
return heldCallsInOutput(part.tool.output).filter((call) => {
|
|
87
|
+
if (seen.has(call.id)) return false
|
|
88
|
+
seen.add(call.id)
|
|
89
|
+
return true
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** The ids of the held calls the transcript's replies, saved or streaming, already show a card for. */
|
|
95
|
+
export function heldCallIdsInMessages(
|
|
96
|
+
messages: readonly AgentConversationMessage[]
|
|
97
|
+
): ReadonlySet<string> {
|
|
98
|
+
const ids = new Set<string>()
|
|
99
|
+
for (const message of messages) {
|
|
100
|
+
if (message.role !== "assistant") continue
|
|
101
|
+
|
|
102
|
+
for (const part of message.parts) {
|
|
103
|
+
if (part.type !== "tool" || part.toolName !== "bash") continue
|
|
104
|
+
if (part.state !== "output-available") continue
|
|
105
|
+
|
|
106
|
+
for (const call of heldCallsInOutput(part.output)) ids.add(call.id)
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return ids
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* A user message Sixb wrote to resume a turn: it carries only how the held calls ended, which the
|
|
114
|
+
* transcript shows on their cards.
|
|
115
|
+
*/
|
|
116
|
+
export function isApprovalOutcomeMessage(message: AgentMessage): boolean {
|
|
117
|
+
return (
|
|
118
|
+
message.role === "user" &&
|
|
119
|
+
message.parts.length > 0 &&
|
|
120
|
+
message.parts.every((part) => part.type === "approval-outcome")
|
|
121
|
+
)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** A held call as its card names it, from its record. */
|
|
125
|
+
export function heldCallOf(approval: AgentApproval): HeldCall {
|
|
126
|
+
const call = approval.call
|
|
127
|
+
if (call.kind === "workflow") {
|
|
128
|
+
return { id: approval.id, kind: "workflow", workflowId: call.workflowId }
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return {
|
|
132
|
+
id: approval.id,
|
|
133
|
+
kind: "action",
|
|
134
|
+
actionId: call.actionId,
|
|
135
|
+
...(call.subject.kind === "object"
|
|
136
|
+
? { subject: { objectTypeId: call.subject.objectTypeId, primaryId: call.subject.primaryId } }
|
|
137
|
+
: {}),
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/** How a call the transcript holds no record of ended, from the message that told the agent. */
|
|
142
|
+
export interface ReportedApprovalOutcome {
|
|
143
|
+
readonly status: Exclude<AgentApprovalStatus, "pending">
|
|
144
|
+
readonly outcome?: AgentApproval["outcome"]
|
|
145
|
+
/** The sub-agent that made it, when the turn did not. */
|
|
146
|
+
readonly caller?: AgentApproval["caller"]
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* How each held call ended, as the messages that resumed or followed its turn told the agent. A
|
|
151
|
+
* reader without the thread's approvals, such as an observer, still sees each card's outcome.
|
|
152
|
+
*/
|
|
153
|
+
export function reportedApprovalOutcomes(
|
|
154
|
+
messages: readonly AgentMessage[]
|
|
155
|
+
): ReadonlyMap<string, ReportedApprovalOutcome> {
|
|
156
|
+
const outcomes = new Map<string, ReportedApprovalOutcome>()
|
|
157
|
+
for (const message of messages) {
|
|
158
|
+
for (const part of message.parts) {
|
|
159
|
+
if (part.type !== "approval-outcome") continue
|
|
160
|
+
outcomes.set(part.approvalId, {
|
|
161
|
+
status: part.status,
|
|
162
|
+
...(part.outcome === undefined
|
|
163
|
+
? {}
|
|
164
|
+
: { outcome: part.outcome as AgentApproval["outcome"] }),
|
|
165
|
+
...(part.caller === undefined ? {} : { caller: part.caller }),
|
|
166
|
+
})
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return outcomes
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/** What a decision sends: approve, optionally for good in this thread, or deny. */
|
|
173
|
+
export interface AgentApprovalDecision {
|
|
174
|
+
readonly decision: "approve" | "deny"
|
|
175
|
+
readonly always?: true
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/** A decision that went through. `resume` says why the turn did not continue, when it did not. */
|
|
179
|
+
export type AgentApprovalDecided = Pick<DecideAgentApprovalResponse, "approval" | "resume">
|
|
180
|
+
|
|
181
|
+
/** Why a decision did not go through, as the card tells it. */
|
|
182
|
+
export type AgentApprovalDecisionFailure =
|
|
183
|
+
| "expired"
|
|
184
|
+
/** Someone, on another device, decided first. */
|
|
185
|
+
| "decided"
|
|
186
|
+
| "failed"
|
|
187
|
+
|
|
188
|
+
/** A decision that did not go through; nothing ran. */
|
|
189
|
+
export class AgentApprovalDecisionError extends Error {
|
|
190
|
+
readonly name = "AgentApprovalDecisionError"
|
|
191
|
+
|
|
192
|
+
constructor(readonly code: AgentApprovalDecisionFailure) {
|
|
193
|
+
super(`[SixbApp] The approval decision did not go through: ${code}.`)
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/** The held calls of a conversation, as its transcript shows and answers them. */
|
|
198
|
+
export interface TranscriptApprovals {
|
|
199
|
+
/** The thread's held calls, oldest first. */
|
|
200
|
+
readonly approvals: readonly AgentApproval[]
|
|
201
|
+
/** False until the first read: a card shows what its command said meanwhile. */
|
|
202
|
+
readonly loaded: boolean
|
|
203
|
+
/** Whether the reader decides on this one: only whoever asked for its turn does. */
|
|
204
|
+
readonly canDecide: (approval: AgentApproval) => boolean
|
|
205
|
+
/** Who decides on it, by name, for the others. */
|
|
206
|
+
readonly requesterName: (approval: AgentApproval) => string
|
|
207
|
+
/**
|
|
208
|
+
* Whether the reader may stop the turn paused on this call: its requester, or the thread's owner.
|
|
209
|
+
* Stopping sets all of the turn's waiting calls aside, and the turn does not resume.
|
|
210
|
+
*/
|
|
211
|
+
readonly canStop?: (approval: AgentApproval) => boolean
|
|
212
|
+
/** Stop the paused turn; rejects when it could not. */
|
|
213
|
+
readonly stop?: (approval: AgentApproval) => Promise<void>
|
|
214
|
+
/** Rejects with an {@link AgentApprovalDecisionError} when nothing was decided. */
|
|
215
|
+
readonly decide?: (
|
|
216
|
+
approval: AgentApproval,
|
|
217
|
+
decision: AgentApprovalDecision
|
|
218
|
+
) => Promise<AgentApprovalDecided>
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/** What the cards of a transcript read: its approvals when it has them, and the reported outcomes. */
|
|
222
|
+
export interface ApprovalCardsContext {
|
|
223
|
+
readonly approvals: TranscriptApprovals | null
|
|
224
|
+
readonly outcomes: ReadonlyMap<string, ReportedApprovalOutcome>
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export const ApprovalCardsContext = createContext<ApprovalCardsContext>({
|
|
228
|
+
approvals: null,
|
|
229
|
+
outcomes: new Map(),
|
|
230
|
+
})
|
|
231
|
+
|
|
232
|
+
export function useApprovalCards(): ApprovalCardsContext {
|
|
233
|
+
return useContext(ApprovalCardsContext)
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
function heldCall(value: unknown): HeldCall | null {
|
|
237
|
+
if (!isRecord(value) || typeof value.id !== "string" || value.id.length === 0) return null
|
|
238
|
+
|
|
239
|
+
if (value.kind === "workflow" && typeof value.workflowId === "string") {
|
|
240
|
+
return { id: value.id, kind: "workflow", workflowId: value.workflowId }
|
|
241
|
+
}
|
|
242
|
+
if (value.kind !== "action" || typeof value.actionId !== "string") return null
|
|
243
|
+
|
|
244
|
+
const subject = value.subject
|
|
245
|
+
return {
|
|
246
|
+
id: value.id,
|
|
247
|
+
kind: "action",
|
|
248
|
+
actionId: value.actionId,
|
|
249
|
+
...(isRecord(subject) &&
|
|
250
|
+
subject.kind === "object" &&
|
|
251
|
+
typeof subject.objectTypeId === "string" &&
|
|
252
|
+
typeof subject.primaryId === "string"
|
|
253
|
+
? { subject: { objectTypeId: subject.objectTypeId, primaryId: subject.primaryId } }
|
|
254
|
+
: {}),
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
function parseJson(text: string): unknown {
|
|
259
|
+
try {
|
|
260
|
+
return JSON.parse(text)
|
|
261
|
+
} catch {
|
|
262
|
+
return undefined
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
267
|
+
return typeof value === "object" && value !== null && !Array.isArray(value)
|
|
268
|
+
}
|
|
@@ -66,6 +66,22 @@ export function useArtifactPanel(): ArtifactPanelValue | null {
|
|
|
66
66
|
return useContext(ArtifactPanelContext)
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
export interface ArtifactPanelRootProps {
|
|
70
|
+
readonly children: ReactNode
|
|
71
|
+
/** The conversation is narrow: open artifacts in a dialog, or over `overlayHost` when given. */
|
|
72
|
+
readonly compact?: boolean
|
|
73
|
+
/** Use the resizable panel beside the conversation even when compact. */
|
|
74
|
+
readonly split?: boolean
|
|
75
|
+
/** Where the dock's canvas goes, beside it over the app. */
|
|
76
|
+
readonly overlayHost?: HTMLElement | null
|
|
77
|
+
/** The conversation; a different one starts with nothing open. */
|
|
78
|
+
readonly scopeKey: string
|
|
79
|
+
readonly routeTarget?: ArtifactTarget | null
|
|
80
|
+
readonly onRouteTargetChange?: (target: ArtifactTarget | null) => void
|
|
81
|
+
/** Offer each artifact's own page, to open or to copy a link to. Off for an observer. */
|
|
82
|
+
readonly pageLinks?: boolean
|
|
83
|
+
}
|
|
84
|
+
|
|
69
85
|
/**
|
|
70
86
|
* Shows one artifact or file beside the conversation. With `onRouteTargetChange`, an open artifact
|
|
71
87
|
* lives in the page's URL so reloads and shared links land on it; a file stays local, since a
|
|
@@ -79,18 +95,8 @@ export function ArtifactPanelRoot({
|
|
|
79
95
|
scopeKey,
|
|
80
96
|
routeTarget = null,
|
|
81
97
|
onRouteTargetChange,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
readonly compact?: boolean
|
|
85
|
-
/** Use the resizable panel beside the conversation even when compact. */
|
|
86
|
-
readonly split?: boolean
|
|
87
|
-
/** Where the dock's canvas goes, beside it over the app. */
|
|
88
|
-
readonly overlayHost?: HTMLElement | null
|
|
89
|
-
/** The conversation; a different one starts with nothing open. */
|
|
90
|
-
readonly scopeKey: string
|
|
91
|
-
readonly routeTarget?: ArtifactTarget | null
|
|
92
|
-
readonly onRouteTargetChange?: (target: ArtifactTarget | null) => void
|
|
93
|
-
}) {
|
|
98
|
+
pageLinks = true,
|
|
99
|
+
}: ArtifactPanelRootProps) {
|
|
94
100
|
const messages = useAgentMessages().artifacts
|
|
95
101
|
const idPrefix = useId()
|
|
96
102
|
const [localTarget, setLocalTarget] = useState<ViewerTarget | null>(null)
|
|
@@ -175,7 +181,10 @@ export function ArtifactPanelRoot({
|
|
|
175
181
|
},
|
|
176
182
|
}
|
|
177
183
|
: {}),
|
|
178
|
-
...(target.type === "artifact"
|
|
184
|
+
...(target.type === "artifact" && pageLinks
|
|
185
|
+
? { fullPageHref: artifactTargetHref(target) }
|
|
186
|
+
: {}),
|
|
187
|
+
...(pageLinks ? {} : { withoutPageLink: true }),
|
|
179
188
|
}}
|
|
180
189
|
/>
|
|
181
190
|
) : null
|
|
@@ -1,19 +1,26 @@
|
|
|
1
1
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@sixb/ui/components"
|
|
2
2
|
import {
|
|
3
3
|
Activity,
|
|
4
|
+
AudioLines,
|
|
4
5
|
BarChart3,
|
|
6
|
+
Bookmark,
|
|
5
7
|
BookOpen,
|
|
6
8
|
Boxes,
|
|
7
9
|
ChevronRight,
|
|
10
|
+
CirclePause,
|
|
8
11
|
FileText,
|
|
9
12
|
FolderGit2,
|
|
10
13
|
Hash,
|
|
14
|
+
Image as ImageIcon,
|
|
11
15
|
type LucideIcon,
|
|
16
|
+
Quote,
|
|
17
|
+
Sparkles,
|
|
12
18
|
Table2,
|
|
13
19
|
Terminal,
|
|
14
20
|
Zap,
|
|
15
21
|
} from "lucide-react"
|
|
16
22
|
import { useState } from "react"
|
|
23
|
+
import { heldCallsInOutput } from "../approvals"
|
|
17
24
|
import { ActivityStatusText } from "../components/activity-status"
|
|
18
25
|
import { useAgentMessages } from "../i18n"
|
|
19
26
|
import {
|
|
@@ -24,8 +31,12 @@ import {
|
|
|
24
31
|
coerceBashOutput,
|
|
25
32
|
commandPreview,
|
|
26
33
|
describeBash,
|
|
34
|
+
humanize,
|
|
35
|
+
type ModelMedia,
|
|
36
|
+
modelMedia,
|
|
27
37
|
type ParsedBashOutput,
|
|
28
38
|
} from "./interpret"
|
|
39
|
+
import { ModelAnswerView, ModelMediaView } from "./model-media-view"
|
|
29
40
|
import {
|
|
30
41
|
ActionRunView,
|
|
31
42
|
FacetsView,
|
|
@@ -58,6 +69,11 @@ const ICONS: Record<BashIcon, LucideIcon> = {
|
|
|
58
69
|
actions: Zap,
|
|
59
70
|
project: FolderGit2,
|
|
60
71
|
skill: BookOpen,
|
|
72
|
+
image: ImageIcon,
|
|
73
|
+
audio: AudioLines,
|
|
74
|
+
transcript: Quote,
|
|
75
|
+
model: Sparkles,
|
|
76
|
+
memory: Bookmark,
|
|
61
77
|
terminal: Terminal,
|
|
62
78
|
}
|
|
63
79
|
|
|
@@ -79,9 +95,22 @@ export function BashToolView({ tool }: { tool: BashTool }) {
|
|
|
79
95
|
const parsed = coerceBashOutput(tool.output)
|
|
80
96
|
|
|
81
97
|
const running = tool.state === "input-available"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
98
|
+
|
|
99
|
+
// A call held for approval did not fail: it waits, and its card, under the work, answers it. The
|
|
100
|
+
// command keeps its output view, headed by what waits.
|
|
101
|
+
const held = tool.state === "output-available" ? heldCallsInOutput(tool.output) : []
|
|
102
|
+
const first = held[0]
|
|
103
|
+
const isError =
|
|
104
|
+
held.length === 0 && (tool.state === "output-error" || (parsed !== null && !parsed.ok))
|
|
105
|
+
const described = describeBash(intent, parsed, messages)
|
|
106
|
+
const description = first
|
|
107
|
+
? {
|
|
108
|
+
...described,
|
|
109
|
+
title: messages.bash.heldForApproval,
|
|
110
|
+
detail: humanize(first.kind === "action" ? first.actionId : first.workflowId),
|
|
111
|
+
}
|
|
112
|
+
: described
|
|
113
|
+
const Icon = first ? CirclePause : ICONS[description.icon]
|
|
85
114
|
const label = running ? description.runningTitle : description.title
|
|
86
115
|
|
|
87
116
|
// A failed command reads as a quiet, neutral step — same calm marker as any other tool line, no
|
|
@@ -94,6 +123,11 @@ export function BashToolView({ tool }: { tool: BashTool }) {
|
|
|
94
123
|
<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">
|
|
95
124
|
<Icon className="size-3.5 shrink-0" />
|
|
96
125
|
<span className="min-w-0 truncate font-medium">{label}</span>
|
|
126
|
+
{description.detail ? (
|
|
127
|
+
<span className="min-w-0 shrink truncate text-muted-foreground/60">
|
|
128
|
+
{description.detail}
|
|
129
|
+
</span>
|
|
130
|
+
) : null}
|
|
97
131
|
<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" />
|
|
98
132
|
</CollapsibleTrigger>
|
|
99
133
|
<CollapsibleContent>
|
|
@@ -109,9 +143,31 @@ export function BashToolView({ tool }: { tool: BashTool }) {
|
|
|
109
143
|
)
|
|
110
144
|
}
|
|
111
145
|
|
|
146
|
+
// An image or voice clip shows under the work it belongs to (see `generatedMedia`), so its step
|
|
147
|
+
// is one line here; a transcript, which feeds the answer, reads in place under its line.
|
|
148
|
+
const media = modelMedia(intent, parsed)
|
|
149
|
+
if (media?.kind === "image" || media?.kind === "speech") {
|
|
150
|
+
return <ToolLine icon={Icon} label={label} running={running} />
|
|
151
|
+
}
|
|
152
|
+
if (media?.kind === "transcript") {
|
|
153
|
+
return (
|
|
154
|
+
<div className="min-w-0 space-y-2">
|
|
155
|
+
<ToolLine
|
|
156
|
+
icon={Icon}
|
|
157
|
+
label={label}
|
|
158
|
+
detail={running ? undefined : description.detail}
|
|
159
|
+
running={running}
|
|
160
|
+
/>
|
|
161
|
+
<div className="pl-5">
|
|
162
|
+
<ModelMediaView media={media} running={running} />
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
)
|
|
166
|
+
}
|
|
167
|
+
|
|
112
168
|
// These answer fully from the headline (and we never expose internal skill docs), so they render
|
|
113
169
|
// as a plain one-line marker with no disclosure.
|
|
114
|
-
if (intent.kind === "read-skill" || isLeafResult(intent, running)) {
|
|
170
|
+
if (!first && (intent.kind === "read-skill" || isLeafResult(intent, running))) {
|
|
115
171
|
return (
|
|
116
172
|
<ToolLine
|
|
117
173
|
icon={Icon}
|
|
@@ -148,6 +204,28 @@ export function BashToolView({ tool }: { tool: BashTool }) {
|
|
|
148
204
|
)
|
|
149
205
|
}
|
|
150
206
|
|
|
207
|
+
/**
|
|
208
|
+
* The image or voice clip a bash step made or is making, which the work group shows under its
|
|
209
|
+
* closed line: what the user asked for, not how it was made. A failed call shows nothing, and so
|
|
210
|
+
* does a finished one whose output does not name its call (several calls in one step, or output
|
|
211
|
+
* piped elsewhere): there is nothing to fetch, so nothing to hold a place for.
|
|
212
|
+
*/
|
|
213
|
+
export function generatedMedia(tool: BashTool): {
|
|
214
|
+
readonly media: Extract<ModelMedia, { kind: "image" | "speech" }>
|
|
215
|
+
readonly running: boolean
|
|
216
|
+
} | null {
|
|
217
|
+
if (tool.state === "input-streaming" || tool.state === "output-error") return null
|
|
218
|
+
const command = coerceBashInput(tool.input)?.command ?? tool.inputText ?? ""
|
|
219
|
+
const parsed = coerceBashOutput(tool.output)
|
|
220
|
+
if (parsed && !parsed.ok) return null
|
|
221
|
+
const media = modelMedia(classifyCommand(command), parsed)
|
|
222
|
+
if (media?.kind !== "image" && media?.kind !== "speech") return null
|
|
223
|
+
|
|
224
|
+
const running = tool.state === "input-available"
|
|
225
|
+
if (!running && !media.callId) return null
|
|
226
|
+
return { media, running }
|
|
227
|
+
}
|
|
228
|
+
|
|
151
229
|
/** A quiet, non-interactive marker row matching the reasoning label style. */
|
|
152
230
|
function ToolLine({
|
|
153
231
|
icon: Icon,
|
|
@@ -178,7 +256,13 @@ function ToolLine({
|
|
|
178
256
|
/** Results whose headline already says everything — no expandable body needed. */
|
|
179
257
|
function isLeafResult(intent: BashIntent, running: boolean): boolean {
|
|
180
258
|
if (running || intent.kind !== "sixb") return false
|
|
181
|
-
return [
|
|
259
|
+
return [
|
|
260
|
+
"objects.count",
|
|
261
|
+
"objects.exists",
|
|
262
|
+
"telemetry.latest",
|
|
263
|
+
"models.list",
|
|
264
|
+
"models.get",
|
|
265
|
+
].includes(intent.command)
|
|
182
266
|
}
|
|
183
267
|
|
|
184
268
|
function BashResult({
|
|
@@ -201,7 +285,7 @@ function BashResult({
|
|
|
201
285
|
) : null
|
|
202
286
|
}
|
|
203
287
|
|
|
204
|
-
if (intent.kind === "generic" || intent.kind === "compound") {
|
|
288
|
+
if (intent.kind === "generic" || intent.kind === "compound" || intent.kind === "memory") {
|
|
205
289
|
return <GenericCommandView parsed={parsed} command={command} />
|
|
206
290
|
}
|
|
207
291
|
if (intent.kind === "read-skill") return <StructuredDataView parsed={parsed} />
|
|
@@ -227,6 +311,14 @@ function BashResult({
|
|
|
227
311
|
case "actions.request":
|
|
228
312
|
case "action-runs.get":
|
|
229
313
|
return <ActionRunView parsed={parsed} />
|
|
314
|
+
case "models.text": {
|
|
315
|
+
const media = modelMedia(intent, parsed)
|
|
316
|
+
return media?.kind === "answer" ? (
|
|
317
|
+
<ModelAnswerView media={media} />
|
|
318
|
+
) : (
|
|
319
|
+
<StructuredDataView parsed={parsed} />
|
|
320
|
+
)
|
|
321
|
+
}
|
|
230
322
|
// Remaining CLI surfaces render through the neutral data view — structured, never raw JSON.
|
|
231
323
|
default:
|
|
232
324
|
return <StructuredDataView parsed={parsed} />
|