@assistant-ui/react 0.12.17 → 0.12.19
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/client/ExternalThread.d.ts.map +1 -1
- package/dist/client/ExternalThread.js +1 -0
- package/dist/client/ExternalThread.js.map +1 -1
- package/dist/context/index.d.ts +19 -3
- package/dist/context/index.d.ts.map +1 -1
- package/dist/context/index.js +18 -3
- package/dist/context/index.js.map +1 -1
- package/dist/context/react/ThreadViewportContext.d.ts +1 -1
- package/dist/context/react/ThreadViewportContext.d.ts.map +1 -1
- package/dist/hooks/useMessageQuote.d.ts.map +1 -1
- package/dist/hooks/useMessageQuote.js +2 -1
- package/dist/hooks/useMessageQuote.js.map +1 -1
- package/dist/index.d.ts +90 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +96 -8
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +2 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +2 -1
- package/dist/internal.js.map +1 -1
- package/dist/legacy-runtime/AssistantRuntimeProvider.js +1 -1
- package/dist/legacy-runtime/AssistantRuntimeProvider.js.map +1 -1
- package/dist/legacy-runtime/cloud/useCloudThreadListRuntime.d.ts +1 -1
- package/dist/legacy-runtime/cloud/useCloudThreadListRuntime.d.ts.map +1 -1
- package/dist/legacy-runtime/hooks/ThreadContext.d.ts +1 -1
- package/dist/legacy-runtime/hooks/ThreadContext.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/types.d.ts +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/types.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/types.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarSpeak.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarSpeak.js +4 -13
- package/dist/primitives/actionBar/ActionBarSpeak.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarStopSpeaking.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarStopSpeaking.js +4 -9
- package/dist/primitives/actionBar/ActionBarStopSpeaking.js.map +1 -1
- package/dist/primitives/actionBar.d.ts +10 -0
- package/dist/primitives/actionBar.d.ts.map +1 -0
- package/dist/primitives/actionBar.js +10 -0
- package/dist/primitives/actionBar.js.map +1 -0
- package/dist/primitives/actionBarMore.d.ts +6 -0
- package/dist/primitives/actionBarMore.d.ts.map +1 -0
- package/dist/primitives/actionBarMore.js +6 -0
- package/dist/primitives/actionBarMore.js.map +1 -0
- package/dist/primitives/assistantModal.d.ts +5 -0
- package/dist/primitives/assistantModal.d.ts.map +1 -0
- package/dist/primitives/assistantModal.js +5 -0
- package/dist/primitives/assistantModal.js.map +1 -0
- package/dist/primitives/attachment/AttachmentThumb.js +1 -1
- package/dist/primitives/attachment/AttachmentThumb.js.map +1 -1
- package/dist/primitives/attachment.d.ts +5 -0
- package/dist/primitives/attachment.d.ts.map +1 -0
- package/dist/primitives/attachment.js +5 -0
- package/dist/primitives/attachment.js.map +1 -0
- package/dist/primitives/branchPicker/BranchPickerNext.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerNext.js +3 -17
- package/dist/primitives/branchPicker/BranchPickerNext.js.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerPrevious.d.ts +0 -21
- package/dist/primitives/branchPicker/BranchPickerPrevious.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerPrevious.js +3 -38
- package/dist/primitives/branchPicker/BranchPickerPrevious.js.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerRoot.js +1 -1
- package/dist/primitives/branchPicker/BranchPickerRoot.js.map +1 -1
- package/dist/primitives/branchPicker.d.ts +6 -0
- package/dist/primitives/branchPicker.d.ts.map +1 -0
- package/dist/primitives/branchPicker.js +6 -0
- package/dist/primitives/branchPicker.js.map +1 -0
- package/dist/primitives/chainOfThought.d.ts +4 -0
- package/dist/primitives/chainOfThought.d.ts.map +1 -0
- package/dist/primitives/chainOfThought.js +4 -0
- package/dist/primitives/chainOfThought.js.map +1 -0
- package/dist/primitives/composer/ComposerDictate.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerDictate.js +3 -10
- package/dist/primitives/composer/ComposerDictate.js.map +1 -1
- package/dist/primitives/composer.d.ts +16 -0
- package/dist/primitives/composer.d.ts.map +1 -0
- package/dist/primitives/composer.js +16 -0
- package/dist/primitives/composer.js.map +1 -0
- package/dist/primitives/error/ErrorMessage.d.ts.map +1 -1
- package/dist/primitives/error/ErrorMessage.js +2 -7
- package/dist/primitives/error/ErrorMessage.js.map +1 -1
- package/dist/primitives/error.d.ts +3 -0
- package/dist/primitives/error.d.ts.map +1 -0
- package/dist/primitives/error.js +3 -0
- package/dist/primitives/error.js.map +1 -0
- package/dist/primitives/message/MessageError.d.ts.map +1 -1
- package/dist/primitives/message/MessageError.js +3 -4
- package/dist/primitives/message/MessageError.js.map +1 -1
- package/dist/primitives/message/MessageParts.d.ts.map +1 -1
- package/dist/primitives/message/MessageParts.js +6 -1
- package/dist/primitives/message/MessageParts.js.map +1 -1
- package/dist/primitives/message/MessagePartsGrouped.d.ts +1 -1
- package/dist/primitives/message/MessagePartsGrouped.d.ts.map +1 -1
- package/dist/primitives/message/MessagePartsGrouped.js +2 -1
- package/dist/primitives/message/MessagePartsGrouped.js.map +1 -1
- package/dist/primitives/message.d.ts +11 -0
- package/dist/primitives/message.d.ts.map +1 -0
- package/dist/primitives/message.js +11 -0
- package/dist/primitives/message.js.map +1 -0
- package/dist/primitives/messagePart.d.ts +5 -0
- package/dist/primitives/messagePart.d.ts.map +1 -0
- package/dist/primitives/messagePart.js +5 -0
- package/dist/primitives/messagePart.js.map +1 -0
- package/dist/primitives/selectionToolbar.d.ts +3 -0
- package/dist/primitives/selectionToolbar.d.ts.map +1 -0
- package/dist/primitives/selectionToolbar.js +3 -0
- package/dist/primitives/selectionToolbar.js.map +1 -0
- package/dist/primitives/suggestion.d.ts +4 -0
- package/dist/primitives/suggestion.d.ts.map +1 -0
- package/dist/primitives/suggestion.js +4 -0
- package/dist/primitives/suggestion.js.map +1 -0
- package/dist/primitives/thread/ThreadRoot.d.ts +3 -1
- package/dist/primitives/thread/ThreadRoot.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadRoot.js +3 -1
- package/dist/primitives/thread/ThreadRoot.js.map +1 -1
- package/dist/primitives/thread/ThreadSuggestion.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadSuggestion.js +8 -29
- package/dist/primitives/thread/ThreadSuggestion.js.map +1 -1
- package/dist/primitives/thread/ThreadViewport.d.ts +3 -1
- package/dist/primitives/thread/ThreadViewport.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadViewport.js +3 -1
- package/dist/primitives/thread/ThreadViewport.js.map +1 -1
- package/dist/primitives/thread/ThreadViewportFooter.d.ts +3 -1
- package/dist/primitives/thread/ThreadViewportFooter.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadViewportFooter.js +3 -1
- package/dist/primitives/thread/ThreadViewportFooter.js.map +1 -1
- package/dist/primitives/thread.d.ts +13 -0
- package/dist/primitives/thread.d.ts.map +1 -0
- package/dist/primitives/thread.js +13 -0
- package/dist/primitives/thread.js.map +1 -0
- package/dist/primitives/threadList/ThreadListNew.d.ts.map +1 -1
- package/dist/primitives/threadList/ThreadListNew.js +4 -5
- package/dist/primitives/threadList/ThreadListNew.js.map +1 -1
- package/dist/primitives/threadList.d.ts +5 -0
- package/dist/primitives/threadList.d.ts.map +1 -0
- package/dist/primitives/threadList.js +5 -0
- package/dist/primitives/threadList.js.map +1 -0
- package/dist/primitives/threadListItem/ThreadListItemArchive.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemArchive.js +3 -6
- package/dist/primitives/threadListItem/ThreadListItemArchive.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemDelete.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemDelete.js +3 -6
- package/dist/primitives/threadListItem/ThreadListItemDelete.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemTrigger.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemTrigger.js +3 -6
- package/dist/primitives/threadListItem/ThreadListItemTrigger.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemUnarchive.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemUnarchive.js +3 -6
- package/dist/primitives/threadListItem/ThreadListItemUnarchive.js.map +1 -1
- package/dist/primitives/threadListItem.d.ts +7 -0
- package/dist/primitives/threadListItem.d.ts.map +1 -0
- package/dist/primitives/threadListItem.js +7 -0
- package/dist/primitives/threadListItem.js.map +1 -0
- package/dist/primitives/threadListItemMore.d.ts +6 -0
- package/dist/primitives/threadListItemMore.d.ts.map +1 -0
- package/dist/primitives/threadListItemMore.js +6 -0
- package/dist/primitives/threadListItemMore.js.map +1 -0
- package/package.json +9 -9
- package/src/client/ExternalThread.ts +1 -0
- package/src/context/index.ts +67 -3
- package/src/context/react/ThreadViewportContext.ts +1 -1
- package/src/hooks/useMessageQuote.ts +3 -7
- package/src/index.ts +338 -8
- package/src/internal.ts +5 -1
- package/src/legacy-runtime/AssistantRuntimeProvider.tsx +1 -1
- package/src/legacy-runtime/cloud/useCloudThreadListRuntime.ts +1 -1
- package/src/legacy-runtime/hooks/MessageContext.ts +1 -1
- package/src/legacy-runtime/hooks/ThreadContext.ts +2 -2
- package/src/legacy-runtime/runtime-cores/assistant-transport/types.ts +4 -1
- package/src/legacy-runtime/runtime-cores/assistant-transport/useAssistantTransportRuntime.ts +1 -1
- package/src/model-context/frame/SPEC_AssistantFrame.md +2 -2
- package/src/primitives/actionBar/ActionBarSpeak.ts +4 -17
- package/src/primitives/actionBar/ActionBarStopSpeaking.tsx +4 -12
- package/src/primitives/actionBar.ts +9 -0
- package/src/primitives/actionBarMore.ts +5 -0
- package/src/primitives/assistantModal.ts +4 -0
- package/src/primitives/attachment/AttachmentThumb.tsx +1 -1
- package/src/primitives/attachment.ts +4 -0
- package/src/primitives/branchPicker/BranchPickerNext.ts +3 -20
- package/src/primitives/branchPicker/BranchPickerPrevious.ts +3 -41
- package/src/primitives/branchPicker/BranchPickerRoot.tsx +1 -1
- package/src/primitives/branchPicker.ts +5 -0
- package/src/primitives/{chainOfThought/index.ts → chainOfThought.ts} +3 -3
- package/src/primitives/composer/ComposerDictate.ts +3 -15
- package/src/primitives/composer.ts +15 -0
- package/src/primitives/error/ErrorMessage.tsx +2 -7
- package/src/primitives/error.ts +2 -0
- package/src/primitives/message/MessageError.ts +3 -7
- package/src/primitives/message/MessageParts.tsx +11 -4
- package/src/primitives/message/MessagePartsGrouped.tsx +3 -5
- package/src/primitives/message.ts +13 -0
- package/src/primitives/messagePart.ts +4 -0
- package/src/primitives/{selectionToolbar/index.ts → selectionToolbar.ts} +2 -2
- package/src/primitives/suggestion.ts +3 -0
- package/src/primitives/thread/ThreadRoot.tsx +3 -1
- package/src/primitives/thread/ThreadSuggestion.ts +8 -30
- package/src/primitives/thread/ThreadViewport.tsx +3 -1
- package/src/primitives/thread/ThreadViewportFooter.tsx +3 -1
- package/src/primitives/thread.ts +15 -0
- package/src/primitives/threadList/ThreadListNew.tsx +4 -5
- package/src/primitives/threadList.ts +4 -0
- package/src/primitives/threadListItem/ThreadListItemArchive.ts +3 -6
- package/src/primitives/threadListItem/ThreadListItemDelete.ts +3 -6
- package/src/primitives/threadListItem/ThreadListItemTrigger.ts +3 -6
- package/src/primitives/threadListItem/ThreadListItemUnarchive.ts +3 -6
- package/src/primitives/threadListItem.ts +6 -0
- package/src/primitives/threadListItemMore.ts +5 -0
- package/dist/client/index.d.ts +0 -7
- package/dist/client/index.d.ts.map +0 -1
- package/dist/client/index.js +0 -10
- package/dist/client/index.js.map +0 -1
- package/dist/context/providers/index.d.ts +0 -10
- package/dist/context/providers/index.d.ts.map +0 -1
- package/dist/context/providers/index.js +0 -10
- package/dist/context/providers/index.js.map +0 -1
- package/dist/context/react/index.d.ts +0 -9
- package/dist/context/react/index.d.ts.map +0 -1
- package/dist/context/react/index.js +0 -10
- package/dist/context/react/index.js.map +0 -1
- package/dist/context/stores/index.d.ts +0 -2
- package/dist/context/stores/index.d.ts.map +0 -1
- package/dist/context/stores/index.js +0 -2
- package/dist/context/stores/index.js.map +0 -1
- package/dist/devtools/index.d.ts +0 -2
- package/dist/devtools/index.d.ts.map +0 -1
- package/dist/devtools/index.js +0 -2
- package/dist/devtools/index.js.map +0 -1
- package/dist/legacy-runtime/cloud/index.d.ts +0 -3
- package/dist/legacy-runtime/cloud/index.d.ts.map +0 -1
- package/dist/legacy-runtime/cloud/index.js +0 -3
- package/dist/legacy-runtime/cloud/index.js.map +0 -1
- package/dist/legacy-runtime/runtime/index.d.ts +0 -2
- package/dist/legacy-runtime/runtime/index.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime/index.js +0 -2
- package/dist/legacy-runtime/runtime/index.js.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/index.d.ts +0 -4
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/index.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/index.js +0 -4
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/index.js.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/feedback/index.d.ts +0 -2
- package/dist/legacy-runtime/runtime-cores/adapters/feedback/index.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/feedback/index.js +0 -2
- package/dist/legacy-runtime/runtime-cores/adapters/feedback/index.js.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/index.d.ts +0 -7
- package/dist/legacy-runtime/runtime-cores/adapters/index.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/index.js +0 -7
- package/dist/legacy-runtime/runtime-cores/adapters/index.js.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/speech/index.d.ts +0 -3
- package/dist/legacy-runtime/runtime-cores/adapters/speech/index.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/speech/index.js +0 -2
- package/dist/legacy-runtime/runtime-cores/adapters/speech/index.js.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/suggestion/index.d.ts +0 -2
- package/dist/legacy-runtime/runtime-cores/adapters/suggestion/index.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/suggestion/index.js +0 -2
- package/dist/legacy-runtime/runtime-cores/adapters/suggestion/index.js.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/thread-history/index.d.ts +0 -2
- package/dist/legacy-runtime/runtime-cores/adapters/thread-history/index.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/thread-history/index.js +0 -2
- package/dist/legacy-runtime/runtime-cores/adapters/thread-history/index.js.map +0 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/index.d.ts +0 -3
- package/dist/legacy-runtime/runtime-cores/assistant-transport/index.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/index.js +0 -2
- package/dist/legacy-runtime/runtime-cores/assistant-transport/index.js.map +0 -1
- package/dist/legacy-runtime/runtime-cores/core/index.d.ts +0 -2
- package/dist/legacy-runtime/runtime-cores/core/index.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime-cores/core/index.js +0 -2
- package/dist/legacy-runtime/runtime-cores/core/index.js.map +0 -1
- package/dist/legacy-runtime/runtime-cores/external-store/index.d.ts +0 -7
- package/dist/legacy-runtime/runtime-cores/external-store/index.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime-cores/external-store/index.js +0 -6
- package/dist/legacy-runtime/runtime-cores/external-store/index.js.map +0 -1
- package/dist/legacy-runtime/runtime-cores/index.d.ts +0 -9
- package/dist/legacy-runtime/runtime-cores/index.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime-cores/index.js +0 -8
- package/dist/legacy-runtime/runtime-cores/index.js.map +0 -1
- package/dist/legacy-runtime/runtime-cores/local/index.d.ts +0 -8
- package/dist/legacy-runtime/runtime-cores/local/index.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime-cores/local/index.js +0 -7
- package/dist/legacy-runtime/runtime-cores/local/index.js.map +0 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/index.d.ts +0 -5
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/index.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/index.js +0 -5
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/index.js.map +0 -1
- package/dist/model-context/frame/index.d.ts +0 -6
- package/dist/model-context/frame/index.d.ts.map +0 -1
- package/dist/model-context/frame/index.js +0 -5
- package/dist/model-context/frame/index.js.map +0 -1
- package/dist/model-context/index.d.ts +0 -10
- package/dist/model-context/index.d.ts.map +0 -1
- package/dist/model-context/index.js +0 -11
- package/dist/model-context/index.js.map +0 -1
- package/dist/model-context/registry/index.d.ts +0 -3
- package/dist/model-context/registry/index.d.ts.map +0 -1
- package/dist/model-context/registry/index.js +0 -2
- package/dist/model-context/registry/index.js.map +0 -1
- package/dist/primitives/actionBar/index.d.ts +0 -10
- package/dist/primitives/actionBar/index.d.ts.map +0 -1
- package/dist/primitives/actionBar/index.js +0 -10
- package/dist/primitives/actionBar/index.js.map +0 -1
- package/dist/primitives/actionBarMore/index.d.ts +0 -6
- package/dist/primitives/actionBarMore/index.d.ts.map +0 -1
- package/dist/primitives/actionBarMore/index.js +0 -6
- package/dist/primitives/actionBarMore/index.js.map +0 -1
- package/dist/primitives/assistantModal/index.d.ts +0 -5
- package/dist/primitives/assistantModal/index.d.ts.map +0 -1
- package/dist/primitives/assistantModal/index.js +0 -5
- package/dist/primitives/assistantModal/index.js.map +0 -1
- package/dist/primitives/attachment/index.d.ts +0 -5
- package/dist/primitives/attachment/index.d.ts.map +0 -1
- package/dist/primitives/attachment/index.js +0 -5
- package/dist/primitives/attachment/index.js.map +0 -1
- package/dist/primitives/branchPicker/index.d.ts +0 -6
- package/dist/primitives/branchPicker/index.d.ts.map +0 -1
- package/dist/primitives/branchPicker/index.js +0 -6
- package/dist/primitives/branchPicker/index.js.map +0 -1
- package/dist/primitives/chainOfThought/index.d.ts +0 -4
- package/dist/primitives/chainOfThought/index.d.ts.map +0 -1
- package/dist/primitives/chainOfThought/index.js +0 -4
- package/dist/primitives/chainOfThought/index.js.map +0 -1
- package/dist/primitives/composer/index.d.ts +0 -16
- package/dist/primitives/composer/index.d.ts.map +0 -1
- package/dist/primitives/composer/index.js +0 -16
- package/dist/primitives/composer/index.js.map +0 -1
- package/dist/primitives/error/index.d.ts +0 -3
- package/dist/primitives/error/index.d.ts.map +0 -1
- package/dist/primitives/error/index.js +0 -3
- package/dist/primitives/error/index.js.map +0 -1
- package/dist/primitives/index.d.ts +0 -27
- package/dist/primitives/index.d.ts.map +0 -1
- package/dist/primitives/index.js +0 -27
- package/dist/primitives/index.js.map +0 -1
- package/dist/primitives/message/index.d.ts +0 -10
- package/dist/primitives/message/index.d.ts.map +0 -1
- package/dist/primitives/message/index.js +0 -10
- package/dist/primitives/message/index.js.map +0 -1
- package/dist/primitives/messagePart/index.d.ts +0 -4
- package/dist/primitives/messagePart/index.d.ts.map +0 -1
- package/dist/primitives/messagePart/index.js +0 -4
- package/dist/primitives/messagePart/index.js.map +0 -1
- package/dist/primitives/reasoning/index.d.ts +0 -2
- package/dist/primitives/reasoning/index.d.ts.map +0 -1
- package/dist/primitives/reasoning/index.js +0 -2
- package/dist/primitives/reasoning/index.js.map +0 -1
- package/dist/primitives/selectionToolbar/index.d.ts +0 -3
- package/dist/primitives/selectionToolbar/index.d.ts.map +0 -1
- package/dist/primitives/selectionToolbar/index.js +0 -3
- package/dist/primitives/selectionToolbar/index.js.map +0 -1
- package/dist/primitives/suggestion/index.d.ts +0 -4
- package/dist/primitives/suggestion/index.d.ts.map +0 -1
- package/dist/primitives/suggestion/index.js +0 -4
- package/dist/primitives/suggestion/index.js.map +0 -1
- package/dist/primitives/thread/index.d.ts +0 -13
- package/dist/primitives/thread/index.d.ts.map +0 -1
- package/dist/primitives/thread/index.js +0 -13
- package/dist/primitives/thread/index.js.map +0 -1
- package/dist/primitives/threadList/index.d.ts +0 -5
- package/dist/primitives/threadList/index.d.ts.map +0 -1
- package/dist/primitives/threadList/index.js +0 -5
- package/dist/primitives/threadList/index.js.map +0 -1
- package/dist/primitives/threadListItem/index.d.ts +0 -7
- package/dist/primitives/threadListItem/index.d.ts.map +0 -1
- package/dist/primitives/threadListItem/index.js +0 -7
- package/dist/primitives/threadListItem/index.js.map +0 -1
- package/dist/primitives/threadListItemMore/index.d.ts +0 -6
- package/dist/primitives/threadListItemMore/index.d.ts.map +0 -1
- package/dist/primitives/threadListItemMore/index.js +0 -6
- package/dist/primitives/threadListItemMore/index.js.map +0 -1
- package/dist/types/index.d.ts +0 -4
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -2
- package/dist/types/index.js.map +0 -1
- package/dist/types/scopes/index.d.ts +0 -3
- package/dist/types/scopes/index.d.ts.map +0 -1
- package/dist/types/scopes/index.js +0 -2
- package/dist/types/scopes/index.js.map +0 -1
- package/dist/utils/smooth/index.d.ts +0 -3
- package/dist/utils/smooth/index.d.ts.map +0 -1
- package/dist/utils/smooth/index.js +0 -6
- package/dist/utils/smooth/index.js.map +0 -1
- package/src/client/index.ts +0 -18
- package/src/context/providers/index.ts +0 -15
- package/src/context/react/index.ts +0 -50
- package/src/context/stores/index.ts +0 -1
- package/src/devtools/index.ts +0 -1
- package/src/legacy-runtime/cloud/index.ts +0 -2
- package/src/legacy-runtime/runtime/index.ts +0 -25
- package/src/legacy-runtime/runtime-cores/adapters/attachment/index.ts +0 -10
- package/src/legacy-runtime/runtime-cores/adapters/feedback/index.ts +0 -2
- package/src/legacy-runtime/runtime-cores/adapters/index.ts +0 -6
- package/src/legacy-runtime/runtime-cores/adapters/speech/index.ts +0 -9
- package/src/legacy-runtime/runtime-cores/adapters/suggestion/index.ts +0 -2
- package/src/legacy-runtime/runtime-cores/adapters/thread-history/index.ts +0 -9
- package/src/legacy-runtime/runtime-cores/assistant-transport/index.ts +0 -11
- package/src/legacy-runtime/runtime-cores/core/index.ts +0 -7
- package/src/legacy-runtime/runtime-cores/external-store/index.ts +0 -21
- package/src/legacy-runtime/runtime-cores/index.ts +0 -10
- package/src/legacy-runtime/runtime-cores/local/index.ts +0 -18
- package/src/legacy-runtime/runtime-cores/remote-thread-list/index.ts +0 -7
- package/src/model-context/frame/index.ts +0 -10
- package/src/model-context/index.ts +0 -45
- package/src/model-context/registry/index.ts +0 -6
- package/src/primitives/actionBar/index.ts +0 -9
- package/src/primitives/actionBarMore/index.ts +0 -5
- package/src/primitives/assistantModal/index.ts +0 -4
- package/src/primitives/attachment/index.ts +0 -4
- package/src/primitives/branchPicker/index.ts +0 -5
- package/src/primitives/composer/index.ts +0 -15
- package/src/primitives/error/index.ts +0 -2
- package/src/primitives/index.ts +0 -27
- package/src/primitives/message/index.ts +0 -12
- package/src/primitives/messagePart/index.ts +0 -3
- package/src/primitives/reasoning/index.ts +0 -1
- package/src/primitives/suggestion/index.ts +0 -3
- package/src/primitives/thread/index.ts +0 -15
- package/src/primitives/threadList/index.ts +0 -4
- package/src/primitives/threadListItem/index.ts +0 -6
- package/src/primitives/threadListItemMore/index.ts +0 -5
- package/src/types/index.ts +0 -56
- package/src/types/scopes/index.ts +0 -59
- package/src/utils/smooth/index.ts +0 -6
|
@@ -5,20 +5,12 @@ import { ActionButtonProps } from "../../utils/createActionButton";
|
|
|
5
5
|
import { useEscapeKeydown } from "@radix-ui/react-use-escape-keydown";
|
|
6
6
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
7
7
|
import { composeEventHandlers } from "@radix-ui/primitive";
|
|
8
|
-
import {
|
|
9
|
-
import { useAuiState, useAui } from "@assistant-ui/store";
|
|
8
|
+
import { useActionBarStopSpeaking as useActionBarStopSpeakingBehavior } from "@assistant-ui/core/react";
|
|
10
9
|
|
|
11
10
|
const useActionBarStopSpeaking = () => {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const callback = useCallback(() => {
|
|
16
|
-
aui.message().stopSpeaking();
|
|
17
|
-
}, [aui]);
|
|
18
|
-
|
|
19
|
-
if (!isSpeaking) return null;
|
|
20
|
-
|
|
21
|
-
return callback;
|
|
11
|
+
const { disabled, stopSpeaking } = useActionBarStopSpeakingBehavior();
|
|
12
|
+
if (disabled) return null;
|
|
13
|
+
return stopSpeaking;
|
|
22
14
|
};
|
|
23
15
|
|
|
24
16
|
export namespace ActionBarPrimitiveStopSpeaking {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { ActionBarPrimitiveRoot as Root } from "./actionBar/ActionBarRoot";
|
|
2
|
+
export { ActionBarPrimitiveCopy as Copy } from "./actionBar/ActionBarCopy";
|
|
3
|
+
export { ActionBarPrimitiveReload as Reload } from "./actionBar/ActionBarReload";
|
|
4
|
+
export { ActionBarPrimitiveEdit as Edit } from "./actionBar/ActionBarEdit";
|
|
5
|
+
export { ActionBarPrimitiveSpeak as Speak } from "./actionBar/ActionBarSpeak";
|
|
6
|
+
export { ActionBarPrimitiveStopSpeaking as StopSpeaking } from "./actionBar/ActionBarStopSpeaking";
|
|
7
|
+
export { ActionBarPrimitiveFeedbackPositive as FeedbackPositive } from "./actionBar/ActionBarFeedbackPositive";
|
|
8
|
+
export { ActionBarPrimitiveFeedbackNegative as FeedbackNegative } from "./actionBar/ActionBarFeedbackNegative";
|
|
9
|
+
export { ActionBarPrimitiveExportMarkdown as ExportMarkdown } from "./actionBar/ActionBarExportMarkdown";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ActionBarMorePrimitiveRoot as Root } from "./actionBarMore/ActionBarMoreRoot";
|
|
2
|
+
export { ActionBarMorePrimitiveTrigger as Trigger } from "./actionBarMore/ActionBarMoreTrigger";
|
|
3
|
+
export { ActionBarMorePrimitiveContent as Content } from "./actionBarMore/ActionBarMoreContent";
|
|
4
|
+
export { ActionBarMorePrimitiveItem as Item } from "./actionBarMore/ActionBarMoreItem";
|
|
5
|
+
export { ActionBarMorePrimitiveSeparator as Separator } from "./actionBarMore/ActionBarMoreSeparator";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { AssistantModalPrimitiveRoot as Root } from "./assistantModal/AssistantModalRoot";
|
|
2
|
+
export { AssistantModalPrimitiveTrigger as Trigger } from "./assistantModal/AssistantModalTrigger";
|
|
3
|
+
export { AssistantModalPrimitiveContent as Content } from "./assistantModal/AssistantModalContent";
|
|
4
|
+
export { AssistantModalPrimitiveAnchor as Anchor } from "./assistantModal/AssistantModalAnchor";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { AttachmentPrimitiveRoot as Root } from "./attachment/AttachmentRoot";
|
|
2
|
+
export { AttachmentPrimitiveThumb as unstable_Thumb } from "./attachment/AttachmentThumb";
|
|
3
|
+
export { AttachmentPrimitiveName as Name } from "./attachment/AttachmentName";
|
|
4
|
+
export { AttachmentPrimitiveRemove as Remove } from "./attachment/AttachmentRemove";
|
|
@@ -5,29 +5,12 @@ import {
|
|
|
5
5
|
ActionButtonProps,
|
|
6
6
|
createActionButton,
|
|
7
7
|
} from "../../utils/createActionButton";
|
|
8
|
-
import {
|
|
9
|
-
import { useAuiState, useAui } from "@assistant-ui/store";
|
|
8
|
+
import { useBranchPickerNext as useBranchPickerNextBehavior } from "@assistant-ui/core/react";
|
|
10
9
|
|
|
11
10
|
const useBranchPickerNext = () => {
|
|
12
|
-
const
|
|
13
|
-
const disabled = useAuiState((s) => {
|
|
14
|
-
// Disabled if no next branch
|
|
15
|
-
if (s.message.branchNumber >= s.message.branchCount) return true;
|
|
16
|
-
|
|
17
|
-
// Disabled if running and capability not supported
|
|
18
|
-
if (s.thread.isRunning && !s.thread.capabilities.switchBranchDuringRun) {
|
|
19
|
-
return true;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return false;
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
const callback = useCallback(() => {
|
|
26
|
-
aui.message().switchToBranch({ position: "next" });
|
|
27
|
-
}, [aui]);
|
|
28
|
-
|
|
11
|
+
const { disabled, next } = useBranchPickerNextBehavior();
|
|
29
12
|
if (disabled) return null;
|
|
30
|
-
return
|
|
13
|
+
return next;
|
|
31
14
|
};
|
|
32
15
|
|
|
33
16
|
export namespace BranchPickerPrimitiveNext {
|
|
@@ -5,50 +5,12 @@ import {
|
|
|
5
5
|
ActionButtonProps,
|
|
6
6
|
createActionButton,
|
|
7
7
|
} from "../../utils/createActionButton";
|
|
8
|
-
import {
|
|
9
|
-
import { useAuiState, useAui } from "@assistant-ui/store";
|
|
8
|
+
import { useBranchPickerPrevious as useBranchPickerPreviousBehavior } from "@assistant-ui/core/react";
|
|
10
9
|
|
|
11
|
-
/**
|
|
12
|
-
* Hook that provides navigation to the previous branch functionality.
|
|
13
|
-
*
|
|
14
|
-
* This hook returns a callback function that switches to the previous branch
|
|
15
|
-
* in the message branch tree, or null if there is no previous branch available.
|
|
16
|
-
*
|
|
17
|
-
* @returns A previous branch callback function, or null if navigation is disabled
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* ```tsx
|
|
21
|
-
* function CustomPreviousButton() {
|
|
22
|
-
* const previous = useBranchPickerPrevious();
|
|
23
|
-
*
|
|
24
|
-
* return (
|
|
25
|
-
* <button onClick={previous} disabled={!previous}>
|
|
26
|
-
* {previous ? "Previous Branch" : "No Previous Branch"}
|
|
27
|
-
* </button>
|
|
28
|
-
* );
|
|
29
|
-
* }
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
10
|
const useBranchPickerPrevious = () => {
|
|
33
|
-
const
|
|
34
|
-
const disabled = useAuiState((s) => {
|
|
35
|
-
// Disabled if no previous branch
|
|
36
|
-
if (s.message.branchNumber <= 1) return true;
|
|
37
|
-
|
|
38
|
-
// Disabled if running and capability not supported
|
|
39
|
-
if (s.thread.isRunning && !s.thread.capabilities.switchBranchDuringRun) {
|
|
40
|
-
return true;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
return false;
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
const callback = useCallback(() => {
|
|
47
|
-
aui.message().switchToBranch({ position: "previous" });
|
|
48
|
-
}, [aui]);
|
|
49
|
-
|
|
11
|
+
const { disabled, previous } = useBranchPickerPreviousBehavior();
|
|
50
12
|
if (disabled) return null;
|
|
51
|
-
return
|
|
13
|
+
return previous;
|
|
52
14
|
};
|
|
53
15
|
|
|
54
16
|
export namespace BranchPickerPrimitivePrevious {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
4
|
import { type ComponentRef, forwardRef, ComponentPropsWithoutRef } from "react";
|
|
5
|
-
import { If } from "../message";
|
|
5
|
+
import { MessagePrimitiveIf as If } from "../message/MessageIf";
|
|
6
6
|
|
|
7
7
|
export namespace BranchPickerPrimitiveRoot {
|
|
8
8
|
export type Element = ComponentRef<typeof Primitive.div>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { BranchPickerPrimitiveNext as Next } from "./branchPicker/BranchPickerNext";
|
|
2
|
+
export { BranchPickerPrimitivePrevious as Previous } from "./branchPicker/BranchPickerPrevious";
|
|
3
|
+
export { BranchPickerPrimitiveCount as Count } from "./branchPicker/BranchPickerCount";
|
|
4
|
+
export { BranchPickerPrimitiveNumber as Number } from "./branchPicker/BranchPickerNumber";
|
|
5
|
+
export { BranchPickerPrimitiveRoot as Root } from "./branchPicker/BranchPickerRoot";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export {
|
|
2
2
|
ChainOfThoughtPrimitiveRoot as Root,
|
|
3
3
|
type ChainOfThoughtPrimitiveRoot as RootPrimitive,
|
|
4
|
-
} from "./ChainOfThoughtRoot";
|
|
4
|
+
} from "./chainOfThought/ChainOfThoughtRoot";
|
|
5
5
|
|
|
6
6
|
export {
|
|
7
7
|
ChainOfThoughtPrimitiveAccordionTrigger as AccordionTrigger,
|
|
8
8
|
type ChainOfThoughtPrimitiveAccordionTrigger as AccordionTriggerPrimitive,
|
|
9
|
-
} from "./ChainOfThoughtAccordionTrigger";
|
|
9
|
+
} from "./chainOfThought/ChainOfThoughtAccordionTrigger";
|
|
10
10
|
|
|
11
11
|
export {
|
|
12
12
|
ChainOfThoughtPrimitiveParts as Parts,
|
|
13
13
|
type ChainOfThoughtPrimitiveParts as PartsPrimitive,
|
|
14
|
-
} from "./ChainOfThoughtParts";
|
|
14
|
+
} from "./chainOfThought/ChainOfThoughtParts";
|
|
@@ -1,28 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { useCallback } from "react";
|
|
4
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
5
3
|
import type {
|
|
6
4
|
ActionButtonElement,
|
|
7
5
|
ActionButtonProps,
|
|
8
6
|
} from "../../utils/createActionButton";
|
|
9
7
|
import { createActionButton } from "../../utils/createActionButton";
|
|
8
|
+
import { useComposerDictate as useComposerDictateBehavior } from "@assistant-ui/core/react";
|
|
10
9
|
|
|
11
10
|
const useComposerDictate = () => {
|
|
12
|
-
const
|
|
13
|
-
const disabled = useAuiState(
|
|
14
|
-
(s) =>
|
|
15
|
-
s.composer.dictation != null ||
|
|
16
|
-
!s.thread.capabilities.dictation ||
|
|
17
|
-
!s.composer.isEditing,
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
const callback = useCallback(() => {
|
|
21
|
-
aui.composer().startDictation();
|
|
22
|
-
}, [aui]);
|
|
23
|
-
|
|
11
|
+
const { disabled, startDictation } = useComposerDictateBehavior();
|
|
24
12
|
if (disabled) return null;
|
|
25
|
-
return
|
|
13
|
+
return startDictation;
|
|
26
14
|
};
|
|
27
15
|
|
|
28
16
|
export namespace ComposerPrimitiveDictate {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { ComposerPrimitiveRoot as Root } from "./composer/ComposerRoot";
|
|
2
|
+
export { ComposerPrimitiveInput as Input } from "./composer/ComposerInput";
|
|
3
|
+
export { ComposerPrimitiveSend as Send } from "./composer/ComposerSend";
|
|
4
|
+
export { ComposerPrimitiveCancel as Cancel } from "./composer/ComposerCancel";
|
|
5
|
+
export { ComposerPrimitiveAddAttachment as AddAttachment } from "./composer/ComposerAddAttachment";
|
|
6
|
+
export { ComposerPrimitiveAttachments as Attachments } from "./composer/ComposerAttachments";
|
|
7
|
+
export { ComposerPrimitiveAttachmentByIndex as AttachmentByIndex } from "./composer/ComposerAttachments";
|
|
8
|
+
export { ComposerPrimitiveAttachmentDropzone as AttachmentDropzone } from "./composer/ComposerAttachmentDropzone";
|
|
9
|
+
export { ComposerPrimitiveDictate as Dictate } from "./composer/ComposerDictate";
|
|
10
|
+
export { ComposerPrimitiveStopDictation as StopDictation } from "./composer/ComposerStopDictation";
|
|
11
|
+
export { ComposerPrimitiveDictationTranscript as DictationTranscript } from "./composer/ComposerDictationTranscript";
|
|
12
|
+
export { ComposerPrimitiveIf as If } from "./composer/ComposerIf";
|
|
13
|
+
export { ComposerPrimitiveQuote as Quote } from "./composer/ComposerQuote";
|
|
14
|
+
export { ComposerPrimitiveQuoteText as QuoteText } from "./composer/ComposerQuote";
|
|
15
|
+
export { ComposerPrimitiveQuoteDismiss as QuoteDismiss } from "./composer/ComposerQuote";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
4
|
import { type ComponentRef, forwardRef, ComponentPropsWithoutRef } from "react";
|
|
5
|
-
import {
|
|
5
|
+
import { useMessageError } from "@assistant-ui/core/react";
|
|
6
6
|
|
|
7
7
|
export namespace ErrorPrimitiveMessage {
|
|
8
8
|
export type Element = ComponentRef<typeof Primitive.span>;
|
|
@@ -13,12 +13,7 @@ export const ErrorPrimitiveMessage = forwardRef<
|
|
|
13
13
|
ErrorPrimitiveMessage.Element,
|
|
14
14
|
ErrorPrimitiveMessage.Props
|
|
15
15
|
>(({ children, ...props }, forwardRef) => {
|
|
16
|
-
const error =
|
|
17
|
-
return s.message.status?.type === "incomplete" &&
|
|
18
|
-
s.message.status.reason === "error"
|
|
19
|
-
? s.message.status.error
|
|
20
|
-
: undefined;
|
|
21
|
-
});
|
|
16
|
+
const error = useMessageError();
|
|
22
17
|
|
|
23
18
|
if (error === undefined) return null;
|
|
24
19
|
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { FC, PropsWithChildren } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { useMessageError } from "@assistant-ui/core/react";
|
|
5
5
|
|
|
6
6
|
export const MessagePrimitiveError: FC<PropsWithChildren> = ({ children }) => {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
s.message.status?.type === "incomplete" &&
|
|
10
|
-
s.message.status.reason === "error",
|
|
11
|
-
);
|
|
12
|
-
return hasError ? children : null;
|
|
7
|
+
const error = useMessageError();
|
|
8
|
+
return error !== undefined ? children : null;
|
|
13
9
|
};
|
|
14
10
|
|
|
15
11
|
MessagePrimitiveError.displayName = "MessagePrimitive.Error";
|
|
@@ -31,10 +31,16 @@ export namespace MessagePrimitiveParts {
|
|
|
31
31
|
/**
|
|
32
32
|
* Renders the parts of a message with web-specific default components.
|
|
33
33
|
*/
|
|
34
|
-
export const MessagePrimitiveParts: FC<MessagePrimitiveParts.Props> = (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
export const MessagePrimitiveParts: FC<MessagePrimitiveParts.Props> = (
|
|
35
|
+
props,
|
|
36
|
+
) => {
|
|
37
|
+
if ("children" in props) {
|
|
38
|
+
return (
|
|
39
|
+
<MessagePrimitivePartsBase>{props.children}</MessagePrimitivePartsBase>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const { components, ...rest } = props;
|
|
38
44
|
const merged = components
|
|
39
45
|
? {
|
|
40
46
|
Text: components.Text ?? webDefaultComponents.Text,
|
|
@@ -58,6 +64,7 @@ export const MessagePrimitiveParts: FC<MessagePrimitiveParts.Props> = ({
|
|
|
58
64
|
messagePartsDefaultComponents.ReasoningGroup,
|
|
59
65
|
}),
|
|
60
66
|
Empty: components.Empty,
|
|
67
|
+
Quote: components.Quote,
|
|
61
68
|
}
|
|
62
69
|
: webDefaultComponents;
|
|
63
70
|
|
|
@@ -8,10 +8,8 @@ import {
|
|
|
8
8
|
useMemo,
|
|
9
9
|
} from "react";
|
|
10
10
|
import { useAuiState, useAui } from "@assistant-ui/store";
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
TextMessagePartProvider,
|
|
14
|
-
} from "../../context/providers";
|
|
11
|
+
import { PartByIndexProvider } from "../../context/providers/PartByIndexProvider";
|
|
12
|
+
import { TextMessagePartProvider } from "../../context/providers/TextMessagePartProvider";
|
|
15
13
|
import { MessagePartPrimitiveText } from "../messagePart/MessagePartText";
|
|
16
14
|
import { MessagePartPrimitiveImage } from "../messagePart/MessagePartImage";
|
|
17
15
|
import type {
|
|
@@ -26,7 +24,7 @@ import type {
|
|
|
26
24
|
ToolCallMessagePartProps,
|
|
27
25
|
FileMessagePartComponent,
|
|
28
26
|
ReasoningMessagePartComponent,
|
|
29
|
-
} from "
|
|
27
|
+
} from "@assistant-ui/core/react";
|
|
30
28
|
import { MessagePartPrimitiveInProgress } from "../messagePart/MessagePartInProgress";
|
|
31
29
|
import type { MessagePartStatus } from "@assistant-ui/core";
|
|
32
30
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { MessagePrimitiveRoot as Root } from "./message/MessageRoot";
|
|
2
|
+
export { MessagePrimitiveParts as Parts } from "./message/MessageParts";
|
|
3
|
+
export { MessagePrimitivePartByIndex as PartByIndex } from "./message/MessageParts";
|
|
4
|
+
export { MessagePrimitiveParts as Content } from "./message/MessageParts";
|
|
5
|
+
export { MessagePrimitiveIf as If } from "./message/MessageIf";
|
|
6
|
+
export { MessagePrimitiveAttachments as Attachments } from "./message/MessageAttachments";
|
|
7
|
+
export { MessagePrimitiveAttachmentByIndex as AttachmentByIndex } from "./message/MessageAttachments";
|
|
8
|
+
export { MessagePrimitiveQuote as Quote } from "@assistant-ui/core/react";
|
|
9
|
+
export { MessagePrimitiveError as Error } from "./message/MessageError";
|
|
10
|
+
export {
|
|
11
|
+
MessagePrimitiveUnstable_PartsGrouped as Unstable_PartsGrouped,
|
|
12
|
+
MessagePrimitiveUnstable_PartsGroupedByParentId as Unstable_PartsGroupedByParentId,
|
|
13
|
+
} from "./message/MessagePartsGrouped";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { MessagePartPrimitiveText as Text } from "./messagePart/MessagePartText";
|
|
2
|
+
export { MessagePartPrimitiveImage as Image } from "./messagePart/MessagePartImage";
|
|
3
|
+
export { MessagePartPrimitiveInProgress as InProgress } from "./messagePart/MessagePartInProgress";
|
|
4
|
+
export { PartPrimitiveMessages as Messages } from "@assistant-ui/core/react";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export {
|
|
2
2
|
SelectionToolbarPrimitiveRoot as Root,
|
|
3
3
|
type SelectionToolbarPrimitiveRoot,
|
|
4
|
-
} from "./SelectionToolbarRoot";
|
|
4
|
+
} from "./selectionToolbar/SelectionToolbarRoot";
|
|
5
5
|
export {
|
|
6
6
|
SelectionToolbarPrimitiveQuote as Quote,
|
|
7
7
|
type SelectionToolbarPrimitiveQuote,
|
|
8
|
-
} from "./SelectionToolbarQuote";
|
|
8
|
+
} from "./selectionToolbar/SelectionToolbarQuote";
|
|
@@ -22,7 +22,9 @@ export namespace ThreadPrimitiveRoot {
|
|
|
22
22
|
* ```tsx
|
|
23
23
|
* <ThreadPrimitive.Root>
|
|
24
24
|
* <ThreadPrimitive.Viewport>
|
|
25
|
-
* <ThreadPrimitive.Messages
|
|
25
|
+
* <ThreadPrimitive.Messages>
|
|
26
|
+
* {() => <MyMessage />}
|
|
27
|
+
* </ThreadPrimitive.Messages>
|
|
26
28
|
* </ThreadPrimitive.Viewport>
|
|
27
29
|
* </ThreadPrimitive.Root>
|
|
28
30
|
* ```
|
|
@@ -5,13 +5,12 @@ import {
|
|
|
5
5
|
ActionButtonProps,
|
|
6
6
|
createActionButton,
|
|
7
7
|
} from "../../utils/createActionButton";
|
|
8
|
-
import {
|
|
9
|
-
import { useAuiState, useAui } from "@assistant-ui/store";
|
|
8
|
+
import { useSuggestionTrigger as useSuggestionTriggerBehavior } from "@assistant-ui/core/react";
|
|
10
9
|
|
|
11
10
|
const useThreadSuggestion = ({
|
|
12
11
|
prompt,
|
|
13
12
|
send,
|
|
14
|
-
clearComposer
|
|
13
|
+
clearComposer,
|
|
15
14
|
autoSend,
|
|
16
15
|
method: _method,
|
|
17
16
|
}: {
|
|
@@ -39,38 +38,17 @@ const useThreadSuggestion = ({
|
|
|
39
38
|
/** @deprecated Use `clearComposer` instead. */
|
|
40
39
|
method?: "replace";
|
|
41
40
|
}) => {
|
|
42
|
-
const aui = useAui();
|
|
43
|
-
const disabled = useAuiState((s) => s.thread.isDisabled);
|
|
44
|
-
|
|
45
41
|
// ========== Deprecation Mapping ==========
|
|
46
42
|
const resolvedSend = send ?? autoSend ?? false;
|
|
47
43
|
// ==========================================
|
|
48
44
|
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
content: [{ type: "text", text: prompt }],
|
|
55
|
-
runConfig: aui.composer().getState().runConfig,
|
|
56
|
-
});
|
|
57
|
-
if (clearComposer) {
|
|
58
|
-
aui.composer().setText("");
|
|
59
|
-
}
|
|
60
|
-
} else {
|
|
61
|
-
if (clearComposer) {
|
|
62
|
-
aui.composer().setText(prompt);
|
|
63
|
-
} else {
|
|
64
|
-
const currentText = aui.composer().getState().text;
|
|
65
|
-
aui
|
|
66
|
-
.composer()
|
|
67
|
-
.setText(currentText.trim() ? `${currentText} ${prompt}` : prompt);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}, [aui, resolvedSend, clearComposer, prompt]);
|
|
71
|
-
|
|
45
|
+
const { disabled, trigger } = useSuggestionTriggerBehavior({
|
|
46
|
+
prompt,
|
|
47
|
+
send: resolvedSend,
|
|
48
|
+
clearComposer,
|
|
49
|
+
});
|
|
72
50
|
if (disabled) return null;
|
|
73
|
-
return
|
|
51
|
+
return trigger;
|
|
74
52
|
};
|
|
75
53
|
|
|
76
54
|
export namespace ThreadPrimitiveSuggestion {
|
|
@@ -105,7 +105,9 @@ ThreadPrimitiveViewportScrollable.displayName =
|
|
|
105
105
|
* @example
|
|
106
106
|
* ```tsx
|
|
107
107
|
* <ThreadPrimitive.Viewport turnAnchor="top">
|
|
108
|
-
* <ThreadPrimitive.Messages
|
|
108
|
+
* <ThreadPrimitive.Messages>
|
|
109
|
+
* {() => <MyMessage />}
|
|
110
|
+
* </ThreadPrimitive.Messages>
|
|
109
111
|
* </ThreadPrimitive.Viewport>
|
|
110
112
|
* ```
|
|
111
113
|
*/
|
|
@@ -30,7 +30,9 @@ export namespace ThreadPrimitiveViewportFooter {
|
|
|
30
30
|
* @example
|
|
31
31
|
* ```tsx
|
|
32
32
|
* <ThreadPrimitive.Viewport>
|
|
33
|
-
* <ThreadPrimitive.Messages
|
|
33
|
+
* <ThreadPrimitive.Messages>
|
|
34
|
+
* {() => <MyMessage />}
|
|
35
|
+
* </ThreadPrimitive.Messages>
|
|
34
36
|
* <ThreadPrimitive.ViewportFooter className="sticky bottom-0">
|
|
35
37
|
* <Composer />
|
|
36
38
|
* </ThreadPrimitive.ViewportFooter>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { ThreadPrimitiveRoot as Root } from "./thread/ThreadRoot";
|
|
2
|
+
export { ThreadPrimitiveEmpty as Empty } from "./thread/ThreadEmpty";
|
|
3
|
+
export { ThreadPrimitiveIf as If } from "./thread/ThreadIf";
|
|
4
|
+
export { ThreadPrimitiveViewport as Viewport } from "./thread/ThreadViewport";
|
|
5
|
+
export { ThreadPrimitiveViewportProvider as ViewportProvider } from "../context/providers/ThreadViewportProvider";
|
|
6
|
+
export { ThreadPrimitiveViewportFooter as ViewportFooter } from "./thread/ThreadViewportFooter";
|
|
7
|
+
export { ThreadPrimitiveViewportSlack as ViewportSlack } from "./thread/ThreadViewportSlack";
|
|
8
|
+
export { ThreadPrimitiveMessages as Messages } from "./thread/ThreadMessages";
|
|
9
|
+
export { ThreadPrimitiveMessageByIndex as MessageByIndex } from "./thread/ThreadMessages";
|
|
10
|
+
export { ThreadPrimitiveScrollToBottom as ScrollToBottom } from "./thread/ThreadScrollToBottom";
|
|
11
|
+
export { ThreadPrimitiveSuggestion as Suggestion } from "./thread/ThreadSuggestion";
|
|
12
|
+
export {
|
|
13
|
+
ThreadPrimitiveSuggestions as Suggestions,
|
|
14
|
+
ThreadPrimitiveSuggestionByIndex as SuggestionByIndex,
|
|
15
|
+
} from "./thread/ThreadSuggestions";
|
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
import { forwardRef } from "react";
|
|
8
8
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
9
9
|
import { composeEventHandlers } from "@radix-ui/primitive";
|
|
10
|
-
import { useAuiState
|
|
10
|
+
import { useAuiState } from "@assistant-ui/store";
|
|
11
|
+
import { useThreadListNew as useThreadListNewBehavior } from "@assistant-ui/core/react";
|
|
11
12
|
|
|
12
13
|
export namespace ThreadListPrimitiveNew {
|
|
13
14
|
export type Element = ActionButtonElement;
|
|
@@ -22,7 +23,7 @@ export const ThreadListPrimitiveNew = forwardRef<
|
|
|
22
23
|
(s) => s.threads.newThreadId === s.threads.mainThreadId,
|
|
23
24
|
);
|
|
24
25
|
|
|
25
|
-
const
|
|
26
|
+
const { switchToNewThread } = useThreadListNewBehavior();
|
|
26
27
|
|
|
27
28
|
return (
|
|
28
29
|
<Primitive.button
|
|
@@ -31,9 +32,7 @@ export const ThreadListPrimitiveNew = forwardRef<
|
|
|
31
32
|
{...props}
|
|
32
33
|
ref={forwardedRef}
|
|
33
34
|
disabled={disabled}
|
|
34
|
-
onClick={composeEventHandlers(onClick,
|
|
35
|
-
aui.threads().switchToNewThread();
|
|
36
|
-
})}
|
|
35
|
+
onClick={composeEventHandlers(onClick, switchToNewThread)}
|
|
37
36
|
/>
|
|
38
37
|
);
|
|
39
38
|
});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { ThreadListPrimitiveNew as New } from "./threadList/ThreadListNew";
|
|
2
|
+
export { ThreadListPrimitiveItems as Items } from "./threadList/ThreadListItems";
|
|
3
|
+
export { ThreadListPrimitiveItemByIndex as ItemByIndex } from "./threadList/ThreadListItems";
|
|
4
|
+
export { ThreadListPrimitiveRoot as Root } from "./threadList/ThreadListRoot";
|
|
@@ -5,14 +5,11 @@ import {
|
|
|
5
5
|
ActionButtonProps,
|
|
6
6
|
createActionButton,
|
|
7
7
|
} from "../../utils/createActionButton";
|
|
8
|
-
import {
|
|
9
|
-
import { useCallback } from "react";
|
|
8
|
+
import { useThreadListItemArchive as useThreadListItemArchiveBehavior } from "@assistant-ui/core/react";
|
|
10
9
|
|
|
11
10
|
const useThreadListItemArchive = () => {
|
|
12
|
-
const
|
|
13
|
-
return
|
|
14
|
-
aui.threadListItem().archive();
|
|
15
|
-
}, [aui]);
|
|
11
|
+
const { archive } = useThreadListItemArchiveBehavior();
|
|
12
|
+
return archive;
|
|
16
13
|
};
|
|
17
14
|
|
|
18
15
|
export namespace ThreadListItemPrimitiveArchive {
|
|
@@ -5,14 +5,11 @@ import {
|
|
|
5
5
|
ActionButtonProps,
|
|
6
6
|
createActionButton,
|
|
7
7
|
} from "../../utils/createActionButton";
|
|
8
|
-
import {
|
|
9
|
-
import { useCallback } from "react";
|
|
8
|
+
import { useThreadListItemDelete as useThreadListItemDeleteBehavior } from "@assistant-ui/core/react";
|
|
10
9
|
|
|
11
10
|
const useThreadListItemDelete = () => {
|
|
12
|
-
const
|
|
13
|
-
return
|
|
14
|
-
aui.threadListItem().delete();
|
|
15
|
-
}, [aui]);
|
|
11
|
+
const { delete: deleteThread } = useThreadListItemDeleteBehavior();
|
|
12
|
+
return deleteThread;
|
|
16
13
|
};
|
|
17
14
|
|
|
18
15
|
export namespace ThreadListItemPrimitiveDelete {
|
|
@@ -5,14 +5,11 @@ import {
|
|
|
5
5
|
ActionButtonProps,
|
|
6
6
|
createActionButton,
|
|
7
7
|
} from "../../utils/createActionButton";
|
|
8
|
-
import {
|
|
9
|
-
import { useCallback } from "react";
|
|
8
|
+
import { useThreadListItemTrigger as useThreadListItemTriggerBehavior } from "@assistant-ui/core/react";
|
|
10
9
|
|
|
11
10
|
const useThreadListItemTrigger = () => {
|
|
12
|
-
const
|
|
13
|
-
return
|
|
14
|
-
aui.threadListItem().switchTo();
|
|
15
|
-
}, [aui]);
|
|
11
|
+
const { switchTo } = useThreadListItemTriggerBehavior();
|
|
12
|
+
return switchTo;
|
|
16
13
|
};
|
|
17
14
|
|
|
18
15
|
export namespace ThreadListItemPrimitiveTrigger {
|
|
@@ -5,14 +5,11 @@ import {
|
|
|
5
5
|
ActionButtonProps,
|
|
6
6
|
createActionButton,
|
|
7
7
|
} from "../../utils/createActionButton";
|
|
8
|
-
import {
|
|
9
|
-
import { useCallback } from "react";
|
|
8
|
+
import { useThreadListItemUnarchive as useThreadListItemUnarchiveBehavior } from "@assistant-ui/core/react";
|
|
10
9
|
|
|
11
10
|
const useThreadListItemUnarchive = () => {
|
|
12
|
-
const
|
|
13
|
-
return
|
|
14
|
-
aui.threadListItem().unarchive();
|
|
15
|
-
}, [aui]);
|
|
11
|
+
const { unarchive } = useThreadListItemUnarchiveBehavior();
|
|
12
|
+
return unarchive;
|
|
16
13
|
};
|
|
17
14
|
|
|
18
15
|
export namespace ThreadListItemPrimitiveUnarchive {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ThreadListItemPrimitiveRoot as Root } from "./threadListItem/ThreadListItemRoot";
|
|
2
|
+
export { ThreadListItemPrimitiveArchive as Archive } from "./threadListItem/ThreadListItemArchive";
|
|
3
|
+
export { ThreadListItemPrimitiveUnarchive as Unarchive } from "./threadListItem/ThreadListItemUnarchive";
|
|
4
|
+
export { ThreadListItemPrimitiveDelete as Delete } from "./threadListItem/ThreadListItemDelete";
|
|
5
|
+
export { ThreadListItemPrimitiveTrigger as Trigger } from "./threadListItem/ThreadListItemTrigger";
|
|
6
|
+
export { ThreadListItemPrimitiveTitle as Title } from "./threadListItem/ThreadListItemTitle";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ThreadListItemMorePrimitiveRoot as Root } from "./threadListItemMore/ThreadListItemMoreRoot";
|
|
2
|
+
export { ThreadListItemMorePrimitiveTrigger as Trigger } from "./threadListItemMore/ThreadListItemMoreTrigger";
|
|
3
|
+
export { ThreadListItemMorePrimitiveContent as Content } from "./threadListItemMore/ThreadListItemMoreContent";
|
|
4
|
+
export { ThreadListItemMorePrimitiveItem as Item } from "./threadListItemMore/ThreadListItemMoreItem";
|
|
5
|
+
export { ThreadListItemMorePrimitiveSeparator as Separator } from "./threadListItemMore/ThreadListItemMoreSeparator";
|
package/dist/client/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { Tools, DataRenderers } from "@assistant-ui/core/react";
|
|
2
|
-
export { ModelContext as ModelContextClient } from "@assistant-ui/core/store";
|
|
3
|
-
export { Suggestions, type SuggestionConfig } from "@assistant-ui/core/store";
|
|
4
|
-
export { ChainOfThoughtClient } from "@assistant-ui/core/store";
|
|
5
|
-
export { ExternalThread, type ExternalThreadProps, type ExternalThreadMessage, } from "./ExternalThread.js";
|
|
6
|
-
export { InMemoryThreadList, type InMemoryThreadListProps, } from "./InMemoryThreadList.js";
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAGhE,OAAO,EAAE,YAAY,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGhE,OAAO,EACL,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,GAC3B,4BAAyB;AAC1B,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,GAC7B,gCAA6B"}
|