@assistant-ui/react 0.5.100 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/api/AssistantRuntime.d.ts +2 -52
- 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 +0 -12
- 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 +5 -121
- 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 +0 -4
- 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 +1 -12
- package/dist/api/MessageRuntime.d.ts.map +1 -1
- package/dist/api/MessageRuntime.js +9 -5
- package/dist/api/MessageRuntime.js.map +1 -1
- package/dist/api/MessageRuntime.mjs +8 -4
- package/dist/api/MessageRuntime.mjs.map +1 -1
- package/dist/api/ThreadListItemRuntime.d.ts +9 -5
- 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 +5 -23
- 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 +17 -164
- 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/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 +16 -88
- 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 +16 -32
- 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 +0 -10
- 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 +25 -1635
- 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/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 +0 -3
- 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 +0 -3
- 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 +0 -3
- 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 +5 -4
- 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 +14 -1
- 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 +9 -11
- 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 +0 -1
- 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 +5 -5
- package/src/api/AssistantRuntime.ts +1 -23
- package/src/api/AttachmentRuntime.ts +0 -12
- package/src/api/ComposerRuntime.ts +11 -207
- package/src/api/ContentPartRuntime.ts +0 -4
- package/src/api/MessageRuntime.ts +7 -11
- package/src/api/ThreadListItemRuntime.ts +16 -8
- package/src/api/ThreadListRuntime.ts +34 -53
- package/src/api/ThreadRuntime.ts +11 -203
- 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/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 +18 -1
- 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
@@ -68,9 +68,6 @@ var BaseComposerRuntimeCore = class {
|
|
68
68
|
this.attachments.map(async (a) => {
|
69
69
|
if (isAttachmentComplete(a)) return a;
|
70
70
|
const result = await adapter.send(a);
|
71
|
-
if (result.status?.type !== "complete") {
|
72
|
-
result.status = { type: "complete" };
|
73
|
-
}
|
74
71
|
return result;
|
75
72
|
})
|
76
73
|
) : [];
|
@@ -86,9 +83,6 @@ var BaseComposerRuntimeCore = class {
|
|
86
83
|
const adapter = this.getAttachmentAdapter();
|
87
84
|
if (!adapter) throw new Error("Attachments are not supported");
|
88
85
|
const attachment = await adapter.add({ file });
|
89
|
-
if (attachment.status === void 0) {
|
90
|
-
attachment.status = { type: "requires-action", reason: "composer-send" };
|
91
|
-
}
|
92
86
|
this._attachments = [...this._attachments, attachment];
|
93
87
|
this.notifySubscribers();
|
94
88
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/runtimes/composer/BaseComposerRuntimeCore.tsx"],"sourcesContent":["import {\n Attachment,\n CompleteAttachment,\n PendingAttachment,\n} from \"../../types/AttachmentTypes\";\nimport { AppendMessage, Unsubscribe } from \"../../types\";\nimport { AttachmentAdapter } from \"../attachment\";\nimport { ComposerRuntimeCore } from \"../core/ComposerRuntimeCore\";\nimport { MessageRole } from \"../../types/AssistantTypes\";\n\nconst isAttachmentComplete = (a: Attachment): a is CompleteAttachment =>\n a.status.type === \"complete\";\n\nexport abstract class BaseComposerRuntimeCore implements ComposerRuntimeCore {\n public readonly isEditing = true;\n\n protected abstract getAttachmentAdapter(): AttachmentAdapter | undefined;\n\n public getAttachmentAccept(): string {\n return this.getAttachmentAdapter()?.accept ?? \"*\";\n }\n\n private _attachments: readonly Attachment[] = [];\n public get attachments() {\n return this._attachments;\n }\n\n protected setAttachments(value: readonly Attachment[]) {\n this._attachments = value;\n this.notifySubscribers();\n }\n\n public abstract get canCancel(): boolean;\n\n public get isEmpty() {\n return !this.text.trim() && !this.attachments.length;\n }\n\n private _text = \"\";\n\n get text() {\n return this._text;\n }\n\n private _role: MessageRole = \"user\";\n\n get role() {\n return this._role;\n }\n\n setRole(role: MessageRole) {\n this._role = role;\n this.notifySubscribers();\n }\n\n setText(value: string) {\n this._text = value;\n this.notifySubscribers();\n }\n\n reset() {\n this._text = \"\";\n this._role = \"user\";\n this._attachments = [];\n this.notifySubscribers();\n }\n\n public async send() {\n const adapter = this.getAttachmentAdapter();\n const attachments =\n adapter && this.attachments.length > 0\n ? await Promise.all(\n this.attachments.map(async (a) => {\n if (isAttachmentComplete(a)) return a;\n const result = await adapter.send(a);\n
|
1
|
+
{"version":3,"sources":["../../../src/runtimes/composer/BaseComposerRuntimeCore.tsx"],"sourcesContent":["import {\n Attachment,\n CompleteAttachment,\n PendingAttachment,\n} from \"../../types/AttachmentTypes\";\nimport { AppendMessage, Unsubscribe } from \"../../types\";\nimport { AttachmentAdapter } from \"../attachment\";\nimport { ComposerRuntimeCore } from \"../core/ComposerRuntimeCore\";\nimport { MessageRole } from \"../../types/AssistantTypes\";\n\nconst isAttachmentComplete = (a: Attachment): a is CompleteAttachment =>\n a.status.type === \"complete\";\n\nexport abstract class BaseComposerRuntimeCore implements ComposerRuntimeCore {\n public readonly isEditing = true;\n\n protected abstract getAttachmentAdapter(): AttachmentAdapter | undefined;\n\n public getAttachmentAccept(): string {\n return this.getAttachmentAdapter()?.accept ?? \"*\";\n }\n\n private _attachments: readonly Attachment[] = [];\n public get attachments() {\n return this._attachments;\n }\n\n protected setAttachments(value: readonly Attachment[]) {\n this._attachments = value;\n this.notifySubscribers();\n }\n\n public abstract get canCancel(): boolean;\n\n public get isEmpty() {\n return !this.text.trim() && !this.attachments.length;\n }\n\n private _text = \"\";\n\n get text() {\n return this._text;\n }\n\n private _role: MessageRole = \"user\";\n\n get role() {\n return this._role;\n }\n\n setRole(role: MessageRole) {\n this._role = role;\n this.notifySubscribers();\n }\n\n setText(value: string) {\n this._text = value;\n this.notifySubscribers();\n }\n\n reset() {\n this._text = \"\";\n this._role = \"user\";\n this._attachments = [];\n this.notifySubscribers();\n }\n\n public async send() {\n const adapter = this.getAttachmentAdapter();\n const attachments =\n adapter && this.attachments.length > 0\n ? await Promise.all(\n this.attachments.map(async (a) => {\n if (isAttachmentComplete(a)) return a;\n const result = await adapter.send(a);\n return result as CompleteAttachment;\n }),\n )\n : [];\n\n const message: Omit<AppendMessage, \"parentId\"> = {\n role: this.role,\n content: this.text ? [{ type: \"text\", text: this.text }] : [],\n attachments,\n };\n this.reset();\n\n this.handleSend(message);\n }\n public abstract handleSend(message: Omit<AppendMessage, \"parentId\">): void;\n public abstract cancel(): void;\n\n async addAttachment(file: File) {\n const adapter = this.getAttachmentAdapter();\n if (!adapter) throw new Error(\"Attachments are not supported\");\n\n const attachment = await adapter.add({ file });\n\n this._attachments = [...this._attachments, attachment as PendingAttachment];\n this.notifySubscribers();\n }\n\n async removeAttachment(attachmentId: string) {\n const adapter = this.getAttachmentAdapter();\n if (!adapter) throw new Error(\"Attachments are not supported\");\n\n const index = this._attachments.findIndex((a) => a.id === attachmentId);\n if (index === -1) throw new Error(\"Attachment not found\");\n const attachment = this._attachments[index]!;\n\n await adapter.remove(attachment);\n\n this._attachments = this._attachments.toSpliced(index, 1);\n this.notifySubscribers();\n }\n\n private _subscriptions = new Set<() => void>();\n protected notifySubscribers() {\n for (const callback of this._subscriptions) callback();\n }\n\n public subscribe(callback: () => void): Unsubscribe {\n this._subscriptions.add(callback);\n return () => this._subscriptions.delete(callback);\n }\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KAAK;AAAA,MACX,SAAS,KAAK,OAAO,CAAC,EAAE,MAAM,QAAQ,MAAM,KAAK,KAAK,CAAC,IAAI,CAAC;AAAA,MAC5D;AAAA,IACF;AACA,SAAK,MAAM;AAEX,SAAK,WAAW,OAAO;AAAA,EACzB;AAAA,EAIA,MAAM,cAAc,MAAY;AAC9B,UAAM,UAAU,KAAK,qBAAqB;AAC1C,QAAI,CAAC,QAAS,OAAM,IAAI,MAAM,+BAA+B;AAE7D,UAAM,aAAa,MAAM,QAAQ,IAAI,EAAE,KAAK,CAAC;AAE7C,SAAK,eAAe,CAAC,GAAG,KAAK,cAAc,UAA+B;AAC1E,SAAK,kBAAkB;AAAA,EACzB;AAAA,EAEA,MAAM,iBAAiB,cAAsB;AAC3C,UAAM,UAAU,KAAK,qBAAqB;AAC1C,QAAI,CAAC,QAAS,OAAM,IAAI,MAAM,+BAA+B;AAE7D,UAAM,QAAQ,KAAK,aAAa,UAAU,CAAC,MAAM,EAAE,OAAO,YAAY;AACtE,QAAI,UAAU,GAAI,OAAM,IAAI,MAAM,sBAAsB;AACxD,UAAM,aAAa,KAAK,aAAa,KAAK;AAE1C,UAAM,QAAQ,OAAO,UAAU;AAE/B,SAAK,eAAe,KAAK,aAAa,UAAU,OAAO,CAAC;AACxD,SAAK,kBAAkB;AAAA,EACzB;AAAA,EAEQ,iBAAiB,oBAAI,IAAgB;AAAA,EACnC,oBAAoB;AAC5B,eAAW,YAAY,KAAK,eAAgB,UAAS;AAAA,EACvD;AAAA,EAEO,UAAU,UAAmC;AAClD,SAAK,eAAe,IAAI,QAAQ;AAChC,WAAO,MAAM,KAAK,eAAe,OAAO,QAAQ;AAAA,EAClD;AACF;","names":[]}
|
@@ -44,9 +44,6 @@ var BaseComposerRuntimeCore = class {
|
|
44
44
|
this.attachments.map(async (a) => {
|
45
45
|
if (isAttachmentComplete(a)) return a;
|
46
46
|
const result = await adapter.send(a);
|
47
|
-
if (result.status?.type !== "complete") {
|
48
|
-
result.status = { type: "complete" };
|
49
|
-
}
|
50
47
|
return result;
|
51
48
|
})
|
52
49
|
) : [];
|
@@ -62,9 +59,6 @@ var BaseComposerRuntimeCore = class {
|
|
62
59
|
const adapter = this.getAttachmentAdapter();
|
63
60
|
if (!adapter) throw new Error("Attachments are not supported");
|
64
61
|
const attachment = await adapter.add({ file });
|
65
|
-
if (attachment.status === void 0) {
|
66
|
-
attachment.status = { type: "requires-action", reason: "composer-send" };
|
67
|
-
}
|
68
62
|
this._attachments = [...this._attachments, attachment];
|
69
63
|
this.notifySubscribers();
|
70
64
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/runtimes/composer/BaseComposerRuntimeCore.tsx"],"sourcesContent":["import {\n Attachment,\n CompleteAttachment,\n PendingAttachment,\n} from \"../../types/AttachmentTypes\";\nimport { AppendMessage, Unsubscribe } from \"../../types\";\nimport { AttachmentAdapter } from \"../attachment\";\nimport { ComposerRuntimeCore } from \"../core/ComposerRuntimeCore\";\nimport { MessageRole } from \"../../types/AssistantTypes\";\n\nconst isAttachmentComplete = (a: Attachment): a is CompleteAttachment =>\n a.status.type === \"complete\";\n\nexport abstract class BaseComposerRuntimeCore implements ComposerRuntimeCore {\n public readonly isEditing = true;\n\n protected abstract getAttachmentAdapter(): AttachmentAdapter | undefined;\n\n public getAttachmentAccept(): string {\n return this.getAttachmentAdapter()?.accept ?? \"*\";\n }\n\n private _attachments: readonly Attachment[] = [];\n public get attachments() {\n return this._attachments;\n }\n\n protected setAttachments(value: readonly Attachment[]) {\n this._attachments = value;\n this.notifySubscribers();\n }\n\n public abstract get canCancel(): boolean;\n\n public get isEmpty() {\n return !this.text.trim() && !this.attachments.length;\n }\n\n private _text = \"\";\n\n get text() {\n return this._text;\n }\n\n private _role: MessageRole = \"user\";\n\n get role() {\n return this._role;\n }\n\n setRole(role: MessageRole) {\n this._role = role;\n this.notifySubscribers();\n }\n\n setText(value: string) {\n this._text = value;\n this.notifySubscribers();\n }\n\n reset() {\n this._text = \"\";\n this._role = \"user\";\n this._attachments = [];\n this.notifySubscribers();\n }\n\n public async send() {\n const adapter = this.getAttachmentAdapter();\n const attachments =\n adapter && this.attachments.length > 0\n ? await Promise.all(\n this.attachments.map(async (a) => {\n if (isAttachmentComplete(a)) return a;\n const result = await adapter.send(a);\n
|
1
|
+
{"version":3,"sources":["../../../src/runtimes/composer/BaseComposerRuntimeCore.tsx"],"sourcesContent":["import {\n Attachment,\n CompleteAttachment,\n PendingAttachment,\n} from \"../../types/AttachmentTypes\";\nimport { AppendMessage, Unsubscribe } from \"../../types\";\nimport { AttachmentAdapter } from \"../attachment\";\nimport { ComposerRuntimeCore } from \"../core/ComposerRuntimeCore\";\nimport { MessageRole } from \"../../types/AssistantTypes\";\n\nconst isAttachmentComplete = (a: Attachment): a is CompleteAttachment =>\n a.status.type === \"complete\";\n\nexport abstract class BaseComposerRuntimeCore implements ComposerRuntimeCore {\n public readonly isEditing = true;\n\n protected abstract getAttachmentAdapter(): AttachmentAdapter | undefined;\n\n public getAttachmentAccept(): string {\n return this.getAttachmentAdapter()?.accept ?? \"*\";\n }\n\n private _attachments: readonly Attachment[] = [];\n public get attachments() {\n return this._attachments;\n }\n\n protected setAttachments(value: readonly Attachment[]) {\n this._attachments = value;\n this.notifySubscribers();\n }\n\n public abstract get canCancel(): boolean;\n\n public get isEmpty() {\n return !this.text.trim() && !this.attachments.length;\n }\n\n private _text = \"\";\n\n get text() {\n return this._text;\n }\n\n private _role: MessageRole = \"user\";\n\n get role() {\n return this._role;\n }\n\n setRole(role: MessageRole) {\n this._role = role;\n this.notifySubscribers();\n }\n\n setText(value: string) {\n this._text = value;\n this.notifySubscribers();\n }\n\n reset() {\n this._text = \"\";\n this._role = \"user\";\n this._attachments = [];\n this.notifySubscribers();\n }\n\n public async send() {\n const adapter = this.getAttachmentAdapter();\n const attachments =\n adapter && this.attachments.length > 0\n ? await Promise.all(\n this.attachments.map(async (a) => {\n if (isAttachmentComplete(a)) return a;\n const result = await adapter.send(a);\n return result as CompleteAttachment;\n }),\n )\n : [];\n\n const message: Omit<AppendMessage, \"parentId\"> = {\n role: this.role,\n content: this.text ? [{ type: \"text\", text: this.text }] : [],\n attachments,\n };\n this.reset();\n\n this.handleSend(message);\n }\n public abstract handleSend(message: Omit<AppendMessage, \"parentId\">): void;\n public abstract cancel(): void;\n\n async addAttachment(file: File) {\n const adapter = this.getAttachmentAdapter();\n if (!adapter) throw new Error(\"Attachments are not supported\");\n\n const attachment = await adapter.add({ file });\n\n this._attachments = [...this._attachments, attachment as PendingAttachment];\n this.notifySubscribers();\n }\n\n async removeAttachment(attachmentId: string) {\n const adapter = this.getAttachmentAdapter();\n if (!adapter) throw new Error(\"Attachments are not supported\");\n\n const index = this._attachments.findIndex((a) => a.id === attachmentId);\n if (index === -1) throw new Error(\"Attachment not found\");\n const attachment = this._attachments[index]!;\n\n await adapter.remove(attachment);\n\n this._attachments = this._attachments.toSpliced(index, 1);\n this.notifySubscribers();\n }\n\n private _subscriptions = new Set<() => void>();\n protected notifySubscribers() {\n for (const callback of this._subscriptions) callback();\n }\n\n public subscribe(callback: () => void): Unsubscribe {\n this._subscriptions.add(callback);\n return () => this._subscriptions.delete(callback);\n }\n}\n"],"mappings":";AAUA,IAAM,uBAAuB,CAAC,MAC5B,EAAE,OAAO,SAAS;AAEb,IAAe,0BAAf,MAAsE;AAAA,EAC3D,YAAY;AAAA,EAIrB,sBAA8B;AACnC,WAAO,KAAK,qBAAqB,GAAG,UAAU;AAAA,EAChD;AAAA,EAEQ,eAAsC,CAAC;AAAA,EAC/C,IAAW,cAAc;AACvB,WAAO,KAAK;AAAA,EACd;AAAA,EAEU,eAAe,OAA8B;AACrD,SAAK,eAAe;AACpB,SAAK,kBAAkB;AAAA,EACzB;AAAA,EAIA,IAAW,UAAU;AACnB,WAAO,CAAC,KAAK,KAAK,KAAK,KAAK,CAAC,KAAK,YAAY;AAAA,EAChD;AAAA,EAEQ,QAAQ;AAAA,EAEhB,IAAI,OAAO;AACT,WAAO,KAAK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E7D,UAAM,QAAQ,KAAK,aAAa,UAAU,CAAC,MAAM,EAAE,OAAO,YAAY;AACtE,QAAI,UAAU,GAAI,OAAM,IAAI,MAAM,sBAAsB;AACxD,UAAM,aAAa,KAAK,aAAa,KAAK;AAE1C,UAAM,QAAQ,OAAO,UAAU;AAE/B,SAAK,eAAe,KAAK,aAAa,UAAU,OAAO,CAAC;AACxD,SAAK,kBAAkB;AAAA,EACzB;AAAA,EAEQ,iBAAiB,oBAAI,IAAgB;AAAA,EACnC,oBAAoB;AAC5B,eAAW,YAAY,KAAK,eAAgB,UAAS;AAAA,EACvD;AAAA,EAEO,UAAU,UAAmC;AAClD,SAAK,eAAe,IAAI,QAAQ;AAChC,WAAO,MAAM,KAAK,eAAe,OAAO,QAAQ;AAAA,EAClD;AACF;","names":[]}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { ModelConfigProvider, AppendMessage, Unsubscribe } from "../../types";
|
2
2
|
import { ExportedMessageRepository, MessageRepository } from "../utils/MessageRepository";
|
3
3
|
import { DefaultThreadComposerRuntimeCore } from "../composer/DefaultThreadComposerRuntimeCore";
|
4
|
-
import { AddToolResultOptions, ThreadSuggestion, SubmitFeedbackOptions, ThreadRuntimeCore, SpeechState, RuntimeCapabilities, ThreadRuntimeEventType } from "../core/ThreadRuntimeCore";
|
4
|
+
import { AddToolResultOptions, ThreadSuggestion, SubmitFeedbackOptions, ThreadRuntimeCore, SpeechState, RuntimeCapabilities, ThreadRuntimeEventType, ThreadMetadataRuntimeCore } from "../core/ThreadRuntimeCore";
|
5
5
|
import { DefaultEditComposerRuntimeCore } from "../composer/DefaultEditComposerRuntimeCore";
|
6
6
|
import { SpeechSynthesisAdapter } from "../speech/SpeechAdapterTypes";
|
7
7
|
import { FeedbackAdapter } from "../feedback/FeedbackAdapter";
|
@@ -12,11 +12,11 @@ type BaseThreadAdapters = {
|
|
12
12
|
attachments?: AttachmentAdapter | undefined;
|
13
13
|
};
|
14
14
|
export declare abstract class BaseThreadRuntimeCore implements ThreadRuntimeCore {
|
15
|
-
private
|
15
|
+
private readonly _configProvider;
|
16
|
+
private readonly _metadata;
|
16
17
|
private _subscriptions;
|
17
18
|
protected readonly repository: MessageRepository;
|
18
19
|
abstract get adapters(): BaseThreadAdapters | undefined;
|
19
|
-
abstract get threadId(): string;
|
20
20
|
abstract get isDisabled(): boolean;
|
21
21
|
abstract get suggestions(): readonly ThreadSuggestion[];
|
22
22
|
abstract get extras(): unknown;
|
@@ -25,9 +25,10 @@ export declare abstract class BaseThreadRuntimeCore implements ThreadRuntimeCore
|
|
25
25
|
abstract startRun(parentId: string | null): void;
|
26
26
|
abstract addToolResult(options: AddToolResultOptions): void;
|
27
27
|
abstract cancelRun(): void;
|
28
|
+
get metadata(): ThreadMetadataRuntimeCore;
|
28
29
|
get messages(): import("../..").ThreadMessage[];
|
29
30
|
readonly composer: DefaultThreadComposerRuntimeCore;
|
30
|
-
constructor(
|
31
|
+
constructor(_configProvider: ModelConfigProvider, _metadata: ThreadMetadataRuntimeCore);
|
31
32
|
getModelConfig(): import("../..").ModelConfig;
|
32
33
|
private _editComposers;
|
33
34
|
getEditComposer(messageId: string): DefaultEditComposerRuntimeCore | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BaseThreadRuntimeCore.d.ts","sourceRoot":"","sources":["../../../src/runtimes/core/BaseThreadRuntimeCore.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,aAAa,EACb,WAAW,EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,gCAAgC,EAAE,MAAM,8CAA8C,CAAC;AAChG,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EAEnB,sBAAsB,
|
1
|
+
{"version":3,"file":"BaseThreadRuntimeCore.d.ts","sourceRoot":"","s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eCore = require("../composer/DefaultEditComposerRuntimeCore.cjs");
|
29
29
|
var import_getThreadMessageText = require("../../utils/getThreadMessageText.cjs");
|
30
30
|
var BaseThreadRuntimeCore = class {
|
31
|
-
constructor(
|
32
|
-
this.
|
31
|
+
constructor(_configProvider, _metadata) {
|
32
|
+
this._configProvider = _configProvider;
|
33
|
+
this._metadata = _metadata;
|
33
34
|
}
|
34
35
|
_subscriptions = /* @__PURE__ */ new Set();
|
35
36
|
repository = new import_MessageRepository.MessageRepository();
|
37
|
+
get metadata() {
|
38
|
+
return this._metadata;
|
39
|
+
}
|
36
40
|
get messages() {
|
37
41
|
return this.repository.getMessages();
|
38
42
|
}
|
39
43
|
composer = new import_DefaultThreadComposerRuntimeCore.DefaultThreadComposerRuntimeCore(this);
|
40
44
|
getModelConfig() {
|
41
|
-
return this.
|
45
|
+
return this._configProvider.getModelConfig();
|
42
46
|
}
|
43
47
|
_editComposers = /* @__PURE__ */ new Map();
|
44
48
|
getEditComposer(messageId) {
|
@@ -132,7 +136,7 @@ var BaseThreadRuntimeCore = class {
|
|
132
136
|
_eventSubscribers = /* @__PURE__ */ new Map();
|
133
137
|
unstable_on(event, callback) {
|
134
138
|
if (event === "model-config-update") {
|
135
|
-
return this.
|
139
|
+
return this._configProvider.subscribe?.(callback) ?? (() => {
|
136
140
|
});
|
137
141
|
}
|
138
142
|
const subscribers = this._eventSubscribers.get(event);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/runtimes/core/BaseThreadRuntimeCore.tsx"],"sourcesContent":["import type {\n ModelConfigProvider,\n AppendMessage,\n Unsubscribe,\n} from \"../../types\";\nimport {\n ExportedMessageRepository,\n MessageRepository,\n} from \"../utils/MessageRepository\";\nimport { DefaultThreadComposerRuntimeCore } from \"../composer/DefaultThreadComposerRuntimeCore\";\nimport {\n AddToolResultOptions,\n ThreadSuggestion,\n SubmitFeedbackOptions,\n ThreadRuntimeCore,\n SpeechState,\n RuntimeCapabilities,\n SubmittedFeedback,\n ThreadRuntimeEventType,\n} from \"../core/ThreadRuntimeCore\";\nimport { DefaultEditComposerRuntimeCore } from \"../composer/DefaultEditComposerRuntimeCore\";\nimport { SpeechSynthesisAdapter } from \"../speech/SpeechAdapterTypes\";\nimport { FeedbackAdapter } from \"../feedback/FeedbackAdapter\";\nimport { AttachmentAdapter } from \"../attachment\";\nimport { getThreadMessageText } from \"../../utils/getThreadMessageText\";\n\ntype BaseThreadAdapters = {\n speech?: SpeechSynthesisAdapter | undefined;\n feedback?: FeedbackAdapter | undefined;\n attachments?: AttachmentAdapter | undefined;\n};\n\nexport abstract class BaseThreadRuntimeCore implements ThreadRuntimeCore {\n private _subscriptions = new Set<() => void>();\n\n protected readonly repository = new MessageRepository();\n public abstract get adapters(): BaseThreadAdapters | undefined;\n
|
1
|
+
{"version":3,"sources":["../../../src/runtimes/core/BaseThreadRuntimeCore.tsx"],"sourcesContent":["import type {\n ModelConfigProvider,\n AppendMessage,\n Unsubscribe,\n} from \"../../types\";\nimport {\n ExportedMessageRepository,\n MessageRepository,\n} from \"../utils/MessageRepository\";\nimport { DefaultThreadComposerRuntimeCore } from \"../composer/DefaultThreadComposerRuntimeCore\";\nimport {\n AddToolResultOptions,\n ThreadSuggestion,\n SubmitFeedbackOptions,\n ThreadRuntimeCore,\n SpeechState,\n RuntimeCapabilities,\n SubmittedFeedback,\n ThreadRuntimeEventType,\n ThreadMetadataRuntimeCore,\n} from \"../core/ThreadRuntimeCore\";\nimport { DefaultEditComposerRuntimeCore } from \"../composer/DefaultEditComposerRuntimeCore\";\nimport { SpeechSynthesisAdapter } from \"../speech/SpeechAdapterTypes\";\nimport { FeedbackAdapter } from \"../feedback/FeedbackAdapter\";\nimport { AttachmentAdapter } from \"../attachment\";\nimport { getThreadMessageText } from \"../../utils/getThreadMessageText\";\n\ntype BaseThreadAdapters = {\n speech?: SpeechSynthesisAdapter | undefined;\n feedback?: FeedbackAdapter | undefined;\n attachments?: AttachmentAdapter | undefined;\n};\n\nexport abstract class BaseThreadRuntimeCore implements ThreadRuntimeCore {\n private _subscriptions = new Set<() => void>();\n\n protected readonly repository = new MessageRepository();\n public abstract get adapters(): BaseThreadAdapters | undefined;\n public abstract get isDisabled(): boolean;\n public abstract get suggestions(): readonly ThreadSuggestion[];\n public abstract get extras(): unknown;\n\n public abstract get capabilities(): RuntimeCapabilities;\n public abstract append(message: AppendMessage): void;\n public abstract startRun(parentId: string | null): void;\n public abstract addToolResult(options: AddToolResultOptions): void;\n public abstract cancelRun(): void;\n\n public get metadata() {\n return this._metadata;\n }\n\n public get messages() {\n return this.repository.getMessages();\n }\n\n public readonly composer = new DefaultThreadComposerRuntimeCore(this);\n\n constructor(\n private readonly _configProvider: ModelConfigProvider,\n private readonly _metadata: ThreadMetadataRuntimeCore,\n ) {}\n\n public getModelConfig() {\n return this._configProvider.getModelConfig();\n }\n\n private _editComposers = new Map<string, DefaultEditComposerRuntimeCore>();\n public getEditComposer(messageId: string) {\n return this._editComposers.get(messageId);\n }\n public beginEdit(messageId: string) {\n if (this._editComposers.has(messageId))\n throw new Error(\"Edit already in progress\");\n\n this._editComposers.set(\n messageId,\n new DefaultEditComposerRuntimeCore(\n this,\n () => this._editComposers.delete(messageId),\n this.repository.getMessage(messageId),\n ),\n );\n this._notifySubscribers();\n }\n\n public getMessageById(messageId: string) {\n return this.repository.getMessage(messageId);\n }\n\n public getBranches(messageId: string): string[] {\n return this.repository.getBranches(messageId);\n }\n\n public switchToBranch(branchId: string): void {\n this.repository.switchToBranch(branchId);\n this._notifySubscribers();\n }\n\n protected _notifySubscribers() {\n for (const callback of this._subscriptions) callback();\n }\n\n public _notifyEventSubscribers(event: ThreadRuntimeEventType) {\n const subscribers = this._eventSubscribers.get(event);\n if (!subscribers) return;\n\n for (const callback of subscribers) callback();\n }\n\n public subscribe(callback: () => void): Unsubscribe {\n this._subscriptions.add(callback);\n return () => this._subscriptions.delete(callback);\n }\n\n private _submittedFeedback: Record<string, SubmittedFeedback> = {};\n\n public getSubmittedFeedback(messageId: string) {\n return this._submittedFeedback[messageId];\n }\n\n public submitFeedback({ messageId, type }: SubmitFeedbackOptions) {\n const adapter = this.adapters?.feedback;\n if (!adapter) throw new Error(\"Feedback adapter not configured\");\n\n const { message } = this.repository.getMessage(messageId);\n adapter.submit({ message, type });\n\n this._submittedFeedback[messageId] = { type };\n this._notifySubscribers();\n }\n\n private _stopSpeaking: Unsubscribe | undefined;\n public speech: SpeechState | undefined;\n\n public speak(messageId: string) {\n const adapter = this.adapters?.speech;\n if (!adapter) throw new Error(\"Speech adapter not configured\");\n\n const { message } = this.repository.getMessage(messageId);\n\n this._stopSpeaking?.();\n\n const utterance = adapter.speak(getThreadMessageText(message));\n const unsub = utterance.subscribe(() => {\n if (utterance.status.type === \"ended\") {\n this._stopSpeaking = undefined;\n this.speech = undefined;\n } else {\n this.speech = { messageId, status: utterance.status };\n }\n this._notifySubscribers();\n });\n\n this.speech = { messageId, status: utterance.status };\n this._notifySubscribers();\n\n this._stopSpeaking = () => {\n utterance.cancel();\n unsub();\n this.speech = undefined;\n this._stopSpeaking = undefined;\n };\n }\n\n public stopSpeaking() {\n if (!this._stopSpeaking) throw new Error(\"No message is being spoken\");\n this._stopSpeaking();\n this._notifySubscribers();\n }\n\n public export() {\n return this.repository.export();\n }\n\n public import(data: ExportedMessageRepository) {\n this.repository.import(data);\n this._notifySubscribers();\n }\n\n private _eventSubscribers = new Map<string, Set<() => void>>();\n\n public unstable_on(event: ThreadRuntimeEventType, callback: () => void) {\n if (event === \"model-config-update\") {\n return this._configProvider.subscribe?.(callback) ?? (() => {});\n }\n\n const subscribers = this._eventSubscribers.get(event);\n if (!subscribers) {\n this._eventSubscribers.set(event, new Set([callback]));\n } else {\n subscribers.add(callback);\n }\n\n return () => {\n const subscribers = this._eventSubscribers.get(event)!;\n subscribers.delete(callback);\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,+BAGO;AACP,8CAAiD;AAYjD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AEO,eAAe;AACpB,QAAI,CAAC,KAAK,cAAe,OAAM,IAAI,MAAM,4BAA4B;AACrE,SAAK,cAAc;AACnB,SAAK,mBAAmB;AAAA,EAC1B;AAAA,EAEO,SAAS;AACd,WAAO,KAAK,WAAW,OAAO;AAAA,EAChC;AAAA,EAEO,OAAO,MAAiC;AAC7C,SAAK,WAAW,OAAO,IAAI;AAC3B,SAAK,mBAAmB;AAAA,EAC1B;AAAA,EAEQ,oBAAoB,oBAAI,IAA6B;AAAA,EAEtD,YAAY,OAA+B,UAAsB;AACtE,QAAI,UAAU,uBAAuB;AACnC,aAAO,KAAK,gBAAgB,YAAY,QAAQ,MAAM,MAAM;AAAA,MAAC;AAAA,IAC/D;AAEA,UAAM,cAAc,KAAK,kBAAkB,IAAI,KAAK;AACpD,QAAI,CAAC,aAAa;AAChB,WAAK,kBAAkB,IAAI,OAAO,oBAAI,IAAI,CAAC,QAAQ,CAAC,CAAC;AAAA,IACvD,OAAO;AACL,kBAAY,IAAI,QAAQ;AAAA,IAC1B;AAEA,WAAO,MAAM;AACX,YAAMA,eAAc,KAAK,kBAAkB,IAAI,KAAK;AACpD,MAAAA,aAAY,OAAO,QAAQ;AAAA,IAC7B;AAAA,EACF;AACF;","names":["subscribers"]}
|
@@ -6,17 +6,21 @@ import { DefaultThreadComposerRuntimeCore } from "../composer/DefaultThreadCompo
|
|
6
6
|
import { DefaultEditComposerRuntimeCore } from "../composer/DefaultEditComposerRuntimeCore.mjs";
|
7
7
|
import { getThreadMessageText } from "../../utils/getThreadMessageText.mjs";
|
8
8
|
var BaseThreadRuntimeCore = class {
|
9
|
-
constructor(
|
10
|
-
this.
|
9
|
+
constructor(_configProvider, _metadata) {
|
10
|
+
this._configProvider = _configProvider;
|
11
|
+
this._metadata = _metadata;
|
11
12
|
}
|
12
13
|
_subscriptions = /* @__PURE__ */ new Set();
|
13
14
|
repository = new MessageRepository();
|
15
|
+
get metadata() {
|
16
|
+
return this._metadata;
|
17
|
+
}
|
14
18
|
get messages() {
|
15
19
|
return this.repository.getMessages();
|
16
20
|
}
|
17
21
|
composer = new DefaultThreadComposerRuntimeCore(this);
|
18
22
|
getModelConfig() {
|
19
|
-
return this.
|
23
|
+
return this._configProvider.getModelConfig();
|
20
24
|
}
|
21
25
|
_editComposers = /* @__PURE__ */ new Map();
|
22
26
|
getEditComposer(messageId) {
|
@@ -110,7 +114,7 @@ var BaseThreadRuntimeCore = class {
|
|
110
114
|
_eventSubscribers = /* @__PURE__ */ new Map();
|
111
115
|
unstable_on(event, callback) {
|
112
116
|
if (event === "model-config-update") {
|
113
|
-
return this.
|
117
|
+
return this._configProvider.subscribe?.(callback) ?? (() => {
|
114
118
|
});
|
115
119
|
}
|
116
120
|
const subscribers = this._eventSubscribers.get(event);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/runtimes/core/BaseThreadRuntimeCore.tsx"],"sourcesContent":["import type {\n ModelConfigProvider,\n AppendMessage,\n Unsubscribe,\n} from \"../../types\";\nimport {\n ExportedMessageRepository,\n MessageRepository,\n} from \"../utils/MessageRepository\";\nimport { DefaultThreadComposerRuntimeCore } from \"../composer/DefaultThreadComposerRuntimeCore\";\nimport {\n AddToolResultOptions,\n ThreadSuggestion,\n SubmitFeedbackOptions,\n ThreadRuntimeCore,\n SpeechState,\n RuntimeCapabilities,\n SubmittedFeedback,\n ThreadRuntimeEventType,\n} from \"../core/ThreadRuntimeCore\";\nimport { DefaultEditComposerRuntimeCore } from \"../composer/DefaultEditComposerRuntimeCore\";\nimport { SpeechSynthesisAdapter } from \"../speech/SpeechAdapterTypes\";\nimport { FeedbackAdapter } from \"../feedback/FeedbackAdapter\";\nimport { AttachmentAdapter } from \"../attachment\";\nimport { getThreadMessageText } from \"../../utils/getThreadMessageText\";\n\ntype BaseThreadAdapters = {\n speech?: SpeechSynthesisAdapter | undefined;\n feedback?: FeedbackAdapter | undefined;\n attachments?: AttachmentAdapter | undefined;\n};\n\nexport abstract class BaseThreadRuntimeCore implements ThreadRuntimeCore {\n private _subscriptions = new Set<() => void>();\n\n protected readonly repository = new MessageRepository();\n public abstract get adapters(): BaseThreadAdapters | undefined;\n
|
1
|
+
{"version":3,"sources":["../../../src/runtimes/core/BaseThreadRuntimeCore.tsx"],"sourcesContent":["import type {\n ModelConfigProvider,\n AppendMessage,\n Unsubscribe,\n} from \"../../types\";\nimport {\n ExportedMessageRepository,\n MessageRepository,\n} from \"../utils/MessageRepository\";\nimport { DefaultThreadComposerRuntimeCore } from \"../composer/DefaultThreadComposerRuntimeCore\";\nimport {\n AddToolResultOptions,\n ThreadSuggestion,\n SubmitFeedbackOptions,\n ThreadRuntimeCore,\n SpeechState,\n RuntimeCapabilities,\n SubmittedFeedback,\n ThreadRuntimeEventType,\n ThreadMetadataRuntimeCore,\n} from \"../core/ThreadRuntimeCore\";\nimport { DefaultEditComposerRuntimeCore } from \"../composer/DefaultEditComposerRuntimeCore\";\nimport { SpeechSynthesisAdapter } from \"../speech/SpeechAdapterTypes\";\nimport { FeedbackAdapter } from \"../feedback/FeedbackAdapter\";\nimport { AttachmentAdapter } from \"../attachment\";\nimport { getThreadMessageText } from \"../../utils/getThreadMessageText\";\n\ntype BaseThreadAdapters = {\n speech?: SpeechSynthesisAdapter | undefined;\n feedback?: FeedbackAdapter | undefined;\n attachments?: AttachmentAdapter | undefined;\n};\n\nexport abstract class BaseThreadRuntimeCore implements ThreadRuntimeCore {\n private _subscriptions = new Set<() => void>();\n\n protected readonly repository = new MessageRepository();\n public abstract get adapters(): BaseThreadAdapters | undefined;\n public abstract get isDisabled(): boolean;\n public abstract get suggestions(): readonly ThreadSuggestion[];\n public abstract get extras(): unknown;\n\n public abstract get capabilities(): RuntimeCapabilities;\n public abstract append(message: AppendMessage): void;\n public abstract startRun(parentId: string | null): void;\n public abstract addToolResult(options: AddToolResultOptions): void;\n public abstract cancelRun(): void;\n\n public get metadata() {\n return this._metadata;\n }\n\n public get messages() {\n return this.repository.getMessages();\n }\n\n public readonly composer = new DefaultThreadComposerRuntimeCore(this);\n\n constructor(\n private readonly _configProvider: ModelConfigProvider,\n private readonly _metadata: ThreadMetadataRuntimeCore,\n ) {}\n\n public getModelConfig() {\n return this._configProvider.getModelConfig();\n }\n\n private _editComposers = new Map<string, DefaultEditComposerRuntimeCore>();\n public getEditComposer(messageId: string) {\n return this._editComposers.get(messageId);\n }\n public beginEdit(messageId: string) {\n if (this._editComposers.has(messageId))\n throw new Error(\"Edit already in progress\");\n\n this._editComposers.set(\n messageId,\n new DefaultEditComposerRuntimeCore(\n this,\n () => this._editComposers.delete(messageId),\n this.repository.getMessage(messageId),\n ),\n );\n this._notifySubscribers();\n }\n\n public getMessageById(messageId: string) {\n return this.repository.getMessage(messageId);\n }\n\n public getBranches(messageId: string): string[] {\n return this.repository.getBranches(messageId);\n }\n\n public switchToBranch(branchId: string): void {\n this.repository.switchToBranch(branchId);\n this._notifySubscribers();\n }\n\n protected _notifySubscribers() {\n for (const callback of this._subscriptions) callback();\n }\n\n public _notifyEventSubscribers(event: ThreadRuntimeEventType) {\n const subscribers = this._eventSubscribers.get(event);\n if (!subscribers) return;\n\n for (const callback of subscribers) callback();\n }\n\n public subscribe(callback: () => void): Unsubscribe {\n this._subscriptions.add(callback);\n return () => this._subscriptions.delete(callback);\n }\n\n private _submittedFeedback: Record<string, SubmittedFeedback> = {};\n\n public getSubmittedFeedback(messageId: string) {\n return this._submittedFeedback[messageId];\n }\n\n public submitFeedback({ messageId, type }: SubmitFeedbackOptions) {\n const adapter = this.adapters?.feedback;\n if (!adapter) throw new Error(\"Feedback adapter not configured\");\n\n const { message } = this.repository.getMessage(messageId);\n adapter.submit({ message, type });\n\n this._submittedFeedback[messageId] = { type };\n this._notifySubscribers();\n }\n\n private _stopSpeaking: Unsubscribe | undefined;\n public speech: SpeechState | undefined;\n\n public speak(messageId: string) {\n const adapter = this.adapters?.speech;\n if (!adapter) throw new Error(\"Speech adapter not configured\");\n\n const { message } = this.repository.getMessage(messageId);\n\n this._stopSpeaking?.();\n\n const utterance = adapter.speak(getThreadMessageText(message));\n const unsub = utterance.subscribe(() => {\n if (utterance.status.type === \"ended\") {\n this._stopSpeaking = undefined;\n this.speech = undefined;\n } else {\n this.speech = { messageId, status: utterance.status };\n }\n this._notifySubscribers();\n });\n\n this.speech = { messageId, status: utterance.status };\n this._notifySubscribers();\n\n this._stopSpeaking = () => {\n utterance.cancel();\n unsub();\n this.speech = undefined;\n this._stopSpeaking = undefined;\n };\n }\n\n public stopSpeaking() {\n if (!this._stopSpeaking) throw new Error(\"No message is being spoken\");\n this._stopSpeaking();\n this._notifySubscribers();\n }\n\n public export() {\n return this.repository.export();\n }\n\n public import(data: ExportedMessageRepository) {\n this.repository.import(data);\n this._notifySubscribers();\n }\n\n private _eventSubscribers = new Map<string, Set<() => void>>();\n\n public unstable_on(event: ThreadRuntimeEventType, callback: () => void) {\n if (event === \"model-config-update\") {\n return this._configProvider.subscribe?.(callback) ?? (() => {});\n }\n\n const subscribers = this._eventSubscribers.get(event);\n if (!subscribers) {\n this._eventSubscribers.set(event, new Set([callback]));\n } else {\n subscribers.add(callback);\n }\n\n return () => {\n const subscribers = this._eventSubscribers.get(event)!;\n subscribers.delete(callback);\n };\n }\n}\n"],"mappings":";AAKA;AAAA,EAEE;AAAA,OACK;AACP,SAAS,wCAAwC;AAYjD,SAAS,sCAAsC;AAI/C,SAAS,4BAA4B;AAQ9B,IAAe,wBAAf,MAAkE;AAAA,EAyBvE,YACmB,iBACA,WACjB;AAFiB;AACA;AAAA,EAChB;AAAA,EA3BK,iBAAiB,oBAAI,IAAgB;AAAA,EAE1B,aAAa,IAAI,kBAAkB;AAAA,EAYtD,IAAW,WAAW;AACpB,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,IAAW,WAAW;AACpB,WAAO,KAAK,WAAW,YAAY;AAAA,EACrC;AAAA,EAEgB,WAAW,IAAI,iCAAiC,IAAI;AAAA,EAO7D,iBAAiB;AACtB,WAAO,KAAK,gBAAgB,eAAe;AAAA,EAC7C;AAAA,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AM;AAAA,MAAC;AAAA,IAC/D;AAEA,UAAM,cAAc,KAAK,kBAAkB,IAAI,KAAK;AACpD,QAAI,CAAC,aAAa;AAChB,WAAK,kBAAkB,IAAI,OAAO,oBAAI,IAAI,CAAC,QAAQ,CAAC,CAAC;AAAA,IACvD,OAAO;AACL,kBAAY,IAAI,QAAQ;AAAA,IAC1B;AAEA,WAAO,MAAM;AACX,YAAMA,eAAc,KAAK,kBAAkB,IAAI,KAAK;AACpD,MAAAA,aAAY,OAAO,QAAQ;AAAA,IAC7B;AAAA,EACF;AACF;","names":["subscribers"]}
|
@@ -12,9 +12,6 @@ export type ComposerRuntimeCore = Readonly<{
|
|
12
12
|
setText: (value: string) => void;
|
13
13
|
role: MessageRole;
|
14
14
|
setRole: (role: MessageRole) => void;
|
15
|
-
/**
|
16
|
-
* @deprecated This method will be removed in 0.6.0. Submit feedback if you need this functionality.
|
17
|
-
*/
|
18
15
|
reset: () => void;
|
19
16
|
send: () => void;
|
20
17
|
cancel: () => void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ComposerRuntimeCore.d.ts","sourceRoot":"","sources":["../../../src/runtimes/core/ComposerRuntimeCore.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC;IACzC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;IAEnC,mBAAmB,IAAI,MAAM,CAAC;IAC9B,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,gBAAgB,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1D,SAAS,EAAE,OAAO,CAAC;IAEnB,SAAS,EAAE,OAAO,CAAC;IACnB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AAG,mBAAmB,GACzD,QAAQ,CAAC;IACP,WAAW,EAAE,SAAS,iBAAiB,EAAE,CAAC;CAC3C,CAAC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/runtimes/core/ComposerRuntimeCore.tsx"],"sourcesContent":["import type { Attachment, PendingAttachment, Unsubscribe } from \"../../types\";\nimport { MessageRole } from \"../../types/AssistantTypes\";\n\nexport type ComposerRuntimeCore = Readonly<{\n attachments: readonly Attachment[];\n\n getAttachmentAccept(): string;\n addAttachment: (file: File) => Promise<void>;\n removeAttachment: (attachmentId: string) => Promise<void>;\n\n isEditing: boolean;\n\n canCancel: boolean;\n isEmpty: boolean;\n\n text: string;\n setText: (value: string) => void;\n\n role: MessageRole;\n setRole: (role: MessageRole) => void;\n\n
|
1
|
+
{"version":3,"sources":["../../../src/runtimes/core/ComposerRuntimeCore.tsx"],"sourcesContent":["import type { Attachment, PendingAttachment, Unsubscribe } from \"../../types\";\nimport { MessageRole } from \"../../types/AssistantTypes\";\n\nexport type ComposerRuntimeCore = Readonly<{\n attachments: readonly Attachment[];\n\n getAttachmentAccept(): string;\n addAttachment: (file: File) => Promise<void>;\n removeAttachment: (attachmentId: string) => Promise<void>;\n\n isEditing: boolean;\n\n canCancel: boolean;\n isEmpty: boolean;\n\n text: string;\n setText: (value: string) => void;\n\n role: MessageRole;\n setRole: (role: MessageRole) => void;\n\n reset: () => void;\n\n send: () => void;\n cancel: () => void;\n\n subscribe: (callback: () => void) => Unsubscribe;\n}>;\n\nexport type ThreadComposerRuntimeCore = ComposerRuntimeCore &\n Readonly<{\n attachments: readonly PendingAttachment[];\n }>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
@@ -1,16 +1,13 @@
|
|
1
1
|
import { Unsubscribe } from "../../types";
|
2
|
-
import { ThreadRuntimeCore } from "./ThreadRuntimeCore";
|
3
|
-
export type ThreadListMetadata = Readonly<{
|
4
|
-
threadId: string;
|
5
|
-
title?: string;
|
6
|
-
}>;
|
2
|
+
import { ThreadMetadata, ThreadRuntimeCore } from "./ThreadRuntimeCore";
|
7
3
|
export type ThreadListRuntimeCore = {
|
8
4
|
mainThread: ThreadRuntimeCore;
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
5
|
+
newThread: string | undefined;
|
6
|
+
threads: readonly string[];
|
7
|
+
archivedThreads: readonly string[];
|
8
|
+
getThreadMetadataById(threadId: string): ThreadMetadata | undefined;
|
9
|
+
switchToThread(threadId: string): Promise<void>;
|
10
|
+
switchToNewThread(): Promise<void>;
|
14
11
|
rename(threadId: string, newTitle: string): Promise<void>;
|
15
12
|
archive(threadId: string): Promise<void>;
|
16
13
|
unarchive(threadId: string): Promise<void>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ThreadListRuntimeCore.d.ts","sourceRoot":"","sources":["../../../src/runtimes/core/ThreadListRuntimeCore.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;
|
1
|
+
{"version":3,"file":"ThreadListRuntimeCore.d.ts","sourceRoot":"","sources":["../../../src/runtimes/core/ThreadListRuntimeCore.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExE,MAAM,MAAM,qBAAqB,GAAG;IAClC,UAAU,EAAE,iBAAiB,CAAC;IAE9B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IAEnC,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAAC;IAEpE,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAKnC,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExC,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,WAAW,CAAC;CAC9C,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/runtimes/core/ThreadListRuntimeCore.tsx"],"sourcesContent":["import { Unsubscribe } from \"../../types\";\nimport { ThreadRuntimeCore } from \"./ThreadRuntimeCore\";\n\nexport type
|
1
|
+
{"version":3,"sources":["../../../src/runtimes/core/ThreadListRuntimeCore.tsx"],"sourcesContent":["import { Unsubscribe } from \"../../types\";\nimport { ThreadMetadata, ThreadRuntimeCore } from \"./ThreadRuntimeCore\";\n\nexport type ThreadListRuntimeCore = {\n mainThread: ThreadRuntimeCore;\n\n newThread: string | undefined;\n threads: readonly string[];\n archivedThreads: readonly string[];\n\n getThreadMetadataById(threadId: string): ThreadMetadata | undefined;\n\n switchToThread(threadId: string): Promise<void>;\n switchToNewThread(): Promise<void>;\n\n // getLoadThreadsPromise(): Promise<void>;\n // getLoadArchivedThreadsPromise(): Promise<void>;\n // create(): Promise<ThreadMetadata>;\n rename(threadId: string, newTitle: string): Promise<void>;\n archive(threadId: string): Promise<void>;\n unarchive(threadId: string): Promise<void>;\n delete(threadId: string): Promise<void>;\n\n subscribe(callback: () => void): Unsubscribe;\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
@@ -33,8 +33,22 @@ export type SpeechState = Readonly<{
|
|
33
33
|
export type SubmittedFeedback = Readonly<{
|
34
34
|
type: "negative" | "positive";
|
35
35
|
}>;
|
36
|
+
export type ThreadMetadata = Readonly<{
|
37
|
+
threadId: string;
|
38
|
+
state: "archived" | "regular" | "new" | "deleted";
|
39
|
+
title?: string | undefined;
|
40
|
+
}>;
|
36
41
|
export type ThreadRuntimeEventType = "switched-to" | "switched-away" | "run-start" | "model-config-update";
|
42
|
+
export type ThreadMetadataRuntimeCore = ThreadMetadata & Readonly<{
|
43
|
+
create(title?: string): Promise<void>;
|
44
|
+
rename(newTitle: string): Promise<void>;
|
45
|
+
archive(): Promise<void>;
|
46
|
+
unarchive(): Promise<void>;
|
47
|
+
delete(): Promise<void>;
|
48
|
+
subscribe(callback: () => void): Unsubscribe;
|
49
|
+
}>;
|
37
50
|
export type ThreadRuntimeCore = Readonly<{
|
51
|
+
metadata: ThreadMetadataRuntimeCore;
|
38
52
|
getMessageById: (messageId: string) => {
|
39
53
|
parentId: string | null;
|
40
54
|
message: ThreadMessage;
|
@@ -55,7 +69,6 @@ export type ThreadRuntimeCore = Readonly<{
|
|
55
69
|
beginEdit: (messageId: string) => void;
|
56
70
|
speech: SpeechState | undefined;
|
57
71
|
capabilities: Readonly<RuntimeCapabilities>;
|
58
|
-
threadId: string;
|
59
72
|
isDisabled: boolean;
|
60
73
|
messages: readonly ThreadMessage[];
|
61
74
|
suggestions: readonly ThreadSuggestion[];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ThreadRuntimeCore.d.ts","sourceRoot":"","sources":["../../../src/runtimes/core/ThreadRuntimeCore.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAC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EAAE,MAAM,IAAI,CAAC;IAEzB,oBAAoB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,iBAAiB,GAAG,SAAS,CAAC;IAC3E,cAAc,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAE1D,cAAc,EAAE,MAAM,WAAW,CAAC;IAElC,QAAQ,EAAE,yBAAyB,CAAC;IACpC,eAAe,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,mBAAmB,GAAG,SAAS,CAAC;IACxE,SAAS,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAEvC,MAAM,EAAE,WAAW,GAAG,SAAS,CAAC;IAEhC,YAAY,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IAC5C,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,SAAS,aAAa,EAAE,CAAC;IACnC,WAAW,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACzC,MAAM,EAAE,OAAO,CAAC;IAEhB,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,WAAW,CAAC;IAEjD,MAAM,CAAC,UAAU,EAAE,yBAAyB,GAAG,IAAI,CAAC;IACpD,MAAM,IAAI,yBAAyB,CAAC;IAEpC,WAAW,CAAC,KAAK,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,WAAW,CAAC;CAC/E,CAAC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/runtimes/core/ThreadRuntimeCore.tsx"],"sourcesContent":["import { AppendMessage, ModelConfig, ThreadMessage } from \"../../types\";\nimport type { Unsubscribe } from \"../../types/Unsubscribe\";\nimport { SpeechSynthesisAdapter } from \"../speech/SpeechAdapterTypes\";\nimport { ExportedMessageRepository } from \"../utils/MessageRepository\";\nimport {\n ComposerRuntimeCore,\n ThreadComposerRuntimeCore,\n} from \"./ComposerRuntimeCore\";\n\nexport type RuntimeCapabilities = Readonly<{\n switchToBranch: boolean;\n edit: boolean;\n reload: boolean;\n cancel: boolean;\n unstable_copy: boolean;\n speech: boolean;\n attachments: boolean;\n feedback: boolean;\n}>;\n\nexport type AddToolResultOptions = {\n messageId: string;\n toolName: string;\n toolCallId: string;\n result: any;\n};\n\nexport type SubmitFeedbackOptions = {\n messageId: string;\n type: \"negative\" | \"positive\";\n};\n\nexport type ThreadSuggestion = {\n prompt: string;\n};\n\nexport type SpeechState = Readonly<{\n messageId: string;\n status: SpeechSynthesisAdapter.Status;\n}>;\n\nexport type SubmittedFeedback = Readonly<{\n type: \"negative\" | \"positive\";\n}>;\n\nexport type ThreadRuntimeEventType =\n | \"switched-to\"\n | \"switched-away\"\n | \"run-start\"\n | \"model-config-update\";\n\nexport type ThreadRuntimeCore = Readonly<{\n getMessageById: (messageId: string) =>\n | {\n parentId: string | null;\n message: ThreadMessage;\n }\n | undefined;\n\n getBranches: (messageId: string) => readonly string[];\n switchToBranch: (branchId: string) => void;\n\n append: (message: AppendMessage) => void;\n startRun: (parentId: string | null) => void;\n cancelRun: () => void;\n\n addToolResult: (options: AddToolResultOptions) => void;\n\n speak: (messageId: string) => void;\n stopSpeaking: () => void;\n\n getSubmittedFeedback: (messageId: string) => SubmittedFeedback | undefined;\n submitFeedback: (feedback: SubmitFeedbackOptions) => void;\n\n getModelConfig: () => ModelConfig;\n\n composer: ThreadComposerRuntimeCore;\n getEditComposer: (messageId: string) => ComposerRuntimeCore | undefined;\n beginEdit: (messageId: string) => void;\n\n speech: SpeechState | undefined;\n\n capabilities: Readonly<RuntimeCapabilities>;\n
|
1
|
+
{"version":3,"sources":["../../../src/runtimes/core/ThreadRuntimeCore.tsx"],"sourcesContent":["import { AppendMessage, ModelConfig, ThreadMessage } from \"../../types\";\nimport type { Unsubscribe } from \"../../types/Unsubscribe\";\nimport { SpeechSynthesisAdapter } from \"../speech/SpeechAdapterTypes\";\nimport { ExportedMessageRepository } from \"../utils/MessageRepository\";\nimport {\n ComposerRuntimeCore,\n ThreadComposerRuntimeCore,\n} from \"./ComposerRuntimeCore\";\n\nexport type RuntimeCapabilities = Readonly<{\n switchToBranch: boolean;\n edit: boolean;\n reload: boolean;\n cancel: boolean;\n unstable_copy: boolean;\n speech: boolean;\n attachments: boolean;\n feedback: boolean;\n}>;\n\nexport type AddToolResultOptions = {\n messageId: string;\n toolName: string;\n toolCallId: string;\n result: any;\n};\n\nexport type SubmitFeedbackOptions = {\n messageId: string;\n type: \"negative\" | \"positive\";\n};\n\nexport type ThreadSuggestion = {\n prompt: string;\n};\n\nexport type SpeechState = Readonly<{\n messageId: string;\n status: SpeechSynthesisAdapter.Status;\n}>;\n\nexport type SubmittedFeedback = Readonly<{\n type: \"negative\" | \"positive\";\n}>;\n\nexport type ThreadMetadata = Readonly<{\n threadId: string;\n state: \"archived\" | \"regular\" | \"new\" | \"deleted\";\n title?: string | undefined;\n}>;\n\nexport type ThreadRuntimeEventType =\n | \"switched-to\"\n | \"switched-away\"\n | \"run-start\"\n | \"model-config-update\";\n\nexport type ThreadMetadataRuntimeCore = ThreadMetadata &\n Readonly<{\n create(title?: string): Promise<void>;\n rename(newTitle: string): Promise<void>;\n archive(): Promise<void>;\n unarchive(): Promise<void>;\n delete(): Promise<void>;\n subscribe(callback: () => void): Unsubscribe;\n }>;\n\nexport type ThreadRuntimeCore = Readonly<{\n metadata: ThreadMetadataRuntimeCore;\n\n getMessageById: (messageId: string) =>\n | {\n parentId: string | null;\n message: ThreadMessage;\n }\n | undefined;\n\n getBranches: (messageId: string) => readonly string[];\n switchToBranch: (branchId: string) => void;\n\n append: (message: AppendMessage) => void;\n startRun: (parentId: string | null) => void;\n cancelRun: () => void;\n\n addToolResult: (options: AddToolResultOptions) => void;\n\n speak: (messageId: string) => void;\n stopSpeaking: () => void;\n\n getSubmittedFeedback: (messageId: string) => SubmittedFeedback | undefined;\n submitFeedback: (feedback: SubmitFeedbackOptions) => void;\n\n getModelConfig: () => ModelConfig;\n\n composer: ThreadComposerRuntimeCore;\n getEditComposer: (messageId: string) => ComposerRuntimeCore | undefined;\n beginEdit: (messageId: string) => void;\n\n speech: SpeechState | undefined;\n\n capabilities: Readonly<RuntimeCapabilities>;\n isDisabled: boolean;\n messages: readonly ThreadMessage[];\n suggestions: readonly ThreadSuggestion[];\n extras: unknown;\n\n subscribe: (callback: () => void) => Unsubscribe;\n\n import(repository: ExportedMessageRepository): void;\n export(): ExportedMessageRepository;\n\n unstable_on(event: ThreadRuntimeEventType, callback: () => void): Unsubscribe;\n}>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
@@ -1,3 +1,2 @@
|
|
1
|
-
export type { AddToolResultOptions, SubmitFeedbackOptions, ThreadSuggestion, } from "./ThreadRuntimeCore";
|
2
|
-
export { subscribeToMainThread } from "./subscribeToMainThread";
|
1
|
+
export type { AddToolResultOptions, SubmitFeedbackOptions, ThreadSuggestion, ThreadMetadataRuntimeCore, } from "./ThreadRuntimeCore";
|
3
2
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtimes/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtimes/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC"}
|
@@ -3,10 +3,6 @@ var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
-
var __export = (target, all) => {
|
7
|
-
for (var name in all)
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
9
|
-
};
|
10
6
|
var __copyProps = (to, from, except, desc) => {
|
11
7
|
if (from && typeof from === "object" || typeof from === "function") {
|
12
8
|
for (let key of __getOwnPropNames(from))
|
@@ -19,13 +15,5 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
19
15
|
|
20
16
|
// src/runtimes/core/index.ts
|
21
17
|
var core_exports = {};
|
22
|
-
__export(core_exports, {
|
23
|
-
subscribeToMainThread: () => import_subscribeToMainThread.subscribeToMainThread
|
24
|
-
});
|
25
18
|
module.exports = __toCommonJS(core_exports);
|
26
|
-
var import_subscribeToMainThread = require("./subscribeToMainThread.cjs");
|
27
|
-
// Annotate the CommonJS export names for ESM import in node:
|
28
|
-
0 && (module.exports = {
|
29
|
-
subscribeToMainThread
|
30
|
-
});
|
31
19
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/runtimes/core/index.ts"],"sourcesContent":["export type {\n AddToolResultOptions,\n SubmitFeedbackOptions,\n ThreadSuggestion,\n} from \"./ThreadRuntimeCore\";\n
|
1
|
+
{"version":3,"sources":["../../../src/runtimes/core/index.ts"],"sourcesContent":["export type {\n AddToolResultOptions,\n SubmitFeedbackOptions,\n ThreadSuggestion,\n ThreadMetadataRuntimeCore,\n} from \"./ThreadRuntimeCore\";\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":[
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
@@ -2,7 +2,7 @@ import { ThreadMessage, CoreMessage } from "../../../types";
|
|
2
2
|
type CoreMessageWithConditionalId<T extends boolean> = T extends false ? CoreMessage : CoreMessage & {
|
3
3
|
unstable_id?: string;
|
4
4
|
};
|
5
|
-
export declare const toCoreMessages: <T extends boolean = false>(messages: ThreadMessage[], options?: {
|
5
|
+
export declare const toCoreMessages: <T extends boolean = false>(messages: readonly ThreadMessage[], options?: {
|
6
6
|
unstable_includeId?: T | undefined;
|
7
7
|
}) => CoreMessageWithConditionalId<T>[];
|
8
8
|
export declare const toCoreMessage: <T extends boolean = false>(message: ThreadMessage, options?: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"toCoreMessages.d.ts","sourceRoot":"","sources":["../../../../src/runtimes/edge/converters/toCoreMessages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE5D,KAAK,4BAA4B,CAAC,CAAC,SAAS,OAAO,IAAI,CAAC,SAAS,KAAK,GAClE,WAAW,GACX,WAAW,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3C,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,OAAO,oBACpC,aAAa,EAAE,
|
1
|
+
{"version":3,"file":"toCoreMessages.d.ts","sourceRoot":"","sources":["../../../../src/runtimes/edge/converters/toCoreMessages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE5D,KAAK,4BAA4B,CAAC,CAAC,SAAS,OAAO,IAAI,CAAC,SAAS,KAAK,GAClE,WAAW,GACX,WAAW,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3C,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,OAAO,oBACpC,SAAS,aAAa,EAAE,YACzB;IAAE,kBAAkB,CAAC,EAAE,CAAC,GAAG,SAAS,CAAA;CAAE,KAC9C,4BAA4B,CAAC,CAAC,CAAC,EAEjC,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,OAAO,mBACpC,aAAa,YACb;IAAE,kBAAkB,CAAC,EAAE,CAAC,GAAG,SAAS,CAAA;CAAE,KAC9C,4BAA4B,CAAC,CAAC,CA4ChC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/runtimes/edge/converters/toCoreMessages.ts"],"sourcesContent":["import { ThreadMessage, CoreMessage } from \"../../../types\";\n\ntype CoreMessageWithConditionalId<T extends boolean> = T extends false\n ? CoreMessage\n : CoreMessage & { unstable_id?: string };\n\nexport const toCoreMessages = <T extends boolean = false>(\n messages: ThreadMessage[],\n options: { unstable_includeId?: T | undefined } = {},\n): CoreMessageWithConditionalId<T>[] => {\n return messages.map((message) => toCoreMessage(message, options));\n};\n\nexport const toCoreMessage = <T extends boolean = false>(\n message: ThreadMessage,\n options: { unstable_includeId?: T | undefined } = {},\n): CoreMessageWithConditionalId<T> => {\n const includeId = options.unstable_includeId ?? false;\n const role = message.role;\n switch (role) {\n case \"assistant\":\n return {\n role,\n content: message.content.map((part) => {\n if (part.type === \"ui\") throw new Error(\"UI parts are not supported\");\n if (part.type === \"tool-call\") {\n const { argsText, ...rest } = part;\n return rest;\n }\n return part;\n }),\n ...(includeId ? { unstable_id: message.id } : {}),\n };\n\n case \"user\":\n return {\n role,\n content: [\n ...message.content.map((part) => {\n if (part.type === \"ui\")\n throw new Error(\"UI parts are not supported\");\n return part;\n }),\n ...message.attachments.map((a) => a.content).flat(),\n ],\n ...(includeId ? { unstable_id: message.id } : {}),\n };\n\n case \"system\":\n return {\n role,\n content: message.content,\n ...(includeId ? { unstable_id: message.id } : {}),\n };\n\n default: {\n const unsupportedRole: never = role;\n throw new Error(`Unknown message role: ${unsupportedRole}`);\n }\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,IAAM,iBAAiB,CAC5B,UACA,UAAkD,CAAC,MACb;AACtC,SAAO,SAAS,IAAI,CAAC,YAAY,cAAc,SAAS,OAAO,CAAC;AAClE;AAEO,IAAM,gBAAgB,CAC3B,SACA,UAAkD,CAAC,MACf;AACpC,QAAM,YAAY,QAAQ,sBAAsB;AAChD,QAAM,OAAO,QAAQ;AACrB,UAAQ,MAAM;AAAA,IACZ,KAAK;AACH,aAAO;AAAA,QACL;AAAA,QACA,SAAS,QAAQ,QAAQ,IAAI,CAAC,SAAS;AACrC,cAAI,KAAK,SAAS,KAAM,OAAM,IAAI,MAAM,4BAA4B;AACpE,cAAI,KAAK,SAAS,aAAa;AAC7B,kBAAM,EAAE,UAAU,GAAG,KAAK,IAAI;AAC9B,mBAAO;AAAA,UACT;AACA,iBAAO;AAAA,QACT,CAAC;AAAA,QACD,GAAI,YAAY,EAAE,aAAa,QAAQ,GAAG,IAAI,CAAC;AAAA,MACjD;AAAA,IAEF,KAAK;AACH,aAAO;AAAA,QACL;AAAA,QACA,SAAS;AAAA,UACP,GAAG,QAAQ,QAAQ,IAAI,CAAC,SAAS;AAC/B,gBAAI,KAAK,SAAS;AAChB,oBAAM,IAAI,MAAM,4BAA4B;AAC9C,mBAAO;AAAA,UACT,CAAC;AAAA,UACD,GAAG,QAAQ,YAAY,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK;AAAA,QACpD;AAAA,QACA,GAAI,YAAY,EAAE,aAAa,QAAQ,GAAG,IAAI,CAAC;AAAA,MACjD;AAAA,IAEF,KAAK;AACH,aAAO;AAAA,QACL;AAAA,QACA,SAAS,QAAQ;AAAA,QACjB,GAAI,YAAY,EAAE,aAAa,QAAQ,GAAG,IAAI,CAAC;AAAA,MACjD;AAAA,IAEF,SAAS;AACP,YAAM,kBAAyB;AAC/B,YAAM,IAAI,MAAM,yBAAyB,eAAe,EAAE;AAAA,IAC5D;AAAA,EACF;AACF;","names":[]}
|
1
|
+
{"version":3,"sources":["../../../../src/runtimes/edge/converters/toCoreMessages.ts"],"sourcesContent":["import { ThreadMessage, CoreMessage } from \"../../../types\";\n\ntype CoreMessageWithConditionalId<T extends boolean> = T extends false\n ? CoreMessage\n : CoreMessage & { unstable_id?: string };\n\nexport const toCoreMessages = <T extends boolean = false>(\n messages: readonly ThreadMessage[],\n options: { unstable_includeId?: T | undefined } = {},\n): CoreMessageWithConditionalId<T>[] => {\n return messages.map((message) => toCoreMessage(message, options));\n};\n\nexport const toCoreMessage = <T extends boolean = false>(\n message: ThreadMessage,\n options: { unstable_includeId?: T | undefined } = {},\n): CoreMessageWithConditionalId<T> => {\n const includeId = options.unstable_includeId ?? false;\n const role = message.role;\n switch (role) {\n case \"assistant\":\n return {\n role,\n content: message.content.map((part) => {\n if (part.type === \"ui\") throw new Error(\"UI parts are not supported\");\n if (part.type === \"tool-call\") {\n const { argsText, ...rest } = part;\n return rest;\n }\n return part;\n }),\n ...(includeId ? { unstable_id: message.id } : {}),\n };\n\n case \"user\":\n return {\n role,\n content: [\n ...message.content.map((part) => {\n if (part.type === \"ui\")\n throw new Error(\"UI parts are not supported\");\n return part;\n }),\n ...message.attachments.map((a) => a.content).flat(),\n ],\n ...(includeId ? { unstable_id: message.id } : {}),\n };\n\n case \"system\":\n return {\n role,\n content: message.content,\n ...(includeId ? { unstable_id: message.id } : {}),\n };\n\n default: {\n const unsupportedRole: never = role;\n throw new Error(`Unknown message role: ${unsupportedRole}`);\n }\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,IAAM,iBAAiB,CAC5B,UACA,UAAkD,CAAC,MACb;AACtC,SAAO,SAAS,IAAI,CAAC,YAAY,cAAc,SAAS,OAAO,CAAC;AAClE;AAEO,IAAM,gBAAgB,CAC3B,SACA,UAAkD,CAAC,MACf;AACpC,QAAM,YAAY,QAAQ,sBAAsB;AAChD,QAAM,OAAO,QAAQ;AACrB,UAAQ,MAAM;AAAA,IACZ,KAAK;AACH,aAAO;AAAA,QACL;AAAA,QACA,SAAS,QAAQ,QAAQ,IAAI,CAAC,SAAS;AACrC,cAAI,KAAK,SAAS,KAAM,OAAM,IAAI,MAAM,4BAA4B;AACpE,cAAI,KAAK,SAAS,aAAa;AAC7B,kBAAM,EAAE,UAAU,GAAG,KAAK,IAAI;AAC9B,mBAAO;AAAA,UACT;AACA,iBAAO;AAAA,QACT,CAAC;AAAA,QACD,GAAI,YAAY,EAAE,aAAa,QAAQ,GAAG,IAAI,CAAC;AAAA,MACjD;AAAA,IAEF,KAAK;AACH,aAAO;AAAA,QACL;AAAA,QACA,SAAS;AAAA,UACP,GAAG,QAAQ,QAAQ,IAAI,CAAC,SAAS;AAC/B,gBAAI,KAAK,SAAS;AAChB,oBAAM,IAAI,MAAM,4BAA4B;AAC9C,mBAAO;AAAA,UACT,CAAC;AAAA,UACD,GAAG,QAAQ,YAAY,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK;AAAA,QACpD;AAAA,QACA,GAAI,YAAY,EAAE,aAAa,QAAQ,GAAG,IAAI,CAAC;AAAA,MACjD;AAAA,IAEF,KAAK;AACH,aAAO;AAAA,QACL;AAAA,QACA,SAAS,QAAQ;AAAA,QACjB,GAAI,YAAY,EAAE,aAAa,QAAQ,GAAG,IAAI,CAAC;AAAA,MACjD;AAAA,IAEF,SAAS;AACP,YAAM,kBAAyB;AAC/B,YAAM,IAAI,MAAM,yBAAyB,eAAe,EAAE;AAAA,IAC5D;AAAA,EACF;AACF;","names":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/runtimes/edge/converters/toCoreMessages.ts"],"sourcesContent":["import { ThreadMessage, CoreMessage } from \"../../../types\";\n\ntype CoreMessageWithConditionalId<T extends boolean> = T extends false\n ? CoreMessage\n : CoreMessage & { unstable_id?: string };\n\nexport const toCoreMessages = <T extends boolean = false>(\n messages: ThreadMessage[],\n options: { unstable_includeId?: T | undefined } = {},\n): CoreMessageWithConditionalId<T>[] => {\n return messages.map((message) => toCoreMessage(message, options));\n};\n\nexport const toCoreMessage = <T extends boolean = false>(\n message: ThreadMessage,\n options: { unstable_includeId?: T | undefined } = {},\n): CoreMessageWithConditionalId<T> => {\n const includeId = options.unstable_includeId ?? false;\n const role = message.role;\n switch (role) {\n case \"assistant\":\n return {\n role,\n content: message.content.map((part) => {\n if (part.type === \"ui\") throw new Error(\"UI parts are not supported\");\n if (part.type === \"tool-call\") {\n const { argsText, ...rest } = part;\n return rest;\n }\n return part;\n }),\n ...(includeId ? { unstable_id: message.id } : {}),\n };\n\n case \"user\":\n return {\n role,\n content: [\n ...message.content.map((part) => {\n if (part.type === \"ui\")\n throw new Error(\"UI parts are not supported\");\n return part;\n }),\n ...message.attachments.map((a) => a.content).flat(),\n ],\n ...(includeId ? { unstable_id: message.id } : {}),\n };\n\n case \"system\":\n return {\n role,\n content: message.content,\n ...(includeId ? { unstable_id: message.id } : {}),\n };\n\n default: {\n const unsupportedRole: never = role;\n throw new Error(`Unknown message role: ${unsupportedRole}`);\n }\n }\n};\n"],"mappings":";AAMO,IAAM,iBAAiB,CAC5B,UACA,UAAkD,CAAC,MACb;AACtC,SAAO,SAAS,IAAI,CAAC,YAAY,cAAc,SAAS,OAAO,CAAC;AAClE;AAEO,IAAM,gBAAgB,CAC3B,SACA,UAAkD,CAAC,MACf;AACpC,QAAM,YAAY,QAAQ,sBAAsB;AAChD,QAAM,OAAO,QAAQ;AACrB,UAAQ,MAAM;AAAA,IACZ,KAAK;AACH,aAAO;AAAA,QACL;AAAA,QACA,SAAS,QAAQ,QAAQ,IAAI,CAAC,SAAS;AACrC,cAAI,KAAK,SAAS,KAAM,OAAM,IAAI,MAAM,4BAA4B;AACpE,cAAI,KAAK,SAAS,aAAa;AAC7B,kBAAM,EAAE,UAAU,GAAG,KAAK,IAAI;AAC9B,mBAAO;AAAA,UACT;AACA,iBAAO;AAAA,QACT,CAAC;AAAA,QACD,GAAI,YAAY,EAAE,aAAa,QAAQ,GAAG,IAAI,CAAC;AAAA,MACjD;AAAA,IAEF,KAAK;AACH,aAAO;AAAA,QACL;AAAA,QACA,SAAS;AAAA,UACP,GAAG,QAAQ,QAAQ,IAAI,CAAC,SAAS;AAC/B,gBAAI,KAAK,SAAS;AAChB,oBAAM,IAAI,MAAM,4BAA4B;AAC9C,mBAAO;AAAA,UACT,CAAC;AAAA,UACD,GAAG,QAAQ,YAAY,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK;AAAA,QACpD;AAAA,QACA,GAAI,YAAY,EAAE,aAAa,QAAQ,GAAG,IAAI,CAAC;AAAA,MACjD;AAAA,IAEF,KAAK;AACH,aAAO;AAAA,QACL;AAAA,QACA,SAAS,QAAQ;AAAA,QACjB,GAAI,YAAY,EAAE,aAAa,QAAQ,GAAG,IAAI,CAAC;AAAA,MACjD;AAAA,IAEF,SAAS;AACP,YAAM,kBAAyB;AAC/B,YAAM,IAAI,MAAM,yBAAyB,eAAe,EAAE;AAAA,IAC5D;AAAA,EACF;AACF;","names":[]}
|
1
|
+
{"version":3,"sources":["../../../../src/runtimes/edge/converters/toCoreMessages.ts"],"sourcesContent":["import { ThreadMessage, CoreMessage } from \"../../../types\";\n\ntype CoreMessageWithConditionalId<T extends boolean> = T extends false\n ? CoreMessage\n : CoreMessage & { unstable_id?: string };\n\nexport const toCoreMessages = <T extends boolean = false>(\n messages: readonly ThreadMessage[],\n options: { unstable_includeId?: T | undefined } = {},\n): CoreMessageWithConditionalId<T>[] => {\n return messages.map((message) => toCoreMessage(message, options));\n};\n\nexport const toCoreMessage = <T extends boolean = false>(\n message: ThreadMessage,\n options: { unstable_includeId?: T | undefined } = {},\n): CoreMessageWithConditionalId<T> => {\n const includeId = options.unstable_includeId ?? false;\n const role = message.role;\n switch (role) {\n case \"assistant\":\n return {\n role,\n content: message.content.map((part) => {\n if (part.type === \"ui\") throw new Error(\"UI parts are not supported\");\n if (part.type === \"tool-call\") {\n const { argsText, ...rest } = part;\n return rest;\n }\n return part;\n }),\n ...(includeId ? { unstable_id: message.id } : {}),\n };\n\n case \"user\":\n return {\n role,\n content: [\n ...message.content.map((part) => {\n if (part.type === \"ui\")\n throw new Error(\"UI parts are not supported\");\n return part;\n }),\n ...message.attachments.map((a) => a.content).flat(),\n ],\n ...(includeId ? { unstable_id: message.id } : {}),\n };\n\n case \"system\":\n return {\n role,\n content: message.content,\n ...(includeId ? { unstable_id: message.id } : {}),\n };\n\n default: {\n const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AAE;AAAA,IAC5D;AAAA,EACF;AACF;","names":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createEdgeRuntimeAPI.d.ts","sourceRoot":"","sources":["../../../src/runtimes/edge/createEdgeRuntimeAPI.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,yBAAyB,EAEzB,qBAAqB,EAEtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,WAAW,EAEX,UAAU,EACX,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AAE9E,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,OAAO,EAEL,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,mBAAmB,EACnB,2BAA2B,EAE5B,MAAM,8BAA8B,CAAC;AAItC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,KAAK,YAAY,GAAG;IAClB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,QAAQ,EAAE;QACR
|
1
|
+
{"version":3,"file":"createEdgeRuntimeAPI.d.ts","sourceRoot":"","sources":["../../../src/runtimes/edge/createEdgeRuntimeAPI.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,yBAAyB,EAEzB,qBAAqB,EAEtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,WAAW,EAEX,UAAU,EACX,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AAE9E,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,OAAO,EAEL,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,mBAAmB,EACnB,2BAA2B,EAE5B,MAAM,8BAA8B,CAAC;AAItC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,KAAK,YAAY,GAAG;IAClB,QAA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next-line @typescript-eslint/no-non-null-asserted-optional-chain
|
123
|
-
roundtrips: lastChunk.metadata?.steps,
|
124
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain
|
125
123
|
steps: lastChunk.metadata?.steps
|
126
124
|
}
|
127
125
|
});
|