@assistant-ui/react 0.5.100 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/api/AssistantRuntime.d.ts +6 -86
- package/dist/api/AssistantRuntime.d.ts.map +1 -1
- package/dist/api/AssistantRuntime.js +0 -8
- package/dist/api/AssistantRuntime.js.map +1 -1
- package/dist/api/AssistantRuntime.mjs +0 -8
- package/dist/api/AssistantRuntime.mjs.map +1 -1
- package/dist/api/AttachmentRuntime.d.ts +4 -16
- package/dist/api/AttachmentRuntime.d.ts.map +1 -1
- package/dist/api/AttachmentRuntime.js.map +1 -1
- package/dist/api/AttachmentRuntime.mjs.map +1 -1
- package/dist/api/ComposerRuntime.d.ts +15 -131
- package/dist/api/ComposerRuntime.d.ts.map +1 -1
- package/dist/api/ComposerRuntime.js +4 -84
- package/dist/api/ComposerRuntime.js.map +1 -1
- package/dist/api/ComposerRuntime.mjs +4 -84
- package/dist/api/ComposerRuntime.mjs.map +1 -1
- package/dist/api/ContentPartRuntime.d.ts +2 -6
- package/dist/api/ContentPartRuntime.d.ts.map +1 -1
- package/dist/api/ContentPartRuntime.js.map +1 -1
- package/dist/api/ContentPartRuntime.mjs.map +1 -1
- package/dist/api/MessageRuntime.d.ts +8 -19
- package/dist/api/MessageRuntime.d.ts.map +1 -1
- package/dist/api/MessageRuntime.js +11 -7
- package/dist/api/MessageRuntime.js.map +1 -1
- package/dist/api/MessageRuntime.mjs +10 -6
- package/dist/api/MessageRuntime.mjs.map +1 -1
- package/dist/api/RuntimePathTypes.d.ts +33 -33
- package/dist/api/RuntimePathTypes.d.ts.map +1 -1
- package/dist/api/RuntimePathTypes.js.map +1 -1
- package/dist/api/ThreadListItemRuntime.d.ts +12 -8
- package/dist/api/ThreadListItemRuntime.d.ts.map +1 -1
- package/dist/api/ThreadListItemRuntime.js +10 -6
- package/dist/api/ThreadListItemRuntime.js.map +1 -1
- package/dist/api/ThreadListItemRuntime.mjs +10 -6
- package/dist/api/ThreadListItemRuntime.mjs.map +1 -1
- package/dist/api/ThreadListRuntime.d.ts +10 -28
- package/dist/api/ThreadListRuntime.d.ts.map +1 -1
- package/dist/api/ThreadListRuntime.js +23 -26
- package/dist/api/ThreadListRuntime.js.map +1 -1
- package/dist/api/ThreadListRuntime.mjs +23 -26
- package/dist/api/ThreadListRuntime.mjs.map +1 -1
- package/dist/api/ThreadRuntime.d.ts +53 -211
- package/dist/api/ThreadRuntime.d.ts.map +1 -1
- package/dist/api/ThreadRuntime.js +2 -94
- package/dist/api/ThreadRuntime.js.map +1 -1
- package/dist/api/ThreadRuntime.mjs +2 -94
- package/dist/api/ThreadRuntime.mjs.map +1 -1
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js.map +1 -1
- package/dist/context/providers/AssistantRuntimeProvider.d.ts.map +1 -1
- package/dist/context/providers/AssistantRuntimeProvider.js +0 -1
- package/dist/context/providers/AssistantRuntimeProvider.js.map +1 -1
- package/dist/context/providers/AssistantRuntimeProvider.mjs +0 -1
- package/dist/context/providers/AssistantRuntimeProvider.mjs.map +1 -1
- package/dist/context/providers/TextContentPartProvider.d.ts.map +1 -1
- package/dist/context/providers/TextContentPartProvider.js +0 -2
- package/dist/context/providers/TextContentPartProvider.js.map +1 -1
- package/dist/context/providers/TextContentPartProvider.mjs +0 -2
- package/dist/context/providers/TextContentPartProvider.mjs.map +1 -1
- package/dist/context/providers/ThreadListItemRuntimeProvider.d.ts +1 -4
- package/dist/context/providers/ThreadListItemRuntimeProvider.d.ts.map +1 -1
- package/dist/context/providers/ThreadRuntimeProvider.d.ts.map +1 -1
- package/dist/context/providers/ThreadRuntimeProvider.js +1 -13
- package/dist/context/providers/ThreadRuntimeProvider.js.map +1 -1
- package/dist/context/providers/ThreadRuntimeProvider.mjs +1 -13
- package/dist/context/providers/ThreadRuntimeProvider.mjs.map +1 -1
- package/dist/context/react/AssistantContext.d.ts +10 -120
- package/dist/context/react/AssistantContext.d.ts.map +1 -1
- package/dist/context/react/AssistantContext.js +0 -15
- package/dist/context/react/AssistantContext.js.map +1 -1
- package/dist/context/react/AssistantContext.mjs +0 -11
- package/dist/context/react/AssistantContext.mjs.map +1 -1
- package/dist/context/react/AttachmentContext.d.ts +32 -48
- package/dist/context/react/AttachmentContext.d.ts.map +1 -1
- package/dist/context/react/ComposerContext.d.ts +0 -5
- package/dist/context/react/ComposerContext.d.ts.map +1 -1
- package/dist/context/react/ComposerContext.js +3 -5
- package/dist/context/react/ComposerContext.js.map +1 -1
- package/dist/context/react/ComposerContext.mjs +2 -3
- package/dist/context/react/ComposerContext.mjs.map +1 -1
- package/dist/context/react/ContentPartContext.d.ts +0 -5
- package/dist/context/react/ContentPartContext.d.ts.map +1 -1
- package/dist/context/react/ContentPartContext.js +3 -5
- package/dist/context/react/ContentPartContext.js.map +1 -1
- package/dist/context/react/ContentPartContext.mjs +2 -3
- package/dist/context/react/ContentPartContext.mjs.map +1 -1
- package/dist/context/react/MessageContext.d.ts +6 -46
- package/dist/context/react/MessageContext.d.ts.map +1 -1
- package/dist/context/react/MessageContext.js +2 -6
- package/dist/context/react/MessageContext.js.map +1 -1
- package/dist/context/react/MessageContext.mjs +2 -4
- package/dist/context/react/MessageContext.mjs.map +1 -1
- package/dist/context/react/ThreadContext.d.ts +11 -1749
- package/dist/context/react/ThreadContext.d.ts.map +1 -1
- package/dist/context/react/ThreadContext.js +4 -30
- package/dist/context/react/ThreadContext.js.map +1 -1
- package/dist/context/react/ThreadContext.mjs +4 -22
- package/dist/context/react/ThreadContext.mjs.map +1 -1
- package/dist/context/react/ThreadListItemContext.d.ts +6 -24
- package/dist/context/react/ThreadListItemContext.d.ts.map +1 -1
- package/dist/context/react/index.d.ts +5 -101
- package/dist/context/react/index.d.ts.map +1 -1
- package/dist/context/react/index.js +0 -38
- package/dist/context/react/index.js.map +1 -1
- package/dist/context/react/index.mjs +5 -49
- package/dist/context/react/index.mjs.map +1 -1
- package/dist/context/stores/AssistantToolUIs.d.ts +9 -6
- package/dist/context/stores/AssistantToolUIs.d.ts.map +1 -1
- package/dist/context/stores/AssistantToolUIs.js.map +1 -1
- package/dist/context/stores/AssistantToolUIs.mjs.map +1 -1
- package/dist/context/stores/MessageUtils.d.ts +7 -12
- package/dist/context/stores/MessageUtils.d.ts.map +1 -1
- package/dist/context/stores/MessageUtils.js.map +1 -1
- package/dist/context/stores/MessageUtils.mjs.map +1 -1
- package/dist/context/stores/ThreadViewport.d.ts +6 -10
- package/dist/context/stores/ThreadViewport.d.ts.map +1 -1
- package/dist/context/stores/ThreadViewport.js +0 -1
- package/dist/context/stores/ThreadViewport.js.map +1 -1
- package/dist/context/stores/ThreadViewport.mjs +0 -2
- package/dist/context/stores/ThreadViewport.mjs.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +0 -1
- package/dist/index.mjs.map +1 -1
- package/dist/internal.d.ts +1 -0
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +3 -0
- package/dist/internal.js.map +1 -1
- package/dist/internal.mjs +2 -0
- package/dist/internal.mjs.map +1 -1
- package/dist/model-config/useAssistantToolUI.d.ts.map +1 -1
- package/dist/model-config/useAssistantToolUI.js.map +1 -1
- package/dist/model-config/useAssistantToolUI.mjs.map +1 -1
- package/dist/primitive-hooks/contentPart/useContentPartDisplay.d.ts +1 -4
- package/dist/primitive-hooks/contentPart/useContentPartDisplay.d.ts.map +1 -1
- package/dist/primitive-hooks/contentPart/useContentPartDisplay.js.map +1 -1
- package/dist/primitive-hooks/contentPart/useContentPartDisplay.mjs.map +1 -1
- package/dist/primitive-hooks/contentPart/useContentPartImage.d.ts +1 -4
- package/dist/primitive-hooks/contentPart/useContentPartImage.d.ts.map +1 -1
- package/dist/primitive-hooks/contentPart/useContentPartImage.js.map +1 -1
- package/dist/primitive-hooks/contentPart/useContentPartImage.mjs.map +1 -1
- package/dist/primitive-hooks/contentPart/useContentPartText.d.ts +1 -4
- package/dist/primitive-hooks/contentPart/useContentPartText.d.ts.map +1 -1
- package/dist/primitive-hooks/contentPart/useContentPartText.js.map +1 -1
- package/dist/primitive-hooks/contentPart/useContentPartText.mjs.map +1 -1
- package/dist/primitive-hooks/index.d.ts +0 -5
- package/dist/primitive-hooks/index.d.ts.map +1 -1
- package/dist/primitive-hooks/index.js +1 -11
- package/dist/primitive-hooks/index.js.map +1 -1
- package/dist/primitive-hooks/index.mjs +0 -5
- package/dist/primitive-hooks/index.mjs.map +1 -1
- package/dist/primitives/actionBar/ActionBarCopy.d.ts +1 -5
- package/dist/primitives/actionBar/ActionBarCopy.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarCopy.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarCopy.mjs.map +1 -1
- package/dist/primitives/actionBar/ActionBarEdit.d.ts +0 -4
- package/dist/primitives/actionBar/ActionBarEdit.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarEdit.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarEdit.mjs.map +1 -1
- package/dist/primitives/actionBar/ActionBarFeedbackNegative.d.ts +0 -4
- package/dist/primitives/actionBar/ActionBarFeedbackNegative.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarFeedbackNegative.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarFeedbackNegative.mjs.map +1 -1
- package/dist/primitives/actionBar/ActionBarFeedbackPositive.d.ts +0 -4
- package/dist/primitives/actionBar/ActionBarFeedbackPositive.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarFeedbackPositive.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarFeedbackPositive.mjs.map +1 -1
- package/dist/primitives/actionBar/ActionBarReload.d.ts +0 -4
- package/dist/primitives/actionBar/ActionBarReload.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarReload.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarReload.mjs.map +1 -1
- package/dist/primitives/actionBar/ActionBarRoot.d.ts +0 -4
- package/dist/primitives/actionBar/ActionBarRoot.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarRoot.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarRoot.mjs.map +1 -1
- package/dist/primitives/actionBar/ActionBarSpeak.d.ts +0 -4
- package/dist/primitives/actionBar/ActionBarSpeak.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarSpeak.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarSpeak.mjs.map +1 -1
- package/dist/primitives/actionBar/ActionBarStopSpeaking.d.ts +0 -4
- package/dist/primitives/actionBar/ActionBarStopSpeaking.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarStopSpeaking.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarStopSpeaking.mjs.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalContent.d.ts +0 -4
- package/dist/primitives/assistantModal/AssistantModalContent.d.ts.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalContent.js.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalContent.mjs.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalRoot.d.ts +0 -4
- package/dist/primitives/assistantModal/AssistantModalRoot.d.ts.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalRoot.js.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalRoot.mjs.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalTrigger.d.ts +0 -4
- package/dist/primitives/assistantModal/AssistantModalTrigger.d.ts.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalTrigger.js.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalTrigger.mjs.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerCount.d.ts +0 -4
- package/dist/primitives/branchPicker/BranchPickerCount.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerCount.js.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerCount.mjs.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerNext.d.ts +0 -4
- package/dist/primitives/branchPicker/BranchPickerNext.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerNext.js.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerNext.mjs.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerNumber.d.ts +0 -4
- package/dist/primitives/branchPicker/BranchPickerNumber.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerNumber.js.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerNumber.mjs.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerPrevious.d.ts +0 -4
- package/dist/primitives/branchPicker/BranchPickerPrevious.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerPrevious.js.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerPrevious.mjs.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerRoot.d.ts +0 -4
- package/dist/primitives/branchPicker/BranchPickerRoot.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerRoot.js.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerRoot.mjs.map +1 -1
- package/dist/primitives/composer/ComposerAddAttachment.d.ts +1 -5
- package/dist/primitives/composer/ComposerAddAttachment.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerAddAttachment.js +2 -2
- package/dist/primitives/composer/ComposerAddAttachment.js.map +1 -1
- package/dist/primitives/composer/ComposerAddAttachment.mjs +1 -1
- package/dist/primitives/composer/ComposerAddAttachment.mjs.map +1 -1
- package/dist/primitives/composer/ComposerAttachments.d.ts +0 -4
- package/dist/primitives/composer/ComposerAttachments.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerAttachments.js.map +1 -1
- package/dist/primitives/composer/ComposerAttachments.mjs.map +1 -1
- package/dist/primitives/composer/ComposerCancel.d.ts +0 -4
- package/dist/primitives/composer/ComposerCancel.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerCancel.js.map +1 -1
- package/dist/primitives/composer/ComposerCancel.mjs.map +1 -1
- package/dist/primitives/composer/ComposerIf.d.ts +0 -4
- package/dist/primitives/composer/ComposerIf.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerIf.js.map +1 -1
- package/dist/primitives/composer/ComposerIf.mjs.map +1 -1
- package/dist/primitives/composer/ComposerInput.d.ts +0 -4
- package/dist/primitives/composer/ComposerInput.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerInput.js.map +1 -1
- package/dist/primitives/composer/ComposerInput.mjs.map +1 -1
- package/dist/primitives/composer/ComposerRoot.d.ts +0 -1
- package/dist/primitives/composer/ComposerRoot.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerRoot.js +2 -2
- package/dist/primitives/composer/ComposerRoot.js.map +1 -1
- package/dist/primitives/composer/ComposerRoot.mjs +1 -1
- package/dist/primitives/composer/ComposerRoot.mjs.map +1 -1
- package/dist/primitives/composer/ComposerSend.d.ts +1 -5
- package/dist/primitives/composer/ComposerSend.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerSend.js +2 -2
- package/dist/primitives/composer/ComposerSend.js.map +1 -1
- package/dist/primitives/composer/ComposerSend.mjs +1 -1
- package/dist/primitives/composer/ComposerSend.mjs.map +1 -1
- package/dist/primitives/contentPart/ContentPartDisplay.d.ts +0 -4
- package/dist/primitives/contentPart/ContentPartDisplay.d.ts.map +1 -1
- package/dist/primitives/contentPart/ContentPartDisplay.js.map +1 -1
- package/dist/primitives/contentPart/ContentPartDisplay.mjs.map +1 -1
- package/dist/primitives/contentPart/ContentPartImage.d.ts +0 -4
- package/dist/primitives/contentPart/ContentPartImage.d.ts.map +1 -1
- package/dist/primitives/contentPart/ContentPartImage.js.map +1 -1
- package/dist/primitives/contentPart/ContentPartImage.mjs.map +1 -1
- package/dist/primitives/contentPart/ContentPartInProgress.d.ts +0 -4
- package/dist/primitives/contentPart/ContentPartInProgress.d.ts.map +1 -1
- package/dist/primitives/contentPart/ContentPartInProgress.js.map +1 -1
- package/dist/primitives/contentPart/ContentPartInProgress.mjs.map +1 -1
- package/dist/primitives/contentPart/ContentPartText.d.ts +0 -4
- package/dist/primitives/contentPart/ContentPartText.d.ts.map +1 -1
- package/dist/primitives/contentPart/ContentPartText.js.map +1 -1
- package/dist/primitives/contentPart/ContentPartText.mjs.map +1 -1
- package/dist/primitives/index.d.ts +0 -7
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js.map +1 -1
- package/dist/primitives/index.mjs.map +1 -1
- package/dist/primitives/message/MessageAttachments.d.ts +0 -4
- package/dist/primitives/message/MessageAttachments.d.ts.map +1 -1
- package/dist/primitives/message/MessageAttachments.js +2 -4
- package/dist/primitives/message/MessageAttachments.js.map +1 -1
- package/dist/primitives/message/MessageAttachments.mjs +2 -4
- package/dist/primitives/message/MessageAttachments.mjs.map +1 -1
- package/dist/primitives/message/MessageContent.d.ts +0 -4
- package/dist/primitives/message/MessageContent.d.ts.map +1 -1
- package/dist/primitives/message/MessageContent.js +6 -6
- package/dist/primitives/message/MessageContent.js.map +1 -1
- package/dist/primitives/message/MessageContent.mjs +7 -7
- package/dist/primitives/message/MessageContent.mjs.map +1 -1
- package/dist/primitives/message/MessageIf.d.ts +0 -4
- package/dist/primitives/message/MessageIf.d.ts.map +1 -1
- package/dist/primitives/message/MessageIf.js.map +1 -1
- package/dist/primitives/message/MessageIf.mjs.map +1 -1
- package/dist/primitives/message/MessageRoot.d.ts +0 -4
- package/dist/primitives/message/MessageRoot.d.ts.map +1 -1
- package/dist/primitives/message/MessageRoot.js.map +1 -1
- package/dist/primitives/message/MessageRoot.mjs.map +1 -1
- package/dist/primitives/message/index.d.ts +0 -1
- package/dist/primitives/message/index.d.ts.map +1 -1
- package/dist/primitives/message/index.js +0 -3
- package/dist/primitives/message/index.js.map +1 -1
- package/dist/primitives/message/index.mjs +0 -2
- package/dist/primitives/message/index.mjs.map +1 -1
- package/dist/primitives/thread/ThreadEmpty.d.ts +0 -4
- package/dist/primitives/thread/ThreadEmpty.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadEmpty.js +2 -2
- package/dist/primitives/thread/ThreadEmpty.js.map +1 -1
- package/dist/primitives/thread/ThreadEmpty.mjs +1 -1
- package/dist/primitives/thread/ThreadEmpty.mjs.map +1 -1
- package/dist/primitives/thread/ThreadIf.d.ts +0 -4
- package/dist/primitives/thread/ThreadIf.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadIf.js.map +1 -1
- package/dist/primitives/thread/ThreadIf.mjs.map +1 -1
- package/dist/primitives/thread/ThreadMessages.d.ts +0 -4
- package/dist/primitives/thread/ThreadMessages.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadMessages.js.map +1 -1
- package/dist/primitives/thread/ThreadMessages.mjs.map +1 -1
- package/dist/primitives/thread/ThreadRoot.d.ts +0 -4
- package/dist/primitives/thread/ThreadRoot.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadRoot.js.map +1 -1
- package/dist/primitives/thread/ThreadRoot.mjs.map +1 -1
- package/dist/primitives/thread/ThreadScrollToBottom.d.ts +0 -4
- package/dist/primitives/thread/ThreadScrollToBottom.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadScrollToBottom.js.map +1 -1
- package/dist/primitives/thread/ThreadScrollToBottom.mjs.map +1 -1
- package/dist/primitives/thread/ThreadSuggestion.d.ts +0 -4
- package/dist/primitives/thread/ThreadSuggestion.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadSuggestion.js.map +1 -1
- package/dist/primitives/thread/ThreadSuggestion.mjs.map +1 -1
- package/dist/primitives/thread/ThreadViewport.d.ts +0 -4
- package/dist/primitives/thread/ThreadViewport.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadViewport.js.map +1 -1
- package/dist/primitives/thread/ThreadViewport.mjs.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemArchive.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemArchive.js +3 -2
- package/dist/primitives/threadListItem/ThreadListItemArchive.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemArchive.mjs +3 -2
- package/dist/primitives/threadListItem/ThreadListItemArchive.mjs.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemRoot.d.ts +14 -0
- package/dist/primitives/threadListItem/ThreadListItemRoot.d.ts.map +1 -0
- package/dist/primitives/threadListItem/ThreadListItemRoot.js +47 -0
- package/dist/primitives/threadListItem/ThreadListItemRoot.js.map +1 -0
- package/dist/primitives/threadListItem/ThreadListItemRoot.mjs +23 -0
- package/dist/primitives/threadListItem/ThreadListItemRoot.mjs.map +1 -0
- package/dist/primitives/threadListItem/ThreadListItemTitle.d.ts +8 -0
- package/dist/primitives/threadListItem/ThreadListItemTitle.d.ts.map +1 -0
- package/dist/primitives/{message/MessageInProgress.js → threadListItem/ThreadListItemTitle.js} +13 -10
- package/dist/primitives/threadListItem/ThreadListItemTitle.js.map +1 -0
- package/dist/primitives/threadListItem/ThreadListItemTitle.mjs +14 -0
- package/dist/primitives/threadListItem/ThreadListItemTitle.mjs.map +1 -0
- package/dist/primitives/threadListItem/ThreadListItemTrigger.d.ts +13 -0
- package/dist/primitives/threadListItem/ThreadListItemTrigger.d.ts.map +1 -0
- package/dist/{runtimes/core/subscribeToMainThread.js → primitives/threadListItem/ThreadListItemTrigger.js} +17 -22
- package/dist/primitives/threadListItem/ThreadListItemTrigger.js.map +1 -0
- package/dist/primitives/threadListItem/ThreadListItemTrigger.mjs +21 -0
- package/dist/primitives/threadListItem/ThreadListItemTrigger.mjs.map +1 -0
- package/dist/primitives/threadListItem/index.d.ts +3 -0
- package/dist/primitives/threadListItem/index.d.ts.map +1 -1
- package/dist/primitives/threadListItem/index.js +9 -0
- package/dist/primitives/threadListItem/index.js.map +1 -1
- package/dist/primitives/threadListItem/index.mjs +6 -0
- package/dist/primitives/threadListItem/index.mjs.map +1 -1
- package/dist/runtimes/attachment/AttachmentAdapter.d.ts +3 -7
- package/dist/runtimes/attachment/AttachmentAdapter.d.ts.map +1 -1
- package/dist/runtimes/attachment/AttachmentAdapter.js.map +1 -1
- package/dist/runtimes/attachment/CompositeAttachmentAdapter.d.ts +2 -6
- package/dist/runtimes/attachment/CompositeAttachmentAdapter.d.ts.map +1 -1
- package/dist/runtimes/attachment/CompositeAttachmentAdapter.js +1 -2
- package/dist/runtimes/attachment/CompositeAttachmentAdapter.js.map +1 -1
- package/dist/runtimes/attachment/CompositeAttachmentAdapter.mjs +1 -2
- package/dist/runtimes/attachment/CompositeAttachmentAdapter.mjs.map +1 -1
- package/dist/runtimes/composer/BaseComposerRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/composer/BaseComposerRuntimeCore.js +0 -6
- package/dist/runtimes/composer/BaseComposerRuntimeCore.js.map +1 -1
- package/dist/runtimes/composer/BaseComposerRuntimeCore.mjs +0 -6
- package/dist/runtimes/composer/BaseComposerRuntimeCore.mjs.map +1 -1
- package/dist/runtimes/core/BaseThreadRuntimeCore.d.ts +6 -7
- package/dist/runtimes/core/BaseThreadRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/core/BaseThreadRuntimeCore.js +8 -4
- package/dist/runtimes/core/BaseThreadRuntimeCore.js.map +1 -1
- package/dist/runtimes/core/BaseThreadRuntimeCore.mjs +8 -4
- package/dist/runtimes/core/BaseThreadRuntimeCore.mjs.map +1 -1
- package/dist/runtimes/core/ComposerRuntimeCore.d.ts +0 -3
- package/dist/runtimes/core/ComposerRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/core/ComposerRuntimeCore.js.map +1 -1
- package/dist/runtimes/core/ThreadListRuntimeCore.d.ts +7 -10
- package/dist/runtimes/core/ThreadListRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/core/ThreadListRuntimeCore.js.map +1 -1
- package/dist/runtimes/core/ThreadRuntimeCore.d.ts +30 -17
- package/dist/runtimes/core/ThreadRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/core/ThreadRuntimeCore.js.map +1 -1
- package/dist/runtimes/core/index.d.ts +1 -2
- package/dist/runtimes/core/index.d.ts.map +1 -1
- package/dist/runtimes/core/index.js +0 -12
- package/dist/runtimes/core/index.js.map +1 -1
- package/dist/runtimes/core/index.mjs +0 -5
- package/dist/runtimes/core/index.mjs.map +1 -1
- package/dist/runtimes/edge/converters/toCoreMessages.d.ts +1 -1
- package/dist/runtimes/edge/converters/toCoreMessages.d.ts.map +1 -1
- package/dist/runtimes/edge/converters/toCoreMessages.js.map +1 -1
- package/dist/runtimes/edge/converters/toCoreMessages.mjs.map +1 -1
- package/dist/runtimes/edge/createEdgeRuntimeAPI.d.ts +0 -4
- package/dist/runtimes/edge/createEdgeRuntimeAPI.d.ts.map +1 -1
- package/dist/runtimes/edge/createEdgeRuntimeAPI.js +0 -2
- package/dist/runtimes/edge/createEdgeRuntimeAPI.js.map +1 -1
- package/dist/runtimes/edge/createEdgeRuntimeAPI.mjs +0 -2
- package/dist/runtimes/edge/createEdgeRuntimeAPI.mjs.map +1 -1
- package/dist/runtimes/edge/streams/runResultStream.js +0 -2
- package/dist/runtimes/edge/streams/runResultStream.js.map +1 -1
- package/dist/runtimes/edge/streams/runResultStream.mjs +0 -2
- package/dist/runtimes/edge/streams/runResultStream.mjs.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreAdapter.d.ts +3 -16
- package/dist/runtimes/external-store/ExternalStoreAdapter.d.ts.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreAdapter.js.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreRuntimeCore.js +0 -3
- package/dist/runtimes/external-store/ExternalStoreRuntimeCore.js.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreRuntimeCore.mjs +0 -3
- package/dist/runtimes/external-store/ExternalStoreRuntimeCore.mjs.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.d.ts +10 -12
- package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.js +29 -7
- package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.js.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.mjs +29 -7
- package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.mjs.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.d.ts +2 -12
- package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.js +4 -3
- package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.js.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.mjs +4 -3
- package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.mjs.map +1 -1
- package/dist/runtimes/external-store/ThreadMessageLike.d.ts.map +1 -1
- package/dist/runtimes/external-store/ThreadMessageLike.js +2 -0
- package/dist/runtimes/external-store/ThreadMessageLike.js.map +1 -1
- package/dist/runtimes/external-store/ThreadMessageLike.mjs +2 -0
- package/dist/runtimes/external-store/ThreadMessageLike.mjs.map +1 -1
- package/dist/runtimes/local/ChatModelAdapter.d.ts +0 -8
- package/dist/runtimes/local/ChatModelAdapter.d.ts.map +1 -1
- package/dist/runtimes/local/ChatModelAdapter.js.map +1 -1
- package/dist/runtimes/local/LocalRuntimeOptions.d.ts +1 -6
- package/dist/runtimes/local/LocalRuntimeOptions.d.ts.map +1 -1
- package/dist/runtimes/local/LocalRuntimeOptions.js +1 -2
- package/dist/runtimes/local/LocalRuntimeOptions.js.map +1 -1
- package/dist/runtimes/local/LocalRuntimeOptions.mjs +1 -2
- package/dist/runtimes/local/LocalRuntimeOptions.mjs.map +1 -1
- package/dist/runtimes/local/LocalThreadListRuntimeCore.d.ts +16 -20
- package/dist/runtimes/local/LocalThreadListRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/local/LocalThreadListRuntimeCore.js +112 -72
- package/dist/runtimes/local/LocalThreadListRuntimeCore.js.map +1 -1
- package/dist/runtimes/local/LocalThreadListRuntimeCore.mjs +112 -72
- package/dist/runtimes/local/LocalThreadListRuntimeCore.mjs.map +1 -1
- package/dist/runtimes/local/LocalThreadMetadataRuntimeCore.d.ts +19 -0
- package/dist/runtimes/local/LocalThreadMetadataRuntimeCore.d.ts.map +1 -0
- package/dist/runtimes/local/LocalThreadMetadataRuntimeCore.js +87 -0
- package/dist/runtimes/local/LocalThreadMetadataRuntimeCore.js.map +1 -0
- package/dist/runtimes/local/LocalThreadMetadataRuntimeCore.mjs +62 -0
- package/dist/runtimes/local/LocalThreadMetadataRuntimeCore.mjs.map +1 -0
- package/dist/runtimes/local/LocalThreadRuntimeCore.d.ts +1 -1
- package/dist/runtimes/local/LocalThreadRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/local/LocalThreadRuntimeCore.js +15 -11
- package/dist/runtimes/local/LocalThreadRuntimeCore.js.map +1 -1
- package/dist/runtimes/local/LocalThreadRuntimeCore.mjs +15 -11
- package/dist/runtimes/local/LocalThreadRuntimeCore.mjs.map +1 -1
- package/dist/styles/index.css.map +1 -1
- package/dist/types/AssistantTypes.d.ts +1 -18
- package/dist/types/AssistantTypes.d.ts.map +1 -1
- package/dist/types/AssistantTypes.js.map +1 -1
- package/dist/types/AttachmentTypes.d.ts +1 -1
- package/dist/types/AttachmentTypes.d.ts.map +1 -1
- package/dist/types/AttachmentTypes.js.map +1 -1
- package/dist/types/ContentPartComponentTypes.d.ts +4 -28
- package/dist/types/ContentPartComponentTypes.d.ts.map +1 -1
- package/dist/types/ContentPartComponentTypes.js.map +1 -1
- package/dist/ui/assistant-message.d.ts +1 -10
- package/dist/ui/assistant-message.d.ts.map +1 -1
- package/dist/ui/assistant-message.js.map +1 -1
- package/dist/ui/assistant-message.mjs.map +1 -1
- package/dist/ui/composer.d.ts +1 -25
- package/dist/ui/composer.d.ts.map +1 -1
- package/dist/ui/composer.js.map +1 -1
- package/dist/ui/composer.mjs.map +1 -1
- package/dist/ui/index.d.ts +6 -14
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +0 -4
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/index.mjs +14 -24
- package/dist/ui/index.mjs.map +1 -1
- package/dist/ui/thread-welcome.d.ts +5 -17
- package/dist/ui/thread-welcome.d.ts.map +1 -1
- package/dist/ui/thread-welcome.js.map +1 -1
- package/dist/ui/thread-welcome.mjs.map +1 -1
- package/dist/ui/thread.d.ts +1 -19
- package/dist/ui/thread.d.ts.map +1 -1
- package/dist/ui/thread.js.map +1 -1
- package/dist/ui/thread.mjs.map +1 -1
- package/dist/ui/user-message.d.ts +1 -18
- package/dist/ui/user-message.d.ts.map +1 -1
- package/dist/ui/user-message.js.map +1 -1
- package/dist/ui/user-message.mjs.map +1 -1
- package/dist/utils/smooth/SmoothContext.js +2 -2
- package/dist/utils/smooth/SmoothContext.js.map +1 -1
- package/dist/utils/smooth/SmoothContext.mjs +3 -3
- package/dist/utils/smooth/SmoothContext.mjs.map +1 -1
- package/dist/utils/smooth/useSmooth.d.ts.map +1 -1
- package/dist/utils/smooth/useSmooth.js +0 -1
- package/dist/utils/smooth/useSmooth.js.map +1 -1
- package/dist/utils/smooth/useSmooth.mjs +0 -1
- package/dist/utils/smooth/useSmooth.mjs.map +1 -1
- package/package.json +7 -7
- package/src/api/AssistantRuntime.ts +3 -25
- package/src/api/AttachmentRuntime.ts +4 -16
- package/src/api/ComposerRuntime.ts +18 -214
- package/src/api/ContentPartRuntime.ts +2 -6
- package/src/api/MessageRuntime.ts +16 -20
- package/src/api/RuntimePathTypes.ts +26 -26
- package/src/api/ThreadListItemRuntime.ts +19 -11
- package/src/api/ThreadListRuntime.ts +39 -58
- package/src/api/ThreadRuntime.ts +52 -213
- package/src/api/index.ts +4 -0
- package/src/context/providers/AssistantRuntimeProvider.tsx +0 -1
- package/src/context/providers/TextContentPartProvider.tsx +0 -2
- package/src/context/providers/ThreadRuntimeProvider.tsx +1 -17
- package/src/context/react/AssistantContext.ts +0 -25
- package/src/context/react/ComposerContext.ts +1 -1
- package/src/context/react/ContentPartContext.ts +1 -1
- package/src/context/react/MessageContext.ts +2 -2
- package/src/context/react/ThreadContext.ts +5 -42
- package/src/context/react/index.ts +2 -125
- package/src/context/stores/AssistantToolUIs.ts +9 -2
- package/src/context/stores/MessageUtils.ts +6 -6
- package/src/context/stores/ThreadViewport.tsx +5 -6
- package/src/index.ts +0 -1
- package/src/internal.ts +1 -0
- package/src/model-config/useAssistantToolUI.tsx +0 -1
- package/src/primitive-hooks/contentPart/useContentPartDisplay.tsx +1 -1
- package/src/primitive-hooks/contentPart/useContentPartImage.tsx +1 -2
- package/src/primitive-hooks/contentPart/useContentPartText.tsx +1 -1
- package/src/primitive-hooks/index.ts +0 -5
- package/src/primitives/actionBar/ActionBarCopy.tsx +0 -5
- package/src/primitives/actionBar/ActionBarEdit.tsx +0 -5
- package/src/primitives/actionBar/ActionBarFeedbackNegative.tsx +0 -6
- package/src/primitives/actionBar/ActionBarFeedbackPositive.tsx +0 -6
- package/src/primitives/actionBar/ActionBarReload.tsx +0 -5
- package/src/primitives/actionBar/ActionBarRoot.tsx +0 -5
- package/src/primitives/actionBar/ActionBarSpeak.tsx +0 -5
- package/src/primitives/actionBar/ActionBarStopSpeaking.tsx +0 -6
- package/src/primitives/assistantModal/AssistantModalContent.tsx +1 -7
- package/src/primitives/assistantModal/AssistantModalRoot.tsx +0 -6
- package/src/primitives/assistantModal/AssistantModalTrigger.tsx +0 -6
- package/src/primitives/branchPicker/BranchPickerCount.tsx +0 -5
- package/src/primitives/branchPicker/BranchPickerNext.tsx +0 -6
- package/src/primitives/branchPicker/BranchPickerNumber.tsx +0 -5
- package/src/primitives/branchPicker/BranchPickerPrevious.tsx +1 -6
- package/src/primitives/branchPicker/BranchPickerRoot.tsx +0 -5
- package/src/primitives/composer/ComposerAddAttachment.tsx +2 -7
- package/src/primitives/composer/ComposerAttachments.tsx +0 -6
- package/src/primitives/composer/ComposerCancel.tsx +0 -5
- package/src/primitives/composer/ComposerIf.tsx +0 -5
- package/src/primitives/composer/ComposerInput.tsx +0 -5
- package/src/primitives/composer/ComposerRoot.tsx +1 -3
- package/src/primitives/composer/ComposerSend.tsx +2 -7
- package/src/primitives/contentPart/ContentPartDisplay.tsx +0 -6
- package/src/primitives/contentPart/ContentPartImage.tsx +0 -5
- package/src/primitives/contentPart/ContentPartInProgress.tsx +0 -6
- package/src/primitives/contentPart/ContentPartText.tsx +0 -5
- package/src/primitives/index.ts +0 -8
- package/src/primitives/message/MessageAttachments.tsx +2 -10
- package/src/primitives/message/MessageContent.tsx +7 -15
- package/src/primitives/message/MessageIf.tsx +0 -5
- package/src/primitives/message/MessageRoot.tsx +0 -5
- package/src/primitives/message/index.ts +0 -1
- package/src/primitives/thread/ThreadEmpty.tsx +1 -6
- package/src/primitives/thread/ThreadIf.tsx +0 -5
- package/src/primitives/thread/ThreadMessages.tsx +0 -5
- package/src/primitives/thread/ThreadRoot.tsx +0 -5
- package/src/primitives/thread/ThreadScrollToBottom.tsx +0 -6
- package/src/primitives/thread/ThreadSuggestion.tsx +0 -5
- package/src/primitives/thread/ThreadViewport.tsx +0 -5
- package/src/primitives/threadListItem/ThreadListItemArchive.ts +3 -2
- package/src/primitives/threadListItem/ThreadListItemRoot.tsx +29 -0
- package/src/primitives/threadListItem/ThreadListItemTitle.tsx +19 -0
- package/src/primitives/threadListItem/ThreadListItemTrigger.ts +25 -0
- package/src/primitives/threadListItem/index.ts +4 -1
- package/src/runtimes/attachment/AttachmentAdapter.ts +2 -12
- package/src/runtimes/attachment/CompositeAttachmentAdapter.ts +1 -1
- package/src/runtimes/composer/BaseComposerRuntimeCore.tsx +0 -8
- package/src/runtimes/core/BaseThreadRuntimeCore.tsx +11 -5
- package/src/runtimes/core/ComposerRuntimeCore.tsx +0 -3
- package/src/runtimes/core/ThreadListRuntimeCore.tsx +7 -11
- package/src/runtimes/core/ThreadRuntimeCore.tsx +33 -17
- package/src/runtimes/core/index.ts +1 -2
- package/src/runtimes/edge/converters/toCoreMessages.ts +1 -1
- package/src/runtimes/edge/createEdgeRuntimeAPI.ts +0 -6
- package/src/runtimes/edge/streams/runResultStream.ts +0 -2
- package/src/runtimes/external-store/ExternalStoreAdapter.tsx +3 -17
- package/src/runtimes/external-store/ExternalStoreRuntimeCore.tsx +0 -3
- package/src/runtimes/external-store/ExternalStoreThreadListRuntimeCore.tsx +39 -7
- package/src/runtimes/external-store/ExternalStoreThreadRuntimeCore.tsx +4 -3
- package/src/runtimes/external-store/ThreadMessageLike.tsx +4 -3
- package/src/runtimes/local/ChatModelAdapter.tsx +0 -9
- package/src/runtimes/local/LocalRuntimeOptions.tsx +1 -7
- package/src/runtimes/local/LocalThreadListRuntimeCore.tsx +140 -96
- package/src/runtimes/local/LocalThreadMetadataRuntimeCore.tsx +79 -0
- package/src/runtimes/local/LocalThreadRuntimeCore.tsx +16 -11
- package/src/types/AssistantTypes.ts +1 -20
- package/src/types/AttachmentTypes.ts +1 -2
- package/src/types/ContentPartComponentTypes.tsx +4 -31
- package/src/ui/assistant-message.tsx +0 -5
- package/src/ui/composer.tsx +0 -5
- package/src/ui/index.ts +5 -23
- package/src/ui/thread-welcome.tsx +6 -9
- package/src/ui/thread.tsx +0 -5
- package/src/ui/user-message.tsx +2 -12
- package/src/utils/smooth/SmoothContext.tsx +3 -3
- package/src/utils/smooth/useSmooth.tsx +0 -1
- package/dist/hooks/index.d.ts +0 -3
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/index.js +0 -34
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/index.mjs +0 -8
- package/dist/hooks/index.mjs.map +0 -1
- package/dist/hooks/useAppendMessage.d.ts +0 -6
- package/dist/hooks/useAppendMessage.d.ts.map +0 -1
- package/dist/hooks/useAppendMessage.js +0 -42
- package/dist/hooks/useAppendMessage.js.map +0 -1
- package/dist/hooks/useAppendMessage.mjs +0 -17
- package/dist/hooks/useAppendMessage.mjs.map +0 -1
- package/dist/hooks/useSwitchToNewThread.d.ts +0 -5
- package/dist/hooks/useSwitchToNewThread.d.ts.map +0 -1
- package/dist/hooks/useSwitchToNewThread.js +0 -39
- package/dist/hooks/useSwitchToNewThread.js.map +0 -1
- package/dist/hooks/useSwitchToNewThread.mjs +0 -14
- package/dist/hooks/useSwitchToNewThread.mjs.map +0 -1
- package/dist/primitive-hooks/actionBar/index.d.ts +0 -34
- package/dist/primitive-hooks/actionBar/index.d.ts.map +0 -1
- package/dist/primitive-hooks/actionBar/index.js +0 -49
- package/dist/primitive-hooks/actionBar/index.js.map +0 -1
- package/dist/primitive-hooks/actionBar/index.mjs +0 -20
- package/dist/primitive-hooks/actionBar/index.mjs.map +0 -1
- package/dist/primitive-hooks/branchPicker/index.d.ts +0 -17
- package/dist/primitive-hooks/branchPicker/index.d.ts.map +0 -1
- package/dist/primitive-hooks/branchPicker/index.js +0 -40
- package/dist/primitive-hooks/branchPicker/index.js.map +0 -1
- package/dist/primitive-hooks/branchPicker/index.mjs +0 -12
- package/dist/primitive-hooks/branchPicker/index.mjs.map +0 -1
- package/dist/primitive-hooks/composer/index.d.ts +0 -17
- package/dist/primitive-hooks/composer/index.d.ts.map +0 -1
- package/dist/primitive-hooks/composer/index.js +0 -40
- package/dist/primitive-hooks/composer/index.js.map +0 -1
- package/dist/primitive-hooks/composer/index.mjs +0 -12
- package/dist/primitive-hooks/composer/index.mjs.map +0 -1
- package/dist/primitive-hooks/message/index.d.ts +0 -5
- package/dist/primitive-hooks/message/index.d.ts.map +0 -1
- package/dist/primitive-hooks/message/index.js +0 -31
- package/dist/primitive-hooks/message/index.js.map +0 -1
- package/dist/primitive-hooks/message/index.mjs +0 -6
- package/dist/primitive-hooks/message/index.mjs.map +0 -1
- package/dist/primitive-hooks/thread/index.d.ts +0 -17
- package/dist/primitive-hooks/thread/index.d.ts.map +0 -1
- package/dist/primitive-hooks/thread/index.js +0 -40
- package/dist/primitive-hooks/thread/index.js.map +0 -1
- package/dist/primitive-hooks/thread/index.mjs +0 -12
- package/dist/primitive-hooks/thread/index.mjs.map +0 -1
- package/dist/primitives/actionBar/types.d.ts +0 -9
- package/dist/primitives/actionBar/types.d.ts.map +0 -1
- package/dist/primitives/actionBar/types.js +0 -19
- package/dist/primitives/actionBar/types.js.map +0 -1
- package/dist/primitives/actionBar/types.mjs +0 -1
- package/dist/primitives/actionBar/types.mjs.map +0 -1
- package/dist/primitives/assistantModal/types.d.ts +0 -4
- package/dist/primitives/assistantModal/types.d.ts.map +0 -1
- package/dist/primitives/assistantModal/types.js +0 -19
- package/dist/primitives/assistantModal/types.js.map +0 -1
- package/dist/primitives/assistantModal/types.mjs +0 -1
- package/dist/primitives/assistantModal/types.mjs.map +0 -1
- package/dist/primitives/attachment/types.d.ts +0 -1
- package/dist/primitives/attachment/types.d.ts.map +0 -1
- package/dist/primitives/attachment/types.js +0 -2
- package/dist/primitives/attachment/types.js.map +0 -1
- package/dist/primitives/attachment/types.mjs +0 -1
- package/dist/primitives/attachment/types.mjs.map +0 -1
- package/dist/primitives/branchPicker/types.d.ts +0 -6
- package/dist/primitives/branchPicker/types.d.ts.map +0 -1
- package/dist/primitives/branchPicker/types.js +0 -19
- package/dist/primitives/branchPicker/types.js.map +0 -1
- package/dist/primitives/branchPicker/types.mjs +0 -1
- package/dist/primitives/branchPicker/types.mjs.map +0 -1
- package/dist/primitives/composer/types.d.ts +0 -6
- package/dist/primitives/composer/types.d.ts.map +0 -1
- package/dist/primitives/composer/types.js +0 -19
- package/dist/primitives/composer/types.js.map +0 -1
- package/dist/primitives/composer/types.mjs +0 -1
- package/dist/primitives/composer/types.mjs.map +0 -1
- package/dist/primitives/contentPart/types.d.ts +0 -5
- package/dist/primitives/contentPart/types.d.ts.map +0 -1
- package/dist/primitives/contentPart/types.js +0 -19
- package/dist/primitives/contentPart/types.js.map +0 -1
- package/dist/primitives/contentPart/types.mjs +0 -1
- package/dist/primitives/contentPart/types.mjs.map +0 -1
- package/dist/primitives/message/MessageInProgress.d.ts +0 -13
- package/dist/primitives/message/MessageInProgress.d.ts.map +0 -1
- package/dist/primitives/message/MessageInProgress.js.map +0 -1
- package/dist/primitives/message/MessageInProgress.mjs +0 -11
- package/dist/primitives/message/MessageInProgress.mjs.map +0 -1
- package/dist/primitives/message/types.d.ts +0 -5
- package/dist/primitives/message/types.d.ts.map +0 -1
- package/dist/primitives/message/types.js +0 -19
- package/dist/primitives/message/types.js.map +0 -1
- package/dist/primitives/message/types.mjs +0 -1
- package/dist/primitives/message/types.mjs.map +0 -1
- package/dist/primitives/thread/types.d.ts +0 -8
- package/dist/primitives/thread/types.d.ts.map +0 -1
- package/dist/primitives/thread/types.js +0 -19
- package/dist/primitives/thread/types.js.map +0 -1
- package/dist/primitives/thread/types.mjs +0 -1
- package/dist/primitives/thread/types.mjs.map +0 -1
- package/dist/runtimes/core/subscribeToMainThread.d.ts +0 -6
- package/dist/runtimes/core/subscribeToMainThread.d.ts.map +0 -1
- package/dist/runtimes/core/subscribeToMainThread.js.map +0 -1
- package/dist/runtimes/core/subscribeToMainThread.mjs +0 -23
- package/dist/runtimes/core/subscribeToMainThread.mjs.map +0 -1
- package/src/hooks/index.ts +0 -2
- package/src/hooks/useAppendMessage.tsx +0 -19
- package/src/hooks/useSwitchToNewThread.tsx +0 -14
- package/src/primitive-hooks/actionBar/index.ts +0 -39
- package/src/primitive-hooks/branchPicker/index.ts +0 -18
- package/src/primitive-hooks/composer/index.ts +0 -17
- package/src/primitive-hooks/message/index.ts +0 -4
- package/src/primitive-hooks/thread/index.ts +0 -16
- package/src/primitives/actionBar/types.ts +0 -8
- package/src/primitives/assistantModal/types.ts +0 -3
- package/src/primitives/attachment/types.ts +0 -0
- package/src/primitives/branchPicker/types.ts +0 -5
- package/src/primitives/composer/types.ts +0 -5
- package/src/primitives/contentPart/types.ts +0 -4
- package/src/primitives/message/MessageInProgress.tsx +0 -22
- package/src/primitives/message/types.ts +0 -4
- package/src/primitives/thread/types.ts +0 -7
- package/src/runtimes/core/subscribeToMainThread.ts +0 -30
@@ -26,12 +26,26 @@ module.exports = __toCommonJS(ThreadListRuntime_exports);
|
|
26
26
|
var import_LazyMemoizeSubject = require("./subscribable/LazyMemoizeSubject.cjs");
|
27
27
|
var import_ThreadListItemRuntime = require("./ThreadListItemRuntime.cjs");
|
28
28
|
var import_SKIP_UPDATE = require("./subscribable/SKIP_UPDATE.cjs");
|
29
|
+
var import_ShallowMemoizeSubject = require("./subscribable/ShallowMemoizeSubject.cjs");
|
29
30
|
var getThreadListState = (threadList) => {
|
30
31
|
return {
|
32
|
+
mainThreadId: threadList.mainThread.metadata.threadId,
|
33
|
+
newThread: threadList.newThread,
|
31
34
|
threads: threadList.threads,
|
32
35
|
archivedThreads: threadList.archivedThreads
|
33
36
|
};
|
34
37
|
};
|
38
|
+
var getThreadListItemState = (threadList, threadId) => {
|
39
|
+
if (threadId === void 0) return import_SKIP_UPDATE.SKIP_UPDATE;
|
40
|
+
const threadData = threadList.getThreadMetadataById(threadId);
|
41
|
+
if (!threadData) return import_SKIP_UPDATE.SKIP_UPDATE;
|
42
|
+
return {
|
43
|
+
threadId: threadData.threadId,
|
44
|
+
title: threadData.title,
|
45
|
+
state: threadData.state,
|
46
|
+
isMain: threadList.mainThread.metadata.threadId === threadId
|
47
|
+
};
|
48
|
+
};
|
35
49
|
var THREAD_MANAGER_PATH = {
|
36
50
|
ref: "ThreadList"
|
37
51
|
};
|
@@ -52,33 +66,18 @@ var ThreadListRuntimeImpl = class {
|
|
52
66
|
getState() {
|
53
67
|
return this._getState();
|
54
68
|
}
|
55
|
-
rename(threadId, newTitle) {
|
56
|
-
return this._core.rename(threadId, newTitle);
|
57
|
-
}
|
58
|
-
archive(threadId) {
|
59
|
-
return this._core.archive(threadId);
|
60
|
-
}
|
61
|
-
unarchive(threadId) {
|
62
|
-
return this._core.unarchive(threadId);
|
63
|
-
}
|
64
|
-
delete(threadId) {
|
65
|
-
return this._core.delete(threadId);
|
66
|
-
}
|
67
69
|
subscribe(callback) {
|
68
70
|
return this._core.subscribe(callback);
|
69
71
|
}
|
70
72
|
getThreadListItemByIndex(idx) {
|
71
73
|
return new import_ThreadListItemRuntime.ThreadListItemRuntimeImpl(
|
72
|
-
new
|
74
|
+
new import_ShallowMemoizeSubject.ShallowMemoizeSubject({
|
73
75
|
path: {
|
74
76
|
ref: this.path.ref + `${this.path.ref}.threadItems[${idx}]`,
|
75
77
|
threadSelector: { type: "index", index: idx }
|
76
78
|
},
|
77
79
|
getState: () => {
|
78
|
-
|
79
|
-
const thread = threads[idx];
|
80
|
-
if (!thread) return import_SKIP_UPDATE.SKIP_UPDATE;
|
81
|
-
return thread;
|
80
|
+
return getThreadListItemState(this._core, this._core.threads[idx]);
|
82
81
|
},
|
83
82
|
subscribe: (callback) => this._core.subscribe(callback)
|
84
83
|
}),
|
@@ -87,16 +86,16 @@ var ThreadListRuntimeImpl = class {
|
|
87
86
|
}
|
88
87
|
getThreadListArchivedItemByIndex(idx) {
|
89
88
|
return new import_ThreadListItemRuntime.ThreadListItemRuntimeImpl(
|
90
|
-
new
|
89
|
+
new import_ShallowMemoizeSubject.ShallowMemoizeSubject({
|
91
90
|
path: {
|
92
91
|
ref: this.path.ref + `${this.path.ref}.archivedThreadItems[${idx}]`,
|
93
92
|
threadSelector: { type: "archiveIndex", index: idx }
|
94
93
|
},
|
95
94
|
getState: () => {
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
95
|
+
return getThreadListItemState(
|
96
|
+
this._core,
|
97
|
+
this._core.archivedThreads[idx]
|
98
|
+
);
|
100
99
|
},
|
101
100
|
subscribe: (callback) => this._core.subscribe(callback)
|
102
101
|
}),
|
@@ -105,15 +104,13 @@ var ThreadListRuntimeImpl = class {
|
|
105
104
|
}
|
106
105
|
getThreadListItemById(threadId) {
|
107
106
|
return new import_ThreadListItemRuntime.ThreadListItemRuntimeImpl(
|
108
|
-
new
|
107
|
+
new import_ShallowMemoizeSubject.ShallowMemoizeSubject({
|
109
108
|
path: {
|
110
109
|
ref: this.path.ref + `${this.path.ref}.threadItems[threadId=${threadId}]`,
|
111
110
|
threadSelector: { type: "threadId", threadId }
|
112
111
|
},
|
113
112
|
getState: () => {
|
114
|
-
|
115
|
-
if (!threadItem) return import_SKIP_UPDATE.SKIP_UPDATE;
|
116
|
-
return threadItem;
|
113
|
+
return getThreadListItemState(this._core, threadId);
|
117
114
|
},
|
118
115
|
subscribe: (callback) => this._core.subscribe(callback)
|
119
116
|
}),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/api/ThreadListRuntime.ts"],"sourcesContent":["import { LazyMemoizeSubject } from \"./subscribable/LazyMemoizeSubject\";\nimport {
|
1
|
+
{"version":3,"sources":["../../src/api/ThreadListRuntime.ts"],"sourcesContent":["import { LazyMemoizeSubject } from \"./subscribable/LazyMemoizeSubject\";\nimport { ThreadListRuntimeCore } from \"../runtimes/core/ThreadListRuntimeCore\";\nimport { Unsubscribe } from \"../types\";\nimport { ThreadListRuntimePath } from \"./RuntimePathTypes\";\nimport {\n ThreadListItemRuntime,\n ThreadListItemRuntimeImpl,\n ThreadListItemState,\n} from \"./ThreadListItemRuntime\";\nimport { SKIP_UPDATE } from \"./subscribable/SKIP_UPDATE\";\nimport { ShallowMemoizeSubject } from \"./subscribable/ShallowMemoizeSubject\";\n\nexport type ThreadListState = {\n readonly mainThreadId: string;\n readonly newThread: string | undefined;\n readonly threads: readonly string[];\n readonly archivedThreads: readonly string[];\n};\n\nexport type ThreadListRuntime = {\n readonly path: ThreadListRuntimePath;\n getState(): ThreadListState;\n\n subscribe(callback: () => void): Unsubscribe;\n\n getThreadListItemById(threadId: string): ThreadListItemRuntime;\n getThreadListItemByIndex(idx: number): ThreadListItemRuntime;\n getThreadListArchivedItemByIndex(idx: number): ThreadListItemRuntime;\n};\n\nconst getThreadListState = (\n threadList: ThreadListRuntimeCore,\n): ThreadListState => {\n return {\n mainThreadId: threadList.mainThread.metadata.threadId,\n newThread: threadList.newThread,\n threads: threadList.threads,\n archivedThreads: threadList.archivedThreads,\n };\n};\n\nconst getThreadListItemState = (\n threadList: ThreadListRuntimeCore,\n threadId: string | undefined,\n): ThreadListItemState | SKIP_UPDATE => {\n if (threadId === undefined) return SKIP_UPDATE;\n\n const threadData = threadList.getThreadMetadataById(threadId);\n if (!threadData) return SKIP_UPDATE;\n return {\n threadId: threadData.threadId,\n title: threadData.title,\n state: threadData.state,\n isMain: threadList.mainThread.metadata.threadId === threadId,\n };\n};\n\nconst THREAD_MANAGER_PATH = {\n ref: \"ThreadList\",\n};\n\nexport type ThreadListRuntimeCoreBinding = ThreadListRuntimeCore;\n\nexport class ThreadListRuntimeImpl implements ThreadListRuntime {\n public get path() {\n return THREAD_MANAGER_PATH;\n }\n\n private _getState;\n constructor(private _core: ThreadListRuntimeCoreBinding) {\n const stateBinding = new LazyMemoizeSubject({\n path: THREAD_MANAGER_PATH,\n getState: () => getThreadListState(_core),\n subscribe: (callback) => _core.subscribe(callback),\n });\n\n this._getState = stateBinding.getState.bind(stateBinding);\n }\n\n public getState(): ThreadListState {\n return this._getState();\n }\n\n public subscribe(callback: () => void): Unsubscribe {\n return this._core.subscribe(callback);\n }\n\n public getThreadListItemByIndex(idx: number) {\n return new ThreadListItemRuntimeImpl(\n new ShallowMemoizeSubject({\n path: {\n ref: this.path.ref + `${this.path.ref}.threadItems[${idx}]`,\n threadSelector: { type: \"index\", index: idx },\n },\n getState: () => {\n return getThreadListItemState(this._core, this._core.threads[idx]);\n },\n subscribe: (callback) => this._core.subscribe(callback),\n }),\n this._core,\n );\n }\n\n public getThreadListArchivedItemByIndex(idx: number) {\n return new ThreadListItemRuntimeImpl(\n new ShallowMemoizeSubject({\n path: {\n ref: this.path.ref + `${this.path.ref}.archivedThreadItems[${idx}]`,\n threadSelector: { type: \"archiveIndex\", index: idx },\n },\n getState: () => {\n return getThreadListItemState(\n this._core,\n this._core.archivedThreads[idx],\n );\n },\n subscribe: (callback) => this._core.subscribe(callback),\n }),\n this._core,\n );\n }\n\n public getThreadListItemById(threadId: string) {\n return new ThreadListItemRuntimeImpl(\n new ShallowMemoizeSubject({\n path: {\n ref:\n this.path.ref +\n `${this.path.ref}.threadItems[threadId=${threadId}]`,\n threadSelector: { type: \"threadId\", threadId },\n },\n getState: () => {\n return getThreadListItemState(this._core, threadId);\n },\n subscribe: (callback) => this._core.subscribe(callback),\n }),\n this._core,\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAmC;AAInC,mCAIO;AACP,yBAA4B;AAC5B,mCAAsC;AAoBtC,IAAM,qBAAqB,CACzB,eACoB;AACpB,SAAO;AAAA,IACL,cAAc,WAAW,WAAW,SAAS;AAAA,IAC7C,WAAW,WAAW;AAAA,IACtB,SAAS,WAAW;AAAA,IACpB,iBAAiB,WAAW;AAAA,EAC9B;AACF;AAEA,IAAM,yBAAyB,CAC7B,YACA,aACsC;AACtC,MAAI,aAAa,OAAW,QAAO;AAEnC,QAAM,aAAa,WAAW,sBAAsB,QAAQ;AAC5D,MAAI,CAAC,WAAY,QAAO;AACxB,SAAO;AAAA,IACL,UAAU,WAAW;AAAA,IACrB,OAAO,WAAW;AAAA,IAClB,OAAO,WAAW;AAAA,IAClB,QAAQ,WAAW,WAAW,SAAS,aAAa;AAAA,EACtD;AACF;AAEA,IAAM,sBAAsB;AAAA,EAC1B,KAAK;AACP;AAIO,IAAM,wBAAN,MAAyD;AAAA,EAM9D,YAAoB,OAAqC;AAArC;AAClB,UAAM,eAAe,IAAI,6CAAmB;AAAA,MAC1C,MAAM;AAAA,MACN,UAAU,MAAM,mBAAmB,KAAK;AAAA,MACxC,WAAW,CAAC,aAAa,MAAM,UAAU,QAAQ;AAAA,IACnD,CAAC;AAED,SAAK,YAAY,aAAa,SAAS,KAAK,YAAY;AAAA,EAC1D;AAAA,EAbA,IAAW,OAAO;AAChB,WAAO;AAAA,EACT;AAAA,EAEQ;AAAA,EAWD,WAA4B;AACjC,WAAO,KAAK,UAAU;AAAA,EACxB;AAAA,EAEO,UAAU,UAAmC;AAClD,WAAO,KAAK,MAAM,UAAU,QAAQ;AAAA,EACtC;AAAA,EAEO,yBAAyB,KAAa;A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,MACD,KAAK;AAAA,IACP;AAAA,EACF;AACF;","names":[]}
|
@@ -4,12 +4,26 @@ import {
|
|
4
4
|
ThreadListItemRuntimeImpl
|
5
5
|
} from "./ThreadListItemRuntime.mjs";
|
6
6
|
import { SKIP_UPDATE } from "./subscribable/SKIP_UPDATE.mjs";
|
7
|
+
import { ShallowMemoizeSubject } from "./subscribable/ShallowMemoizeSubject.mjs";
|
7
8
|
var getThreadListState = (threadList) => {
|
8
9
|
return {
|
10
|
+
mainThreadId: threadList.mainThread.metadata.threadId,
|
11
|
+
newThread: threadList.newThread,
|
9
12
|
threads: threadList.threads,
|
10
13
|
archivedThreads: threadList.archivedThreads
|
11
14
|
};
|
12
15
|
};
|
16
|
+
var getThreadListItemState = (threadList, threadId) => {
|
17
|
+
if (threadId === void 0) return SKIP_UPDATE;
|
18
|
+
const threadData = threadList.getThreadMetadataById(threadId);
|
19
|
+
if (!threadData) return SKIP_UPDATE;
|
20
|
+
return {
|
21
|
+
threadId: threadData.threadId,
|
22
|
+
title: threadData.title,
|
23
|
+
state: threadData.state,
|
24
|
+
isMain: threadList.mainThread.metadata.threadId === threadId
|
25
|
+
};
|
26
|
+
};
|
13
27
|
var THREAD_MANAGER_PATH = {
|
14
28
|
ref: "ThreadList"
|
15
29
|
};
|
@@ -30,33 +44,18 @@ var ThreadListRuntimeImpl = class {
|
|
30
44
|
getState() {
|
31
45
|
return this._getState();
|
32
46
|
}
|
33
|
-
rename(threadId, newTitle) {
|
34
|
-
return this._core.rename(threadId, newTitle);
|
35
|
-
}
|
36
|
-
archive(threadId) {
|
37
|
-
return this._core.archive(threadId);
|
38
|
-
}
|
39
|
-
unarchive(threadId) {
|
40
|
-
return this._core.unarchive(threadId);
|
41
|
-
}
|
42
|
-
delete(threadId) {
|
43
|
-
return this._core.delete(threadId);
|
44
|
-
}
|
45
47
|
subscribe(callback) {
|
46
48
|
return this._core.subscribe(callback);
|
47
49
|
}
|
48
50
|
getThreadListItemByIndex(idx) {
|
49
51
|
return new ThreadListItemRuntimeImpl(
|
50
|
-
new
|
52
|
+
new ShallowMemoizeSubject({
|
51
53
|
path: {
|
52
54
|
ref: this.path.ref + `${this.path.ref}.threadItems[${idx}]`,
|
53
55
|
threadSelector: { type: "index", index: idx }
|
54
56
|
},
|
55
57
|
getState: () => {
|
56
|
-
|
57
|
-
const thread = threads[idx];
|
58
|
-
if (!thread) return SKIP_UPDATE;
|
59
|
-
return thread;
|
58
|
+
return getThreadListItemState(this._core, this._core.threads[idx]);
|
60
59
|
},
|
61
60
|
subscribe: (callback) => this._core.subscribe(callback)
|
62
61
|
}),
|
@@ -65,16 +64,16 @@ var ThreadListRuntimeImpl = class {
|
|
65
64
|
}
|
66
65
|
getThreadListArchivedItemByIndex(idx) {
|
67
66
|
return new ThreadListItemRuntimeImpl(
|
68
|
-
new
|
67
|
+
new ShallowMemoizeSubject({
|
69
68
|
path: {
|
70
69
|
ref: this.path.ref + `${this.path.ref}.archivedThreadItems[${idx}]`,
|
71
70
|
threadSelector: { type: "archiveIndex", index: idx }
|
72
71
|
},
|
73
72
|
getState: () => {
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
73
|
+
return getThreadListItemState(
|
74
|
+
this._core,
|
75
|
+
this._core.archivedThreads[idx]
|
76
|
+
);
|
78
77
|
},
|
79
78
|
subscribe: (callback) => this._core.subscribe(callback)
|
80
79
|
}),
|
@@ -83,15 +82,13 @@ var ThreadListRuntimeImpl = class {
|
|
83
82
|
}
|
84
83
|
getThreadListItemById(threadId) {
|
85
84
|
return new ThreadListItemRuntimeImpl(
|
86
|
-
new
|
85
|
+
new ShallowMemoizeSubject({
|
87
86
|
path: {
|
88
87
|
ref: this.path.ref + `${this.path.ref}.threadItems[threadId=${threadId}]`,
|
89
88
|
threadSelector: { type: "threadId", threadId }
|
90
89
|
},
|
91
90
|
getState: () => {
|
92
|
-
|
93
|
-
if (!threadItem) return SKIP_UPDATE;
|
94
|
-
return threadItem;
|
91
|
+
return getThreadListItemState(this._core, threadId);
|
95
92
|
},
|
96
93
|
subscribe: (callback) => this._core.subscribe(callback)
|
97
94
|
}),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/api/ThreadListRuntime.ts"],"sourcesContent":["import { LazyMemoizeSubject } from \"./subscribable/LazyMemoizeSubject\";\nimport {
|
1
|
+
{"version":3,"sources":["../../src/api/ThreadListRuntime.ts"],"sourcesContent":["import { LazyMemoizeSubject } from \"./subscribable/LazyMemoizeSubject\";\nimport { ThreadListRuntimeCore } from \"../runtimes/core/ThreadListRuntimeCore\";\nimport { Unsubscribe } from \"../types\";\nimport { ThreadListRuntimePath } from \"./RuntimePathTypes\";\nimport {\n ThreadListItemRuntime,\n ThreadListItemRuntimeImpl,\n ThreadListItemState,\n} from \"./ThreadListItemRuntime\";\nimport { SKIP_UPDATE } from \"./subscribable/SKIP_UPDATE\";\nimport { ShallowMemoizeSubject } from \"./subscribable/ShallowMemoizeSubject\";\n\nexport type ThreadListState = {\n readonly mainThreadId: string;\n readonly newThread: string | undefined;\n readonly threads: readonly string[];\n readonly archivedThreads: readonly string[];\n};\n\nexport type ThreadListRuntime = {\n readonly path: ThreadListRuntimePath;\n getState(): ThreadListState;\n\n subscribe(callback: () => void): Unsubscribe;\n\n getThreadListItemById(threadId: string): ThreadListItemRuntime;\n getThreadListItemByIndex(idx: number): ThreadListItemRuntime;\n getThreadListArchivedItemByIndex(idx: number): ThreadListItemRuntime;\n};\n\nconst getThreadListState = (\n threadList: ThreadListRuntimeCore,\n): ThreadListState => {\n return {\n mainThreadId: threadList.mainThread.metadata.threadId,\n newThread: threadList.newThread,\n threads: threadList.threads,\n archivedThreads: threadList.archivedThreads,\n };\n};\n\nconst getThreadListItemState = (\n threadList: ThreadListRuntimeCore,\n threadId: string | undefined,\n): ThreadListItemState | SKIP_UPDATE => {\n if (threadId === undefined) return SKIP_UPDATE;\n\n const threadData = threadList.getThreadMetadataById(threadId);\n if (!threadData) return SKIP_UPDATE;\n return {\n threadId: threadData.threadId,\n title: threadData.title,\n state: threadData.state,\n isMain: threadList.mainThread.metadata.threadId === threadId,\n };\n};\n\nconst THREAD_MANAGER_PATH = {\n ref: \"ThreadList\",\n};\n\nexport type ThreadListRuntimeCoreBinding = ThreadListRuntimeCore;\n\nexport class ThreadListRuntimeImpl implements ThreadListRuntime {\n public get path() {\n return THREAD_MANAGER_PATH;\n }\n\n private _getState;\n constructor(private _core: ThreadListRuntimeCoreBinding) {\n const stateBinding = new LazyMemoizeSubject({\n path: THREAD_MANAGER_PATH,\n getState: () => getThreadListState(_core),\n subscribe: (callback) => _core.subscribe(callback),\n });\n\n this._getState = stateBinding.getState.bind(stateBinding);\n }\n\n public getState(): ThreadListState {\n return this._getState();\n }\n\n public subscribe(callback: () => void): Unsubscribe {\n return this._core.subscribe(callback);\n }\n\n public getThreadListItemByIndex(idx: number) {\n return new ThreadListItemRuntimeImpl(\n new ShallowMemoizeSubject({\n path: {\n ref: this.path.ref + `${this.path.ref}.threadItems[${idx}]`,\n threadSelector: { type: \"index\", index: idx },\n },\n getState: () => {\n return getThreadListItemState(this._core, this._core.threads[idx]);\n },\n subscribe: (callback) => this._core.subscribe(callback),\n }),\n this._core,\n );\n }\n\n public getThreadListArchivedItemByIndex(idx: number) {\n return new ThreadListItemRuntimeImpl(\n new ShallowMemoizeSubject({\n path: {\n ref: this.path.ref + `${this.path.ref}.archivedThreadItems[${idx}]`,\n threadSelector: { type: \"archiveIndex\", index: idx },\n },\n getState: () => {\n return getThreadListItemState(\n this._core,\n this._core.archivedThreads[idx],\n );\n },\n subscribe: (callback) => this._core.subscribe(callback),\n }),\n this._core,\n );\n }\n\n public getThreadListItemById(threadId: string) {\n return new ThreadListItemRuntimeImpl(\n new ShallowMemoizeSubject({\n path: {\n ref:\n this.path.ref +\n `${this.path.ref}.threadItems[threadId=${threadId}]`,\n threadSelector: { type: \"threadId\", threadId },\n },\n getState: () => {\n return getThreadListItemState(this._core, threadId);\n },\n subscribe: (callback) => this._core.subscribe(callback),\n }),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ilities, ThreadRuntimeCore, SpeechState, ThreadRuntimeEventType, ThreadMetadata } from "../runtimes/core/ThreadRuntimeCore";
|
2
2
|
import { ExportedMessageRepository } from "../runtimes/utils/MessageRepository";
|
3
3
|
import { AppendMessage, ModelConfig, ThreadMessage, Unsubscribe } from "../types";
|
4
4
|
import { MessageRuntime, MessageRuntimeImpl } from "./MessageRuntime";
|
5
5
|
import { SubscribableWithState } from "./subscribable/Subscribable";
|
6
6
|
import { ThreadComposerRuntime, ThreadComposerRuntimeImpl } from "./ComposerRuntime";
|
7
|
-
import { ComposerRuntimeCore } from "../runtimes/core/ComposerRuntimeCore";
|
8
7
|
import { ThreadRuntimePath } from "./RuntimePathTypes";
|
9
8
|
export type CreateAppendMessage = string | {
|
10
9
|
parentId?: string | null | undefined;
|
@@ -16,50 +15,80 @@ export type CreateAppendMessage = string | {
|
|
16
15
|
export type ThreadRuntimeCoreBinding = SubscribableWithState<ThreadRuntimeCore, ThreadRuntimePath> & {
|
17
16
|
outerSubscribe(callback: () => void): Unsubscribe;
|
18
17
|
};
|
19
|
-
export type ThreadState =
|
18
|
+
export type ThreadState = {
|
20
19
|
/**
|
21
20
|
* The thread ID.
|
21
|
+
* @deprecated This field is deprecated and will be removed in 0.8.0. Use `metadata.threadId` instead.
|
22
22
|
*/
|
23
|
-
threadId: string;
|
23
|
+
readonly threadId: string;
|
24
|
+
/**
|
25
|
+
* The thread metadata.
|
26
|
+
*/
|
27
|
+
readonly metadata: ThreadMetadata;
|
24
28
|
/**
|
25
29
|
* Whether the thread is disabled. Disabled threads cannot receive new messages.
|
26
30
|
*/
|
27
|
-
isDisabled: boolean;
|
31
|
+
readonly isDisabled: boolean;
|
28
32
|
/**
|
29
33
|
* Whether the thread is running. A thread is considered running when there is an active stream connection to the backend.
|
30
34
|
*/
|
31
|
-
isRunning: boolean;
|
35
|
+
readonly isRunning: boolean;
|
32
36
|
/**
|
33
37
|
* The capabilities of the thread, such as whether the thread supports editing, branch switching, etc.
|
34
38
|
*/
|
35
|
-
capabilities: RuntimeCapabilities;
|
39
|
+
readonly capabilities: RuntimeCapabilities;
|
36
40
|
/**
|
37
41
|
* The messages in the currently selected branch of the thread.
|
38
42
|
*/
|
39
|
-
messages: readonly ThreadMessage[];
|
43
|
+
readonly messages: readonly ThreadMessage[];
|
40
44
|
/**
|
41
45
|
* Follow up message suggestions to show the user.
|
42
46
|
*/
|
43
|
-
suggestions: readonly ThreadSuggestion[];
|
47
|
+
readonly suggestions: readonly ThreadSuggestion[];
|
44
48
|
/**
|
45
49
|
* Custom extra information provided by the runtime.
|
46
50
|
*/
|
47
|
-
extras: unknown;
|
51
|
+
readonly extras: unknown;
|
48
52
|
/**
|
49
53
|
* @deprecated This API is still under active development and might change without notice.
|
50
54
|
*/
|
51
|
-
speech: SpeechState | undefined;
|
52
|
-
}
|
55
|
+
readonly speech: SpeechState | undefined;
|
56
|
+
};
|
53
57
|
export declare const getThreadState: (runtime: ThreadRuntimeCore) => ThreadState;
|
54
|
-
export type ThreadRuntime =
|
58
|
+
export type ThreadRuntime = {
|
59
|
+
/**
|
60
|
+
* The selector for the thread runtime.
|
61
|
+
*/
|
55
62
|
readonly path: ThreadRuntimePath;
|
63
|
+
/**
|
64
|
+
* The thread composer runtime.
|
65
|
+
*/
|
56
66
|
readonly composer: ThreadComposerRuntime;
|
67
|
+
/**
|
68
|
+
* Gets a snapshot of the thread state.
|
69
|
+
*/
|
57
70
|
getState(): ThreadState;
|
58
71
|
/**
|
59
|
-
*
|
72
|
+
* Append a new message to the thread.
|
73
|
+
*
|
74
|
+
* @example ```ts
|
75
|
+
* // append a new user message with the text "Hello, world!"
|
76
|
+
* threadRuntime.append("Hello, world!");
|
77
|
+
* ```
|
78
|
+
*
|
79
|
+
* @example ```ts
|
80
|
+
* // append a new assistant message with the text "Hello, world!"
|
81
|
+
* threadRuntime.append({
|
82
|
+
* role: "assistant",
|
83
|
+
* content: [{ type: "text", text: "Hello, world!" }],
|
84
|
+
* });
|
85
|
+
* ```
|
60
86
|
*/
|
61
|
-
unstable_getCore(): ThreadRuntimeCore;
|
62
87
|
append(message: CreateAppendMessage): void;
|
88
|
+
/**
|
89
|
+
*
|
90
|
+
* @param parentId
|
91
|
+
*/
|
63
92
|
startRun(parentId: string | null): void;
|
64
93
|
subscribe(callback: () => void): Unsubscribe;
|
65
94
|
cancelRun(): void;
|
@@ -73,118 +102,11 @@ export type ThreadRuntime = Readonly<{
|
|
73
102
|
*/
|
74
103
|
stopSpeaking: () => void;
|
75
104
|
unstable_on(event: ThreadRuntimeEventType, callback: () => void): Unsubscribe;
|
76
|
-
|
77
|
-
|
78
|
-
*/
|
79
|
-
capabilities: Readonly<RuntimeCapabilities>;
|
80
|
-
/**
|
81
|
-
* @deprecated Use `getState().threadId` instead. This will be removed in 0.6.0.
|
82
|
-
*/
|
83
|
-
threadId: string;
|
84
|
-
/**
|
85
|
-
* @deprecated Use `getState().isDisabled` instead. This will be removed in 0.6.0.
|
86
|
-
*/
|
87
|
-
isDisabled: boolean;
|
88
|
-
/**
|
89
|
-
* @deprecated Use `getState().isRunning` instead. This will be removed in 0.6.0.
|
90
|
-
*/
|
91
|
-
isRunning: boolean;
|
92
|
-
/**
|
93
|
-
* @deprecated Use `getState().messages` instead. This will be removed in 0.6.0.
|
94
|
-
*/
|
95
|
-
messages: readonly ThreadMessage[];
|
96
|
-
/**
|
97
|
-
* @deprecated Use `getState().followupSuggestions` instead. This will be removed in 0.6.0.
|
98
|
-
*/
|
99
|
-
suggestions: readonly ThreadSuggestion[];
|
100
|
-
/**
|
101
|
-
* @deprecated Use `getState().speechState` instead. This will be removed in 0.6.0.
|
102
|
-
*/
|
103
|
-
speech: SpeechState | undefined;
|
104
|
-
/**
|
105
|
-
* @deprecated Use `getState().extras` instead. This will be removed in 0.6.0.
|
106
|
-
*/
|
107
|
-
extras: unknown;
|
108
|
-
/**
|
109
|
-
* @deprecated Use `getMesssageById(id).getState().branchNumber` / `getMesssageById(id).getState().branchCount` instead. This will be removed in 0.6.0.
|
110
|
-
*/
|
111
|
-
getBranches: (messageId: string) => readonly string[];
|
112
|
-
/**
|
113
|
-
* @deprecated Use `getMesssageById(id).switchToBranch({ options })` instead. This will be removed in 0.6.0.
|
114
|
-
*/
|
115
|
-
switchToBranch: (branchId: string) => void;
|
116
|
-
/**
|
117
|
-
* @deprecated Use `getMesssageById(id).getContentPartByToolCallId(toolCallId).addToolResult({ result })` instead. This will be removed in 0.6.0.
|
118
|
-
*/
|
119
|
-
addToolResult: (options: AddToolResultOptions) => void;
|
120
|
-
/**
|
121
|
-
* @deprecated Use `getMesssageById(id).speak()` instead. This will be removed in 0.6.0.
|
122
|
-
*/
|
123
|
-
speak: (messageId: string) => void;
|
124
|
-
/**
|
125
|
-
* @deprecated Use `getMesssageById(id).getState().submittedFeedback` instead. This will be removed in 0.6.0.
|
126
|
-
*/
|
127
|
-
getSubmittedFeedback: (messageId: string) => SubmittedFeedback | undefined;
|
128
|
-
/**
|
129
|
-
* @deprecated Use `getMesssageById(id).submitFeedback({ type })` instead. This will be removed in 0.6.0.
|
130
|
-
*/
|
131
|
-
submitFeedback: (feedback: SubmitFeedbackOptions) => void;
|
132
|
-
/**
|
133
|
-
* @deprecated Use `getMesssageById(id).composer` instead. This will be removed in 0.6.0.
|
134
|
-
*/
|
135
|
-
getEditComposer: (messageId: string) => ComposerRuntimeCore | undefined;
|
136
|
-
/**
|
137
|
-
* @deprecated Use `getMesssageById(id).composer.beginEdit()` instead. This will be removed in 0.6.0.
|
138
|
-
*/
|
139
|
-
beginEdit: (messageId: string) => void;
|
140
|
-
}>;
|
141
|
-
export declare class ThreadRuntimeImpl implements Omit<ThreadRuntimeCore, "getMessageById">, ThreadRuntime {
|
105
|
+
};
|
106
|
+
export declare class ThreadRuntimeImpl implements ThreadRuntime {
|
142
107
|
get path(): ThreadRuntimePath;
|
143
|
-
/**
|
144
|
-
* @deprecated Use `getState().threadId` instead. This will be removed in 0.6.0.
|
145
|
-
*/
|
146
|
-
get threadId(): string;
|
147
|
-
/**
|
148
|
-
* @deprecated Use `getState().isDisabled` instead. This will be removed in 0.6.0.
|
149
|
-
*/
|
150
|
-
get isDisabled(): boolean;
|
151
|
-
/**
|
152
|
-
* @deprecated Use `getState().isRunning` instead. This will be removed in 0.6.0.
|
153
|
-
*/
|
154
|
-
get isRunning(): boolean;
|
155
|
-
/**
|
156
|
-
* @deprecated Use `getState().capabilities` instead. This will be removed in 0.6.0.
|
157
|
-
*/
|
158
|
-
get capabilities(): Readonly<{
|
159
|
-
switchToBranch: boolean;
|
160
|
-
edit: boolean;
|
161
|
-
reload: boolean;
|
162
|
-
cancel: boolean;
|
163
|
-
unstable_copy: boolean;
|
164
|
-
speech: boolean;
|
165
|
-
attachments: boolean;
|
166
|
-
feedback: boolean;
|
167
|
-
}>;
|
168
|
-
/**
|
169
|
-
* @deprecated Use `getState().extras` instead. This will be removed in 0.6.0.
|
170
|
-
*/
|
171
|
-
get extras(): unknown;
|
172
|
-
/**
|
173
|
-
* @deprecated Use `getState().followupSuggestions` instead. This will be removed in 0.6.0.
|
174
|
-
*/
|
175
|
-
get suggestions(): readonly ThreadSuggestion[];
|
176
|
-
/**
|
177
|
-
* @deprecated Use `getState().messages` instead. This will be removed in 0.6.0.
|
178
|
-
*/
|
179
|
-
get messages(): readonly ThreadMessage[];
|
180
|
-
/**
|
181
|
-
* @deprecated Use `getState().speechState` instead. This will be removed in 0.6.0.
|
182
|
-
*/
|
183
|
-
get speech(): Readonly<{
|
184
|
-
messageId: string;
|
185
|
-
status: import("..").SpeechSynthesisAdapter.Status;
|
186
|
-
}> | undefined;
|
187
108
|
unstable_getCore(): Readonly<{
|
109
|
+
metadata: import("..").ThreadMetadataRuntimeCore;
|
188
110
|
getMessageById: (messageId: string) => {
|
189
111
|
parentId: string | null;
|
190
112
|
message: ThreadMessage;
|
@@ -194,18 +116,17 @@ export declare class ThreadRuntimeImpl implements Omit<ThreadRuntimeCore, "getMe
|
|
194
116
|
append: (message: AppendMessage) => void;
|
195
117
|
startRun: (parentId: string | null) => void;
|
196
118
|
cancelRun: () => void;
|
197
|
-
addToolResult: (options: AddToolResultOptions) => void;
|
119
|
+
addToolResult: (options: import("..").AddToolResultOptions) => void;
|
198
120
|
speak: (messageId: string) => void;
|
199
121
|
stopSpeaking: () => void;
|
200
|
-
getSubmittedFeedback: (messageId: string) => SubmittedFeedback | undefined;
|
201
|
-
submitFeedback: (feedback: SubmitFeedbackOptions) => void;
|
122
|
+
getSubmittedFeedback: (messageId: string) => import("../runtimes/core/ThreadRuntimeCore").SubmittedFeedback | undefined;
|
123
|
+
submitFeedback: (feedback: import("..").SubmitFeedbackOptions) => void;
|
202
124
|
getModelConfig: () => ModelConfig;
|
203
125
|
composer: import("../runtimes/core/ComposerRuntimeCore").ThreadComposerRuntimeCore;
|
204
|
-
getEditComposer: (messageId: string) => ComposerRuntimeCore | undefined;
|
126
|
+
getEditComposer: (messageId: string) => import("../runtimes/core/ComposerRuntimeCore").ComposerRuntimeCore | undefined;
|
205
127
|
beginEdit: (messageId: string) => void;
|
206
128
|
speech: SpeechState | undefined;
|
207
129
|
capabilities: Readonly<RuntimeCapabilities>;
|
208
|
-
threadId: string;
|
209
130
|
isDisabled: boolean;
|
210
131
|
messages: readonly ThreadMessage[];
|
211
132
|
suggestions: readonly ThreadSuggestion[];
|
@@ -218,93 +139,14 @@ export declare class ThreadRuntimeImpl implements Omit<ThreadRuntimeCore, "getMe
|
|
218
139
|
private _threadBinding;
|
219
140
|
constructor(threadBinding: ThreadRuntimeCoreBinding);
|
220
141
|
readonly composer: ThreadComposerRuntimeImpl;
|
221
|
-
getState():
|
222
|
-
/**
|
223
|
-
* The thread ID.
|
224
|
-
*/
|
225
|
-
threadId: string;
|
226
|
-
/**
|
227
|
-
* Whether the thread is disabled. Disabled threads cannot receive new messages.
|
228
|
-
*/
|
229
|
-
isDisabled: boolean;
|
230
|
-
/**
|
231
|
-
* Whether the thread is running. A thread is considered running when there is an active stream connection to the backend.
|
232
|
-
*/
|
233
|
-
isRunning: boolean;
|
234
|
-
/**
|
235
|
-
* The capabilities of the thread, such as whether the thread supports editing, branch switching, etc.
|
236
|
-
*/
|
237
|
-
capabilities: RuntimeCapabilities;
|
238
|
-
/**
|
239
|
-
* The messages in the currently selected branch of the thread.
|
240
|
-
*/
|
241
|
-
messages: readonly ThreadMessage[];
|
242
|
-
/**
|
243
|
-
* Follow up message suggestions to show the user.
|
244
|
-
*/
|
245
|
-
suggestions: readonly ThreadSuggestion[];
|
246
|
-
/**
|
247
|
-
* Custom extra information provided by the runtime.
|
248
|
-
*/
|
249
|
-
extras: unknown;
|
250
|
-
/**
|
251
|
-
* @deprecated This API is still under active development and might change without notice.
|
252
|
-
*/
|
253
|
-
speech: SpeechState | undefined;
|
254
|
-
}>;
|
142
|
+
getState(): ThreadState;
|
255
143
|
append(message: CreateAppendMessage): void;
|
256
144
|
subscribe(callback: () => void): Unsubscribe;
|
257
|
-
/**
|
258
|
-
* @derprecated Use `getMesssageById(id).getState().branchNumber` / `getMesssageById(id).getState().branchCount` instead. This will be removed in 0.6.0.
|
259
|
-
*/
|
260
|
-
getBranches(messageId: string): readonly string[];
|
261
145
|
getModelConfig(): ModelConfig;
|
262
146
|
startRun(parentId: string | null): void;
|
263
147
|
cancelRun(): void;
|
264
|
-
/**
|
265
|
-
* @deprecated Use `getMesssageById(id).getContentPartByToolCallId(toolCallId).addToolResult({ result })` instead. This will be removed in 0.6.0.
|
266
|
-
*/
|
267
|
-
addToolResult(options: AddToolResultOptions): void;
|
268
|
-
/**
|
269
|
-
* @deprecated Use `getMesssageById(id).switchToBranch({ options })` instead. This will be removed in 0.6.0.
|
270
|
-
*/
|
271
|
-
switchToBranch(branchId: string): void;
|
272
|
-
/**
|
273
|
-
* @deprecated Use `getMesssageById(id).speak()` instead. This will be removed in 0.6.0.
|
274
|
-
*/
|
275
|
-
speak(messageId: string): void;
|
276
148
|
stopSpeaking(): void;
|
277
|
-
getSubmittedFeedback(messageId: string):
|
278
|
-
type: "negative" | "positive";
|
279
|
-
}> | undefined;
|
280
|
-
/**
|
281
|
-
* @deprecated Use `getMesssageById(id).submitFeedback({ type })` instead. This will be removed in 0.6.0.
|
282
|
-
*/
|
283
|
-
submitFeedback(options: SubmitFeedbackOptions): void;
|
284
|
-
/**
|
285
|
-
* @deprecated Use `getMesssageById(id).getMessageByIndex(idx).composer` instead. This will be removed in 0.6.0.
|
286
|
-
*/
|
287
|
-
getEditComposer(messageId: string): Readonly<{
|
288
|
-
attachments: readonly import("..").Attachment[];
|
289
|
-
getAttachmentAccept(): string;
|
290
|
-
addAttachment: (file: File) => Promise<void>;
|
291
|
-
removeAttachment: (attachmentId: string) => Promise<void>;
|
292
|
-
isEditing: boolean;
|
293
|
-
canCancel: boolean;
|
294
|
-
isEmpty: boolean;
|
295
|
-
text: string;
|
296
|
-
setText: (value: string) => void;
|
297
|
-
role: import("../types/AssistantTypes").MessageRole;
|
298
|
-
setRole: (role: import("../types/AssistantTypes").MessageRole) => void;
|
299
|
-
reset: () => void;
|
300
|
-
send: () => void;
|
301
|
-
cancel: () => void;
|
302
|
-
subscribe: (callback: () => void) => Unsubscribe;
|
303
|
-
}> | undefined;
|
304
|
-
/**
|
305
|
-
* @deprecated Use `getMesssageById(id).getMessageByIndex(idx).composer.beginEdit()` instead. This will be removed in 0.6.0.
|
306
|
-
*/
|
307
|
-
beginEdit(messageId: string): void;
|
149
|
+
getSubmittedFeedback(messageId: string): import("../runtimes/core/ThreadRuntimeCore").SubmittedFeedback | undefined;
|
308
150
|
export(): ExportedMessageRepository;
|
309
151
|
import(data: ExportedMessageRepository): void;
|
310
152
|
getMesssageByIndex(idx: number): MessageRuntimeImpl;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ThreadRuntime.d.ts","sourceRoot":"","sources":["../../src/api/ThreadRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,
|
1
|
+
{"version":3,"file":"ThreadRuntime.d.ts","sourceRoot":"","sources":["../../src/api/ThreadRuntime.ts"],"names":[],"mappings":"A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