@schlessera/brain-ui-react 0.35.0 → 0.37.0
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 +82 -4
- package/dist/components/activity/activity-page.d.ts +17 -5
- package/dist/components/activity/activity-page.d.ts.map +1 -1
- package/dist/components/activity/activity-page.js +148 -50
- package/dist/components/activity/activity-page.js.map +1 -1
- package/dist/components/activity/activity-run-detail.d.ts +16 -1
- package/dist/components/activity/activity-run-detail.d.ts.map +1 -1
- package/dist/components/activity/activity-run-detail.js +47 -4
- package/dist/components/activity/activity-run-detail.js.map +1 -1
- package/dist/components/activity/activity-run-list.d.ts +7 -1
- package/dist/components/activity/activity-run-list.d.ts.map +1 -1
- package/dist/components/activity/activity-run-list.js +16 -8
- package/dist/components/activity/activity-run-list.js.map +1 -1
- package/dist/components/activity/activity-views.d.ts +63 -0
- package/dist/components/activity/activity-views.d.ts.map +1 -0
- package/dist/components/activity/activity-views.js +52 -0
- package/dist/components/activity/activity-views.js.map +1 -0
- package/dist/components/activity/approval-card.d.ts +29 -0
- package/dist/components/activity/approval-card.d.ts.map +1 -0
- package/dist/components/activity/approval-card.js +73 -0
- package/dist/components/activity/approval-card.js.map +1 -0
- package/dist/components/activity/digest-card.d.ts +3 -0
- package/dist/components/activity/digest-card.d.ts.map +1 -1
- package/dist/components/activity/digest-card.js +20 -16
- package/dist/components/activity/digest-card.js.map +1 -1
- package/dist/components/activity/digest-summary.d.ts +19 -0
- package/dist/components/activity/digest-summary.d.ts.map +1 -0
- package/dist/components/activity/digest-summary.js +20 -0
- package/dist/components/activity/digest-summary.js.map +1 -0
- package/dist/components/activity/push-switch.d.ts +25 -0
- package/dist/components/activity/push-switch.d.ts.map +1 -0
- package/dist/components/activity/push-switch.js +14 -0
- package/dist/components/activity/push-switch.js.map +1 -0
- package/dist/components/activity/push-toggle.d.ts +7 -0
- package/dist/components/activity/push-toggle.d.ts.map +1 -1
- package/dist/components/activity/push-toggle.js +72 -47
- package/dist/components/activity/push-toggle.js.map +1 -1
- package/dist/components/activity/span-bits.d.ts +11 -0
- package/dist/components/activity/span-bits.d.ts.map +1 -1
- package/dist/components/activity/span-bits.js +50 -7
- package/dist/components/activity/span-bits.js.map +1 -1
- package/dist/components/chat/ask-user-card.d.ts +76 -3
- package/dist/components/chat/ask-user-card.d.ts.map +1 -1
- package/dist/components/chat/ask-user-card.js +208 -149
- package/dist/components/chat/ask-user-card.js.map +1 -1
- package/dist/components/chat/ask-user-typed.d.ts +42 -0
- package/dist/components/chat/ask-user-typed.d.ts.map +1 -0
- package/dist/components/chat/ask-user-typed.js +60 -0
- package/dist/components/chat/ask-user-typed.js.map +1 -0
- package/dist/components/chat/brain-markdown-links.d.ts +2 -1
- package/dist/components/chat/brain-markdown-links.d.ts.map +1 -1
- package/dist/components/chat/brain-markdown-links.js +3 -4
- package/dist/components/chat/brain-markdown-links.js.map +1 -1
- package/dist/components/chat/brain-markdown.d.ts.map +1 -1
- package/dist/components/chat/brain-markdown.js +4 -2
- package/dist/components/chat/brain-markdown.js.map +1 -1
- package/dist/components/chat/chat-page.d.ts.map +1 -1
- package/dist/components/chat/chat-page.js +27 -11
- package/dist/components/chat/chat-page.js.map +1 -1
- package/dist/components/chat/composer-view.d.ts +75 -0
- package/dist/components/chat/composer-view.d.ts.map +1 -0
- package/dist/components/chat/composer-view.js +31 -0
- package/dist/components/chat/composer-view.js.map +1 -0
- package/dist/components/chat/composer.d.ts +4 -0
- package/dist/components/chat/composer.d.ts.map +1 -1
- package/dist/components/chat/composer.js +76 -59
- package/dist/components/chat/composer.js.map +1 -1
- package/dist/components/chat/markdown-content.d.ts +16 -1
- package/dist/components/chat/markdown-content.d.ts.map +1 -1
- package/dist/components/chat/markdown-content.js +47 -3
- package/dist/components/chat/markdown-content.js.map +1 -1
- package/dist/components/chat/mermaid-block.d.ts +4 -0
- package/dist/components/chat/mermaid-block.d.ts.map +1 -1
- package/dist/components/chat/mermaid-block.js +13 -5
- package/dist/components/chat/mermaid-block.js.map +1 -1
- package/dist/components/chat/mermaid-share.d.ts +2 -1
- package/dist/components/chat/mermaid-share.d.ts.map +1 -1
- package/dist/components/chat/mermaid-share.js +7 -8
- package/dist/components/chat/mermaid-share.js.map +1 -1
- package/dist/components/chat/mermaid-viewer.d.ts.map +1 -1
- package/dist/components/chat/mermaid-viewer.js +3 -1
- package/dist/components/chat/mermaid-viewer.js.map +1 -1
- package/dist/components/chat/message-bubble.d.ts +8 -1
- package/dist/components/chat/message-bubble.d.ts.map +1 -1
- package/dist/components/chat/message-bubble.js +53 -24
- package/dist/components/chat/message-bubble.js.map +1 -1
- package/dist/components/chat/message-share.d.ts +2 -1
- package/dist/components/chat/message-share.d.ts.map +1 -1
- package/dist/components/chat/message-share.js +6 -7
- package/dist/components/chat/message-share.js.map +1 -1
- package/dist/components/chat/renderers/bind.d.ts +39 -0
- package/dist/components/chat/renderers/bind.d.ts.map +1 -0
- package/dist/components/chat/renderers/bind.js +43 -0
- package/dist/components/chat/renderers/bind.js.map +1 -0
- package/dist/components/chat/renderers/brain-ui-tools.d.ts +3 -0
- package/dist/components/chat/renderers/brain-ui-tools.d.ts.map +1 -0
- package/dist/components/chat/renderers/brain-ui-tools.js +41 -0
- package/dist/components/chat/renderers/brain-ui-tools.js.map +1 -0
- package/dist/components/chat/renderers/claude-tools.d.ts.map +1 -1
- package/dist/components/chat/renderers/claude-tools.js +3 -2
- package/dist/components/chat/renderers/claude-tools.js.map +1 -1
- package/dist/components/chat/renderers/index.d.ts +10 -2
- package/dist/components/chat/renderers/index.d.ts.map +1 -1
- package/dist/components/chat/renderers/index.js +15 -10
- package/dist/components/chat/renderers/index.js.map +1 -1
- package/dist/components/chat/session-drawer.d.ts +4 -0
- package/dist/components/chat/session-drawer.d.ts.map +1 -1
- package/dist/components/chat/session-drawer.js +32 -32
- package/dist/components/chat/session-drawer.js.map +1 -1
- package/dist/components/chat/session-list.d.ts +41 -0
- package/dist/components/chat/session-list.d.ts.map +1 -0
- package/dist/components/chat/session-list.js +10 -0
- package/dist/components/chat/session-list.js.map +1 -0
- package/dist/components/chat/share-block.d.ts.map +1 -1
- package/dist/components/chat/share-block.js +12 -11
- package/dist/components/chat/share-block.js.map +1 -1
- package/dist/components/chat/share-card.js +2 -2
- package/dist/components/chat/share-card.js.map +1 -1
- package/dist/components/chat/subagent-view.js +1 -1
- package/dist/components/chat/subagent-view.js.map +1 -1
- package/dist/components/chat/tool-call-timeline.d.ts.map +1 -1
- package/dist/components/chat/tool-call-timeline.js +45 -14
- package/dist/components/chat/tool-call-timeline.js.map +1 -1
- package/dist/components/chat/tool-cards/block-card.d.ts +28 -0
- package/dist/components/chat/tool-cards/block-card.d.ts.map +1 -0
- package/dist/components/chat/tool-cards/block-card.js +103 -0
- package/dist/components/chat/tool-cards/block-card.js.map +1 -0
- package/dist/components/chat/tool-cards/image-mask-card.d.ts +70 -0
- package/dist/components/chat/tool-cards/image-mask-card.d.ts.map +1 -0
- package/dist/components/chat/tool-cards/image-mask-card.js +142 -0
- package/dist/components/chat/tool-cards/image-mask-card.js.map +1 -0
- package/dist/components/chat/tool-cards/location-card.d.ts +45 -0
- package/dist/components/chat/tool-cards/location-card.d.ts.map +1 -0
- package/dist/components/chat/tool-cards/location-card.js +128 -0
- package/dist/components/chat/tool-cards/location-card.js.map +1 -0
- package/dist/components/chat/tool-views.d.ts +19 -2
- package/dist/components/chat/tool-views.d.ts.map +1 -1
- package/dist/components/chat/tool-views.js +28 -22
- package/dist/components/chat/tool-views.js.map +1 -1
- package/dist/components/chat/transcript-turn.d.ts +45 -0
- package/dist/components/chat/transcript-turn.d.ts.map +1 -0
- package/dist/components/chat/transcript-turn.js +25 -0
- package/dist/components/chat/transcript-turn.js.map +1 -0
- package/dist/components/chat/use-chat-commands.d.ts.map +1 -1
- package/dist/components/chat/use-chat-commands.js +13 -16
- package/dist/components/chat/use-chat-commands.js.map +1 -1
- package/dist/components/chat/welcome-state.d.ts +7 -0
- package/dist/components/chat/welcome-state.d.ts.map +1 -1
- package/dist/components/chat/welcome-state.js +13 -5
- package/dist/components/chat/welcome-state.js.map +1 -1
- package/dist/components/connectivity/connection-gate.d.ts.map +1 -1
- package/dist/components/connectivity/connection-gate.js +27 -21
- package/dist/components/connectivity/connection-gate.js.map +1 -1
- package/dist/components/connectivity/login-form.d.ts +31 -0
- package/dist/components/connectivity/login-form.d.ts.map +1 -0
- package/dist/components/connectivity/login-form.js +19 -0
- package/dist/components/connectivity/login-form.js.map +1 -0
- package/dist/components/connectivity/login-screen.d.ts +5 -2
- package/dist/components/connectivity/login-screen.d.ts.map +1 -1
- package/dist/components/connectivity/login-screen.js +41 -31
- package/dist/components/connectivity/login-screen.js.map +1 -1
- package/dist/components/dev/share-harness.js +1 -1
- package/dist/components/dev/share-harness.js.map +1 -1
- package/dist/components/files/file-panel.d.ts +1 -1
- package/dist/components/files/file-panel.d.ts.map +1 -1
- package/dist/components/files/file-panel.js +74 -0
- package/dist/components/files/file-panel.js.map +1 -1
- package/dist/components/files/file-tree-view.d.ts +45 -0
- package/dist/components/files/file-tree-view.d.ts.map +1 -0
- package/dist/components/files/file-tree-view.js +51 -0
- package/dist/components/files/file-tree-view.js.map +1 -0
- package/dist/components/files/file-tree.d.ts +6 -0
- package/dist/components/files/file-tree.d.ts.map +1 -1
- package/dist/components/files/file-tree.js +39 -43
- package/dist/components/files/file-tree.js.map +1 -1
- package/dist/components/files/file-viewer-binary.d.ts.map +1 -1
- package/dist/components/files/file-viewer-binary.js +3 -2
- package/dist/components/files/file-viewer-binary.js.map +1 -1
- package/dist/components/files/file-viewer-frame.d.ts +36 -0
- package/dist/components/files/file-viewer-frame.d.ts.map +1 -0
- package/dist/components/files/file-viewer-frame.js +26 -0
- package/dist/components/files/file-viewer-frame.js.map +1 -0
- package/dist/components/files/file-viewer.d.ts +5 -0
- package/dist/components/files/file-viewer.d.ts.map +1 -1
- package/dist/components/files/file-viewer.js +26 -32
- package/dist/components/files/file-viewer.js.map +1 -1
- package/dist/components/files/frontmatter-chips.d.ts +18 -0
- package/dist/components/files/frontmatter-chips.d.ts.map +1 -0
- package/dist/components/files/frontmatter-chips.js +11 -0
- package/dist/components/files/frontmatter-chips.js.map +1 -0
- package/dist/components/files/frontmatter-panel.d.ts +5 -1
- package/dist/components/files/frontmatter-panel.d.ts.map +1 -1
- package/dist/components/files/frontmatter-panel.js +7 -6
- package/dist/components/files/frontmatter-panel.js.map +1 -1
- package/dist/components/files/staleness.d.ts +18 -0
- package/dist/components/files/staleness.d.ts.map +1 -0
- package/dist/components/files/staleness.js +27 -0
- package/dist/components/files/staleness.js.map +1 -0
- package/dist/components/graph/graph-canvas.d.ts.map +1 -1
- package/dist/components/graph/graph-canvas.js +24 -1
- package/dist/components/graph/graph-canvas.js.map +1 -1
- package/dist/components/graph/graph-controls-column.d.ts +14 -0
- package/dist/components/graph/graph-controls-column.d.ts.map +1 -0
- package/dist/components/graph/graph-controls-column.js +44 -0
- package/dist/components/graph/graph-controls-column.js.map +1 -0
- package/dist/components/graph/graph-controls.d.ts +20 -5
- package/dist/components/graph/graph-controls.d.ts.map +1 -1
- package/dist/components/graph/graph-controls.js +58 -37
- package/dist/components/graph/graph-controls.js.map +1 -1
- package/dist/components/graph/graph-form.d.ts +82 -0
- package/dist/components/graph/graph-form.d.ts.map +1 -0
- package/dist/components/graph/graph-form.js +69 -0
- package/dist/components/graph/graph-form.js.map +1 -0
- package/dist/components/graph/graph-maintenance.d.ts.map +1 -1
- package/dist/components/graph/graph-maintenance.js +6 -10
- package/dist/components/graph/graph-maintenance.js.map +1 -1
- package/dist/components/graph/graph-node-rail.d.ts +13 -0
- package/dist/components/graph/graph-node-rail.d.ts.map +1 -0
- package/dist/components/graph/graph-node-rail.js +92 -0
- package/dist/components/graph/graph-node-rail.js.map +1 -0
- package/dist/components/graph/graph-page.d.ts +7 -0
- package/dist/components/graph/graph-page.d.ts.map +1 -1
- package/dist/components/graph/graph-page.js +102 -12
- package/dist/components/graph/graph-page.js.map +1 -1
- package/dist/components/graph/graph-scene.d.ts.map +1 -1
- package/dist/components/graph/graph-scene.js +100 -24
- package/dist/components/graph/graph-scene.js.map +1 -1
- package/dist/components/graph/lib/graph-helpers.d.ts +42 -12
- package/dist/components/graph/lib/graph-helpers.d.ts.map +1 -1
- package/dist/components/graph/lib/graph-helpers.js +33 -41
- package/dist/components/graph/lib/graph-helpers.js.map +1 -1
- package/dist/components/graph/node-card.d.ts +28 -0
- package/dist/components/graph/node-card.d.ts.map +1 -0
- package/dist/components/graph/node-card.js +7 -0
- package/dist/components/graph/node-card.js.map +1 -0
- package/dist/components/graph/node-popover.d.ts +6 -2
- package/dist/components/graph/node-popover.d.ts.map +1 -1
- package/dist/components/graph/node-popover.js +13 -31
- package/dist/components/graph/node-popover.js.map +1 -1
- package/dist/components/graph/use-graph-theme.d.ts +32 -4
- package/dist/components/graph/use-graph-theme.d.ts.map +1 -1
- package/dist/components/graph/use-graph-theme.js +44 -32
- package/dist/components/graph/use-graph-theme.js.map +1 -1
- package/dist/components/graph/use-node-actions.d.ts +26 -0
- package/dist/components/graph/use-node-actions.d.ts.map +1 -0
- package/dist/components/graph/use-node-actions.js +54 -0
- package/dist/components/graph/use-node-actions.js.map +1 -0
- package/dist/components/images/image-share.d.ts +2 -1
- package/dist/components/images/image-share.d.ts.map +1 -1
- package/dist/components/images/image-share.js +3 -3
- package/dist/components/images/image-share.js.map +1 -1
- package/dist/components/images/image-viewer.d.ts.map +1 -1
- package/dist/components/images/image-viewer.js +3 -1
- package/dist/components/images/image-viewer.js.map +1 -1
- package/dist/components/images/mask-editor.d.ts.map +1 -1
- package/dist/components/images/mask-editor.js +7 -5
- package/dist/components/images/mask-editor.js.map +1 -1
- package/dist/components/layout/app-shell.d.ts.map +1 -1
- package/dist/components/layout/app-shell.js +4 -1
- package/dist/components/layout/app-shell.js.map +1 -1
- package/dist/components/layout/desktop-palette.d.ts +23 -0
- package/dist/components/layout/desktop-palette.d.ts.map +1 -0
- package/dist/components/layout/desktop-palette.js +132 -0
- package/dist/components/layout/desktop-palette.js.map +1 -0
- package/dist/components/layout/key-cap.d.ts +9 -0
- package/dist/components/layout/key-cap.d.ts.map +1 -0
- package/dist/components/layout/key-cap.js +10 -0
- package/dist/components/layout/key-cap.js.map +1 -0
- package/dist/components/layout/mobile-tab-bar.d.ts +13 -0
- package/dist/components/layout/mobile-tab-bar.d.ts.map +1 -1
- package/dist/components/layout/mobile-tab-bar.js +58 -47
- package/dist/components/layout/mobile-tab-bar.js.map +1 -1
- package/dist/components/layout/shortcut-switch.d.ts +13 -0
- package/dist/components/layout/shortcut-switch.d.ts.map +1 -0
- package/dist/components/layout/shortcut-switch.js +22 -0
- package/dist/components/layout/shortcut-switch.js.map +1 -0
- package/dist/components/layout/side-rail.d.ts +28 -0
- package/dist/components/layout/side-rail.d.ts.map +1 -1
- package/dist/components/layout/side-rail.js +72 -27
- package/dist/components/layout/side-rail.js.map +1 -1
- package/dist/components/layout/slide-panel.d.ts +25 -2
- package/dist/components/layout/slide-panel.d.ts.map +1 -1
- package/dist/components/layout/slide-panel.js +13 -4
- package/dist/components/layout/slide-panel.js.map +1 -1
- package/dist/components/layout/theme.d.ts +22 -0
- package/dist/components/layout/theme.d.ts.map +1 -0
- package/dist/components/layout/theme.js +44 -0
- package/dist/components/layout/theme.js.map +1 -0
- package/dist/components/quick-actions/add-form.d.ts +44 -0
- package/dist/components/quick-actions/add-form.d.ts.map +1 -0
- package/dist/components/quick-actions/add-form.js +32 -0
- package/dist/components/quick-actions/add-form.js.map +1 -0
- package/dist/components/quick-actions/add-modal.d.ts +7 -0
- package/dist/components/quick-actions/add-modal.d.ts.map +1 -1
- package/dist/components/quick-actions/add-modal.js +23 -20
- package/dist/components/quick-actions/add-modal.js.map +1 -1
- package/dist/components/quick-actions/search-modal.d.ts.map +1 -1
- package/dist/components/quick-actions/search-modal.js +8 -5
- package/dist/components/quick-actions/search-modal.js.map +1 -1
- package/dist/components/quick-actions/streaming-modal.d.ts +6 -0
- package/dist/components/quick-actions/streaming-modal.d.ts.map +1 -1
- package/dist/components/quick-actions/streaming-modal.js +53 -18
- package/dist/components/quick-actions/streaming-modal.js.map +1 -1
- package/dist/components/quick-actions/streaming-output.d.ts +38 -0
- package/dist/components/quick-actions/streaming-output.d.ts.map +1 -0
- package/dist/components/quick-actions/streaming-output.js +22 -0
- package/dist/components/quick-actions/streaming-output.js.map +1 -0
- package/dist/components/quick-actions/whatsup-modal.d.ts +5 -0
- package/dist/components/quick-actions/whatsup-modal.d.ts.map +1 -1
- package/dist/components/quick-actions/whatsup-modal.js +51 -10
- package/dist/components/quick-actions/whatsup-modal.js.map +1 -1
- package/dist/components/settings/devices-agents-tab.d.ts +6 -1
- package/dist/components/settings/devices-agents-tab.d.ts.map +1 -1
- package/dist/components/settings/devices-agents-tab.js +55 -20
- package/dist/components/settings/devices-agents-tab.js.map +1 -1
- package/dist/components/settings/models-list.d.ts +39 -0
- package/dist/components/settings/models-list.d.ts.map +1 -0
- package/dist/components/settings/models-list.js +72 -0
- package/dist/components/settings/models-list.js.map +1 -0
- package/dist/components/settings/models-tab.d.ts +4 -0
- package/dist/components/settings/models-tab.d.ts.map +1 -1
- package/dist/components/settings/models-tab.js +52 -102
- package/dist/components/settings/models-tab.js.map +1 -1
- package/dist/components/settings/one-time-agent-credential.js +1 -1
- package/dist/components/settings/one-time-agent-credential.js.map +1 -1
- package/dist/components/settings/passkey-list.d.ts +35 -0
- package/dist/components/settings/passkey-list.d.ts.map +1 -0
- package/dist/components/settings/passkey-list.js +34 -0
- package/dist/components/settings/passkey-list.js.map +1 -0
- package/dist/components/settings/passkey-tab.d.ts +3 -0
- package/dist/components/settings/passkey-tab.d.ts.map +1 -1
- package/dist/components/settings/passkey-tab.js +53 -45
- package/dist/components/settings/passkey-tab.js.map +1 -1
- package/dist/components/settings/pi-accounts-list.d.ts +27 -0
- package/dist/components/settings/pi-accounts-list.d.ts.map +1 -0
- package/dist/components/settings/pi-accounts-list.js +15 -0
- package/dist/components/settings/pi-accounts-list.js.map +1 -0
- package/dist/components/settings/pi-accounts.d.ts +3 -0
- package/dist/components/settings/pi-accounts.d.ts.map +1 -1
- package/dist/components/settings/pi-accounts.js +73 -55
- package/dist/components/settings/pi-accounts.js.map +1 -1
- package/dist/components/settings/principal-list.d.ts +37 -0
- package/dist/components/settings/principal-list.d.ts.map +1 -0
- package/dist/components/settings/principal-list.js +18 -0
- package/dist/components/settings/principal-list.js.map +1 -0
- package/dist/components/settings/settings-panel.d.ts +10 -3
- package/dist/components/settings/settings-panel.d.ts.map +1 -1
- package/dist/components/settings/settings-panel.js +71 -10
- package/dist/components/settings/settings-panel.js.map +1 -1
- package/dist/components/settings/skills-list.d.ts +53 -0
- package/dist/components/settings/skills-list.d.ts.map +1 -0
- package/dist/components/settings/skills-list.js +28 -0
- package/dist/components/settings/skills-list.js.map +1 -0
- package/dist/components/settings/skills-tab.d.ts.map +1 -1
- package/dist/components/settings/skills-tab.js +65 -38
- package/dist/components/settings/skills-tab.js.map +1 -1
- package/dist/components/settings/tool-permissions-list.d.ts +18 -0
- package/dist/components/settings/tool-permissions-list.d.ts.map +1 -0
- package/dist/components/settings/tool-permissions-list.js +6 -0
- package/dist/components/settings/tool-permissions-list.js.map +1 -0
- package/dist/components/settings/tool-permissions.d.ts +2 -1
- package/dist/components/settings/tool-permissions.d.ts.map +1 -1
- package/dist/components/settings/tool-permissions.js +33 -16
- package/dist/components/settings/tool-permissions.js.map +1 -1
- package/dist/components/settings/web-search-chain.d.ts +41 -0
- package/dist/components/settings/web-search-chain.d.ts.map +1 -0
- package/dist/components/settings/web-search-chain.js +47 -0
- package/dist/components/settings/web-search-chain.js.map +1 -0
- package/dist/components/settings/web-search-settings.d.ts +4 -7
- package/dist/components/settings/web-search-settings.d.ts.map +1 -1
- package/dist/components/settings/web-search-settings.js +54 -76
- package/dist/components/settings/web-search-settings.js.map +1 -1
- package/dist/components/share/share-menu.d.ts.map +1 -1
- package/dist/components/share/share-menu.js +24 -4
- package/dist/components/share/share-menu.js.map +1 -1
- package/dist/components/voice/dictation-sheet.js +3 -3
- package/dist/components/voice/dictation-sheet.js.map +1 -1
- package/dist/components/voice/mic-button.js +1 -1
- package/dist/components/voice/mic-button.js.map +1 -1
- package/dist/components/voice/review-card.js +1 -1
- package/dist/components/voice/review-card.js.map +1 -1
- package/dist/config.d.ts +5 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +15 -5
- package/dist/config.js.map +1 -1
- package/dist/connection.d.ts +12 -0
- package/dist/connection.d.ts.map +1 -0
- package/dist/connection.js +421 -0
- package/dist/connection.js.map +1 -0
- package/dist/default-root.d.ts +3 -0
- package/dist/default-root.d.ts.map +1 -0
- package/dist/default-root.js +16 -0
- package/dist/default-root.js.map +1 -0
- package/dist/hooks/use-color-scheme.d.ts +14 -0
- package/dist/hooks/use-color-scheme.d.ts.map +1 -0
- package/dist/hooks/use-color-scheme.js +37 -0
- package/dist/hooks/use-color-scheme.js.map +1 -0
- package/dist/hooks/use-fine-pointer.d.ts +12 -0
- package/dist/hooks/use-fine-pointer.d.ts.map +1 -0
- package/dist/hooks/use-fine-pointer.js +15 -0
- package/dist/hooks/use-fine-pointer.js.map +1 -0
- package/dist/hooks/use-hash-routes.d.ts.map +1 -1
- package/dist/hooks/use-hash-routes.js +4 -2
- package/dist/hooks/use-hash-routes.js.map +1 -1
- package/dist/hooks/use-media-query.d.ts +9 -0
- package/dist/hooks/use-media-query.d.ts.map +1 -0
- package/dist/hooks/use-media-query.js +38 -0
- package/dist/hooks/use-media-query.js.map +1 -0
- package/dist/hooks/use-share-intake.d.ts.map +1 -1
- package/dist/hooks/use-share-intake.js +37 -12
- package/dist/hooks/use-share-intake.js.map +1 -1
- package/dist/hooks/use-vpn-status.d.ts.map +1 -1
- package/dist/hooks/use-vpn-status.js +17 -18
- package/dist/hooks/use-vpn-status.js.map +1 -1
- package/dist/hooks/use-websocket.d.ts +5 -24
- package/dist/hooks/use-websocket.d.ts.map +1 -1
- package/dist/hooks/use-websocket.js +11 -384
- package/dist/hooks/use-websocket.js.map +1 -1
- package/dist/hooks/websocket-handlers/activity.d.ts +2 -2
- package/dist/hooks/websocket-handlers/activity.d.ts.map +1 -1
- package/dist/hooks/websocket-handlers/activity.js +4 -5
- package/dist/hooks/websocket-handlers/activity.js.map +1 -1
- package/dist/hooks/websocket-handlers/chat.d.ts +1 -0
- package/dist/hooks/websocket-handlers/chat.d.ts.map +1 -1
- package/dist/hooks/websocket-handlers/chat.js +28 -6
- package/dist/hooks/websocket-handlers/chat.js.map +1 -1
- package/dist/hooks/websocket-handlers/connection.d.ts.map +1 -1
- package/dist/hooks/websocket-handlers/connection.js +4 -6
- package/dist/hooks/websocket-handlers/connection.js.map +1 -1
- package/dist/hooks/websocket-handlers/mask.d.ts +1 -1
- package/dist/hooks/websocket-handlers/mask.d.ts.map +1 -1
- package/dist/hooks/websocket-handlers/mask.js +2 -3
- package/dist/hooks/websocket-handlers/mask.js.map +1 -1
- package/dist/hooks/websocket-handlers/provider.d.ts.map +1 -1
- package/dist/hooks/websocket-handlers/provider.js +4 -6
- package/dist/hooks/websocket-handlers/provider.js.map +1 -1
- package/dist/hooks/websocket-handlers/types.d.ts +6 -2
- package/dist/hooks/websocket-handlers/types.d.ts.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/api-client.d.ts +289 -0
- package/dist/lib/api-client.d.ts.map +1 -1
- package/dist/lib/api-client.js +243 -224
- package/dist/lib/api-client.js.map +1 -1
- package/dist/lib/backend.d.ts +19 -2
- package/dist/lib/backend.d.ts.map +1 -1
- package/dist/lib/backend.js +15 -9
- package/dist/lib/backend.js.map +1 -1
- package/dist/lib/diff.d.ts +8 -10
- package/dist/lib/diff.d.ts.map +1 -1
- package/dist/lib/diff.js +26 -53
- package/dist/lib/diff.js.map +1 -1
- package/dist/lib/light-dark.d.ts +37 -0
- package/dist/lib/light-dark.d.ts.map +1 -0
- package/dist/lib/light-dark.js +83 -0
- package/dist/lib/light-dark.js.map +1 -0
- package/dist/lib/mermaid-theme.d.ts +7 -2
- package/dist/lib/mermaid-theme.d.ts.map +1 -1
- package/dist/lib/mermaid-theme.js +125 -203
- package/dist/lib/mermaid-theme.js.map +1 -1
- package/dist/lib/passkeys.d.ts +6 -3
- package/dist/lib/passkeys.d.ts.map +1 -1
- package/dist/lib/passkeys.js +10 -4
- package/dist/lib/passkeys.js.map +1 -1
- package/dist/lib/push-registration.d.ts +4 -1
- package/dist/lib/push-registration.d.ts.map +1 -1
- package/dist/lib/push-registration.js +20 -2
- package/dist/lib/push-registration.js.map +1 -1
- package/dist/lib/share-intake.d.ts +2 -1
- package/dist/lib/share-intake.d.ts.map +1 -1
- package/dist/lib/share-intake.js +3 -3
- package/dist/lib/share-intake.js.map +1 -1
- package/dist/lib/share.d.ts +4 -3
- package/dist/lib/share.d.ts.map +1 -1
- package/dist/lib/share.js +6 -7
- package/dist/lib/share.js.map +1 -1
- package/dist/lib/single-key.d.ts +30 -0
- package/dist/lib/single-key.d.ts.map +1 -0
- package/dist/lib/single-key.js +45 -0
- package/dist/lib/single-key.js.map +1 -0
- package/dist/lib/tool-names.d.ts +8 -6
- package/dist/lib/tool-names.d.ts.map +1 -1
- package/dist/lib/tool-names.js +17 -7
- package/dist/lib/tool-names.js.map +1 -1
- package/dist/root-context.d.ts +229 -0
- package/dist/root-context.d.ts.map +1 -0
- package/dist/root-context.js +33 -0
- package/dist/root-context.js.map +1 -0
- package/dist/root.d.ts +38 -0
- package/dist/root.d.ts.map +1 -0
- package/dist/root.js +47 -0
- package/dist/root.js.map +1 -0
- package/dist/stores/activity-state.d.ts +29 -0
- package/dist/stores/activity-state.d.ts.map +1 -0
- package/dist/stores/activity-state.js +282 -0
- package/dist/stores/activity-state.js.map +1 -0
- package/dist/stores/activity-store.d.ts +10 -41
- package/dist/stores/activity-store.d.ts.map +1 -1
- package/dist/stores/activity-store.js +9 -271
- package/dist/stores/activity-store.js.map +1 -1
- package/dist/stores/chat-state.d.ts +233 -0
- package/dist/stores/chat-state.d.ts.map +1 -0
- package/dist/stores/chat-state.js +477 -0
- package/dist/stores/chat-state.js.map +1 -0
- package/dist/stores/chat-store.d.ts +4 -162
- package/dist/stores/chat-store.d.ts.map +1 -1
- package/dist/stores/chat-store.js +7 -418
- package/dist/stores/chat-store.js.map +1 -1
- package/dist/stores/connection-state.d.ts +40 -0
- package/dist/stores/connection-state.d.ts.map +1 -0
- package/dist/stores/connection-state.js +30 -0
- package/dist/stores/connection-state.js.map +1 -0
- package/dist/stores/connection-store.d.ts +4 -40
- package/dist/stores/connection-store.d.ts.map +1 -1
- package/dist/stores/connection-store.js +7 -27
- package/dist/stores/connection-store.js.map +1 -1
- package/dist/stores/create-stores.d.ts +23 -0
- package/dist/stores/create-stores.d.ts.map +1 -0
- package/dist/stores/create-stores.js +28 -0
- package/dist/stores/create-stores.js.map +1 -0
- package/dist/stores/file-state.d.ts +53 -0
- package/dist/stores/file-state.d.ts.map +1 -0
- package/dist/stores/file-state.js +341 -0
- package/dist/stores/file-state.js.map +1 -0
- package/dist/stores/file-store.d.ts +4 -52
- package/dist/stores/file-store.d.ts.map +1 -1
- package/dist/stores/file-store.js +7 -336
- package/dist/stores/file-store.js.map +1 -1
- package/dist/stores/graph-state.d.ts +95 -0
- package/dist/stores/graph-state.d.ts.map +1 -0
- package/dist/stores/graph-state.js +252 -0
- package/dist/stores/graph-state.js.map +1 -0
- package/dist/stores/graph-store.d.ts +7 -83
- package/dist/stores/graph-store.d.ts.map +1 -1
- package/dist/stores/graph-store.js +8 -249
- package/dist/stores/graph-store.js.map +1 -1
- package/dist/stores/mask-state.d.ts +21 -0
- package/dist/stores/mask-state.d.ts.map +1 -0
- package/dist/stores/mask-state.js +9 -0
- package/dist/stores/mask-state.js.map +1 -0
- package/dist/stores/mask-store.d.ts +4 -21
- package/dist/stores/mask-store.d.ts.map +1 -1
- package/dist/stores/mask-store.js +7 -6
- package/dist/stores/mask-store.js.map +1 -1
- package/dist/stores/principal-state.d.ts +16 -0
- package/dist/stores/principal-state.d.ts.map +1 -0
- package/dist/stores/principal-state.js +31 -0
- package/dist/stores/principal-state.js.map +1 -0
- package/dist/stores/principal-store.d.ts +4 -15
- package/dist/stores/principal-store.d.ts.map +1 -1
- package/dist/stores/principal-store.js +7 -28
- package/dist/stores/principal-store.js.map +1 -1
- package/dist/stores/provider-state.d.ts +24 -0
- package/dist/stores/provider-state.d.ts.map +1 -0
- package/dist/stores/provider-state.js +68 -0
- package/dist/stores/provider-state.js.map +1 -0
- package/dist/stores/provider-store.d.ts +4 -23
- package/dist/stores/provider-store.d.ts.map +1 -1
- package/dist/stores/provider-store.js +7 -64
- package/dist/stores/provider-store.js.map +1 -1
- package/dist/stores/share-state.d.ts +29 -0
- package/dist/stores/share-state.d.ts.map +1 -0
- package/dist/stores/share-state.js +21 -0
- package/dist/stores/share-state.js.map +1 -0
- package/dist/stores/share-store.d.ts +4 -28
- package/dist/stores/share-store.d.ts.map +1 -1
- package/dist/stores/share-store.js +7 -18
- package/dist/stores/share-store.js.map +1 -1
- package/dist/stores/store-environment.d.ts +10 -0
- package/dist/stores/store-environment.d.ts.map +1 -0
- package/dist/stores/store-environment.js +2 -0
- package/dist/stores/store-environment.js.map +1 -0
- package/dist/stores/ui-state.d.ts +71 -0
- package/dist/stores/ui-state.d.ts.map +1 -0
- package/dist/stores/ui-state.js +58 -0
- package/dist/stores/ui-state.js.map +1 -0
- package/dist/stores/ui-store.d.ts +4 -45
- package/dist/stores/ui-store.d.ts.map +1 -1
- package/dist/stores/ui-store.js +7 -36
- package/dist/stores/ui-store.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme.css +150 -97
- package/dist/voice/asr-clients.d.ts +2 -1
- package/dist/voice/asr-clients.d.ts.map +1 -1
- package/dist/voice/asr-clients.js +16 -17
- package/dist/voice/asr-clients.js.map +1 -1
- package/dist/voice/use-dictation.d.ts.map +1 -1
- package/dist/voice/use-dictation.js +12 -8
- package/dist/voice/use-dictation.js.map +1 -1
- package/dist/voice/voice-state.d.ts +25 -0
- package/dist/voice/voice-state.d.ts.map +1 -0
- package/dist/voice/voice-state.js +29 -0
- package/dist/voice/voice-state.js.map +1 -0
- package/dist/voice/voice-store.d.ts +4 -25
- package/dist/voice/voice-store.d.ts.map +1 -1
- package/dist/voice/voice-store.js +7 -26
- package/dist/voice/voice-store.js.map +1 -1
- package/package.json +3 -2
- package/src/components/activity/activity-page.tsx +341 -160
- package/src/components/activity/activity-run-detail.tsx +81 -47
- package/src/components/activity/activity-run-list.tsx +27 -59
- package/src/components/activity/activity-views.tsx +155 -0
- package/src/components/activity/approval-card.tsx +117 -0
- package/src/components/activity/digest-card.tsx +25 -61
- package/src/components/activity/digest-summary.tsx +52 -0
- package/src/components/activity/push-switch.tsx +62 -0
- package/src/components/activity/push-toggle.tsx +51 -81
- package/src/components/activity/span-bits.tsx +60 -7
- package/src/components/chat/ask-user-card.tsx +292 -356
- package/src/components/chat/ask-user-typed.ts +77 -0
- package/src/components/chat/brain-markdown-links.tsx +4 -4
- package/src/components/chat/brain-markdown.tsx +4 -2
- package/src/components/chat/chat-page.tsx +41 -11
- package/src/components/chat/composer-view.tsx +194 -0
- package/src/components/chat/composer.tsx +117 -296
- package/src/components/chat/markdown-content.tsx +53 -2
- package/src/components/chat/mermaid-block.tsx +13 -5
- package/src/components/chat/mermaid-share.ts +8 -7
- package/src/components/chat/mermaid-viewer.tsx +3 -1
- package/src/components/chat/message-bubble.tsx +78 -94
- package/src/components/chat/message-share.ts +7 -7
- package/src/components/chat/renderers/bind.tsx +94 -0
- package/src/components/chat/renderers/brain-ui-tools.tsx +56 -0
- package/src/components/chat/renderers/claude-tools.tsx +3 -2
- package/src/components/chat/renderers/index.ts +15 -10
- package/src/components/chat/session-drawer.tsx +41 -138
- package/src/components/chat/session-list.tsx +113 -0
- package/src/components/chat/share-block.tsx +16 -12
- package/src/components/chat/share-card.tsx +2 -2
- package/src/components/chat/subagent-view.tsx +4 -4
- package/src/components/chat/tool-call-timeline.tsx +75 -26
- package/src/components/chat/tool-cards/block-card.tsx +145 -0
- package/src/components/chat/tool-cards/image-mask-card.tsx +214 -0
- package/src/components/chat/tool-cards/location-card.tsx +159 -0
- package/src/components/chat/tool-views.tsx +30 -60
- package/src/components/chat/transcript-turn.tsx +108 -0
- package/src/components/chat/use-chat-commands.ts +14 -16
- package/src/components/chat/welcome-state.tsx +36 -91
- package/src/components/connectivity/connection-gate.tsx +32 -24
- package/src/components/connectivity/login-form.tsx +122 -0
- package/src/components/connectivity/login-screen.tsx +45 -100
- package/src/components/dev/share-harness.tsx +2 -2
- package/src/components/files/file-panel.tsx +168 -0
- package/src/components/files/file-tree-view.tsx +127 -0
- package/src/components/files/file-tree.tsx +55 -109
- package/src/components/files/file-viewer-binary.tsx +3 -2
- package/src/components/files/file-viewer-frame.tsx +113 -0
- package/src/components/files/file-viewer.tsx +40 -95
- package/src/components/files/frontmatter-chips.tsx +42 -0
- package/src/components/files/frontmatter-panel.tsx +6 -71
- package/src/components/files/staleness.ts +29 -0
- package/src/components/graph/graph-canvas.tsx +24 -1
- package/src/components/graph/graph-controls-column.tsx +92 -0
- package/src/components/graph/graph-controls.tsx +83 -127
- package/src/components/graph/graph-form.tsx +183 -0
- package/src/components/graph/graph-maintenance.tsx +9 -14
- package/src/components/graph/graph-node-rail.tsx +147 -0
- package/src/components/graph/graph-page.tsx +189 -49
- package/src/components/graph/graph-scene.tsx +200 -30
- package/src/components/graph/lib/graph-helpers.ts +65 -43
- package/src/components/graph/node-card.tsx +64 -0
- package/src/components/graph/node-popover.tsx +28 -117
- package/src/components/graph/use-graph-theme.ts +69 -32
- package/src/components/graph/use-node-actions.ts +56 -0
- package/src/components/images/image-share.ts +4 -2
- package/src/components/images/image-viewer.tsx +3 -1
- package/src/components/images/mask-editor.tsx +7 -4
- package/src/components/layout/app-shell.tsx +5 -1
- package/src/components/layout/desktop-palette.tsx +151 -0
- package/src/components/layout/key-cap.tsx +15 -0
- package/src/components/layout/mobile-tab-bar.tsx +80 -157
- package/src/components/layout/shortcut-switch.tsx +32 -0
- package/src/components/layout/side-rail.tsx +77 -150
- package/src/components/layout/slide-panel.tsx +49 -6
- package/src/components/layout/theme.tsx +67 -0
- package/src/components/quick-actions/add-form.tsx +196 -0
- package/src/components/quick-actions/add-modal.tsx +32 -153
- package/src/components/quick-actions/search-modal.tsx +15 -5
- package/src/components/quick-actions/streaming-modal.tsx +57 -72
- package/src/components/quick-actions/streaming-output.tsx +112 -0
- package/src/components/quick-actions/whatsup-modal.tsx +53 -59
- package/src/components/settings/devices-agents-tab.tsx +60 -152
- package/src/components/settings/models-list.tsx +299 -0
- package/src/components/settings/models-tab.tsx +63 -337
- package/src/components/settings/one-time-agent-credential.tsx +1 -1
- package/src/components/settings/passkey-list.tsx +201 -0
- package/src/components/settings/passkey-tab.tsx +53 -197
- package/src/components/settings/pi-accounts-list.tsx +128 -0
- package/src/components/settings/pi-accounts.tsx +71 -170
- package/src/components/settings/principal-list.tsx +172 -0
- package/src/components/settings/settings-panel.tsx +239 -25
- package/src/components/settings/skills-list.tsx +276 -0
- package/src/components/settings/skills-tab.tsx +82 -269
- package/src/components/settings/tool-permissions-list.tsx +54 -0
- package/src/components/settings/tool-permissions.tsx +27 -46
- package/src/components/settings/web-search-chain.tsx +300 -0
- package/src/components/settings/web-search-settings.tsx +58 -328
- package/src/components/share/share-menu.tsx +19 -4
- package/src/components/voice/dictation-sheet.tsx +5 -5
- package/src/components/voice/mic-button.tsx +1 -1
- package/src/components/voice/review-card.tsx +1 -1
- package/src/config.ts +21 -7
- package/src/connection.ts +443 -0
- package/src/default-root.ts +16 -0
- package/src/hooks/use-color-scheme.ts +36 -0
- package/src/hooks/use-fine-pointer.ts +15 -0
- package/src/hooks/use-hash-routes.ts +4 -2
- package/src/hooks/use-media-query.ts +35 -0
- package/src/hooks/use-share-intake.ts +32 -12
- package/src/hooks/use-vpn-status.ts +18 -17
- package/src/hooks/use-websocket.ts +12 -428
- package/src/hooks/websocket-handlers/activity.ts +4 -5
- package/src/hooks/websocket-handlers/chat.ts +28 -6
- package/src/hooks/websocket-handlers/connection.ts +4 -6
- package/src/hooks/websocket-handlers/mask.ts +2 -3
- package/src/hooks/websocket-handlers/provider.ts +4 -6
- package/src/hooks/websocket-handlers/types.ts +6 -2
- package/src/index.ts +7 -3
- package/src/lib/api-client.ts +426 -384
- package/src/lib/backend.ts +20 -10
- package/src/lib/diff.ts +28 -62
- package/src/lib/light-dark.ts +83 -0
- package/src/lib/mermaid-theme.ts +183 -214
- package/src/lib/passkeys.ts +12 -4
- package/src/lib/push-registration.ts +19 -2
- package/src/lib/share-intake.ts +6 -3
- package/src/lib/share.ts +7 -4
- package/src/lib/single-key.ts +47 -0
- package/src/lib/tool-names.ts +31 -8
- package/src/root-context.tsx +40 -0
- package/src/root.ts +83 -0
- package/src/stores/activity-state.ts +295 -0
- package/src/stores/activity-store.ts +11 -285
- package/src/stores/chat-state.ts +822 -0
- package/src/stores/chat-store.ts +11 -705
- package/src/stores/connection-state.ts +78 -0
- package/src/stores/connection-store.ts +11 -76
- package/src/stores/create-stores.ts +31 -0
- package/src/stores/file-state.ts +399 -0
- package/src/stores/file-store.ts +9 -390
- package/src/stores/graph-state.ts +368 -0
- package/src/stores/graph-store.ts +10 -355
- package/src/stores/mask-state.ts +30 -0
- package/src/stores/mask-store.ts +10 -27
- package/src/stores/principal-state.ts +42 -0
- package/src/stores/principal-store.ts +10 -37
- package/src/stores/provider-state.ts +103 -0
- package/src/stores/provider-store.ts +10 -95
- package/src/stores/share-state.ts +56 -0
- package/src/stores/share-store.ts +11 -54
- package/src/stores/store-environment.ts +10 -0
- package/src/stores/ui-state.ts +143 -0
- package/src/stores/ui-store.ts +11 -93
- package/src/styles.css +4 -1
- package/src/theme.css +150 -97
- package/src/voice/asr-clients.ts +17 -17
- package/src/voice/use-dictation.ts +11 -8
- package/src/voice/voice-state.ts +57 -0
- package/src/voice/voice-store.ts +11 -55
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pending mask request, if any.
|
|
3
|
+
*
|
|
4
|
+
* Deliberately a small standalone store rather than chat-buffer state: a mask
|
|
5
|
+
* request is modal and at most one is open at a time, and nothing about it
|
|
6
|
+
* needs to survive in a transcript — the answer travels back over the socket
|
|
7
|
+
* and the resulting file is what persists.
|
|
8
|
+
*/
|
|
9
|
+
export interface MaskRequest {
|
|
10
|
+
requestId: string;
|
|
11
|
+
imagePath: string;
|
|
12
|
+
instruction?: string;
|
|
13
|
+
turnId?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface MaskState {
|
|
16
|
+
request: MaskRequest | null;
|
|
17
|
+
open: (request: MaskRequest) => void;
|
|
18
|
+
close: () => void;
|
|
19
|
+
}
|
|
20
|
+
export declare function createMaskStore(): import("zustand").StoreApi<MaskState>;
|
|
21
|
+
//# sourceMappingURL=mask-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mask-state.d.ts","sourceRoot":"","sources":["../../src/stores/mask-state.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,IAAI,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IACrC,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,wBAAgB,eAAe,0CAM9B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createStore } from "zustand/vanilla";
|
|
2
|
+
export function createMaskStore() {
|
|
3
|
+
return createStore((set) => ({
|
|
4
|
+
request: null,
|
|
5
|
+
open: (request) => set({ request }),
|
|
6
|
+
close: () => set({ request: null }),
|
|
7
|
+
}));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=mask-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mask-state.js","sourceRoot":"","sources":["../../src/stores/mask-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAuB9C,MAAM,UAAU,eAAe;IAC7B,OAAO,WAAW,CAAY,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACtC,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,CAAC;QACnC,KAAK,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;KACpC,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -1,22 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* request is modal and at most one is open at a time, and nothing about it
|
|
6
|
-
* needs to survive in a transcript — the answer travels back over the socket
|
|
7
|
-
* and the resulting file is what persists.
|
|
8
|
-
*/
|
|
9
|
-
export interface MaskRequest {
|
|
10
|
-
requestId: string;
|
|
11
|
-
imagePath: string;
|
|
12
|
-
instruction?: string;
|
|
13
|
-
turnId?: string;
|
|
14
|
-
}
|
|
15
|
-
interface MaskState {
|
|
16
|
-
request: MaskRequest | null;
|
|
17
|
-
open: (request: MaskRequest) => void;
|
|
18
|
-
close: () => void;
|
|
19
|
-
}
|
|
20
|
-
export declare const useMaskStore: import("zustand").UseBoundStore<import("zustand").StoreApi<MaskState>>;
|
|
21
|
-
export {};
|
|
1
|
+
import { defaultRoot } from "../default-root.js";
|
|
2
|
+
export * from "./mask-state.js";
|
|
3
|
+
/** Hook reads the current provider. Statics address the default app only. */
|
|
4
|
+
export declare const useMaskStore: (<T>(selector: (state: ReturnType<typeof defaultRoot.stores.mask.getState>) => T) => T) & import("zustand").StoreApi<import("./mask-state.js").MaskState>;
|
|
22
5
|
//# sourceMappingURL=mask-store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mask-store.d.ts","sourceRoot":"","sources":["../../src/stores/mask-store.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mask-store.d.ts","sourceRoot":"","sources":["../../src/stores/mask-store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,cAAc,iBAAiB,CAAC;AAEhC,6EAA6E;AAC7E,eAAO,MAAM,YAAY,IACD,CAAC,YAAY,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAG,CAAC,mEAIzG,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { useRootStore } from "../root-context.js";
|
|
2
|
+
import { defaultRoot } from "../default-root.js";
|
|
3
|
+
export * from "./mask-state.js";
|
|
4
|
+
/** Hook reads the current provider. Statics address the default app only. */
|
|
5
|
+
export const useMaskStore = Object.assign(function useMaskStore(selector) {
|
|
6
|
+
return useRootStore("mask", selector);
|
|
7
|
+
}, defaultRoot.stores.mask);
|
|
7
8
|
//# sourceMappingURL=mask-store.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mask-store.js","sourceRoot":"","sources":["../../src/stores/mask-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"mask-store.js","sourceRoot":"","sources":["../../src/stores/mask-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,cAAc,iBAAiB,CAAC;AAEhC,6EAA6E;AAC7E,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CACvC,SAAS,YAAY,CAAI,QAA2E;IAClG,OAAO,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AACxC,CAAC,EACD,WAAW,CAAC,MAAM,CAAC,IAAI,CACxB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { StoreEnvironment } from "./store-environment.js";
|
|
2
|
+
import type { MintedAgent } from "../lib/api-client.js";
|
|
3
|
+
export interface PrincipalState {
|
|
4
|
+
mintPending: boolean;
|
|
5
|
+
mintError: string | null;
|
|
6
|
+
oneTimeCredential: MintedAgent | null;
|
|
7
|
+
mintAgent: (label: string, ttlDays: number) => Promise<void>;
|
|
8
|
+
acknowledgeAgentCredential: () => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Mint state lives above Settings because the response contains an
|
|
12
|
+
* unrecoverable, one-time value. Closing a panel or changing views must not
|
|
13
|
+
* discard either the request in flight or the value it eventually returns.
|
|
14
|
+
*/
|
|
15
|
+
export declare function createPrincipalStore(env: StoreEnvironment): import("zustand").StoreApi<PrincipalState>;
|
|
16
|
+
//# sourceMappingURL=principal-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"principal-state.d.ts","sourceRoot":"","sources":["../../src/stores/principal-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,iBAAiB,EAAE,WAAW,GAAG,IAAI,CAAC;IACtC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,0BAA0B,EAAE,MAAM,IAAI,CAAC;CACxC;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,gBAAgB,8CAwBzD"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { createStore } from "zustand/vanilla";
|
|
2
|
+
/**
|
|
3
|
+
* Mint state lives above Settings because the response contains an
|
|
4
|
+
* unrecoverable, one-time value. Closing a panel or changing views must not
|
|
5
|
+
* discard either the request in flight or the value it eventually returns.
|
|
6
|
+
*/
|
|
7
|
+
export function createPrincipalStore(env) {
|
|
8
|
+
const { api } = env;
|
|
9
|
+
return createStore((set, get) => ({
|
|
10
|
+
mintPending: false,
|
|
11
|
+
mintError: null,
|
|
12
|
+
oneTimeCredential: null,
|
|
13
|
+
mintAgent: async (label, ttlDays) => {
|
|
14
|
+
if (get().mintPending || get().oneTimeCredential)
|
|
15
|
+
return;
|
|
16
|
+
set({ mintPending: true, mintError: null });
|
|
17
|
+
try {
|
|
18
|
+
const oneTimeCredential = await api.principalMint(label, ttlDays);
|
|
19
|
+
set({ mintPending: false, oneTimeCredential });
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
set({
|
|
23
|
+
mintPending: false,
|
|
24
|
+
mintError: error instanceof Error ? error.message : "Could not create agent access",
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
acknowledgeAgentCredential: () => set({ oneTimeCredential: null }),
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=principal-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"principal-state.js","sourceRoot":"","sources":["../../src/stores/principal-state.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAW9C;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,GAAqB;IACxD,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;IACpB,OAAO,WAAW,CAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;QAChD,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,IAAI;QACf,iBAAiB,EAAE,IAAI;QAEvB,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;YAClC,IAAI,GAAG,EAAE,CAAC,WAAW,IAAI,GAAG,EAAE,CAAC,iBAAiB;gBAAE,OAAO;YACzD,GAAG,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YAC5C,IAAI,CAAC;gBACH,MAAM,iBAAiB,GAAG,MAAM,GAAG,CAAC,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;gBAClE,GAAG,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,iBAAiB,EAAE,CAAC,CAAC;YACjD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,GAAG,CAAC;oBACF,WAAW,EAAE,KAAK;oBAClB,SAAS,EACP,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,+BAA+B;iBAC3E,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,0BAA0B,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;KACnE,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
oneTimeCredential: MintedAgent | null;
|
|
6
|
-
mintAgent: (label: string, ttlDays: number) => Promise<void>;
|
|
7
|
-
acknowledgeAgentCredential: () => void;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Mint state lives above Settings because the response contains an
|
|
11
|
-
* unrecoverable, one-time value. Closing a panel or changing views must not
|
|
12
|
-
* discard either the request in flight or the value it eventually returns.
|
|
13
|
-
*/
|
|
14
|
-
export declare const usePrincipalStore: import("zustand").UseBoundStore<import("zustand").StoreApi<PrincipalState>>;
|
|
15
|
-
export {};
|
|
1
|
+
import { defaultRoot } from "../default-root.js";
|
|
2
|
+
export * from "./principal-state.js";
|
|
3
|
+
/** Hook reads the current provider. Statics address the default app only. */
|
|
4
|
+
export declare const usePrincipalStore: (<T>(selector: (state: ReturnType<typeof defaultRoot.stores.principal.getState>) => T) => T) & import("zustand").StoreApi<import("./principal-state.js").PrincipalState>;
|
|
16
5
|
//# sourceMappingURL=principal-store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"principal-store.d.ts","sourceRoot":"","sources":["../../src/stores/principal-store.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"principal-store.d.ts","sourceRoot":"","sources":["../../src/stores/principal-store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,cAAc,sBAAsB,CAAC;AAErC,6EAA6E;AAC7E,eAAO,MAAM,iBAAiB,IACD,CAAC,YAAY,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAG,CAAC,6EAInH,CAAC"}
|
|
@@ -1,29 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export const usePrincipalStore = create((set, get) => ({
|
|
9
|
-
mintPending: false,
|
|
10
|
-
mintError: null,
|
|
11
|
-
oneTimeCredential: null,
|
|
12
|
-
mintAgent: async (label, ttlDays) => {
|
|
13
|
-
if (get().mintPending || get().oneTimeCredential)
|
|
14
|
-
return;
|
|
15
|
-
set({ mintPending: true, mintError: null });
|
|
16
|
-
try {
|
|
17
|
-
const oneTimeCredential = await api.principalMint(label, ttlDays);
|
|
18
|
-
set({ mintPending: false, oneTimeCredential });
|
|
19
|
-
}
|
|
20
|
-
catch (error) {
|
|
21
|
-
set({
|
|
22
|
-
mintPending: false,
|
|
23
|
-
mintError: error instanceof Error ? error.message : "Could not create agent access",
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
acknowledgeAgentCredential: () => set({ oneTimeCredential: null }),
|
|
28
|
-
}));
|
|
1
|
+
import { useRootStore } from "../root-context.js";
|
|
2
|
+
import { defaultRoot } from "../default-root.js";
|
|
3
|
+
export * from "./principal-state.js";
|
|
4
|
+
/** Hook reads the current provider. Statics address the default app only. */
|
|
5
|
+
export const usePrincipalStore = Object.assign(function usePrincipalStore(selector) {
|
|
6
|
+
return useRootStore("principal", selector);
|
|
7
|
+
}, defaultRoot.stores.principal);
|
|
29
8
|
//# sourceMappingURL=principal-store.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"principal-store.js","sourceRoot":"","sources":["../../src/stores/principal-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"principal-store.js","sourceRoot":"","sources":["../../src/stores/principal-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,cAAc,sBAAsB,CAAC;AAErC,6EAA6E;AAC7E,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAC5C,SAAS,iBAAiB,CAAI,QAAgF;IAC5G,OAAO,YAAY,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AAC7C,CAAC,EACD,WAAW,CAAC,MAAM,CAAC,SAAS,CAC7B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { StoreEnvironment } from "./store-environment.js";
|
|
2
|
+
import type { ProviderInfo } from "@schlessera/brain-ui-sdk/protocol";
|
|
3
|
+
import type { BackendInfo } from "../lib/api-client.js";
|
|
4
|
+
export interface ProviderState {
|
|
5
|
+
/** Provider combos the server currently offers (metadata only). */
|
|
6
|
+
available: ProviderInfo[];
|
|
7
|
+
/** User's chosen combo for the next new conversation. Persisted. */
|
|
8
|
+
selectedId: string;
|
|
9
|
+
/**
|
|
10
|
+
* Provider the active session is pinned to (from `session_info`). When set,
|
|
11
|
+
* it takes display precedence over `selectedId` and the picker locks.
|
|
12
|
+
*/
|
|
13
|
+
pinnedId: string | null;
|
|
14
|
+
/** Capability metadata keyed by backend id. */
|
|
15
|
+
backends: Record<string, BackendInfo>;
|
|
16
|
+
loaded: boolean;
|
|
17
|
+
loadProviders: () => Promise<void>;
|
|
18
|
+
setSelected: (id: string) => void;
|
|
19
|
+
setPinned: (id: string | null) => void;
|
|
20
|
+
}
|
|
21
|
+
export declare function createProviderStore(env: StoreEnvironment): import("zustand").StoreApi<ProviderState>;
|
|
22
|
+
/** Resolve the backend metadata for an available provider profile. */
|
|
23
|
+
export declare function selectBackendForProvider(state: Pick<ProviderState, "available" | "backends">, providerId: string | null | undefined): BackendInfo | null;
|
|
24
|
+
//# sourceMappingURL=provider-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-state.d.ts","sourceRoot":"","sources":["../../src/stores/provider-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,WAAW,aAAa;IAC5B,mEAAmE;IACnE,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,oEAAoE;IACpE,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACtC,MAAM,EAAE,OAAO,CAAC;IAEhB,aAAa,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CACxC;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,gBAAgB,6CAkExD;AAED,sEAAsE;AACtE,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,WAAW,GAAG,UAAU,CAAC,EACpD,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACpC,WAAW,GAAG,IAAI,CAKpB"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { createStore } from "zustand/vanilla";
|
|
2
|
+
export function createProviderStore(env) {
|
|
3
|
+
const { api } = env;
|
|
4
|
+
const PROVIDER_ID_KEY = env.storageKey("brain-ui:provider-id");
|
|
5
|
+
function readSelectedId() {
|
|
6
|
+
const storage = env.storage();
|
|
7
|
+
if (!storage)
|
|
8
|
+
return "";
|
|
9
|
+
return env.storage()?.getItem(PROVIDER_ID_KEY) ?? "";
|
|
10
|
+
}
|
|
11
|
+
return createStore((set, get) => ({
|
|
12
|
+
available: [],
|
|
13
|
+
selectedId: readSelectedId(),
|
|
14
|
+
pinnedId: null,
|
|
15
|
+
backends: {},
|
|
16
|
+
loaded: false,
|
|
17
|
+
loadProviders: async () => {
|
|
18
|
+
try {
|
|
19
|
+
const { providers, backends } = await api.providers();
|
|
20
|
+
set((s) => {
|
|
21
|
+
// Keep the persisted choice if it's still on offer; otherwise fall
|
|
22
|
+
// back to the first available combo. This runs on every reload of the
|
|
23
|
+
// roster, so hiding the selected model in settings moves the selection
|
|
24
|
+
// instead of leaving the composer pointing at a profile the picker no
|
|
25
|
+
// longer lists.
|
|
26
|
+
const stillValid = providers.some((p) => p.id === s.selectedId);
|
|
27
|
+
const selectedId = stillValid && s.selectedId
|
|
28
|
+
? s.selectedId
|
|
29
|
+
: providers[0]?.id ?? "";
|
|
30
|
+
// Persist the fallback too — otherwise the stale id sits in
|
|
31
|
+
// localStorage and has to be re-resolved on every boot.
|
|
32
|
+
if (selectedId !== s.selectedId &&
|
|
33
|
+
env.storage() !== null) {
|
|
34
|
+
env.storage()?.setItem(PROVIDER_ID_KEY, selectedId);
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
available: providers,
|
|
38
|
+
selectedId,
|
|
39
|
+
backends: backends ?? {},
|
|
40
|
+
loaded: true,
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
// Soft-fail: leave the picker empty; the composer still works and
|
|
46
|
+
// sends run on the server default.
|
|
47
|
+
set({ loaded: true });
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
setSelected: (id) => {
|
|
51
|
+
if (env.storage() !== null) {
|
|
52
|
+
env.storage()?.setItem(PROVIDER_ID_KEY, id);
|
|
53
|
+
}
|
|
54
|
+
set({ selectedId: id });
|
|
55
|
+
},
|
|
56
|
+
setPinned: (id) => {
|
|
57
|
+
if (get().pinnedId === id)
|
|
58
|
+
return;
|
|
59
|
+
set({ pinnedId: id });
|
|
60
|
+
},
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
/** Resolve the backend metadata for an available provider profile. */
|
|
64
|
+
export function selectBackendForProvider(state, providerId) {
|
|
65
|
+
const backendId = state.available.find((provider) => provider.id === providerId)?.backendId;
|
|
66
|
+
return backendId ? state.backends[backendId] ?? null : null;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=provider-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-state.js","sourceRoot":"","sources":["../../src/stores/provider-state.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAuB9C,MAAM,UAAU,mBAAmB,CAAC,GAAqB;IACvD,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;IACpB,MAAM,eAAe,GAAG,GAAG,CAAC,UAAU,CAAC,sBAAsB,CAAC,CAAC;IAE/D,SAAS,cAAc;QACrB,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;QAC9B,IAAI,CAAC,OAAO;YAAE,OAAO,EAAE,CAAC;QACxB,OAAO,GAAG,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;IACvD,CAAC;IAGD,OAAO,WAAW,CAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;QAC/C,SAAS,EAAE,EAAE;QACb,UAAU,EAAE,cAAc,EAAE;QAC5B,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,KAAK;QAEb,aAAa,EAAE,KAAK,IAAI,EAAE;YACxB,IAAI,CAAC;gBACH,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,MAAM,GAAG,CAAC,SAAS,EAAE,CAAC;gBACtD,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;oBACR,mEAAmE;oBACnE,sEAAsE;oBACtE,uEAAuE;oBACvE,sEAAsE;oBACtE,gBAAgB;oBAChB,MAAM,UAAU,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC;oBAChE,MAAM,UAAU,GACd,UAAU,IAAI,CAAC,CAAC,UAAU;wBACxB,CAAC,CAAC,CAAC,CAAC,UAAU;wBACd,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC;oBAC7B,4DAA4D;oBAC5D,wDAAwD;oBACxD,IACE,UAAU,KAAK,CAAC,CAAC,UAAU;wBAC3B,GAAG,CAAC,OAAO,EAAE,KAAK,IAAI,EACtB,CAAC;wBACD,GAAG,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;oBACtD,CAAC;oBACD,OAAO;wBACL,SAAS,EAAE,SAAS;wBACpB,UAAU;wBACV,QAAQ,EAAE,QAAQ,IAAI,EAAE;wBACxB,MAAM,EAAE,IAAI;qBACb,CAAC;gBACJ,CAAC,CAAC,CAAC;YACL,CAAC;YAAC,MAAM,CAAC;gBACP,kEAAkE;gBAClE,mCAAmC;gBACnC,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;YACxB,CAAC;QACH,CAAC;QAED,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE;YAClB,IAAI,GAAG,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC;gBAC3B,GAAG,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;YAC9C,CAAC;YACD,GAAG,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;QAC1B,CAAC;QAED,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE;YAChB,IAAI,GAAG,EAAE,CAAC,QAAQ,KAAK,EAAE;gBAAE,OAAO;YAClC,GAAG,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;QACxB,CAAC;KACF,CAAC,CAAC,CAAC;AACN,CAAC;AAED,sEAAsE;AACtE,MAAM,UAAU,wBAAwB,CACtC,KAAoD,EACpD,UAAqC;IAErC,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,CACpC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,UAAU,CACzC,EAAE,SAAS,CAAC;IACb,OAAO,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AAC9D,CAAC"}
|
|
@@ -1,24 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
available: ProviderInfo[];
|
|
6
|
-
/** User's chosen combo for the next new conversation. Persisted. */
|
|
7
|
-
selectedId: string;
|
|
8
|
-
/**
|
|
9
|
-
* Provider the active session is pinned to (from `session_info`). When set,
|
|
10
|
-
* it takes display precedence over `selectedId` and the picker locks.
|
|
11
|
-
*/
|
|
12
|
-
pinnedId: string | null;
|
|
13
|
-
/** Capability metadata keyed by backend id. */
|
|
14
|
-
backends: Record<string, BackendInfo>;
|
|
15
|
-
loaded: boolean;
|
|
16
|
-
loadProviders: () => Promise<void>;
|
|
17
|
-
setSelected: (id: string) => void;
|
|
18
|
-
setPinned: (id: string | null) => void;
|
|
19
|
-
}
|
|
20
|
-
/** Resolve the backend metadata for an available provider profile. */
|
|
21
|
-
export declare function selectBackendForProvider(state: Pick<ProviderState, "available" | "backends">, providerId: string | null | undefined): BackendInfo | null;
|
|
22
|
-
export declare const useProviderStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ProviderState>>;
|
|
23
|
-
export {};
|
|
1
|
+
import { defaultRoot } from "../default-root.js";
|
|
2
|
+
export * from "./provider-state.js";
|
|
3
|
+
/** Hook reads the current provider. Statics address the default app only. */
|
|
4
|
+
export declare const useProviderStore: (<T>(selector: (state: ReturnType<typeof defaultRoot.stores.provider.getState>) => T) => T) & import("zustand").StoreApi<import("./provider-state.js").ProviderState>;
|
|
24
5
|
//# sourceMappingURL=provider-store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-store.d.ts","sourceRoot":"","sources":["../../src/stores/provider-store.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"provider-store.d.ts","sourceRoot":"","sources":["../../src/stores/provider-store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,cAAc,qBAAqB,CAAC;AAEpC,6EAA6E;AAC7E,eAAO,MAAM,gBAAgB,IACD,CAAC,YAAY,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAG,CAAC,2EAIjH,CAAC"}
|
|
@@ -1,65 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
/** Resolve the backend metadata for an available provider profile. */
|
|
10
|
-
export function selectBackendForProvider(state, providerId) {
|
|
11
|
-
const backendId = state.available.find((provider) => provider.id === providerId)?.backendId;
|
|
12
|
-
return backendId ? state.backends[backendId] ?? null : null;
|
|
13
|
-
}
|
|
14
|
-
export const useProviderStore = create((set, get) => ({
|
|
15
|
-
available: [],
|
|
16
|
-
selectedId: readSelectedId(),
|
|
17
|
-
pinnedId: null,
|
|
18
|
-
backends: {},
|
|
19
|
-
loaded: false,
|
|
20
|
-
loadProviders: async () => {
|
|
21
|
-
try {
|
|
22
|
-
const { providers, backends } = await api.providers();
|
|
23
|
-
set((s) => {
|
|
24
|
-
// Keep the persisted choice if it's still on offer; otherwise fall
|
|
25
|
-
// back to the first available combo. This runs on every reload of the
|
|
26
|
-
// roster, so hiding the selected model in settings moves the selection
|
|
27
|
-
// instead of leaving the composer pointing at a profile the picker no
|
|
28
|
-
// longer lists.
|
|
29
|
-
const stillValid = providers.some((p) => p.id === s.selectedId);
|
|
30
|
-
const selectedId = stillValid && s.selectedId
|
|
31
|
-
? s.selectedId
|
|
32
|
-
: providers[0]?.id ?? "";
|
|
33
|
-
// Persist the fallback too — otherwise the stale id sits in
|
|
34
|
-
// localStorage and has to be re-resolved on every boot.
|
|
35
|
-
if (selectedId !== s.selectedId &&
|
|
36
|
-
typeof localStorage !== "undefined") {
|
|
37
|
-
localStorage.setItem(PROVIDER_ID_KEY, selectedId);
|
|
38
|
-
}
|
|
39
|
-
return {
|
|
40
|
-
available: providers,
|
|
41
|
-
selectedId,
|
|
42
|
-
backends: backends ?? {},
|
|
43
|
-
loaded: true,
|
|
44
|
-
};
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
catch {
|
|
48
|
-
// Soft-fail: leave the picker empty; the composer still works and
|
|
49
|
-
// sends run on the server default.
|
|
50
|
-
set({ loaded: true });
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
setSelected: (id) => {
|
|
54
|
-
if (typeof localStorage !== "undefined") {
|
|
55
|
-
localStorage.setItem(PROVIDER_ID_KEY, id);
|
|
56
|
-
}
|
|
57
|
-
set({ selectedId: id });
|
|
58
|
-
},
|
|
59
|
-
setPinned: (id) => {
|
|
60
|
-
if (get().pinnedId === id)
|
|
61
|
-
return;
|
|
62
|
-
set({ pinnedId: id });
|
|
63
|
-
},
|
|
64
|
-
}));
|
|
1
|
+
import { useRootStore } from "../root-context.js";
|
|
2
|
+
import { defaultRoot } from "../default-root.js";
|
|
3
|
+
export * from "./provider-state.js";
|
|
4
|
+
/** Hook reads the current provider. Statics address the default app only. */
|
|
5
|
+
export const useProviderStore = Object.assign(function useProviderStore(selector) {
|
|
6
|
+
return useRootStore("provider", selector);
|
|
7
|
+
}, defaultRoot.stores.provider);
|
|
65
8
|
//# sourceMappingURL=provider-store.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-store.js","sourceRoot":"","sources":["../../src/stores/provider-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"provider-store.js","sourceRoot":"","sources":["../../src/stores/provider-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,cAAc,qBAAqB,CAAC;AAEpC,6EAA6E;AAC7E,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAC3C,SAAS,gBAAgB,CAAI,QAA+E;IAC1G,OAAO,YAAY,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AAC5C,CAAC,EACD,WAAW,CAAC,MAAM,CAAC,QAAQ,CAC5B,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { StoredShare } from "@schlessera/brain-ui-sdk/share-target";
|
|
2
|
+
/**
|
|
3
|
+
* Shares waiting for the user to confirm them.
|
|
4
|
+
*
|
|
5
|
+
* They queue rather than run: a share is untrusted input (any website can POST
|
|
6
|
+
* to the share target), and the client can only have ONE unbound chat draft at
|
|
7
|
+
* a time — two turns started before the first `session_info` arrives would put
|
|
8
|
+
* both messages in the same buffer and then silently drop the second session's
|
|
9
|
+
* transcript. One at a time, each behind a tap, solves both.
|
|
10
|
+
*/
|
|
11
|
+
export interface ShareIntakeState {
|
|
12
|
+
/** Claimed shares, oldest first. The head is the one on screen. */
|
|
13
|
+
queue: StoredShare[];
|
|
14
|
+
/** An upload or send is in flight; no second share may start. */
|
|
15
|
+
busy: boolean;
|
|
16
|
+
/** Something the user needs to see rather than a silent failure. */
|
|
17
|
+
error: string | null;
|
|
18
|
+
/** Non-fatal notes about the last confirm (images over the vision cap, …). */
|
|
19
|
+
notes: string[];
|
|
20
|
+
enqueue: (record: StoredShare) => void;
|
|
21
|
+
remove: (id: string) => void;
|
|
22
|
+
setBusy: (busy: boolean) => void;
|
|
23
|
+
setError: (error: string | null) => void;
|
|
24
|
+
setNotes: (notes: string[]) => void;
|
|
25
|
+
}
|
|
26
|
+
export declare function createShareStore(): import("zustand").StoreApi<ShareIntakeState>;
|
|
27
|
+
/** Whether a share is pending — the shell reads this to defer a reload. */
|
|
28
|
+
export declare function hasPendingShare(state: ShareIntakeState): boolean;
|
|
29
|
+
//# sourceMappingURL=share-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"share-state.d.ts","sourceRoot":"","sources":["../../src/stores/share-state.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAEzE;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAgB;IAC/B,mEAAmE;IACnE,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,iEAAiE;IACjE,IAAI,EAAE,OAAO,CAAC;IACd,oEAAoE;IACpE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,8EAA8E;IAC9E,KAAK,EAAE,MAAM,EAAE,CAAC;IAEhB,OAAO,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACvC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACjC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CACrC;AAED,wBAAgB,gBAAgB,iDAqB/B;AAED,2EAA2E;AAC3E,wBAAgB,eAAe,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAEhE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createStore } from "zustand/vanilla";
|
|
2
|
+
export function createShareStore() {
|
|
3
|
+
return createStore((set) => ({
|
|
4
|
+
queue: [],
|
|
5
|
+
busy: false,
|
|
6
|
+
error: null,
|
|
7
|
+
notes: [],
|
|
8
|
+
enqueue: (record) => set((state) => state.queue.some((queued) => queued.id === record.id)
|
|
9
|
+
? state
|
|
10
|
+
: { queue: [...state.queue, record] }),
|
|
11
|
+
remove: (id) => set((state) => ({ queue: state.queue.filter((queued) => queued.id !== id) })),
|
|
12
|
+
setBusy: (busy) => set({ busy }),
|
|
13
|
+
setError: (error) => set({ error }),
|
|
14
|
+
setNotes: (notes) => set({ notes }),
|
|
15
|
+
}));
|
|
16
|
+
}
|
|
17
|
+
/** Whether a share is pending — the shell reads this to defer a reload. */
|
|
18
|
+
export function hasPendingShare(state) {
|
|
19
|
+
return state.queue.length > 0 || state.busy;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=share-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"share-state.js","sourceRoot":"","sources":["../../src/stores/share-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AA6B9C,MAAM,UAAU,gBAAgB;IAC9B,OAAO,WAAW,CAAmB,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAC7C,KAAK,EAAE,EAAE;QACT,IAAI,EAAE,KAAK;QACX,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,EAAE;QAET,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAClB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CACZ,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,MAAM,CAAC,EAAE,CAAC;YACnD,CAAC,CAAC,KAAK;YACP,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,CACxC;QAEH,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,CACb,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;QAE/E,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC;QAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC;QACnC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC;KACpC,CAAC,CAAC,CAAC;AACN,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,eAAe,CAAC,KAAuB;IACrD,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC;AAC9C,CAAC"}
|
|
@@ -1,29 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* They queue rather than run: a share is untrusted input (any website can POST
|
|
6
|
-
* to the share target), and the client can only have ONE unbound chat draft at
|
|
7
|
-
* a time — two turns started before the first `session_info` arrives would put
|
|
8
|
-
* both messages in the same buffer and then silently drop the second session's
|
|
9
|
-
* transcript. One at a time, each behind a tap, solves both.
|
|
10
|
-
*/
|
|
11
|
-
export interface ShareIntakeState {
|
|
12
|
-
/** Claimed shares, oldest first. The head is the one on screen. */
|
|
13
|
-
queue: StoredShare[];
|
|
14
|
-
/** An upload or send is in flight; no second share may start. */
|
|
15
|
-
busy: boolean;
|
|
16
|
-
/** Something the user needs to see rather than a silent failure. */
|
|
17
|
-
error: string | null;
|
|
18
|
-
/** Non-fatal notes about the last confirm (images over the vision cap, …). */
|
|
19
|
-
notes: string[];
|
|
20
|
-
enqueue: (record: StoredShare) => void;
|
|
21
|
-
remove: (id: string) => void;
|
|
22
|
-
setBusy: (busy: boolean) => void;
|
|
23
|
-
setError: (error: string | null) => void;
|
|
24
|
-
setNotes: (notes: string[]) => void;
|
|
25
|
-
}
|
|
26
|
-
export declare const useShareStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ShareIntakeState>>;
|
|
27
|
-
/** Whether a share is pending — the shell reads this to defer a reload. */
|
|
28
|
-
export declare function hasPendingShare(state: ShareIntakeState): boolean;
|
|
1
|
+
import { defaultRoot } from "../default-root.js";
|
|
2
|
+
export * from "./share-state.js";
|
|
3
|
+
/** Hook reads the current provider. Statics address the default app only. */
|
|
4
|
+
export declare const useShareStore: (<T>(selector: (state: ReturnType<typeof defaultRoot.stores.share.getState>) => T) => T) & import("zustand").StoreApi<import("./share-state.js").ShareIntakeState>;
|
|
29
5
|
//# sourceMappingURL=share-store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"share-store.d.ts","sourceRoot":"","sources":["../../src/stores/share-store.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"share-store.d.ts","sourceRoot":"","sources":["../../src/stores/share-store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,cAAc,kBAAkB,CAAC;AAEjC,6EAA6E;AAC7E,eAAO,MAAM,aAAa,IACD,CAAC,YAAY,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAG,CAAC,2EAI3G,CAAC"}
|
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
? state
|
|
9
|
-
: { queue: [...state.queue, record] }),
|
|
10
|
-
remove: (id) => set((state) => ({ queue: state.queue.filter((queued) => queued.id !== id) })),
|
|
11
|
-
setBusy: (busy) => set({ busy }),
|
|
12
|
-
setError: (error) => set({ error }),
|
|
13
|
-
setNotes: (notes) => set({ notes }),
|
|
14
|
-
}));
|
|
15
|
-
/** Whether a share is pending — the shell reads this to defer a reload. */
|
|
16
|
-
export function hasPendingShare(state) {
|
|
17
|
-
return state.queue.length > 0 || state.busy;
|
|
18
|
-
}
|
|
1
|
+
import { useRootStore } from "../root-context.js";
|
|
2
|
+
import { defaultRoot } from "../default-root.js";
|
|
3
|
+
export * from "./share-state.js";
|
|
4
|
+
/** Hook reads the current provider. Statics address the default app only. */
|
|
5
|
+
export const useShareStore = Object.assign(function useShareStore(selector) {
|
|
6
|
+
return useRootStore("share", selector);
|
|
7
|
+
}, defaultRoot.stores.share);
|
|
19
8
|
//# sourceMappingURL=share-store.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"share-store.js","sourceRoot":"","sources":["../../src/stores/share-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"share-store.js","sourceRoot":"","sources":["../../src/stores/share-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,cAAc,kBAAkB,CAAC;AAEjC,6EAA6E;AAC7E,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CACxC,SAAS,aAAa,CAAI,QAA4E;IACpG,OAAO,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AACzC,CAAC,EACD,WAAW,CAAC,MAAM,CAAC,KAAK,CACzB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BrainApi } from "../lib/api-client.js";
|
|
2
|
+
/** Concrete dependencies shared by the store factories of one UI root. */
|
|
3
|
+
export interface StoreEnvironment {
|
|
4
|
+
api: BrainApi;
|
|
5
|
+
apiBase: () => string;
|
|
6
|
+
request: (url: string, init?: RequestInit) => Promise<Response>;
|
|
7
|
+
storage: () => Storage | null;
|
|
8
|
+
storageKey: (key: string) => string;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=store-environment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-environment.d.ts","sourceRoot":"","sources":["../../src/stores/store-environment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,0EAA0E;AAC1E,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,QAAQ,CAAC;IACd,OAAO,EAAE,MAAM,MAAM,CAAC;IACtB,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChE,OAAO,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CACrC"}
|