@assistant-ui/react 0.15.20 → 0.15.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assistant-transport.d.ts +10 -10
- package/dist/assistant-transport.d.ts.map +1 -1
- package/dist/augmentations.d.ts +3 -4
- package/dist/augmentations.d.ts.map +1 -1
- package/dist/context/ReadonlyStore.d.ts +2 -3
- package/dist/context/ReadonlyStore.d.ts.map +1 -1
- package/dist/context/providers/MessageProvider.d.ts +1 -2
- package/dist/context/providers/MessageProvider.d.ts.map +1 -1
- package/dist/context/providers/ThreadViewportProvider.d.ts +2 -3
- package/dist/context/providers/ThreadViewportProvider.d.ts.map +1 -1
- package/dist/context/react/ThreadViewportContext.d.ts +3 -4
- package/dist/context/react/ThreadViewportContext.d.ts.map +1 -1
- package/dist/context/react/utils/createContextHook.d.ts +1 -2
- package/dist/context/react/utils/createContextHook.d.ts.map +1 -1
- package/dist/context/react/utils/createContextStoreHook.d.ts +1 -2
- package/dist/context/react/utils/createContextStoreHook.d.ts.map +1 -1
- package/dist/context/stores/ThreadViewport.d.ts +4 -5
- package/dist/context/stores/ThreadViewport.d.ts.map +1 -1
- package/dist/devtools/DevToolsHooks.d.ts +3 -4
- package/dist/devtools/DevToolsHooks.d.ts.map +1 -1
- package/dist/hooks/useMessageQuote.d.ts +1 -2
- package/dist/hooks/useMessageQuote.d.ts.map +1 -1
- package/dist/hooks/useMessageTiming.d.ts +1 -2
- package/dist/hooks/useMessageTiming.d.ts.map +1 -1
- package/dist/hooks/useToolCallElapsed.d.ts +1 -2
- package/dist/hooks/useToolCallElapsed.d.ts.map +1 -1
- package/dist/legacy-runtime/AssistantRuntimeProvider.d.ts +3 -4
- package/dist/legacy-runtime/AssistantRuntimeProvider.d.ts.map +1 -1
- package/dist/mcp-apps/McpAppRenderer.d.ts +3 -4
- package/dist/mcp-apps/McpAppRenderer.d.ts.map +1 -1
- package/dist/mcp-apps/McpAppsRemoteHost.d.ts +1 -2
- package/dist/mcp-apps/McpAppsRemoteHost.d.ts.map +1 -1
- package/dist/mcp-apps/app-frame.d.ts +1 -2
- package/dist/mcp-apps/app-frame.d.ts.map +1 -1
- package/dist/mcp-apps/bridge.d.ts +4 -5
- package/dist/mcp-apps/bridge.d.ts.map +1 -1
- package/dist/mcp-apps/types.d.ts +20 -20
- package/dist/mcp-apps/types.d.ts.map +1 -1
- package/dist/mcp-apps/utils.d.ts +1 -2
- package/dist/mcp-apps/utils.d.ts.map +1 -1
- package/dist/model-context/frame/useAssistantFrameHost.d.ts +1 -2
- package/dist/model-context/frame/useAssistantFrameHost.d.ts.map +1 -1
- package/dist/model-context/makeAssistantVisible.d.ts +2 -2
- package/dist/model-context/makeAssistantVisible.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarCopy.d.ts +2 -3
- package/dist/primitives/actionBar/ActionBarCopy.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarEdit.d.ts +2 -3
- package/dist/primitives/actionBar/ActionBarEdit.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarExportMarkdown.d.ts +2 -3
- package/dist/primitives/actionBar/ActionBarExportMarkdown.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarFeedbackNegative.d.ts +2 -3
- package/dist/primitives/actionBar/ActionBarFeedbackNegative.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarFeedbackPositive.d.ts +2 -3
- package/dist/primitives/actionBar/ActionBarFeedbackPositive.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarInteractionContext.d.ts +3 -4
- package/dist/primitives/actionBar/ActionBarInteractionContext.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarReload.d.ts +2 -3
- package/dist/primitives/actionBar/ActionBarReload.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarRoot.d.ts +2 -3
- package/dist/primitives/actionBar/ActionBarRoot.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarSpeak.d.ts +2 -3
- package/dist/primitives/actionBar/ActionBarSpeak.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarStopSpeaking.d.ts +2 -3
- package/dist/primitives/actionBar/ActionBarStopSpeaking.d.ts.map +1 -1
- package/dist/primitives/actionBar/useActionBarFloatStatus.d.ts +4 -5
- package/dist/primitives/actionBar/useActionBarFloatStatus.d.ts.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreContent.d.ts +2 -3
- package/dist/primitives/actionBarMore/ActionBarMoreContent.d.ts.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreItem.d.ts +2 -3
- package/dist/primitives/actionBarMore/ActionBarMoreItem.d.ts.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreRoot.d.ts +2 -3
- package/dist/primitives/actionBarMore/ActionBarMoreRoot.d.ts.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreSeparator.d.ts +2 -3
- package/dist/primitives/actionBarMore/ActionBarMoreSeparator.d.ts.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreTrigger.d.ts +2 -3
- package/dist/primitives/actionBarMore/ActionBarMoreTrigger.d.ts.map +1 -1
- package/dist/primitives/actionBarMore/scope.d.ts +2 -3
- package/dist/primitives/actionBarMore/scope.d.ts.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalAnchor.d.ts +2 -3
- package/dist/primitives/assistantModal/AssistantModalAnchor.d.ts.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalContent.d.ts +2 -3
- package/dist/primitives/assistantModal/AssistantModalContent.d.ts.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalRoot.d.ts +2 -3
- package/dist/primitives/assistantModal/AssistantModalRoot.d.ts.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalTrigger.d.ts +2 -3
- package/dist/primitives/assistantModal/AssistantModalTrigger.d.ts.map +1 -1
- package/dist/primitives/assistantModal/popoverRenderPrimitives.d.ts +3 -4
- package/dist/primitives/assistantModal/popoverRenderPrimitives.d.ts.map +1 -1
- package/dist/primitives/assistantModal/scope.d.ts +2 -3
- package/dist/primitives/assistantModal/scope.d.ts.map +1 -1
- package/dist/primitives/attachment/AttachmentName.d.ts +2 -3
- package/dist/primitives/attachment/AttachmentName.d.ts.map +1 -1
- package/dist/primitives/attachment/AttachmentRemove.d.ts +2 -3
- package/dist/primitives/attachment/AttachmentRemove.d.ts.map +1 -1
- package/dist/primitives/attachment/AttachmentRoot.d.ts +2 -3
- package/dist/primitives/attachment/AttachmentRoot.d.ts.map +1 -1
- package/dist/primitives/attachment/AttachmentThumb.d.ts +2 -3
- package/dist/primitives/attachment/AttachmentThumb.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerCount.d.ts +2 -3
- package/dist/primitives/branchPicker/BranchPickerCount.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerNext.d.ts +2 -3
- package/dist/primitives/branchPicker/BranchPickerNext.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerNumber.d.ts +2 -3
- package/dist/primitives/branchPicker/BranchPickerNumber.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerPrevious.d.ts +2 -3
- package/dist/primitives/branchPicker/BranchPickerPrevious.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerRoot.d.ts +2 -3
- package/dist/primitives/branchPicker/BranchPickerRoot.d.ts.map +1 -1
- package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.d.ts +2 -3
- package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.d.ts.map +1 -1
- package/dist/primitives/chainOfThought/ChainOfThoughtRoot.d.ts +2 -3
- package/dist/primitives/chainOfThought/ChainOfThoughtRoot.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerAddAttachment.d.ts +2 -3
- package/dist/primitives/composer/ComposerAddAttachment.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerAttachmentDropzone.d.ts +2 -3
- package/dist/primitives/composer/ComposerAttachmentDropzone.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerCancel.d.ts +2 -3
- package/dist/primitives/composer/ComposerCancel.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerCompactContext.d.ts +3 -4
- package/dist/primitives/composer/ComposerCompactContext.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerDictate.d.ts +2 -3
- package/dist/primitives/composer/ComposerDictate.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerDictationTranscript.d.ts +2 -3
- package/dist/primitives/composer/ComposerDictationTranscript.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerInput.d.ts +2 -3
- package/dist/primitives/composer/ComposerInput.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerInputPluginContext.d.ts +5 -6
- package/dist/primitives/composer/ComposerInputPluginContext.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerQuote.d.ts +6 -7
- package/dist/primitives/composer/ComposerQuote.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerRoot.d.ts +2 -3
- package/dist/primitives/composer/ComposerRoot.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerSend.d.ts +3 -4
- package/dist/primitives/composer/ComposerSend.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerStopDictation.d.ts +2 -3
- package/dist/primitives/composer/ComposerStopDictation.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopover.d.ts +6 -7
- package/dist/primitives/composer/trigger/TriggerPopover.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopoverAction.d.ts +2 -3
- package/dist/primitives/composer/trigger/TriggerPopoverAction.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopoverBack.d.ts +2 -3
- package/dist/primitives/composer/trigger/TriggerPopoverBack.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopoverCategories.d.ts +4 -5
- package/dist/primitives/composer/trigger/TriggerPopoverCategories.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopoverDirective.d.ts +2 -3
- package/dist/primitives/composer/trigger/TriggerPopoverDirective.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopoverItems.d.ts +4 -5
- package/dist/primitives/composer/trigger/TriggerPopoverItems.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopoverResource.d.ts +4 -4
- package/dist/primitives/composer/trigger/TriggerPopoverResource.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopoverRootContext.d.ts +12 -13
- package/dist/primitives/composer/trigger/TriggerPopoverRootContext.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/detectTrigger.d.ts +3 -4
- package/dist/primitives/composer/trigger/detectTrigger.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/index.d.ts +2 -2
- package/dist/primitives/composer/trigger/index.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/matchesTriggerItemQuery.d.ts +1 -2
- package/dist/primitives/composer/trigger/matchesTriggerItemQuery.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/triggerDetectionResource.d.ts +3 -4
- package/dist/primitives/composer/trigger/triggerDetectionResource.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/triggerKeyboardResource.d.ts +3 -4
- package/dist/primitives/composer/trigger/triggerKeyboardResource.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/triggerNavigationResource.d.ts +2 -3
- package/dist/primitives/composer/trigger/triggerNavigationResource.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/triggerSelectionResource.d.ts +4 -5
- package/dist/primitives/composer/trigger/triggerSelectionResource.d.ts.map +1 -1
- package/dist/primitives/composer/useComposerInputState.d.ts +4 -5
- package/dist/primitives/composer/useComposerInputState.d.ts.map +1 -1
- package/dist/primitives/dropdownMenuRenderPrimitives.d.ts +4 -5
- package/dist/primitives/dropdownMenuRenderPrimitives.d.ts.map +1 -1
- package/dist/primitives/error/ErrorMessage.d.ts +2 -3
- package/dist/primitives/error/ErrorMessage.d.ts.map +1 -1
- package/dist/primitives/error/ErrorRoot.d.ts +2 -3
- package/dist/primitives/error/ErrorRoot.d.ts.map +1 -1
- package/dist/primitives/message/MessageError.d.ts +1 -2
- package/dist/primitives/message/MessageError.d.ts.map +1 -1
- package/dist/primitives/message/MessageIf.d.ts +2 -3
- package/dist/primitives/message/MessageIf.d.ts.map +1 -1
- package/dist/primitives/message/MessageParts.d.ts +3 -3
- package/dist/primitives/message/MessageParts.d.ts.map +1 -1
- package/dist/primitives/message/MessagePartsGrouped.d.ts +4 -5
- package/dist/primitives/message/MessagePartsGrouped.d.ts.map +1 -1
- package/dist/primitives/message/MessageRoot.d.ts +2 -3
- package/dist/primitives/message/MessageRoot.d.ts.map +1 -1
- package/dist/primitives/messagePart/MessagePartImage.d.ts +2 -3
- package/dist/primitives/messagePart/MessagePartImage.d.ts.map +1 -1
- package/dist/primitives/messagePart/MessagePartText.d.ts +2 -3
- package/dist/primitives/messagePart/MessagePartText.d.ts.map +1 -1
- package/dist/primitives/messagePart/useMessagePartData.d.ts +1 -2
- package/dist/primitives/messagePart/useMessagePartData.d.ts.map +1 -1
- package/dist/primitives/messagePart/useMessagePartFile.d.ts +1 -2
- package/dist/primitives/messagePart/useMessagePartFile.d.ts.map +1 -1
- package/dist/primitives/messagePart/useMessagePartImage.d.ts +1 -2
- package/dist/primitives/messagePart/useMessagePartImage.d.ts.map +1 -1
- package/dist/primitives/messagePart/useMessagePartReasoning.d.ts +1 -2
- package/dist/primitives/messagePart/useMessagePartReasoning.d.ts.map +1 -1
- package/dist/primitives/messagePart/useMessagePartSource.d.ts +1 -2
- package/dist/primitives/messagePart/useMessagePartSource.d.ts.map +1 -1
- package/dist/primitives/messagePart/useMessagePartText.d.ts +1 -2
- package/dist/primitives/messagePart/useMessagePartText.d.ts.map +1 -1
- package/dist/primitives/queueItem/QueueItemRemove.d.ts +2 -3
- package/dist/primitives/queueItem/QueueItemRemove.d.ts.map +1 -1
- package/dist/primitives/queueItem/QueueItemSteer.d.ts +2 -3
- package/dist/primitives/queueItem/QueueItemSteer.d.ts.map +1 -1
- package/dist/primitives/queueItem/QueueItemText.d.ts +2 -3
- package/dist/primitives/queueItem/QueueItemText.d.ts.map +1 -1
- package/dist/primitives/reasoning/useScrollLock.d.ts +1 -2
- package/dist/primitives/reasoning/useScrollLock.d.ts.map +1 -1
- package/dist/primitives/selectionToolbar/SelectionToolbarQuote.d.ts +2 -3
- package/dist/primitives/selectionToolbar/SelectionToolbarQuote.d.ts.map +1 -1
- package/dist/primitives/selectionToolbar/SelectionToolbarRoot.d.ts +3 -4
- package/dist/primitives/selectionToolbar/SelectionToolbarRoot.d.ts.map +1 -1
- package/dist/primitives/selectionToolbar/SelectionToolbarRoot.js +5 -1
- package/dist/primitives/selectionToolbar/SelectionToolbarRoot.js.map +1 -1
- package/dist/primitives/suggestion/SuggestionDescription.d.ts +2 -3
- package/dist/primitives/suggestion/SuggestionDescription.d.ts.map +1 -1
- package/dist/primitives/suggestion/SuggestionTitle.d.ts +2 -3
- package/dist/primitives/suggestion/SuggestionTitle.d.ts.map +1 -1
- package/dist/primitives/suggestion/SuggestionTrigger.d.ts +2 -3
- package/dist/primitives/suggestion/SuggestionTrigger.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadEmpty.d.ts +2 -3
- package/dist/primitives/thread/ThreadEmpty.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadIf.d.ts +2 -3
- package/dist/primitives/thread/ThreadIf.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadRoot.d.ts +2 -3
- package/dist/primitives/thread/ThreadRoot.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadScrollToBottom.d.ts +3 -3
- package/dist/primitives/thread/ThreadScrollToBottom.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadSuggestion.d.ts +2 -3
- package/dist/primitives/thread/ThreadSuggestion.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadViewport.d.ts +2 -3
- package/dist/primitives/thread/ThreadViewport.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadViewportFooter.d.ts +2 -3
- package/dist/primitives/thread/ThreadViewportFooter.d.ts.map +1 -1
- package/dist/primitives/thread/topAnchor/computeTopAnchorSlack.d.ts +4 -5
- package/dist/primitives/thread/topAnchor/computeTopAnchorSlack.d.ts.map +1 -1
- package/dist/primitives/thread/topAnchor/createReserveObservers.d.ts +1 -2
- package/dist/primitives/thread/topAnchor/createReserveObservers.d.ts.map +1 -1
- package/dist/primitives/thread/topAnchor/mountTopAnchorReserve.d.ts +2 -3
- package/dist/primitives/thread/topAnchor/mountTopAnchorReserve.d.ts.map +1 -1
- package/dist/primitives/thread/topAnchor/topAnchorTurn.d.ts +5 -6
- package/dist/primitives/thread/topAnchor/topAnchorTurn.d.ts.map +1 -1
- package/dist/primitives/thread/topAnchor/topAnchorUtils.d.ts +5 -6
- package/dist/primitives/thread/topAnchor/topAnchorUtils.d.ts.map +1 -1
- package/dist/primitives/thread/topAnchor/useTopAnchorReserve.d.ts +1 -2
- package/dist/primitives/thread/topAnchor/useTopAnchorReserve.d.ts.map +1 -1
- package/dist/primitives/thread/useThreadViewportAutoScroll.d.ts +2 -3
- package/dist/primitives/thread/useThreadViewportAutoScroll.d.ts.map +1 -1
- package/dist/primitives/thread/useThreadViewportAutoScroll.js +23 -15
- package/dist/primitives/thread/useThreadViewportAutoScroll.js.map +1 -1
- package/dist/primitives/threadList/ThreadListLoadMore.d.ts +2 -3
- package/dist/primitives/threadList/ThreadListLoadMore.d.ts.map +1 -1
- package/dist/primitives/threadList/ThreadListNew.d.ts +2 -3
- package/dist/primitives/threadList/ThreadListNew.d.ts.map +1 -1
- package/dist/primitives/threadList/ThreadListRoot.d.ts +2 -3
- package/dist/primitives/threadList/ThreadListRoot.d.ts.map +1 -1
- package/dist/primitives/threadListFocusGroup.d.ts +4 -4
- package/dist/primitives/threadListFocusGroup.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemArchive.d.ts +2 -3
- package/dist/primitives/threadListItem/ThreadListItemArchive.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemDelete.d.ts +2 -3
- package/dist/primitives/threadListItem/ThreadListItemDelete.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemRoot.d.ts +2 -3
- package/dist/primitives/threadListItem/ThreadListItemRoot.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemTrigger.d.ts +2 -3
- package/dist/primitives/threadListItem/ThreadListItemTrigger.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemUnarchive.d.ts +2 -3
- package/dist/primitives/threadListItem/ThreadListItemUnarchive.d.ts.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreContent.d.ts +2 -3
- package/dist/primitives/threadListItemMore/ThreadListItemMoreContent.d.ts.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreItem.d.ts +2 -3
- package/dist/primitives/threadListItemMore/ThreadListItemMoreItem.d.ts.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreRoot.d.ts +4 -5
- package/dist/primitives/threadListItemMore/ThreadListItemMoreRoot.d.ts.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreSeparator.d.ts +2 -3
- package/dist/primitives/threadListItemMore/ThreadListItemMoreSeparator.d.ts.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreTrigger.d.ts +2 -3
- package/dist/primitives/threadListItemMore/ThreadListItemMoreTrigger.d.ts.map +1 -1
- package/dist/primitives/threadListItemMore/scope.d.ts +2 -3
- package/dist/primitives/threadListItemMore/scope.d.ts.map +1 -1
- package/dist/sandbox-host/SandboxHost.d.ts +8 -9
- package/dist/sandbox-host/SandboxHost.d.ts.map +1 -1
- package/dist/tests/remote-thread-list-test-helpers.d.ts +1 -2
- package/dist/tests/remote-thread-list-test-helpers.d.ts.map +1 -1
- package/dist/unstable/useComposerInput.d.ts +5 -6
- package/dist/unstable/useComposerInput.d.ts.map +1 -1
- package/dist/unstable/useComposerInputHistory.d.ts +2 -3
- package/dist/unstable/useComposerInputHistory.d.ts.map +1 -1
- package/dist/unstable/useLiveCompletionAdapter.d.ts +2 -3
- package/dist/unstable/useLiveCompletionAdapter.d.ts.map +1 -1
- package/dist/unstable/useMentionAdapter.d.ts +7 -8
- package/dist/unstable/useMentionAdapter.d.ts.map +1 -1
- package/dist/unstable/useMessageStallDetection.d.ts +3 -4
- package/dist/unstable/useMessageStallDetection.d.ts.map +1 -1
- package/dist/unstable/useModelContextSnapshot.d.ts +3 -4
- package/dist/unstable/useModelContextSnapshot.d.ts.map +1 -1
- package/dist/unstable/useSlashCommandAdapter.d.ts +4 -5
- package/dist/unstable/useSlashCommandAdapter.d.ts.map +1 -1
- package/dist/unstable/webmcp/WebMcpRegistrationResource.d.ts +2 -3
- package/dist/unstable/webmcp/WebMcpRegistrationResource.d.ts.map +1 -1
- package/dist/unstable/webmcp/convertTools.d.ts +4 -5
- package/dist/unstable/webmcp/convertTools.d.ts.map +1 -1
- package/dist/unstable/webmcp/useWebMcpProvider.d.ts +3 -4
- package/dist/unstable/webmcp/useWebMcpProvider.d.ts.map +1 -1
- package/dist/unstable/webmcp/webmcp-host.d.ts +6 -7
- package/dist/unstable/webmcp/webmcp-host.d.ts.map +1 -1
- package/dist/utils/RequireAtLeastOne.d.ts +1 -2
- package/dist/utils/RequireAtLeastOne.d.ts.map +1 -1
- package/dist/utils/createActionButton.d.ts +3 -4
- package/dist/utils/createActionButton.d.ts.map +1 -1
- package/dist/utils/getSelectionMessageId.d.ts +1 -2
- package/dist/utils/getSelectionMessageId.d.ts.map +1 -1
- package/dist/utils/hooks/useManagedRef.d.ts +1 -2
- package/dist/utils/hooks/useManagedRef.d.ts.map +1 -1
- package/dist/utils/hooks/useMediaQuery.d.ts +1 -2
- package/dist/utils/hooks/useMediaQuery.d.ts.map +1 -1
- package/dist/utils/hooks/useOnResizeContent.d.ts +1 -2
- package/dist/utils/hooks/useOnResizeContent.d.ts.map +1 -1
- package/dist/utils/hooks/useOnScrollToBottom.d.ts +1 -2
- package/dist/utils/hooks/useOnScrollToBottom.d.ts.map +1 -1
- package/dist/utils/hooks/useSizeHandle.d.ts +1 -2
- package/dist/utils/hooks/useSizeHandle.d.ts.map +1 -1
- package/dist/utils/smooth/SmoothContext.d.ts +3 -4
- package/dist/utils/smooth/SmoothContext.d.ts.map +1 -1
- package/dist/utils/smooth/useSmooth.d.ts +2 -3
- package/dist/utils/smooth/useSmooth.d.ts.map +1 -1
- package/package.json +17 -16
- package/src/mcp-apps/McpAppRenderer.test.tsx +1 -2
- package/src/primitives/composer/ComposerAddAttachment.test.tsx +7 -5
- package/src/primitives/composer/ComposerRoot.test.tsx +5 -3
- package/src/primitives/selectionToolbar/SelectionToolbarRoot.test.tsx +44 -0
- package/src/primitives/selectionToolbar/SelectionToolbarRoot.tsx +7 -1
- package/src/primitives/thread/useThreadViewportAutoScroll.test.tsx +95 -0
- package/src/primitives/thread/useThreadViewportAutoScroll.ts +10 -0
- package/src/tests/RemoteThreadListRuntime.reloadMainThread.test.tsx +2 -4
- package/src/tests/threadListItemIsRunning.test.tsx +3 -2
- package/src/unstable/useMentionAdapter.test.tsx +15 -21
- package/src/unstable/useModelContextSnapshot.test.tsx +3 -2
- package/src/unstable/webmcp/convertTools.test.ts +59 -37
- package/src/unstable/webmcp/useWebMcpProvider.test.tsx +12 -3
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Unstable_IconComponent } from "./useMentionAdapter.js";
|
|
2
2
|
import { Unstable_TriggerAdapter, Unstable_TriggerItem } from "@assistant-ui/core";
|
|
3
3
|
//#region src/unstable/useSlashCommandAdapter.d.ts
|
|
4
|
-
type Unstable_SlashCommand = {
|
|
4
|
+
export type Unstable_SlashCommand = {
|
|
5
5
|
readonly id: string;
|
|
6
6
|
readonly label?: string | undefined;
|
|
7
7
|
readonly description?: string | undefined;
|
|
8
8
|
readonly icon?: string | undefined;
|
|
9
9
|
readonly execute: () => void;
|
|
10
10
|
};
|
|
11
|
-
type Unstable_UseSlashCommandAdapterOptions = {
|
|
11
|
+
export type Unstable_UseSlashCommandAdapterOptions = {
|
|
12
12
|
readonly commands: readonly Unstable_SlashCommand[];
|
|
13
13
|
/** Strip the trigger text from the composer after executing. @default false */
|
|
14
14
|
readonly removeOnExecute?: boolean | undefined;
|
|
@@ -17,7 +17,7 @@ type Unstable_UseSlashCommandAdapterOptions = {
|
|
|
17
17
|
/** Fallback icon when no entry in `iconMap` matches. */
|
|
18
18
|
readonly fallbackIcon?: Unstable_IconComponent;
|
|
19
19
|
};
|
|
20
|
-
type Unstable_SlashCommandAction = {
|
|
20
|
+
export type Unstable_SlashCommandAction = {
|
|
21
21
|
readonly onExecute: (item: Unstable_TriggerItem) => void;
|
|
22
22
|
readonly removeOnExecute?: boolean | undefined;
|
|
23
23
|
};
|
|
@@ -41,12 +41,11 @@ type Unstable_SlashCommandAction = {
|
|
|
41
41
|
* <ComposerTriggerPopover char="/" {...slash} />
|
|
42
42
|
* ```
|
|
43
43
|
*/
|
|
44
|
-
declare function unstable_useSlashCommandAdapter(options: Unstable_UseSlashCommandAdapterOptions): {
|
|
44
|
+
export declare function unstable_useSlashCommandAdapter(options: Unstable_UseSlashCommandAdapterOptions): {
|
|
45
45
|
adapter: Unstable_TriggerAdapter;
|
|
46
46
|
action: Unstable_SlashCommandAction;
|
|
47
47
|
iconMap?: Record<string, Unstable_IconComponent>;
|
|
48
48
|
fallbackIcon?: Unstable_IconComponent;
|
|
49
49
|
};
|
|
50
50
|
//#endregion
|
|
51
|
-
export { Unstable_SlashCommand, Unstable_SlashCommandAction, Unstable_UseSlashCommandAdapterOptions, unstable_useSlashCommandAdapter };
|
|
52
51
|
//# sourceMappingURL=useSlashCommandAdapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSlashCommandAdapter.d.ts","names":[],"sources":["../../src/unstable/useSlashCommandAdapter.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"useSlashCommandAdapter.d.ts","names":[],"sources":["../../src/unstable/useSlashCommandAdapter.ts"],"mappings":";;;YAUY;WACD;WACA;WACA;WACA;WACA;;YAGC;WACD,mBAAmB;;WAEnB;;WAEA,UAAU,eAAe;;WAEzB,eAAe;;YAGd;WACD,YAAY,MAAM;WAClB;;;;;;;;;;;;;;;;;;;;;;wBAuBK,gCACd,SAAS;EAET,SAAS;EACT,QAAQ;EACR,UAAU,eAAe;EACzB,eAAe"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { WebMcpHost } from "./webmcp-host.js";
|
|
2
2
|
import { Tool } from "assistant-stream";
|
|
3
3
|
//#region src/unstable/webmcp/WebMcpRegistrationResource.d.ts
|
|
4
|
-
type WebMcpRegistrationProps = {
|
|
4
|
+
export type WebMcpRegistrationProps = {
|
|
5
5
|
host: WebMcpHost;
|
|
6
6
|
name: string;
|
|
7
7
|
/** Re-registers when it changes; an execute-only edit reads through instead. */
|
|
8
8
|
signature: string;
|
|
9
9
|
tool: Tool<any, any>;
|
|
10
10
|
};
|
|
11
|
-
declare const WebMcpRegistrationResource: import("@assistant-ui/tap").Resource<string | null, [WebMcpRegistrationProps]>;
|
|
11
|
+
export declare const WebMcpRegistrationResource: import("@assistant-ui/tap").Resource<string | null, [WebMcpRegistrationProps]>;
|
|
12
12
|
//#endregion
|
|
13
|
-
export { WebMcpRegistrationProps, WebMcpRegistrationResource };
|
|
14
13
|
//# sourceMappingURL=WebMcpRegistrationResource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebMcpRegistrationResource.d.ts","names":[],"sources":["../../../src/unstable/webmcp/WebMcpRegistrationResource.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"WebMcpRegistrationResource.d.ts","names":[],"sources":["../../../src/unstable/webmcp/WebMcpRegistrationResource.ts"],"mappings":";;;YAMY;EACV,MAAM;EACN;;EAEA;EACA,MAAM;;qBAgFK,wDAA0B,yBAAA"}
|
|
@@ -8,14 +8,13 @@ import { Tool } from "assistant-stream";
|
|
|
8
8
|
* type-less form from a backend or human tool. A `filter` replaces this, so
|
|
9
9
|
* pass it through to narrow the default set rather than widen it.
|
|
10
10
|
*/
|
|
11
|
-
declare const defaultWebMcpFilter: (_name: string, tool: Tool<any, any>) => boolean;
|
|
12
|
-
declare const toWebMcpInputSchema: (tool: Tool<any, any>) => unknown;
|
|
13
|
-
declare const toMcpContent: (result: unknown, options: {
|
|
11
|
+
export declare const defaultWebMcpFilter: (_name: string, tool: Tool<any, any>) => boolean;
|
|
12
|
+
export declare const toWebMcpInputSchema: (tool: Tool<any, any>) => unknown;
|
|
13
|
+
export declare const toMcpContent: (result: unknown, options: {
|
|
14
14
|
tool: Tool<any, any>;
|
|
15
15
|
toolCallId: string;
|
|
16
16
|
args: Record<string, unknown>;
|
|
17
17
|
}) => Promise<WebMcpCallToolResult>;
|
|
18
|
-
declare const toWebMcpTool: (name: string, getTool: () => Tool<any, any>, lifecycleSignal?: AbortSignal) => WebMcpToolDescriptor;
|
|
18
|
+
export declare const toWebMcpTool: (name: string, getTool: () => Tool<any, any>, lifecycleSignal?: AbortSignal) => WebMcpToolDescriptor;
|
|
19
19
|
//#endregion
|
|
20
|
-
export { defaultWebMcpFilter, toMcpContent, toWebMcpInputSchema, toWebMcpTool };
|
|
21
20
|
//# sourceMappingURL=convertTools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertTools.d.ts","names":[],"sources":["../../../src/unstable/webmcp/convertTools.ts"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"convertTools.d.ts","names":[],"sources":["../../../src/unstable/webmcp/convertTools.ts"],"mappings":";;;;;;;;;;qBAoBa,sBACX,eACA,MAAM;qBAMK,sBAAuB,MAAM;qBA2C7B,eACX,iBACA;EACE,MAAM;EACN;EACA,MAAM;MAEP,QAAQ;qBAwGE,eACX,cACA,eAAe,gBACf,kBAAkB,gBACjB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Tool } from "assistant-stream";
|
|
2
2
|
//#region src/unstable/webmcp/useWebMcpProvider.d.ts
|
|
3
|
-
type Unstable_WebMcpProviderOptions = {
|
|
3
|
+
export type Unstable_WebMcpProviderOptions = {
|
|
4
4
|
filter?: (name: string, tool: Tool<any, any>) => boolean;
|
|
5
5
|
};
|
|
6
|
-
type Unstable_WebMcpProviderResult = {
|
|
6
|
+
export type Unstable_WebMcpProviderResult = {
|
|
7
7
|
status: "unsupported" | "active";
|
|
8
8
|
registeredToolNames: readonly string[];
|
|
9
9
|
};
|
|
@@ -15,7 +15,6 @@ type Unstable_WebMcpProviderResult = {
|
|
|
15
15
|
* `document.modelContext` (or `navigator.modelContext`), and the sorted names
|
|
16
16
|
* of the tools currently registered with the host.
|
|
17
17
|
*/
|
|
18
|
-
declare const unstable_useWebMcpProvider: (options?: Unstable_WebMcpProviderOptions) => Unstable_WebMcpProviderResult;
|
|
18
|
+
export declare const unstable_useWebMcpProvider: (options?: Unstable_WebMcpProviderOptions) => Unstable_WebMcpProviderResult;
|
|
19
19
|
//#endregion
|
|
20
|
-
export { Unstable_WebMcpProviderOptions, Unstable_WebMcpProviderResult, unstable_useWebMcpProvider };
|
|
21
20
|
//# sourceMappingURL=useWebMcpProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWebMcpProvider.d.ts","names":[],"sources":["../../../src/unstable/webmcp/useWebMcpProvider.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"useWebMcpProvider.d.ts","names":[],"sources":["../../../src/unstable/webmcp/useWebMcpProvider.ts"],"mappings":";;YAeY;EACV,UAAU,cAAc,MAAM;;YAGpB;EACV;EACA;;;;;;;;;;qBAqGW,6BACX,UAAS,mCACR"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/unstable/webmcp/webmcp-host.d.ts
|
|
2
|
-
type WebMcpContent = {
|
|
2
|
+
export type WebMcpContent = {
|
|
3
3
|
type: "text";
|
|
4
4
|
text: string;
|
|
5
5
|
} | {
|
|
@@ -7,11 +7,11 @@ type WebMcpContent = {
|
|
|
7
7
|
data: string;
|
|
8
8
|
mimeType: string;
|
|
9
9
|
};
|
|
10
|
-
type WebMcpCallToolResult = {
|
|
10
|
+
export type WebMcpCallToolResult = {
|
|
11
11
|
content: WebMcpContent[];
|
|
12
12
|
isError?: boolean;
|
|
13
13
|
};
|
|
14
|
-
type WebMcpToolDescriptor = {
|
|
14
|
+
export type WebMcpToolDescriptor = {
|
|
15
15
|
name: string;
|
|
16
16
|
description: string;
|
|
17
17
|
inputSchema: unknown;
|
|
@@ -19,7 +19,7 @@ type WebMcpToolDescriptor = {
|
|
|
19
19
|
signal?: AbortSignal;
|
|
20
20
|
}) => Promise<WebMcpCallToolResult>;
|
|
21
21
|
};
|
|
22
|
-
type WebMcpModelContext = {
|
|
22
|
+
export type WebMcpModelContext = {
|
|
23
23
|
/**
|
|
24
24
|
* Aborting `options.signal` is what unregisters the tool. The explainer
|
|
25
25
|
* defines no other removal method, and a name-keyed one could not be used
|
|
@@ -29,11 +29,10 @@ type WebMcpModelContext = {
|
|
|
29
29
|
signal?: AbortSignal;
|
|
30
30
|
}): Promise<void> | void;
|
|
31
31
|
};
|
|
32
|
-
type WebMcpHost = {
|
|
32
|
+
export type WebMcpHost = {
|
|
33
33
|
available: boolean;
|
|
34
34
|
registerTool(def: WebMcpToolDescriptor, onError?: (error: unknown) => void): () => void;
|
|
35
35
|
};
|
|
36
|
-
declare const getDefaultWebMcpHost: () => WebMcpHost;
|
|
36
|
+
export declare const getDefaultWebMcpHost: () => WebMcpHost;
|
|
37
37
|
//#endregion
|
|
38
|
-
export { WebMcpCallToolResult, WebMcpContent, WebMcpHost, WebMcpModelContext, WebMcpToolDescriptor, getDefaultWebMcpHost };
|
|
39
38
|
//# sourceMappingURL=webmcp-host.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webmcp-host.d.ts","names":[],"sources":["../../../src/unstable/webmcp/webmcp-host.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"webmcp-host.d.ts","names":[],"sources":["../../../src/unstable/webmcp/webmcp-host.ts"],"mappings":";YAAY;EACN;EAAc;;EACd;EAAe;EAAc;;YAEvB;EACV,SAAS;EACT;;YAGU;EACV;EACA;EACA;EACA,UACE,eACA;IAAY,SAAS;QAClB,QAAQ;;YAGH;;;;;;EAMV,aACE,MAAM,sBACN;IAAY,SAAS;MACpB;;YAGO;EACV;EACA,aACE,KAAK,sBACL,WAAW;;qBAsCF,4BAA2B"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
//#region src/utils/RequireAtLeastOne.d.ts
|
|
2
|
-
type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & { [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>; }[Keys];
|
|
2
|
+
export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & { [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>; }[Keys];
|
|
3
3
|
//#endregion
|
|
4
|
-
export { RequireAtLeastOne };
|
|
5
4
|
//# sourceMappingURL=RequireAtLeastOne.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequireAtLeastOne.d.ts","names":[],"sources":["../../src/utils/RequireAtLeastOne.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"RequireAtLeastOne.d.ts","names":[],"sources":["../../src/utils/RequireAtLeastOne.ts"],"mappings":";YAAY,kBAAkB,GAAG,mBAAmB,UAAU,KAAK,KACjE,GACA,cAAc,GAAG,YAGd,KAAK,SAAS,SAAS,KAAK,GAAG,MAAM,QAAQ,KAAK,GAAG,QAAQ,MAAM,QACpE"}
|
|
@@ -3,13 +3,12 @@ import { ComponentPropsWithoutRef, ComponentRef, MouseEventHandler } from "react
|
|
|
3
3
|
//#region src/utils/createActionButton.d.ts
|
|
4
4
|
type ActionButtonCallback<TProps> = (props: TProps) => MouseEventHandler<HTMLButtonElement> | null;
|
|
5
5
|
type PrimitiveButtonProps = ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
6
|
-
type ActionButtonProps<THook> = PrimitiveButtonProps & (THook extends ((props: infer TProps) => unknown) ? TProps : never);
|
|
7
|
-
type ActionButtonElement = ComponentRef<typeof Primitive.button>;
|
|
8
|
-
declare const createActionButton: <TProps>(displayName: string, useActionButton: ActionButtonCallback<TProps>, forwardProps?: (keyof NonNullable<TProps>)[]) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<Omit<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
6
|
+
export type ActionButtonProps<THook> = PrimitiveButtonProps & (THook extends ((props: infer TProps) => unknown) ? TProps : never);
|
|
7
|
+
export type ActionButtonElement = ComponentRef<typeof Primitive.button>;
|
|
8
|
+
export declare const createActionButton: <TProps>(displayName: string, useActionButton: ActionButtonCallback<TProps>, forwardProps?: (keyof NonNullable<TProps>)[]) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<Omit<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
9
9
|
asChild?: boolean;
|
|
10
10
|
}, "ref"> & {
|
|
11
11
|
render?: import("react").ReactElement | undefined;
|
|
12
12
|
} & import("react").RefAttributes<HTMLButtonElement>, "ref"> & TProps> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
13
13
|
//#endregion
|
|
14
|
-
export { ActionButtonElement, ActionButtonProps, createActionButton };
|
|
15
14
|
//# sourceMappingURL=createActionButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createActionButton.d.ts","names":[],"sources":["../../src/utils/createActionButton.tsx"],"mappings":";;;KASK,qBAAqB,WACxB,OAAO,WACJ,kBAAkB;KAElB,uBAAuB,gCAAgC,UAAU;
|
|
1
|
+
{"version":3,"file":"createActionButton.d.ts","names":[],"sources":["../../src/utils/createActionButton.tsx"],"mappings":";;;KASK,qBAAqB,WACxB,OAAO,WACJ,kBAAkB;KAElB,uBAAuB,gCAAgC,UAAU;YAE1D,kBAAkB,SAAS,wBACpC,gBAAe,aAAa,sBAAqB;YAExC,sBAAsB,oBAAoB,UAAU;qBAEnD,qBAAsB,QACjC,qBACA,iBAAiB,qBAAqB,SACtC,sBAAqB,YAAY,+BAAe,0CAAA,gBAAA,KAAA,qBAAA,gBAAA,qCAAA,qBAAA;;;;oBAgCjD,cAAA,6BAAA,0BAAA,cAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
//#region src/utils/getSelectionMessageId.d.ts
|
|
2
|
-
declare const getSelectionMessageId: (selection: Selection) => string | null;
|
|
2
|
+
export declare const getSelectionMessageId: (selection: Selection) => string | null;
|
|
3
3
|
//#endregion
|
|
4
|
-
export { getSelectionMessageId };
|
|
5
4
|
//# sourceMappingURL=getSelectionMessageId.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSelectionMessageId.d.ts","names":[],"sources":["../../src/utils/getSelectionMessageId.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"getSelectionMessageId.d.ts","names":[],"sources":["../../src/utils/getSelectionMessageId.ts"],"mappings":";qBAwDa,wBAAyB,WAAW"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
//#region src/utils/hooks/useManagedRef.d.ts
|
|
2
|
-
declare const useManagedRef: <TNode>(callback: (node: TNode) => (() => void) | undefined) => (el: TNode | null) => void;
|
|
2
|
+
export declare const useManagedRef: <TNode>(callback: (node: TNode) => (() => void) | undefined) => (el: TNode | null) => void;
|
|
3
3
|
//#endregion
|
|
4
|
-
export { useManagedRef };
|
|
5
4
|
//# sourceMappingURL=useManagedRef.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useManagedRef.d.ts","names":[],"sources":["../../../src/utils/hooks/useManagedRef.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"useManagedRef.d.ts","names":[],"sources":["../../../src/utils/hooks/useManagedRef.ts"],"mappings":";qBAEa,gBAAiB,OAC5B,WAAW,MAAM,wCAAkC,IAK5C"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
//#region src/utils/hooks/useMediaQuery.d.ts
|
|
2
|
-
declare const useMediaQuery: (query: string | null) => boolean;
|
|
2
|
+
export declare const useMediaQuery: (query: string | null) => boolean;
|
|
3
3
|
//#endregion
|
|
4
|
-
export { useMediaQuery };
|
|
5
4
|
//# sourceMappingURL=useMediaQuery.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMediaQuery.d.ts","names":[],"sources":["../../../src/utils/hooks/useMediaQuery.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"useMediaQuery.d.ts","names":[],"sources":["../../../src/utils/hooks/useMediaQuery.ts"],"mappings":";qBAOa,gBAAiB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
//#region src/utils/hooks/useOnResizeContent.d.ts
|
|
2
|
-
declare const useOnResizeContent: (callback: () => void) => (el: HTMLElement | null) => void;
|
|
2
|
+
export declare const useOnResizeContent: (callback: () => void) => (el: HTMLElement | null) => void;
|
|
3
3
|
//#endregion
|
|
4
|
-
export { useOnResizeContent };
|
|
5
4
|
//# sourceMappingURL=useOnResizeContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOnResizeContent.d.ts","names":[],"sources":["../../../src/utils/hooks/useOnResizeContent.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"useOnResizeContent.d.ts","names":[],"sources":["../../../src/utils/hooks/useOnResizeContent.ts"],"mappings":";qBAIa,qBAAsB,0BAAoB,IAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
//#region src/utils/hooks/useOnScrollToBottom.d.ts
|
|
2
|
-
declare const useOnScrollToBottom: (callback: (config: {
|
|
2
|
+
export declare const useOnScrollToBottom: (callback: (config: {
|
|
3
3
|
behavior: ScrollBehavior;
|
|
4
4
|
}) => void) => void;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { useOnScrollToBottom };
|
|
7
6
|
//# sourceMappingURL=useOnScrollToBottom.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOnScrollToBottom.d.ts","names":[],"sources":["../../../src/utils/hooks/useOnScrollToBottom.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"useOnScrollToBottom.d.ts","names":[],"sources":["../../../src/utils/hooks/useOnScrollToBottom.ts"],"mappings":";qBAMa,sBACX,WAAW;EAAU,UAAU"}
|
|
@@ -8,7 +8,6 @@ import { SizeHandle } from "../../context/stores/ThreadViewport.js";
|
|
|
8
8
|
* @param getHeight - Optional function to compute height (defaults to el.offsetHeight)
|
|
9
9
|
* @returns A ref callback to attach to the element
|
|
10
10
|
*/
|
|
11
|
-
declare const useSizeHandle: (register: (() => SizeHandle) | null | undefined, getHeight?: (el: HTMLElement) => number) => (el: HTMLElement | null) => void;
|
|
11
|
+
export declare const useSizeHandle: (register: (() => SizeHandle) | null | undefined, getHeight?: (el: HTMLElement) => number) => (el: HTMLElement | null) => void;
|
|
12
12
|
//#endregion
|
|
13
|
-
export { useSizeHandle };
|
|
14
13
|
//# sourceMappingURL=useSizeHandle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSizeHandle.d.ts","names":[],"sources":["../../../src/utils/hooks/useSizeHandle.ts"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useSizeHandle.d.ts","names":[],"sources":["../../../src/utils/hooks/useSizeHandle.ts"],"mappings":";;;;;;;;;;qBAca,gBACX,iBAAiB,gCACjB,aAAa,IAAI,4BAAsB,IAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ReadonlyStore } from "../../context/ReadonlyStore.js";
|
|
2
2
|
import { ComponentType, FC, PropsWithChildren } from "react";
|
|
3
3
|
//#region src/utils/smooth/SmoothContext.d.ts
|
|
4
|
-
declare const SmoothContextProvider: FC<PropsWithChildren>;
|
|
5
|
-
declare const withSmoothContextProvider: <C extends ComponentType<any>>(Component: C) => C;
|
|
6
|
-
declare const useSmoothStatus: {
|
|
4
|
+
export declare const SmoothContextProvider: FC<PropsWithChildren>;
|
|
5
|
+
export declare const withSmoothContextProvider: <C extends ComponentType<any>>(Component: C) => C;
|
|
6
|
+
export declare const useSmoothStatus: {
|
|
7
7
|
(): {
|
|
8
8
|
readonly type: "running";
|
|
9
9
|
} | {
|
|
@@ -110,5 +110,4 @@ declare const useSmoothStatus: {
|
|
|
110
110
|
}> | null;
|
|
111
111
|
};
|
|
112
112
|
//#endregion
|
|
113
|
-
export { SmoothContextProvider, useSmoothStatus, useSmoothStatusStore, withSmoothContextProvider };
|
|
114
113
|
//# sourceMappingURL=SmoothContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SmoothContext.d.ts","names":[],"sources":["../../../src/utils/smooth/SmoothContext.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"SmoothContext.d.ts","names":[],"sources":["../../../src/utils/smooth/SmoothContext.tsx"],"mappings":";;;qBAmCa,uBAAuB,GAAG;qBAgB1B,4BAA6B,UAAU,oBAClD,WAAW,MACV;qBA2BY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAiB"}
|
|
@@ -3,7 +3,7 @@ import { MessagePartState, ReasoningMessagePart, TextMessagePart } from "@assist
|
|
|
3
3
|
/**
|
|
4
4
|
* Tuning options for the smooth text streaming animation.
|
|
5
5
|
*/
|
|
6
|
-
type SmoothOptions = {
|
|
6
|
+
export type SmoothOptions = {
|
|
7
7
|
/**
|
|
8
8
|
* Target time in milliseconds to drain the backlog of unrevealed
|
|
9
9
|
* characters. Larger values reveal long backlogs more gradually.
|
|
@@ -53,7 +53,6 @@ type SmoothOptions = {
|
|
|
53
53
|
* });
|
|
54
54
|
* ```
|
|
55
55
|
*/
|
|
56
|
-
declare const useSmooth: (state: MessagePartState & (TextMessagePart | ReasoningMessagePart), smooth?: boolean | SmoothOptions) => MessagePartState & (TextMessagePart | ReasoningMessagePart);
|
|
56
|
+
export declare const useSmooth: (state: MessagePartState & (TextMessagePart | ReasoningMessagePart), smooth?: boolean | SmoothOptions) => MessagePartState & (TextMessagePart | ReasoningMessagePart);
|
|
57
57
|
//#endregion
|
|
58
|
-
export { SmoothOptions, useSmooth };
|
|
59
58
|
//# sourceMappingURL=useSmooth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSmooth.d.ts","names":[],"sources":["../../../src/utils/smooth/useSmooth.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"useSmooth.d.ts","names":[],"sources":["../../../src/utils/smooth/useSmooth.ts"],"mappings":";;;;;YAkBY;;;;;;EAMV;;;;;;EAMA;;;;;EAKA;;;;;;;;EAQA;;;;;;;;;;;;;;;;;;;;;;;;;qBAgHW,YACX,OAAO,oBAAoB,kBAAkB,uBAC7C,mBAAkB,kBACjB,oBAAoB,kBAAkB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@assistant-ui/react",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.21",
|
|
4
4
|
"description": "Open-source TypeScript/React library for building production-grade AI chat experiences",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -55,15 +55,15 @@
|
|
|
55
55
|
],
|
|
56
56
|
"sideEffects": false,
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@assistant-ui/core": "^0.3.
|
|
59
|
-
"@assistant-ui/store": "^0.3.
|
|
60
|
-
"@assistant-ui/tap": "^0.9.
|
|
61
|
-
"assistant-cloud": "^0.2.
|
|
62
|
-
"assistant-stream": "^0.3.
|
|
58
|
+
"@assistant-ui/core": "^0.3.20",
|
|
59
|
+
"@assistant-ui/store": "^0.3.14",
|
|
60
|
+
"@assistant-ui/tap": "^0.9.18",
|
|
61
|
+
"assistant-cloud": "^0.2.2",
|
|
62
|
+
"assistant-stream": "^0.3.44",
|
|
63
63
|
"radix-ui": "^1.6.7",
|
|
64
64
|
"react-textarea-autosize": "^8.5.9",
|
|
65
|
-
"safe-content-frame": "^0.0.
|
|
66
|
-
"zod": "^4.5
|
|
65
|
+
"safe-content-frame": "^0.0.31",
|
|
66
|
+
"zod": "^4.6.5",
|
|
67
67
|
"zustand": "^5.0.15"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
@@ -81,17 +81,17 @@
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"@assistant-ui/vite": "0.0.
|
|
85
|
-
"@assistant-ui/x-buildutils": "0.0.
|
|
84
|
+
"@assistant-ui/vite": "0.0.18",
|
|
85
|
+
"@assistant-ui/x-buildutils": "0.0.28",
|
|
86
86
|
"@testing-library/react": "^16.3.3",
|
|
87
87
|
"@types/json-schema": "^7.0.15",
|
|
88
|
-
"@types/node": "^26.
|
|
89
|
-
"@types/react": "^19.
|
|
90
|
-
"@types/react-dom": "^19.
|
|
88
|
+
"@types/node": "^26.5.1",
|
|
89
|
+
"@types/react": "^19.3.0",
|
|
90
|
+
"@types/react-dom": "^19.3.0",
|
|
91
91
|
"jsdom": "^30.0.1",
|
|
92
|
-
"react": "^19.
|
|
93
|
-
"react-dom": "^19.
|
|
94
|
-
"vitest": "^5.0.
|
|
92
|
+
"react": "^19.3.0",
|
|
93
|
+
"react-dom": "^19.3.0",
|
|
94
|
+
"vitest": "^5.0.1"
|
|
95
95
|
},
|
|
96
96
|
"publishConfig": {
|
|
97
97
|
"access": "public",
|
|
@@ -109,6 +109,7 @@
|
|
|
109
109
|
"scripts": {
|
|
110
110
|
"build": "aui-build",
|
|
111
111
|
"test": "vitest run",
|
|
112
|
+
"typecheck": "tsc --noEmit",
|
|
112
113
|
"test:watch": "vitest"
|
|
113
114
|
}
|
|
114
115
|
}
|
|
@@ -78,14 +78,16 @@ describe("ComposerPrimitiveAddAttachment", () => {
|
|
|
78
78
|
|
|
79
79
|
const button = container.querySelector("button");
|
|
80
80
|
expect(button).not.toBeNull();
|
|
81
|
+
if (!button) throw new Error("Attachment button was not rendered");
|
|
81
82
|
|
|
82
83
|
await act(async () => {
|
|
83
|
-
button
|
|
84
|
+
button.click();
|
|
84
85
|
});
|
|
85
86
|
|
|
86
87
|
const input =
|
|
87
88
|
document.querySelector<HTMLInputElement>('input[type="file"]');
|
|
88
89
|
expect(input).not.toBeNull();
|
|
90
|
+
if (!input) throw new Error("File input was not rendered");
|
|
89
91
|
|
|
90
92
|
const files = [
|
|
91
93
|
new File(["a"], "unsupported.bin"),
|
|
@@ -96,13 +98,13 @@ describe("ComposerPrimitiveAddAttachment", () => {
|
|
|
96
98
|
value: files,
|
|
97
99
|
});
|
|
98
100
|
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
const event = new Event("change");
|
|
102
|
+
Object.defineProperty(event, "target", { value: input });
|
|
103
|
+
const result = input.onchange?.call(input, event);
|
|
102
104
|
|
|
103
105
|
await expect(Promise.resolve(result)).resolves.toBeUndefined();
|
|
104
106
|
expect(addAttachment).toHaveBeenCalledTimes(2);
|
|
105
107
|
expect(errorSpy).not.toHaveBeenCalled();
|
|
106
|
-
expect(input
|
|
108
|
+
expect(input.isConnected).toBe(false);
|
|
107
109
|
});
|
|
108
110
|
});
|
|
@@ -354,9 +354,11 @@ describe("ComposerPrimitiveRoot compact mode", () => {
|
|
|
354
354
|
);
|
|
355
355
|
|
|
356
356
|
it("updates compact mode when the compact context multiline latch changes", async () => {
|
|
357
|
-
|
|
357
|
+
const compactContext: { current: ComposerCompactContextValue | null } = {
|
|
358
|
+
current: null,
|
|
359
|
+
};
|
|
358
360
|
const Probe = () => {
|
|
359
|
-
compactContext = useComposerCompactContextOptional();
|
|
361
|
+
compactContext.current = useComposerCompactContextOptional();
|
|
360
362
|
return null;
|
|
361
363
|
};
|
|
362
364
|
|
|
@@ -364,7 +366,7 @@ describe("ComposerPrimitiveRoot compact mode", () => {
|
|
|
364
366
|
compact: true,
|
|
365
367
|
children: <Probe />,
|
|
366
368
|
});
|
|
367
|
-
const context = compactContext;
|
|
369
|
+
const context = compactContext.current;
|
|
368
370
|
expect(context).not.toBeNull();
|
|
369
371
|
if (!context) throw new Error("Composer compact context was not provided");
|
|
370
372
|
expect(form.hasAttribute("data-compact")).toBe(true);
|
|
@@ -72,3 +72,47 @@ describe("SelectionToolbarPrimitiveRoot onMouseDown composition", () => {
|
|
|
72
72
|
expect(notPrevented).toBe(false);
|
|
73
73
|
});
|
|
74
74
|
});
|
|
75
|
+
|
|
76
|
+
describe("SelectionToolbarPrimitiveRoot frame cleanup", () => {
|
|
77
|
+
// Defer the frame instead of running it inline, so the window between the
|
|
78
|
+
// selection event and the frame is observable.
|
|
79
|
+
const deferFrames = () => {
|
|
80
|
+
const frames: FrameRequestCallback[] = [];
|
|
81
|
+
let nextHandle = 1;
|
|
82
|
+
vi.spyOn(window, "requestAnimationFrame").mockImplementation((cb) => {
|
|
83
|
+
frames.push(cb);
|
|
84
|
+
return nextHandle++;
|
|
85
|
+
});
|
|
86
|
+
const cancelAnimationFrame = vi
|
|
87
|
+
.spyOn(window, "cancelAnimationFrame")
|
|
88
|
+
.mockImplementation(() => {});
|
|
89
|
+
return { frames, cancelAnimationFrame };
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
it("cancels a queued selection frame when the toolbar unmounts", () => {
|
|
93
|
+
const { frames, cancelAnimationFrame } = deferFrames();
|
|
94
|
+
const { unmount } = render(<SelectionToolbarPrimitiveRoot />);
|
|
95
|
+
|
|
96
|
+
fireEvent.mouseUp(document);
|
|
97
|
+
expect(frames).toHaveLength(1);
|
|
98
|
+
|
|
99
|
+
unmount();
|
|
100
|
+
|
|
101
|
+
expect(cancelAnimationFrame).toHaveBeenCalledWith(1);
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
it("cancels the previous frame when another selection event arrives", () => {
|
|
105
|
+
const { frames, cancelAnimationFrame } = deferFrames();
|
|
106
|
+
const { unmount } = render(<SelectionToolbarPrimitiveRoot />);
|
|
107
|
+
|
|
108
|
+
fireEvent.mouseUp(document);
|
|
109
|
+
fireEvent.keyUp(document);
|
|
110
|
+
expect(frames).toHaveLength(2);
|
|
111
|
+
expect(cancelAnimationFrame).toHaveBeenCalledWith(1);
|
|
112
|
+
|
|
113
|
+
unmount();
|
|
114
|
+
|
|
115
|
+
expect(cancelAnimationFrame).toHaveBeenCalledTimes(2);
|
|
116
|
+
expect(cancelAnimationFrame).toHaveBeenLastCalledWith(2);
|
|
117
|
+
});
|
|
118
|
+
});
|
|
@@ -51,8 +51,13 @@ export const SelectionToolbarPrimitiveRoot = forwardRef<
|
|
|
51
51
|
const [info, setInfo] = useState<SelectionInfo | null>(null);
|
|
52
52
|
|
|
53
53
|
useEffect(() => {
|
|
54
|
+
// Read the selection on the next frame so the browser has settled it.
|
|
55
|
+
let pendingFrame: number | null = null;
|
|
56
|
+
|
|
54
57
|
const checkSelection = () => {
|
|
55
|
-
|
|
58
|
+
if (pendingFrame !== null) cancelAnimationFrame(pendingFrame);
|
|
59
|
+
pendingFrame = requestAnimationFrame(() => {
|
|
60
|
+
pendingFrame = null;
|
|
56
61
|
const sel = window.getSelection();
|
|
57
62
|
if (!sel || sel.isCollapsed) {
|
|
58
63
|
setInfo(null);
|
|
@@ -94,6 +99,7 @@ export const SelectionToolbarPrimitiveRoot = forwardRef<
|
|
|
94
99
|
document.addEventListener("scroll", handleScroll, true);
|
|
95
100
|
|
|
96
101
|
return () => {
|
|
102
|
+
if (pendingFrame !== null) cancelAnimationFrame(pendingFrame);
|
|
97
103
|
document.removeEventListener("mouseup", checkSelection);
|
|
98
104
|
document.removeEventListener("keyup", checkSelection);
|
|
99
105
|
document.removeEventListener("selectionchange", handleSelectionCollapse);
|