@assistant-ui/react 0.12.10 → 0.12.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -58
- package/dist/client/ExternalThread.d.ts +1 -1
- package/dist/client/ExternalThread.d.ts.map +1 -1
- package/dist/client/ExternalThread.js +138 -127
- package/dist/client/ExternalThread.js.map +1 -1
- package/dist/client/InMemoryThreadList.d.ts.map +1 -1
- package/dist/client/InMemoryThreadList.js +62 -54
- package/dist/client/InMemoryThreadList.js.map +1 -1
- package/dist/client/index.d.ts +4 -4
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +7 -4
- package/dist/client/index.js.map +1 -1
- package/dist/context/providers/AttachmentByIndexProvider.d.ts +1 -7
- package/dist/context/providers/AttachmentByIndexProvider.d.ts.map +1 -1
- package/dist/context/providers/AttachmentByIndexProvider.js +1 -22
- package/dist/context/providers/AttachmentByIndexProvider.js.map +1 -1
- package/dist/context/providers/ChainOfThoughtByIndicesProvider.d.ts +1 -5
- package/dist/context/providers/ChainOfThoughtByIndicesProvider.d.ts.map +1 -1
- package/dist/context/providers/ChainOfThoughtByIndicesProvider.js +1 -19
- package/dist/context/providers/ChainOfThoughtByIndicesProvider.js.map +1 -1
- package/dist/context/providers/ChainOfThoughtPartByIndexProvider.d.ts +1 -4
- package/dist/context/providers/ChainOfThoughtPartByIndexProvider.d.ts.map +1 -1
- package/dist/context/providers/ChainOfThoughtPartByIndexProvider.js +1 -12
- package/dist/context/providers/ChainOfThoughtPartByIndexProvider.js.map +1 -1
- package/dist/context/providers/MessageByIndexProvider.d.ts +1 -4
- package/dist/context/providers/MessageByIndexProvider.d.ts.map +1 -1
- package/dist/context/providers/MessageByIndexProvider.js +1 -17
- package/dist/context/providers/MessageByIndexProvider.js.map +1 -1
- package/dist/context/providers/MessageProvider.d.ts +1 -1
- package/dist/context/providers/MessageProvider.d.ts.map +1 -1
- package/dist/context/providers/MessageProvider.js +1 -1
- package/dist/context/providers/MessageProvider.js.map +1 -1
- package/dist/context/providers/PartByIndexProvider.d.ts +1 -4
- package/dist/context/providers/PartByIndexProvider.d.ts.map +1 -1
- package/dist/context/providers/PartByIndexProvider.js +1 -12
- package/dist/context/providers/PartByIndexProvider.js.map +1 -1
- package/dist/context/providers/SuggestionByIndexProvider.d.ts +1 -5
- package/dist/context/providers/SuggestionByIndexProvider.d.ts.map +1 -1
- package/dist/context/providers/SuggestionByIndexProvider.js +1 -12
- package/dist/context/providers/SuggestionByIndexProvider.js.map +1 -1
- package/dist/context/providers/TextMessagePartProvider.d.ts +1 -5
- package/dist/context/providers/TextMessagePartProvider.d.ts.map +1 -1
- package/dist/context/providers/TextMessagePartProvider.js +1 -28
- package/dist/context/providers/TextMessagePartProvider.js.map +1 -1
- package/dist/context/providers/ThreadListItemProvider.d.ts +1 -9
- package/dist/context/providers/ThreadListItemProvider.d.ts.map +1 -1
- package/dist/context/providers/ThreadListItemProvider.js +1 -19
- package/dist/context/providers/ThreadListItemProvider.js.map +1 -1
- package/dist/context/providers/index.d.ts +1 -0
- package/dist/context/providers/index.d.ts.map +1 -1
- package/dist/context/providers/index.js +1 -0
- package/dist/context/providers/index.js.map +1 -1
- package/dist/context/react/utils/useRuntimeState.d.ts +1 -1
- package/dist/context/react/utils/useRuntimeState.d.ts.map +1 -1
- package/dist/context/react/utils/useRuntimeState.js.map +1 -1
- package/dist/context/stores/ThreadViewport.d.ts +1 -1
- package/dist/context/stores/ThreadViewport.d.ts.map +1 -1
- package/dist/context/stores/ThreadViewport.js.map +1 -1
- package/dist/devtools/DevToolsHooks.d.ts +1 -1
- package/dist/devtools/DevToolsHooks.d.ts.map +1 -1
- package/dist/hooks/useMessageQuote.d.ts +1 -1
- package/dist/hooks/useMessageQuote.d.ts.map +1 -1
- package/dist/hooks/useMessageTiming.d.ts +17 -0
- package/dist/hooks/useMessageTiming.d.ts.map +1 -0
- package/dist/hooks/useMessageTiming.js +20 -0
- package/dist/hooks/useMessageTiming.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +3 -11
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +3 -9
- package/dist/internal.js.map +1 -1
- package/dist/legacy-runtime/AssistantRuntimeProvider.d.ts.map +1 -1
- package/dist/legacy-runtime/AssistantRuntimeProvider.js +8 -9
- package/dist/legacy-runtime/AssistantRuntimeProvider.js.map +1 -1
- package/dist/legacy-runtime/RuntimeAdapter.d.ts +1 -2
- package/dist/legacy-runtime/RuntimeAdapter.d.ts.map +1 -1
- package/dist/legacy-runtime/RuntimeAdapter.js +1 -35
- package/dist/legacy-runtime/RuntimeAdapter.js.map +1 -1
- package/dist/legacy-runtime/cloud/AssistantCloudThreadHistoryAdapter.d.ts +2 -2
- package/dist/legacy-runtime/cloud/AssistantCloudThreadHistoryAdapter.d.ts.map +1 -1
- package/dist/legacy-runtime/cloud/AssistantCloudThreadHistoryAdapter.js +384 -80
- package/dist/legacy-runtime/cloud/AssistantCloudThreadHistoryAdapter.js.map +1 -1
- package/dist/legacy-runtime/cloud/auiV0.d.ts +8 -9
- package/dist/legacy-runtime/cloud/auiV0.d.ts.map +1 -1
- package/dist/legacy-runtime/cloud/auiV0.js +20 -45
- package/dist/legacy-runtime/cloud/auiV0.js.map +1 -1
- package/dist/legacy-runtime/cloud/useCloudThreadListRuntime.d.ts +1 -1
- package/dist/legacy-runtime/cloud/useCloudThreadListRuntime.d.ts.map +1 -1
- package/dist/legacy-runtime/cloud/useCloudThreadListRuntime.js +4 -5
- package/dist/legacy-runtime/cloud/useCloudThreadListRuntime.js.map +1 -1
- package/dist/legacy-runtime/hooks/AssistantContext.d.ts +11 -11
- package/dist/legacy-runtime/hooks/AttachmentContext.d.ts +436 -268
- package/dist/legacy-runtime/hooks/AttachmentContext.d.ts.map +1 -1
- package/dist/legacy-runtime/hooks/ComposerContext.d.ts +11 -11
- package/dist/legacy-runtime/hooks/MessageContext.d.ts +22 -22
- package/dist/legacy-runtime/hooks/MessagePartContext.d.ts +11 -11
- package/dist/legacy-runtime/hooks/ThreadContext.d.ts +22 -22
- package/dist/legacy-runtime/hooks/ThreadListItemContext.d.ts +11 -11
- package/dist/legacy-runtime/runtime/AssistantRuntime.d.ts +2 -63
- package/dist/legacy-runtime/runtime/AssistantRuntime.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime/AssistantRuntime.js +1 -45
- package/dist/legacy-runtime/runtime/AssistantRuntime.js.map +1 -1
- package/dist/legacy-runtime/runtime/AttachmentRuntime.d.ts +2 -62
- package/dist/legacy-runtime/runtime/AttachmentRuntime.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime/AttachmentRuntime.js +1 -55
- package/dist/legacy-runtime/runtime/AttachmentRuntime.js.map +1 -1
- package/dist/legacy-runtime/runtime/ComposerRuntime.d.ts +3 -183
- package/dist/legacy-runtime/runtime/ComposerRuntime.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime/ComposerRuntime.js +1 -249
- package/dist/legacy-runtime/runtime/ComposerRuntime.js.map +1 -1
- package/dist/legacy-runtime/runtime/MessagePartRuntime.d.ts +2 -39
- package/dist/legacy-runtime/runtime/MessagePartRuntime.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime/MessagePartRuntime.js +1 -66
- package/dist/legacy-runtime/runtime/MessagePartRuntime.js.map +1 -1
- package/dist/legacy-runtime/runtime/MessageRuntime.d.ts +3 -91
- package/dist/legacy-runtime/runtime/MessageRuntime.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime/MessageRuntime.js +1 -200
- package/dist/legacy-runtime/runtime/MessageRuntime.js.map +1 -1
- package/dist/legacy-runtime/runtime/RuntimeBindings.d.ts +2 -36
- package/dist/legacy-runtime/runtime/RuntimeBindings.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime/RuntimeBindings.js +3 -0
- package/dist/legacy-runtime/runtime/RuntimeBindings.js.map +1 -1
- package/dist/legacy-runtime/runtime/RuntimePathTypes.d.ts +1 -63
- package/dist/legacy-runtime/runtime/RuntimePathTypes.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime/ThreadListItemRuntime.d.ts +4 -49
- package/dist/legacy-runtime/runtime/ThreadListItemRuntime.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime/ThreadListItemRuntime.js +1 -87
- package/dist/legacy-runtime/runtime/ThreadListItemRuntime.js.map +1 -1
- package/dist/legacy-runtime/runtime/ThreadListRuntime.d.ts +3 -43
- package/dist/legacy-runtime/runtime/ThreadListRuntime.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime/ThreadListRuntime.js +1 -138
- package/dist/legacy-runtime/runtime/ThreadListRuntime.js.map +1 -1
- package/dist/legacy-runtime/runtime/ThreadRuntime.d.ts +3 -272
- package/dist/legacy-runtime/runtime/ThreadRuntime.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime/ThreadRuntime.js +1 -242
- package/dist/legacy-runtime/runtime/ThreadRuntime.js.map +1 -1
- package/dist/legacy-runtime/runtime/index.d.ts +1 -8
- package/dist/legacy-runtime/runtime/index.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/adapters/RuntimeAdapterProvider.d.ts +1 -2
- package/dist/legacy-runtime/runtime-cores/adapters/RuntimeAdapterProvider.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/adapters/RuntimeAdapterProvider.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/CloudFileAttachmentAdapter.d.ts +1 -2
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/CloudFileAttachmentAdapter.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/CloudFileAttachmentAdapter.js +1 -1
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/CloudFileAttachmentAdapter.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/index.d.ts +2 -4
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/index.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/index.js +2 -3
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/index.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/adapters/feedback/index.d.ts +1 -1
- package/dist/legacy-runtime/runtime-cores/adapters/feedback/index.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/adapters/speech/index.d.ts +2 -3
- package/dist/legacy-runtime/runtime-cores/adapters/speech/index.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/adapters/speech/index.js +1 -2
- package/dist/legacy-runtime/runtime-cores/adapters/speech/index.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/adapters/suggestion/index.d.ts +1 -1
- package/dist/legacy-runtime/runtime-cores/adapters/suggestion/index.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/adapters/thread-history/index.d.ts +1 -2
- package/dist/legacy-runtime/runtime-cores/adapters/thread-history/index.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/adapters/thread-history/index.js +1 -2
- package/dist/legacy-runtime/runtime-cores/adapters/thread-history/index.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/index.d.ts +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/index.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/types.d.ts +23 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/types.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/types.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/useAssistantTransportRuntime.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/useAssistantTransportRuntime.js +19 -15
- package/dist/legacy-runtime/runtime-cores/assistant-transport/useAssistantTransportRuntime.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/useToolInvocations.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/useToolInvocations.js +119 -28
- package/dist/legacy-runtime/runtime-cores/assistant-transport/useToolInvocations.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/utils.d.ts +1 -10
- package/dist/legacy-runtime/runtime-cores/assistant-transport/utils.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/utils.js +1 -19
- package/dist/legacy-runtime/runtime-cores/assistant-transport/utils.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/composer/BaseComposerRuntimeCore.d.ts +1 -57
- package/dist/legacy-runtime/runtime-cores/composer/BaseComposerRuntimeCore.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/composer/BaseComposerRuntimeCore.js +1 -326
- package/dist/legacy-runtime/runtime-cores/composer/BaseComposerRuntimeCore.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/composer/DefaultEditComposerRuntimeCore.d.ts +1 -27
- package/dist/legacy-runtime/runtime-cores/composer/DefaultEditComposerRuntimeCore.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/composer/DefaultEditComposerRuntimeCore.js +1 -49
- package/dist/legacy-runtime/runtime-cores/composer/DefaultEditComposerRuntimeCore.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/composer/DefaultThreadComposerRuntimeCore.d.ts +1 -23
- package/dist/legacy-runtime/runtime-cores/composer/DefaultThreadComposerRuntimeCore.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/composer/DefaultThreadComposerRuntimeCore.js +1 -40
- package/dist/legacy-runtime/runtime-cores/composer/DefaultThreadComposerRuntimeCore.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/core/AssistantRuntimeCore.d.ts +1 -16
- package/dist/legacy-runtime/runtime-cores/core/AssistantRuntimeCore.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/core/AssistantRuntimeCore.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/core/BaseAssistantRuntimeCore.d.ts +1 -11
- package/dist/legacy-runtime/runtime-cores/core/BaseAssistantRuntimeCore.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/core/BaseAssistantRuntimeCore.js +1 -10
- package/dist/legacy-runtime/runtime-cores/core/BaseAssistantRuntimeCore.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/core/BaseThreadRuntimeCore.d.ts +1 -66
- package/dist/legacy-runtime/runtime-cores/core/BaseThreadRuntimeCore.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/core/BaseThreadRuntimeCore.js +1 -159
- package/dist/legacy-runtime/runtime-cores/core/BaseThreadRuntimeCore.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/core/ComposerRuntimeCore.d.ts +1 -64
- package/dist/legacy-runtime/runtime-cores/core/ComposerRuntimeCore.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/core/ComposerRuntimeCore.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/core/ThreadListRuntimeCore.d.ts +1 -36
- package/dist/legacy-runtime/runtime-cores/core/ThreadListRuntimeCore.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/core/ThreadListRuntimeCore.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/core/ThreadRuntimeCore.d.ts +1 -110
- package/dist/legacy-runtime/runtime-cores/core/ThreadRuntimeCore.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/core/ThreadRuntimeCore.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/core/index.d.ts +1 -2
- package/dist/legacy-runtime/runtime-cores/core/index.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/ExternalStoreAdapter.d.ts +1 -80
- package/dist/legacy-runtime/runtime-cores/external-store/ExternalStoreAdapter.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/ExternalStoreAdapter.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/ExternalStoreRuntimeCore.d.ts +1 -8
- package/dist/legacy-runtime/runtime-cores/external-store/ExternalStoreRuntimeCore.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/ExternalStoreRuntimeCore.js +1 -18
- package/dist/legacy-runtime/runtime-cores/external-store/ExternalStoreRuntimeCore.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/ExternalStoreThreadListRuntimeCore.d.ts +2 -41
- package/dist/legacy-runtime/runtime-cores/external-store/ExternalStoreThreadListRuntimeCore.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/ExternalStoreThreadListRuntimeCore.js +1 -173
- package/dist/legacy-runtime/runtime-cores/external-store/ExternalStoreThreadListRuntimeCore.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/ExternalStoreThreadRuntimeCore.d.ts +1 -46
- package/dist/legacy-runtime/runtime-cores/external-store/ExternalStoreThreadRuntimeCore.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/ExternalStoreThreadRuntimeCore.js +1 -259
- package/dist/legacy-runtime/runtime-cores/external-store/ExternalStoreThreadRuntimeCore.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/ThreadMessageConverter.d.ts +2 -6
- package/dist/legacy-runtime/runtime-cores/external-store/ThreadMessageConverter.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/ThreadMessageConverter.js +1 -11
- package/dist/legacy-runtime/runtime-cores/external-store/ThreadMessageConverter.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/ThreadMessageLike.d.ts +2 -33
- package/dist/legacy-runtime/runtime-cores/external-store/ThreadMessageLike.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/ThreadMessageLike.js +1 -126
- package/dist/legacy-runtime/runtime-cores/external-store/ThreadMessageLike.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/auto-status.d.ts +1 -4
- package/dist/legacy-runtime/runtime-cores/external-store/auto-status.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/auto-status.js +1 -31
- package/dist/legacy-runtime/runtime-cores/external-store/auto-status.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/createMessageConverter.d.ts +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/createMessageConverter.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/createMessageConverter.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/external-message-converter.d.ts +2 -1
- package/dist/legacy-runtime/runtime-cores/external-store/external-message-converter.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/external-message-converter.js +12 -7
- package/dist/legacy-runtime/runtime-cores/external-store/external-message-converter.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/getExternalStoreMessage.d.ts +2 -8
- package/dist/legacy-runtime/runtime-cores/external-store/getExternalStoreMessage.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/getExternalStoreMessage.js +2 -22
- package/dist/legacy-runtime/runtime-cores/external-store/getExternalStoreMessage.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/index.d.ts +3 -3
- package/dist/legacy-runtime/runtime-cores/external-store/index.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/index.js +2 -1
- package/dist/legacy-runtime/runtime-cores/external-store/index.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/useExternalStoreRuntime.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/useExternalStoreRuntime.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/index.d.ts +2 -1
- package/dist/legacy-runtime/runtime-cores/index.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/index.js +1 -1
- package/dist/legacy-runtime/runtime-cores/index.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/local/ChatModelAdapter.d.ts +1 -38
- package/dist/legacy-runtime/runtime-cores/local/ChatModelAdapter.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/local/ChatModelAdapter.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/local/LocalRuntimeCore.d.ts +1 -10
- package/dist/legacy-runtime/runtime-cores/local/LocalRuntimeCore.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/local/LocalRuntimeCore.js +1 -21
- package/dist/legacy-runtime/runtime-cores/local/LocalRuntimeCore.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/local/LocalRuntimeOptions.d.ts +10 -30
- package/dist/legacy-runtime/runtime-cores/local/LocalRuntimeOptions.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/local/LocalRuntimeOptions.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/local/LocalThreadListRuntimeCore.d.ts +2 -45
- package/dist/legacy-runtime/runtime-cores/local/LocalThreadListRuntimeCore.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/local/LocalThreadListRuntimeCore.js +1 -86
- package/dist/legacy-runtime/runtime-cores/local/LocalThreadListRuntimeCore.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/local/LocalThreadRuntimeCore.d.ts +1 -58
- package/dist/legacy-runtime/runtime-cores/local/LocalThreadRuntimeCore.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/local/LocalThreadRuntimeCore.js +1 -415
- package/dist/legacy-runtime/runtime-cores/local/LocalThreadRuntimeCore.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/local/index.d.ts +1 -1
- package/dist/legacy-runtime/runtime-cores/local/index.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/local/index.js +1 -0
- package/dist/legacy-runtime/runtime-cores/local/index.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/local/shouldContinue.d.ts +1 -2
- package/dist/legacy-runtime/runtime-cores/local/shouldContinue.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/local/shouldContinue.js +1 -13
- package/dist/legacy-runtime/runtime-cores/local/shouldContinue.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/local/useLocalRuntime.d.ts +1 -1
- package/dist/legacy-runtime/runtime-cores/local/useLocalRuntime.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/local/useLocalRuntime.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/BaseSubscribable.d.ts +1 -7
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/BaseSubscribable.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/BaseSubscribable.js +1 -37
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/BaseSubscribable.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/EMPTY_THREAD_CORE.d.ts +1 -2
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/EMPTY_THREAD_CORE.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/EMPTY_THREAD_CORE.js +1 -145
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/EMPTY_THREAD_CORE.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/OptimisticState.d.ts +1 -22
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/OptimisticState.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/OptimisticState.js +1 -56
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/OptimisticState.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListHookInstanceManager.d.ts +39 -39
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListHookInstanceManager.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListHookInstanceManager.js +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListHookInstanceManager.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListThreadListRuntimeCore.d.ts +41 -67
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListThreadListRuntimeCore.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListThreadListRuntimeCore.js +13 -72
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListThreadListRuntimeCore.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/adapter/cloud.d.ts +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/adapter/cloud.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/adapter/cloud.js +10 -3
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/adapter/cloud.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/adapter/in-memory.d.ts +1 -12
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/adapter/in-memory.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/adapter/in-memory.js +1 -28
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/adapter/in-memory.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/index.d.ts +2 -2
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/index.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/index.js +2 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/index.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/types.d.ts +1 -38
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/types.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/types.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/useRemoteThreadListRuntime.d.ts +2 -2
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/useRemoteThreadListRuntime.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/useRemoteThreadListRuntime.js +15 -6
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/useRemoteThreadListRuntime.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/utils/MessageRepository.d.ts +3 -163
- package/dist/legacy-runtime/runtime-cores/utils/MessageRepository.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/utils/MessageRepository.js +2 -393
- package/dist/legacy-runtime/runtime-cores/utils/MessageRepository.js.map +1 -1
- package/dist/model-context/frame/index.d.ts +4 -3
- package/dist/model-context/frame/index.d.ts.map +1 -1
- package/dist/model-context/frame/index.js +3 -3
- package/dist/model-context/frame/index.js.map +1 -1
- package/dist/model-context/frame/useAssistantFrameHost.d.ts +2 -2
- package/dist/model-context/frame/useAssistantFrameHost.d.ts.map +1 -1
- package/dist/model-context/frame/useAssistantFrameHost.js +1 -1
- package/dist/model-context/frame/useAssistantFrameHost.js.map +1 -1
- package/dist/model-context/index.d.ts +5 -11
- package/dist/model-context/index.d.ts.map +1 -1
- package/dist/model-context/index.js +7 -9
- package/dist/model-context/index.js.map +1 -1
- package/dist/model-context/makeAssistantVisible.js +1 -1
- package/dist/model-context/makeAssistantVisible.js.map +1 -1
- package/dist/model-context/registry/index.d.ts +2 -2
- package/dist/model-context/registry/index.d.ts.map +1 -1
- package/dist/model-context/registry/index.js +1 -2
- package/dist/model-context/registry/index.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarEdit.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarEdit.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarReload.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarReload.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarSpeak.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarSpeak.js.map +1 -1
- package/dist/primitives/actionBar/useActionBarFloatStatus.d.ts.map +1 -1
- package/dist/primitives/actionBar/useActionBarFloatStatus.js.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreContent.d.ts +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreContent.d.ts.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreContent.js +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreContent.js.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreItem.d.ts +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreItem.d.ts.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreItem.js +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreItem.js.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreRoot.d.ts +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreRoot.d.ts.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreRoot.js +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreRoot.js.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreSeparator.d.ts +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreSeparator.d.ts.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreSeparator.js +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreSeparator.js.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreTrigger.d.ts +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreTrigger.d.ts.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreTrigger.js +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreTrigger.js.map +1 -1
- package/dist/primitives/actionBarMore/scope.d.ts +1 -1
- package/dist/primitives/actionBarMore/scope.d.ts.map +1 -1
- package/dist/primitives/actionBarMore/scope.js +1 -1
- package/dist/primitives/actionBarMore/scope.js.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalAnchor.d.ts +1 -1
- package/dist/primitives/assistantModal/AssistantModalAnchor.d.ts.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalAnchor.js +1 -1
- package/dist/primitives/assistantModal/AssistantModalAnchor.js.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalContent.d.ts +1 -1
- package/dist/primitives/assistantModal/AssistantModalContent.d.ts.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalContent.js +1 -1
- package/dist/primitives/assistantModal/AssistantModalContent.js.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalRoot.d.ts +1 -1
- package/dist/primitives/assistantModal/AssistantModalRoot.d.ts.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalRoot.js +1 -1
- package/dist/primitives/assistantModal/AssistantModalRoot.js.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalTrigger.d.ts +1 -1
- package/dist/primitives/assistantModal/AssistantModalTrigger.d.ts.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalTrigger.js +1 -1
- package/dist/primitives/assistantModal/AssistantModalTrigger.js.map +1 -1
- package/dist/primitives/assistantModal/scope.d.ts +1 -1
- package/dist/primitives/assistantModal/scope.d.ts.map +1 -1
- package/dist/primitives/assistantModal/scope.js +1 -1
- package/dist/primitives/assistantModal/scope.js.map +1 -1
- package/dist/primitives/attachment/AttachmentRemove.d.ts.map +1 -1
- package/dist/primitives/attachment/AttachmentRemove.js.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerNext.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerNext.js.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerPrevious.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerPrevious.js.map +1 -1
- package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.d.ts.map +1 -1
- package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.js.map +1 -1
- package/dist/primitives/chainOfThought/ChainOfThoughtParts.d.ts +1 -38
- package/dist/primitives/chainOfThought/ChainOfThoughtParts.d.ts.map +1 -1
- package/dist/primitives/chainOfThought/ChainOfThoughtParts.js +1 -38
- package/dist/primitives/chainOfThought/ChainOfThoughtParts.js.map +1 -1
- package/dist/primitives/composer/ComposerAddAttachment.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerAddAttachment.js.map +1 -1
- package/dist/primitives/composer/ComposerAttachmentDropzone.js +2 -2
- package/dist/primitives/composer/ComposerAttachmentDropzone.js.map +1 -1
- package/dist/primitives/composer/ComposerAttachments.d.ts +1 -36
- package/dist/primitives/composer/ComposerAttachments.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerAttachments.js +1 -61
- package/dist/primitives/composer/ComposerAttachments.js.map +1 -1
- package/dist/primitives/composer/ComposerCancel.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerCancel.js.map +1 -1
- package/dist/primitives/composer/ComposerDictate.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerDictate.js.map +1 -1
- package/dist/primitives/composer/ComposerIf.d.ts +2 -17
- package/dist/primitives/composer/ComposerIf.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerIf.js +1 -23
- package/dist/primitives/composer/ComposerIf.js.map +1 -1
- package/dist/primitives/composer/ComposerInput.js +2 -2
- package/dist/primitives/composer/ComposerInput.js.map +1 -1
- package/dist/primitives/composer/ComposerSend.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerSend.js.map +1 -1
- package/dist/primitives/composer/ComposerStopDictation.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerStopDictation.js.map +1 -1
- package/dist/primitives/index.d.ts +1 -0
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js +1 -0
- package/dist/primitives/index.js.map +1 -1
- package/dist/primitives/message/MessageAttachments.d.ts +1 -36
- package/dist/primitives/message/MessageAttachments.d.ts.map +1 -1
- package/dist/primitives/message/MessageAttachments.js +1 -65
- package/dist/primitives/message/MessageAttachments.js.map +1 -1
- package/dist/primitives/message/MessageError.d.ts.map +1 -1
- package/dist/primitives/message/MessageError.js.map +1 -1
- package/dist/primitives/message/MessageIf.d.ts +1 -1
- package/dist/primitives/message/MessageIf.d.ts.map +1 -1
- package/dist/primitives/message/MessageIf.js +1 -1
- package/dist/primitives/message/MessageIf.js.map +1 -1
- package/dist/primitives/message/MessageParts.d.ts +5 -211
- package/dist/primitives/message/MessageParts.d.ts.map +1 -1
- package/dist/primitives/message/MessageParts.js +29 -256
- package/dist/primitives/message/MessageParts.js.map +1 -1
- package/dist/primitives/message/MessagePartsGrouped.d.ts +8 -1
- package/dist/primitives/message/MessagePartsGrouped.d.ts.map +1 -1
- package/dist/primitives/message/MessagePartsGrouped.js +19 -5
- package/dist/primitives/message/MessagePartsGrouped.js.map +1 -1
- package/dist/primitives/messagePart/MessagePartInProgress.d.ts.map +1 -1
- package/dist/primitives/messagePart/MessagePartInProgress.js.map +1 -1
- package/dist/primitives/messagePart/useMessagePartData.d.ts +1 -1
- package/dist/primitives/messagePart/useMessagePartData.d.ts.map +1 -1
- package/dist/primitives/messagePart/useMessagePartData.js.map +1 -1
- package/dist/primitives/messagePart/useMessagePartFile.d.ts +2 -2
- package/dist/primitives/messagePart/useMessagePartFile.d.ts.map +1 -1
- package/dist/primitives/messagePart/useMessagePartFile.js.map +1 -1
- package/dist/primitives/messagePart/useMessagePartImage.d.ts +2 -2
- package/dist/primitives/messagePart/useMessagePartImage.d.ts.map +1 -1
- package/dist/primitives/messagePart/useMessagePartImage.js.map +1 -1
- package/dist/primitives/messagePart/useMessagePartReasoning.d.ts +2 -2
- package/dist/primitives/messagePart/useMessagePartReasoning.d.ts.map +1 -1
- package/dist/primitives/messagePart/useMessagePartReasoning.js.map +1 -1
- package/dist/primitives/messagePart/useMessagePartSource.d.ts +2 -2
- package/dist/primitives/messagePart/useMessagePartSource.d.ts.map +1 -1
- package/dist/primitives/messagePart/useMessagePartSource.js.map +1 -1
- package/dist/primitives/messagePart/useMessagePartText.d.ts +3 -3
- package/dist/primitives/messagePart/useMessagePartText.d.ts.map +1 -1
- package/dist/primitives/messagePart/useMessagePartText.js.map +1 -1
- package/dist/primitives/reasoning/useScrollLock.d.ts.map +1 -1
- package/dist/primitives/reasoning/useScrollLock.js.map +1 -1
- package/dist/primitives/selectionToolbar/SelectionToolbarQuote.js +1 -1
- package/dist/primitives/selectionToolbar/SelectionToolbarQuote.js.map +1 -1
- package/dist/primitives/suggestion/SuggestionTrigger.d.ts.map +1 -1
- package/dist/primitives/suggestion/SuggestionTrigger.js.map +1 -1
- package/dist/primitives/thread/ThreadEmpty.d.ts +3 -0
- package/dist/primitives/thread/ThreadEmpty.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadEmpty.js +4 -1
- package/dist/primitives/thread/ThreadEmpty.js.map +1 -1
- package/dist/primitives/thread/ThreadIf.d.ts +1 -1
- package/dist/primitives/thread/ThreadIf.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadIf.js +1 -1
- package/dist/primitives/thread/ThreadIf.js.map +1 -1
- package/dist/primitives/thread/ThreadMessages.d.ts +1 -94
- package/dist/primitives/thread/ThreadMessages.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadMessages.js +1 -109
- package/dist/primitives/thread/ThreadMessages.js.map +1 -1
- package/dist/primitives/thread/ThreadScrollToBottom.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadScrollToBottom.js.map +1 -1
- package/dist/primitives/thread/ThreadSuggestion.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadSuggestion.js.map +1 -1
- package/dist/primitives/thread/ThreadSuggestions.d.ts +1 -52
- package/dist/primitives/thread/ThreadSuggestions.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadSuggestions.js +1 -56
- package/dist/primitives/thread/ThreadSuggestions.js.map +1 -1
- package/dist/primitives/thread/ThreadViewportSlack.js +2 -2
- package/dist/primitives/thread/ThreadViewportSlack.js.map +1 -1
- package/dist/primitives/thread/useThreadViewportAutoScroll.d.ts.map +1 -1
- package/dist/primitives/thread/useThreadViewportAutoScroll.js.map +1 -1
- package/dist/primitives/threadList/ThreadListItems.d.ts +1 -34
- package/dist/primitives/threadList/ThreadListItems.d.ts.map +1 -1
- package/dist/primitives/threadList/ThreadListItems.js +1 -35
- package/dist/primitives/threadList/ThreadListItems.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemTitle.d.ts +1 -7
- package/dist/primitives/threadListItem/ThreadListItemTitle.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemTitle.js +1 -7
- package/dist/primitives/threadListItem/ThreadListItemTitle.js.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreContent.d.ts +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreContent.d.ts.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreContent.js +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreContent.js.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreItem.d.ts +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreItem.d.ts.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreItem.js +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreItem.js.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreRoot.d.ts +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreRoot.d.ts.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreRoot.js +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreRoot.js.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreSeparator.d.ts +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreSeparator.d.ts.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreSeparator.js +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreSeparator.js.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreTrigger.d.ts +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreTrigger.d.ts.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreTrigger.js +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreTrigger.js.map +1 -1
- package/dist/primitives/threadListItemMore/scope.d.ts +1 -1
- package/dist/primitives/threadListItemMore/scope.d.ts.map +1 -1
- package/dist/primitives/threadListItemMore/scope.js +1 -1
- package/dist/primitives/threadListItemMore/scope.js.map +1 -1
- package/dist/types/index.d.ts +3 -6
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/scopes/index.d.ts +2 -12
- package/dist/types/scopes/index.d.ts.map +1 -1
- package/dist/utils/RequireAtLeastOne.d.ts.map +1 -1
- package/dist/utils/RequireAtLeastOne.js.map +1 -1
- package/dist/utils/hooks/useOnResizeContent.d.ts.map +1 -1
- package/dist/utils/hooks/useOnResizeContent.js.map +1 -1
- package/dist/utils/hooks/useOnScrollToBottom.d.ts.map +1 -1
- package/dist/utils/hooks/useOnScrollToBottom.js.map +1 -1
- package/dist/utils/smooth/useSmooth.d.ts +1 -2
- package/dist/utils/smooth/useSmooth.d.ts.map +1 -1
- package/dist/utils/smooth/useSmooth.js +17 -7
- package/dist/utils/smooth/useSmooth.js.map +1 -1
- package/dist/utils/useToolArgsFieldStatus.d.ts.map +1 -1
- package/dist/utils/useToolArgsFieldStatus.js.map +1 -1
- package/package.json +11 -10
- package/src/client/ExternalThread.ts +148 -135
- package/src/client/InMemoryThreadList.ts +68 -55
- package/src/client/index.ts +9 -4
- package/src/context/providers/AttachmentByIndexProvider.tsx +4 -34
- package/src/context/providers/ChainOfThoughtByIndicesProvider.tsx +1 -34
- package/src/context/providers/ChainOfThoughtPartByIndexProvider.tsx +1 -18
- package/src/context/providers/MessageByIndexProvider.tsx +1 -23
- package/src/context/providers/MessageProvider.tsx +2 -2
- package/src/context/providers/PartByIndexProvider.tsx +1 -18
- package/src/context/providers/SuggestionByIndexProvider.tsx +4 -21
- package/src/context/providers/TextMessagePartProvider.tsx +1 -49
- package/src/context/providers/ThreadListItemProvider.tsx +4 -33
- package/src/context/providers/index.ts +1 -0
- package/src/context/react/utils/useRuntimeState.ts +1 -1
- package/src/context/stores/{ThreadViewport.tsx → ThreadViewport.ts} +1 -1
- package/src/devtools/DevToolsHooks.ts +1 -1
- package/src/hooks/useMessageQuote.ts +1 -1
- package/src/hooks/useMessageTiming.ts +24 -0
- package/src/index.ts +1 -1
- package/src/internal.ts +22 -13
- package/src/legacy-runtime/AssistantRuntimeProvider.tsx +12 -18
- package/src/legacy-runtime/RuntimeAdapter.ts +1 -48
- package/src/legacy-runtime/cloud/AssistantCloudThreadHistoryAdapter.ts +646 -0
- package/src/legacy-runtime/cloud/auiV0.ts +29 -53
- package/src/legacy-runtime/cloud/{useCloudThreadListRuntime.tsx → useCloudThreadListRuntime.ts} +5 -7
- package/src/legacy-runtime/runtime/AssistantRuntime.ts +2 -111
- package/src/legacy-runtime/runtime/AttachmentRuntime.ts +7 -119
- package/src/legacy-runtime/runtime/ComposerRuntime.ts +15 -497
- package/src/legacy-runtime/runtime/MessagePartRuntime.ts +2 -117
- package/src/legacy-runtime/runtime/MessageRuntime.ts +3 -335
- package/src/legacy-runtime/runtime/RuntimeBindings.ts +12 -69
- package/src/legacy-runtime/runtime/RuntimePathTypes.ts +8 -61
- package/src/legacy-runtime/runtime/ThreadListItemRuntime.ts +7 -152
- package/src/legacy-runtime/runtime/ThreadListRuntime.ts +6 -224
- package/src/legacy-runtime/runtime/ThreadRuntime.ts +14 -561
- package/src/legacy-runtime/runtime/index.ts +10 -13
- package/src/legacy-runtime/runtime-cores/adapters/RuntimeAdapterProvider.tsx +4 -2
- package/src/legacy-runtime/runtime-cores/adapters/attachment/CloudFileAttachmentAdapter.ts +5 -5
- package/src/legacy-runtime/runtime-cores/adapters/attachment/index.ts +9 -4
- package/src/legacy-runtime/runtime-cores/adapters/feedback/index.ts +2 -1
- package/src/legacy-runtime/runtime-cores/adapters/speech/index.ts +6 -3
- package/src/legacy-runtime/runtime-cores/adapters/suggestion/index.ts +2 -1
- package/src/legacy-runtime/runtime-cores/adapters/thread-history/index.ts +9 -2
- package/src/legacy-runtime/runtime-cores/assistant-transport/index.ts +1 -0
- package/src/legacy-runtime/runtime-cores/assistant-transport/transport-scheduling.test.ts +136 -0
- package/src/legacy-runtime/runtime-cores/assistant-transport/types.ts +26 -1
- package/src/legacy-runtime/runtime-cores/assistant-transport/{useAssistantTransportRuntime.tsx → useAssistantTransportRuntime.ts} +27 -18
- package/src/legacy-runtime/runtime-cores/assistant-transport/useToolInvocations.test.ts +223 -0
- package/src/legacy-runtime/runtime-cores/assistant-transport/useToolInvocations.ts +171 -42
- package/src/legacy-runtime/runtime-cores/assistant-transport/utils.ts +5 -37
- package/src/legacy-runtime/runtime-cores/composer/BaseComposerRuntimeCore.ts +1 -0
- package/src/legacy-runtime/runtime-cores/composer/DefaultEditComposerRuntimeCore.ts +1 -0
- package/src/legacy-runtime/runtime-cores/composer/DefaultThreadComposerRuntimeCore.ts +1 -0
- package/src/legacy-runtime/runtime-cores/core/AssistantRuntimeCore.ts +1 -0
- package/src/legacy-runtime/runtime-cores/core/BaseAssistantRuntimeCore.ts +1 -0
- package/src/legacy-runtime/runtime-cores/core/BaseThreadRuntimeCore.ts +1 -0
- package/src/legacy-runtime/runtime-cores/core/ComposerRuntimeCore.ts +6 -0
- package/src/legacy-runtime/runtime-cores/core/ThreadListRuntimeCore.ts +4 -0
- package/src/legacy-runtime/runtime-cores/core/ThreadRuntimeCore.ts +13 -0
- package/src/legacy-runtime/runtime-cores/core/index.ts +3 -3
- package/src/legacy-runtime/runtime-cores/external-store/ExternalStoreAdapter.ts +6 -0
- package/src/legacy-runtime/runtime-cores/external-store/ExternalStoreRuntimeCore.ts +1 -0
- package/src/legacy-runtime/runtime-cores/external-store/ExternalStoreThreadListRuntimeCore.ts +2 -0
- package/src/legacy-runtime/runtime-cores/external-store/ExternalStoreThreadRuntimeCore.ts +4 -0
- package/src/legacy-runtime/runtime-cores/external-store/ThreadMessageConverter.ts +2 -23
- package/src/legacy-runtime/runtime-cores/external-store/ThreadMessageLike.ts +2 -0
- package/src/legacy-runtime/runtime-cores/external-store/auto-status.ts +1 -0
- package/src/legacy-runtime/runtime-cores/external-store/{createMessageConverter.tsx → createMessageConverter.ts} +1 -1
- package/src/legacy-runtime/runtime-cores/external-store/{external-message-converter.tsx → external-message-converter.ts} +32 -25
- package/src/legacy-runtime/runtime-cores/external-store/getExternalStoreMessage.ts +6 -0
- package/src/legacy-runtime/runtime-cores/external-store/index.ts +10 -6
- package/src/legacy-runtime/runtime-cores/external-store/{useExternalStoreRuntime.tsx → useExternalStoreRuntime.ts} +1 -1
- package/src/legacy-runtime/runtime-cores/index.ts +3 -4
- package/src/legacy-runtime/runtime-cores/local/ChatModelAdapter.ts +7 -0
- package/src/legacy-runtime/runtime-cores/local/LocalRuntimeCore.ts +1 -0
- package/src/legacy-runtime/runtime-cores/local/LocalRuntimeOptions.ts +36 -0
- package/src/legacy-runtime/runtime-cores/local/LocalThreadListRuntimeCore.ts +2 -0
- package/src/legacy-runtime/runtime-cores/local/LocalThreadRuntimeCore.ts +1 -0
- package/src/legacy-runtime/runtime-cores/local/index.ts +10 -6
- package/src/legacy-runtime/runtime-cores/local/shouldContinue.ts +1 -0
- package/src/legacy-runtime/runtime-cores/remote-thread-list/BaseSubscribable.ts +1 -0
- package/src/legacy-runtime/runtime-cores/remote-thread-list/EMPTY_THREAD_CORE.ts +1 -0
- package/src/legacy-runtime/runtime-cores/remote-thread-list/OptimisticState.ts +1 -89
- package/src/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListHookInstanceManager.tsx +1 -1
- package/src/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListThreadListRuntimeCore.tsx +33 -136
- package/src/legacy-runtime/runtime-cores/remote-thread-list/adapter/cloud.tsx +11 -3
- package/src/legacy-runtime/runtime-cores/remote-thread-list/adapter/in-memory.ts +1 -0
- package/src/legacy-runtime/runtime-cores/remote-thread-list/index.ts +5 -3
- package/src/legacy-runtime/runtime-cores/remote-thread-list/types.ts +7 -0
- package/src/legacy-runtime/runtime-cores/remote-thread-list/{useRemoteThreadListRuntime.tsx → useRemoteThreadListRuntime.ts} +29 -9
- package/src/legacy-runtime/runtime-cores/utils/MessageRepository.ts +3 -0
- package/src/model-context/frame/AssistantFrame.test.ts +6 -4
- package/src/model-context/frame/index.ts +9 -3
- package/src/model-context/frame/useAssistantFrameHost.ts +2 -2
- package/src/model-context/index.ts +33 -17
- package/src/model-context/makeAssistantVisible.tsx +1 -1
- package/src/model-context/registry/index.ts +6 -2
- package/src/primitives/actionBarMore/ActionBarMoreContent.tsx +1 -1
- package/src/primitives/actionBarMore/ActionBarMoreItem.tsx +1 -1
- package/src/primitives/actionBarMore/ActionBarMoreRoot.tsx +1 -1
- package/src/primitives/actionBarMore/ActionBarMoreSeparator.tsx +1 -1
- package/src/primitives/actionBarMore/ActionBarMoreTrigger.tsx +1 -1
- package/src/primitives/actionBarMore/{scope.tsx → scope.ts} +1 -1
- package/src/primitives/assistantModal/AssistantModalAnchor.tsx +1 -1
- package/src/primitives/assistantModal/AssistantModalContent.tsx +1 -1
- package/src/primitives/assistantModal/AssistantModalRoot.tsx +1 -1
- package/src/primitives/assistantModal/AssistantModalTrigger.tsx +1 -1
- package/src/primitives/assistantModal/{scope.tsx → scope.ts} +1 -1
- package/src/primitives/chainOfThought/ChainOfThoughtParts.tsx +1 -85
- package/src/primitives/composer/ComposerAttachmentDropzone.tsx +2 -2
- package/src/primitives/composer/ComposerAttachments.tsx +4 -110
- package/src/primitives/composer/ComposerIf.ts +4 -0
- package/src/primitives/composer/ComposerInput.tsx +2 -2
- package/src/primitives/index.ts +1 -0
- package/src/primitives/message/MessageAttachments.tsx +4 -113
- package/src/primitives/message/{MessageIf.tsx → MessageIf.ts} +1 -1
- package/src/primitives/message/MessageParts.tsx +43 -612
- package/src/primitives/message/MessagePartsGrouped.tsx +38 -6
- package/src/primitives/messagePart/{useMessagePartData.tsx → useMessagePartData.ts} +1 -1
- package/src/primitives/messagePart/{useMessagePartFile.tsx → useMessagePartFile.ts} +1 -2
- package/src/primitives/messagePart/{useMessagePartImage.tsx → useMessagePartImage.ts} +1 -2
- package/src/primitives/messagePart/{useMessagePartReasoning.tsx → useMessagePartReasoning.ts} +4 -2
- package/src/primitives/messagePart/{useMessagePartSource.tsx → useMessagePartSource.ts} +1 -2
- package/src/primitives/messagePart/{useMessagePartText.tsx → useMessagePartText.ts} +5 -2
- package/src/primitives/selectionToolbar/SelectionToolbarQuote.tsx +1 -1
- package/src/primitives/thread/{ThreadEmpty.tsx → ThreadEmpty.ts} +4 -3
- package/src/primitives/thread/{ThreadIf.tsx → ThreadIf.ts} +1 -1
- package/src/primitives/thread/ThreadMessages.tsx +4 -217
- package/src/primitives/thread/ThreadSuggestions.tsx +4 -106
- package/src/primitives/thread/ThreadViewportSlack.tsx +2 -2
- package/src/primitives/threadList/ThreadListItems.tsx +4 -79
- package/src/primitives/threadListItem/ThreadListItemTitle.test.tsx +56 -0
- package/src/primitives/threadListItem/ThreadListItemTitle.tsx +1 -17
- package/src/primitives/threadListItemMore/ThreadListItemMoreContent.tsx +1 -1
- package/src/primitives/threadListItemMore/ThreadListItemMoreItem.tsx +1 -1
- package/src/primitives/threadListItemMore/ThreadListItemMoreRoot.tsx +1 -1
- package/src/primitives/threadListItemMore/ThreadListItemMoreSeparator.tsx +1 -1
- package/src/primitives/threadListItemMore/ThreadListItemMoreTrigger.tsx +1 -1
- package/src/primitives/threadListItemMore/{scope.tsx → scope.ts} +1 -1
- package/src/tests/BaseComposerRuntimeCore.test.ts +423 -0
- package/src/tests/BaseSubscribable.test.ts +54 -0
- package/src/tests/DataRenderers.test.ts +222 -0
- package/src/tests/ExternalStoreThreadRuntimeCore.test.ts +510 -0
- package/src/tests/LocalThreadRuntimeCore.test.ts +321 -0
- package/src/tests/external-message-converter.test.ts +1 -1
- package/src/tests/shouldContinue.test.ts +89 -0
- package/src/types/index.ts +11 -11
- package/src/types/scopes/index.ts +12 -22
- package/src/utils/smooth/SmoothContext.tsx +2 -2
- package/src/utils/smooth/{useSmooth.tsx → useSmooth.ts} +21 -10
- package/dist/client/ChainOfThoughtClient.d.ts +0 -15
- package/dist/client/ChainOfThoughtClient.d.ts.map +0 -1
- package/dist/client/ChainOfThoughtClient.js +0 -21
- package/dist/client/ChainOfThoughtClient.js.map +0 -1
- package/dist/client/ModelContextClient.d.ts +0 -3
- package/dist/client/ModelContextClient.d.ts.map +0 -1
- package/dist/client/ModelContextClient.js +0 -17
- package/dist/client/ModelContextClient.js.map +0 -1
- package/dist/client/NoOpComposerClient.d.ts +0 -7
- package/dist/client/NoOpComposerClient.d.ts.map +0 -1
- package/dist/client/NoOpComposerClient.js +0 -65
- package/dist/client/NoOpComposerClient.js.map +0 -1
- package/dist/client/Suggestions.d.ts +0 -11
- package/dist/client/Suggestions.d.ts.map +0 -1
- package/dist/client/Suggestions.js +0 -43
- package/dist/client/Suggestions.js.map +0 -1
- package/dist/client/ThreadMessageClient.d.ts +0 -11
- package/dist/client/ThreadMessageClient.d.ts.map +0 -1
- package/dist/client/ThreadMessageClient.js +0 -121
- package/dist/client/ThreadMessageClient.js.map +0 -1
- package/dist/client/Tools.d.ts +0 -8
- package/dist/client/Tools.d.ts.map +0 -1
- package/dist/client/Tools.js +0 -68
- package/dist/client/Tools.js.map +0 -1
- package/dist/legacy-runtime/client/AttachmentRuntimeClient.d.ts +0 -8
- package/dist/legacy-runtime/client/AttachmentRuntimeClient.d.ts.map +0 -1
- package/dist/legacy-runtime/client/AttachmentRuntimeClient.js +0 -14
- package/dist/legacy-runtime/client/AttachmentRuntimeClient.js.map +0 -1
- package/dist/legacy-runtime/client/ComposerRuntimeClient.d.ts +0 -13
- package/dist/legacy-runtime/client/ComposerRuntimeClient.d.ts.map +0 -1
- package/dist/legacy-runtime/client/ComposerRuntimeClient.js +0 -86
- package/dist/legacy-runtime/client/ComposerRuntimeClient.js.map +0 -1
- package/dist/legacy-runtime/client/MessagePartRuntimeClient.d.ts +0 -8
- package/dist/legacy-runtime/client/MessagePartRuntimeClient.d.ts.map +0 -1
- package/dist/legacy-runtime/client/MessagePartRuntimeClient.js +0 -15
- package/dist/legacy-runtime/client/MessagePartRuntimeClient.js.map +0 -1
- package/dist/legacy-runtime/client/MessageRuntimeClient.d.ts +0 -11
- package/dist/legacy-runtime/client/MessageRuntimeClient.d.ts.map +0 -1
- package/dist/legacy-runtime/client/MessageRuntimeClient.js +0 -81
- package/dist/legacy-runtime/client/MessageRuntimeClient.js.map +0 -1
- package/dist/legacy-runtime/client/ThreadListItemRuntimeClient.d.ts +0 -8
- package/dist/legacy-runtime/client/ThreadListItemRuntimeClient.d.ts.map +0 -1
- package/dist/legacy-runtime/client/ThreadListItemRuntimeClient.js +0 -44
- package/dist/legacy-runtime/client/ThreadListItemRuntimeClient.js.map +0 -1
- package/dist/legacy-runtime/client/ThreadListRuntimeClient.d.ts +0 -11
- package/dist/legacy-runtime/client/ThreadListRuntimeClient.d.ts.map +0 -1
- package/dist/legacy-runtime/client/ThreadListRuntimeClient.js +0 -57
- package/dist/legacy-runtime/client/ThreadListRuntimeClient.js.map +0 -1
- package/dist/legacy-runtime/client/ThreadRuntimeClient.d.ts +0 -8
- package/dist/legacy-runtime/client/ThreadRuntimeClient.d.ts.map +0 -1
- package/dist/legacy-runtime/client/ThreadRuntimeClient.js +0 -94
- package/dist/legacy-runtime/client/ThreadRuntimeClient.js.map +0 -1
- package/dist/legacy-runtime/runtime/subscribable/BaseSubject.d.ts +0 -11
- package/dist/legacy-runtime/runtime/subscribable/BaseSubject.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime/subscribable/BaseSubject.js +0 -31
- package/dist/legacy-runtime/runtime/subscribable/BaseSubject.js.map +0 -1
- package/dist/legacy-runtime/runtime/subscribable/EventSubscriptionSubject.d.ts +0 -13
- package/dist/legacy-runtime/runtime/subscribable/EventSubscriptionSubject.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime/subscribable/EventSubscriptionSubject.js +0 -37
- package/dist/legacy-runtime/runtime/subscribable/EventSubscriptionSubject.js.map +0 -1
- package/dist/legacy-runtime/runtime/subscribable/LazyMemoizeSubject.d.ts +0 -13
- package/dist/legacy-runtime/runtime/subscribable/LazyMemoizeSubject.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime/subscribable/LazyMemoizeSubject.js +0 -34
- package/dist/legacy-runtime/runtime/subscribable/LazyMemoizeSubject.js.map +0 -1
- package/dist/legacy-runtime/runtime/subscribable/NestedSubscriptionSubject.d.ts +0 -12
- package/dist/legacy-runtime/runtime/subscribable/NestedSubscriptionSubject.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime/subscribable/NestedSubscriptionSubject.js +0 -39
- package/dist/legacy-runtime/runtime/subscribable/NestedSubscriptionSubject.js.map +0 -1
- package/dist/legacy-runtime/runtime/subscribable/SKIP_UPDATE.d.ts +0 -3
- package/dist/legacy-runtime/runtime/subscribable/SKIP_UPDATE.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime/subscribable/SKIP_UPDATE.js +0 -2
- package/dist/legacy-runtime/runtime/subscribable/SKIP_UPDATE.js.map +0 -1
- package/dist/legacy-runtime/runtime/subscribable/ShallowMemoizeSubject.d.ts +0 -13
- package/dist/legacy-runtime/runtime/subscribable/ShallowMemoizeSubject.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime/subscribable/ShallowMemoizeSubject.js +0 -41
- package/dist/legacy-runtime/runtime/subscribable/ShallowMemoizeSubject.js.map +0 -1
- package/dist/legacy-runtime/runtime/subscribable/Subscribable.d.ts +0 -16
- package/dist/legacy-runtime/runtime/subscribable/Subscribable.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime/subscribable/Subscribable.js +0 -2
- package/dist/legacy-runtime/runtime/subscribable/Subscribable.js.map +0 -1
- package/dist/legacy-runtime/runtime/subscribable/shallowEqual.d.ts +0 -2
- package/dist/legacy-runtime/runtime/subscribable/shallowEqual.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime/subscribable/shallowEqual.js +0 -16
- package/dist/legacy-runtime/runtime/subscribable/shallowEqual.js.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/AttachmentAdapter.d.ts +0 -64
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/AttachmentAdapter.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/AttachmentAdapter.js +0 -2
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/AttachmentAdapter.js.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/CompositeAttachmentAdapter.d.ts +0 -13
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/CompositeAttachmentAdapter.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/CompositeAttachmentAdapter.js +0 -79
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/CompositeAttachmentAdapter.js.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/SimpleImageAttachmentAdapter.d.ts +0 -11
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/SimpleImageAttachmentAdapter.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/SimpleImageAttachmentAdapter.js +0 -35
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/SimpleImageAttachmentAdapter.js.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/SimpleTextAttachmentAdapter.d.ts +0 -11
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/SimpleTextAttachmentAdapter.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/SimpleTextAttachmentAdapter.js +0 -35
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/SimpleTextAttachmentAdapter.js.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/feedback/FeedbackAdapter.d.ts +0 -43
- package/dist/legacy-runtime/runtime-cores/adapters/feedback/FeedbackAdapter.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/feedback/FeedbackAdapter.js +0 -2
- package/dist/legacy-runtime/runtime-cores/adapters/feedback/FeedbackAdapter.js.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/speech/SpeechAdapterTypes.d.ts +0 -110
- package/dist/legacy-runtime/runtime-cores/adapters/speech/SpeechAdapterTypes.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/speech/SpeechAdapterTypes.js +0 -2
- package/dist/legacy-runtime/runtime-cores/adapters/speech/SpeechAdapterTypes.js.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/speech/WebSpeechDictationAdapter.d.ts +0 -61
- package/dist/legacy-runtime/runtime-cores/adapters/speech/WebSpeechDictationAdapter.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/speech/WebSpeechDictationAdapter.js +0 -152
- package/dist/legacy-runtime/runtime-cores/adapters/speech/WebSpeechDictationAdapter.js.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/speech/WebSpeechSynthesisAdapter.d.ts +0 -5
- package/dist/legacy-runtime/runtime-cores/adapters/speech/WebSpeechSynthesisAdapter.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/speech/WebSpeechSynthesisAdapter.js +0 -42
- package/dist/legacy-runtime/runtime-cores/adapters/speech/WebSpeechSynthesisAdapter.js.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/suggestion/SuggestionAdapter.d.ts +0 -10
- package/dist/legacy-runtime/runtime-cores/adapters/suggestion/SuggestionAdapter.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/suggestion/SuggestionAdapter.js +0 -2
- package/dist/legacy-runtime/runtime-cores/adapters/suggestion/SuggestionAdapter.js.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/thread-history/MessageFormatAdapter.d.ts +0 -21
- package/dist/legacy-runtime/runtime-cores/adapters/thread-history/MessageFormatAdapter.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/thread-history/MessageFormatAdapter.js +0 -2
- package/dist/legacy-runtime/runtime-cores/adapters/thread-history/MessageFormatAdapter.js.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/thread-history/ThreadHistoryAdapter.d.ts +0 -16
- package/dist/legacy-runtime/runtime-cores/adapters/thread-history/ThreadHistoryAdapter.d.ts.map +0 -1
- package/dist/legacy-runtime/runtime-cores/adapters/thread-history/ThreadHistoryAdapter.js +0 -2
- package/dist/legacy-runtime/runtime-cores/adapters/thread-history/ThreadHistoryAdapter.js.map +0 -1
- package/dist/legacy-runtime/util-hooks/tapSubscribable.d.ts +0 -3
- package/dist/legacy-runtime/util-hooks/tapSubscribable.d.ts.map +0 -1
- package/dist/legacy-runtime/util-hooks/tapSubscribable.js +0 -12
- package/dist/legacy-runtime/util-hooks/tapSubscribable.js.map +0 -1
- package/dist/model-context/ModelContextTypes.d.ts +0 -29
- package/dist/model-context/ModelContextTypes.d.ts.map +0 -1
- package/dist/model-context/ModelContextTypes.js +0 -41
- package/dist/model-context/ModelContextTypes.js.map +0 -1
- package/dist/model-context/frame/AssistantFrameHost.d.ts +0 -37
- package/dist/model-context/frame/AssistantFrameHost.d.ts.map +0 -1
- package/dist/model-context/frame/AssistantFrameHost.js +0 -161
- package/dist/model-context/frame/AssistantFrameHost.js.map +0 -1
- package/dist/model-context/frame/AssistantFrameProvider.d.ts +0 -41
- package/dist/model-context/frame/AssistantFrameProvider.d.ts.map +0 -1
- package/dist/model-context/frame/AssistantFrameProvider.js +0 -167
- package/dist/model-context/frame/AssistantFrameProvider.js.map +0 -1
- package/dist/model-context/frame/AssistantFrameTypes.d.ts +0 -29
- package/dist/model-context/frame/AssistantFrameTypes.d.ts.map +0 -1
- package/dist/model-context/frame/AssistantFrameTypes.js +0 -2
- package/dist/model-context/frame/AssistantFrameTypes.js.map +0 -1
- package/dist/model-context/makeAssistantTool.d.ts +0 -7
- package/dist/model-context/makeAssistantTool.d.ts.map +0 -1
- package/dist/model-context/makeAssistantTool.js +0 -11
- package/dist/model-context/makeAssistantTool.js.map +0 -1
- package/dist/model-context/makeAssistantToolUI.d.ts +0 -7
- package/dist/model-context/makeAssistantToolUI.d.ts.map +0 -1
- package/dist/model-context/makeAssistantToolUI.js +0 -11
- package/dist/model-context/makeAssistantToolUI.js.map +0 -1
- package/dist/model-context/registry/ModelContextRegistry.d.ts +0 -19
- package/dist/model-context/registry/ModelContextRegistry.d.ts.map +0 -1
- package/dist/model-context/registry/ModelContextRegistry.js +0 -114
- package/dist/model-context/registry/ModelContextRegistry.js.map +0 -1
- package/dist/model-context/registry/ModelContextRegistryHandles.d.ts +0 -14
- package/dist/model-context/registry/ModelContextRegistryHandles.d.ts.map +0 -1
- package/dist/model-context/registry/ModelContextRegistryHandles.js +0 -2
- package/dist/model-context/registry/ModelContextRegistryHandles.js.map +0 -1
- package/dist/model-context/tool.d.ts +0 -3
- package/dist/model-context/tool.d.ts.map +0 -1
- package/dist/model-context/tool.js +0 -5
- package/dist/model-context/tool.js.map +0 -1
- package/dist/model-context/toolbox.d.ts +0 -10
- package/dist/model-context/toolbox.d.ts.map +0 -1
- package/dist/model-context/toolbox.js +0 -3
- package/dist/model-context/toolbox.js.map +0 -1
- package/dist/model-context/useAssistantInstructions.d.ts +0 -6
- package/dist/model-context/useAssistantInstructions.d.ts.map +0 -1
- package/dist/model-context/useAssistantInstructions.js +0 -23
- package/dist/model-context/useAssistantInstructions.js.map +0 -1
- package/dist/model-context/useAssistantTool.d.ts +0 -8
- package/dist/model-context/useAssistantTool.d.ts.map +0 -1
- package/dist/model-context/useAssistantTool.js +0 -23
- package/dist/model-context/useAssistantTool.js.map +0 -1
- package/dist/model-context/useAssistantToolUI.d.ts +0 -7
- package/dist/model-context/useAssistantToolUI.d.ts.map +0 -1
- package/dist/model-context/useAssistantToolUI.js +0 -12
- package/dist/model-context/useAssistantToolUI.js.map +0 -1
- package/dist/model-context/useInlineRender.d.ts +0 -4
- package/dist/model-context/useInlineRender.d.ts.map +0 -1
- package/dist/model-context/useInlineRender.js +0 -16
- package/dist/model-context/useInlineRender.js.map +0 -1
- package/dist/types/AssistantTypes.d.ts +0 -108
- package/dist/types/AssistantTypes.d.ts.map +0 -1
- package/dist/types/AssistantTypes.js +0 -2
- package/dist/types/AssistantTypes.js.map +0 -1
- package/dist/types/AttachmentTypes.d.ts +0 -35
- package/dist/types/AttachmentTypes.d.ts.map +0 -1
- package/dist/types/AttachmentTypes.js +0 -2
- package/dist/types/AttachmentTypes.js.map +0 -1
- package/dist/types/MessagePartComponentTypes.d.ts +0 -31
- package/dist/types/MessagePartComponentTypes.d.ts.map +0 -1
- package/dist/types/MessagePartComponentTypes.js +0 -2
- package/dist/types/MessagePartComponentTypes.js.map +0 -1
- package/dist/types/MessagePartTypes.d.ts +0 -62
- package/dist/types/MessagePartTypes.d.ts.map +0 -1
- package/dist/types/MessagePartTypes.js +0 -2
- package/dist/types/MessagePartTypes.js.map +0 -1
- package/dist/types/QuoteTypes.d.ts +0 -5
- package/dist/types/QuoteTypes.d.ts.map +0 -1
- package/dist/types/QuoteTypes.js +0 -2
- package/dist/types/QuoteTypes.js.map +0 -1
- package/dist/types/Unsubscribe.d.ts +0 -2
- package/dist/types/Unsubscribe.d.ts.map +0 -1
- package/dist/types/Unsubscribe.js +0 -2
- package/dist/types/Unsubscribe.js.map +0 -1
- package/dist/types/scopes/attachment.d.ts +0 -22
- package/dist/types/scopes/attachment.d.ts.map +0 -1
- package/dist/types/scopes/attachment.js +0 -2
- package/dist/types/scopes/attachment.js.map +0 -1
- package/dist/types/scopes/chainOfThought.d.ts +0 -40
- package/dist/types/scopes/chainOfThought.d.ts.map +0 -1
- package/dist/types/scopes/chainOfThought.js +0 -2
- package/dist/types/scopes/chainOfThought.js.map +0 -1
- package/dist/types/scopes/composer.d.ts +0 -77
- package/dist/types/scopes/composer.d.ts.map +0 -1
- package/dist/types/scopes/composer.js +0 -2
- package/dist/types/scopes/composer.js.map +0 -1
- package/dist/types/scopes/message.d.ts +0 -87
- package/dist/types/scopes/message.d.ts.map +0 -1
- package/dist/types/scopes/message.js +0 -2
- package/dist/types/scopes/message.js.map +0 -1
- package/dist/types/scopes/modelContext.d.ts +0 -12
- package/dist/types/scopes/modelContext.d.ts.map +0 -1
- package/dist/types/scopes/modelContext.js +0 -2
- package/dist/types/scopes/modelContext.js.map +0 -1
- package/dist/types/scopes/part.d.ts +0 -43
- package/dist/types/scopes/part.d.ts.map +0 -1
- package/dist/types/scopes/part.js +0 -2
- package/dist/types/scopes/part.js.map +0 -1
- package/dist/types/scopes/suggestion.d.ts +0 -20
- package/dist/types/scopes/suggestion.d.ts.map +0 -1
- package/dist/types/scopes/suggestion.js +0 -2
- package/dist/types/scopes/suggestion.js.map +0 -1
- package/dist/types/scopes/suggestions.d.ts +0 -20
- package/dist/types/scopes/suggestions.d.ts.map +0 -1
- package/dist/types/scopes/suggestions.js +0 -2
- package/dist/types/scopes/suggestions.js.map +0 -1
- package/dist/types/scopes/thread.d.ts +0 -138
- package/dist/types/scopes/thread.d.ts.map +0 -1
- package/dist/types/scopes/thread.js +0 -2
- package/dist/types/scopes/thread.js.map +0 -1
- package/dist/types/scopes/threadListItem.d.ts +0 -50
- package/dist/types/scopes/threadListItem.d.ts.map +0 -1
- package/dist/types/scopes/threadListItem.js +0 -2
- package/dist/types/scopes/threadListItem.js.map +0 -1
- package/dist/types/scopes/threads.d.ts +0 -28
- package/dist/types/scopes/threads.d.ts.map +0 -1
- package/dist/types/scopes/threads.js +0 -2
- package/dist/types/scopes/threads.js.map +0 -1
- package/dist/types/scopes/tools.d.ts +0 -14
- package/dist/types/scopes/tools.d.ts.map +0 -1
- package/dist/types/scopes/tools.js +0 -2
- package/dist/types/scopes/tools.js.map +0 -1
- package/dist/types/store-augmentation.d.ts +0 -30
- package/dist/types/store-augmentation.d.ts.map +0 -1
- package/dist/types/store-augmentation.js +0 -2
- package/dist/types/store-augmentation.js.map +0 -1
- package/dist/utils/CompositeContextProvider.d.ts +0 -10
- package/dist/utils/CompositeContextProvider.d.ts.map +0 -1
- package/dist/utils/CompositeContextProvider.js +0 -29
- package/dist/utils/CompositeContextProvider.js.map +0 -1
- package/dist/utils/getThreadMessageText.d.ts +0 -3
- package/dist/utils/getThreadMessageText.d.ts.map +0 -1
- package/dist/utils/getThreadMessageText.js +0 -5
- package/dist/utils/getThreadMessageText.js.map +0 -1
- package/dist/utils/idUtils.d.ts +0 -6
- package/dist/utils/idUtils.d.ts.map +0 -1
- package/dist/utils/idUtils.js +0 -9
- package/dist/utils/idUtils.js.map +0 -1
- package/src/client/ChainOfThoughtClient.ts +0 -43
- package/src/client/ModelContextClient.ts +0 -23
- package/src/client/NoOpComposerClient.tsx +0 -70
- package/src/client/Suggestions.ts +0 -74
- package/src/client/ThreadMessageClient.tsx +0 -178
- package/src/client/Tools.ts +0 -97
- package/src/legacy-runtime/client/AttachmentRuntimeClient.ts +0 -19
- package/src/legacy-runtime/client/ComposerRuntimeClient.ts +0 -138
- package/src/legacy-runtime/client/MessagePartRuntimeClient.ts +0 -20
- package/src/legacy-runtime/client/MessageRuntimeClient.ts +0 -151
- package/src/legacy-runtime/client/ThreadListItemRuntimeClient.ts +0 -59
- package/src/legacy-runtime/client/ThreadListRuntimeClient.ts +0 -100
- package/src/legacy-runtime/client/ThreadRuntimeClient.ts +0 -148
- package/src/legacy-runtime/cloud/AssistantCloudThreadHistoryAdapter.tsx +0 -182
- package/src/legacy-runtime/runtime/subscribable/BaseSubject.ts +0 -36
- package/src/legacy-runtime/runtime/subscribable/EventSubscriptionSubject.ts +0 -44
- package/src/legacy-runtime/runtime/subscribable/LazyMemoizeSubject.ts +0 -42
- package/src/legacy-runtime/runtime/subscribable/NestedSubscriptionSubject.ts +0 -58
- package/src/legacy-runtime/runtime/subscribable/SKIP_UPDATE.ts +0 -2
- package/src/legacy-runtime/runtime/subscribable/ShallowMemoizeSubject.ts +0 -47
- package/src/legacy-runtime/runtime/subscribable/Subscribable.ts +0 -26
- package/src/legacy-runtime/runtime/subscribable/shallowEqual.ts +0 -16
- package/src/legacy-runtime/runtime-cores/adapters/attachment/AttachmentAdapter.ts +0 -71
- package/src/legacy-runtime/runtime-cores/adapters/attachment/CompositeAttachmentAdapter.ts +0 -107
- package/src/legacy-runtime/runtime-cores/adapters/attachment/SimpleImageAttachmentAdapter.ts +0 -49
- package/src/legacy-runtime/runtime-cores/adapters/attachment/SimpleTextAttachmentAdapter.ts +0 -50
- package/src/legacy-runtime/runtime-cores/adapters/feedback/FeedbackAdapter.ts +0 -43
- package/src/legacy-runtime/runtime-cores/adapters/speech/SpeechAdapterTypes.ts +0 -121
- package/src/legacy-runtime/runtime-cores/adapters/speech/WebSpeechDictationAdapter.ts +0 -255
- package/src/legacy-runtime/runtime-cores/adapters/speech/WebSpeechSynthesisAdapter.ts +0 -48
- package/src/legacy-runtime/runtime-cores/adapters/suggestion/SuggestionAdapter.ts +0 -14
- package/src/legacy-runtime/runtime-cores/adapters/thread-history/MessageFormatAdapter.ts +0 -25
- package/src/legacy-runtime/runtime-cores/adapters/thread-history/ThreadHistoryAdapter.ts +0 -26
- package/src/legacy-runtime/runtime-cores/composer/BaseComposerRuntimeCore.tsx +0 -423
- package/src/legacy-runtime/runtime-cores/composer/DefaultEditComposerRuntimeCore.tsx +0 -72
- package/src/legacy-runtime/runtime-cores/composer/DefaultThreadComposerRuntimeCore.tsx +0 -65
- package/src/legacy-runtime/runtime-cores/core/AssistantRuntimeCore.tsx +0 -19
- package/src/legacy-runtime/runtime-cores/core/BaseAssistantRuntimeCore.tsx +0 -20
- package/src/legacy-runtime/runtime-cores/core/BaseThreadRuntimeCore.tsx +0 -237
- package/src/legacy-runtime/runtime-cores/core/ComposerRuntimeCore.tsx +0 -90
- package/src/legacy-runtime/runtime-cores/core/ThreadListRuntimeCore.tsx +0 -49
- package/src/legacy-runtime/runtime-cores/core/ThreadRuntimeCore.tsx +0 -154
- package/src/legacy-runtime/runtime-cores/external-store/ExternalStoreAdapter.tsx +0 -111
- package/src/legacy-runtime/runtime-cores/external-store/ExternalStoreRuntimeCore.tsx +0 -26
- package/src/legacy-runtime/runtime-cores/external-store/ExternalStoreThreadListRuntimeCore.tsx +0 -235
- package/src/legacy-runtime/runtime-cores/external-store/ExternalStoreThreadRuntimeCore.tsx +0 -368
- package/src/legacy-runtime/runtime-cores/external-store/ThreadMessageLike.tsx +0 -227
- package/src/legacy-runtime/runtime-cores/external-store/auto-status.tsx +0 -67
- package/src/legacy-runtime/runtime-cores/external-store/getExternalStoreMessage.tsx +0 -37
- package/src/legacy-runtime/runtime-cores/local/ChatModelAdapter.tsx +0 -64
- package/src/legacy-runtime/runtime-cores/local/LocalRuntimeCore.tsx +0 -32
- package/src/legacy-runtime/runtime-cores/local/LocalRuntimeOptions.tsx +0 -60
- package/src/legacy-runtime/runtime-cores/local/LocalThreadListRuntimeCore.tsx +0 -116
- package/src/legacy-runtime/runtime-cores/local/LocalThreadRuntimeCore.tsx +0 -519
- package/src/legacy-runtime/runtime-cores/local/shouldContinue.tsx +0 -26
- package/src/legacy-runtime/runtime-cores/remote-thread-list/BaseSubscribable.tsx +0 -41
- package/src/legacy-runtime/runtime-cores/remote-thread-list/EMPTY_THREAD_CORE.tsx +0 -200
- package/src/legacy-runtime/runtime-cores/remote-thread-list/adapter/in-memory.tsx +0 -43
- package/src/legacy-runtime/runtime-cores/remote-thread-list/types.tsx +0 -49
- package/src/legacy-runtime/runtime-cores/utils/MessageRepository.tsx +0 -551
- package/src/legacy-runtime/util-hooks/tapSubscribable.ts +0 -16
- package/src/model-context/ModelContextTypes.ts +0 -76
- package/src/model-context/frame/AssistantFrameHost.ts +0 -218
- package/src/model-context/frame/AssistantFrameProvider.ts +0 -230
- package/src/model-context/frame/AssistantFrameTypes.ts +0 -40
- package/src/model-context/makeAssistantTool.tsx +0 -22
- package/src/model-context/makeAssistantToolUI.tsx +0 -22
- package/src/model-context/registry/ModelContextRegistry.ts +0 -165
- package/src/model-context/registry/ModelContextRegistryHandles.ts +0 -19
- package/src/model-context/tool.ts +0 -9
- package/src/model-context/toolbox.tsx +0 -17
- package/src/model-context/useAssistantInstructions.tsx +0 -34
- package/src/model-context/useAssistantTool.tsx +0 -40
- package/src/model-context/useAssistantToolUI.tsx +0 -20
- package/src/model-context/useInlineRender.tsx +0 -27
- package/src/primitives/composer/ComposerIf.tsx +0 -44
- package/src/tests/MessageRepository.test.ts +0 -786
- package/src/types/AssistantTypes.ts +0 -166
- package/src/types/AttachmentTypes.ts +0 -45
- package/src/types/MessagePartComponentTypes.tsx +0 -59
- package/src/types/MessagePartTypes.ts +0 -82
- package/src/types/QuoteTypes.ts +0 -4
- package/src/types/Unsubscribe.tsx +0 -1
- package/src/types/scopes/attachment.ts +0 -22
- package/src/types/scopes/chainOfThought.ts +0 -42
- package/src/types/scopes/composer.ts +0 -80
- package/src/types/scopes/message.ts +0 -78
- package/src/types/scopes/modelContext.ts +0 -14
- package/src/types/scopes/part.ts +0 -49
- package/src/types/scopes/suggestion.ts +0 -20
- package/src/types/scopes/suggestions.ts +0 -21
- package/src/types/scopes/thread.ts +0 -141
- package/src/types/scopes/threadListItem.ts +0 -44
- package/src/types/scopes/threads.ts +0 -36
- package/src/types/scopes/tools.ts +0 -19
- package/src/types/store-augmentation.ts +0 -31
- package/src/utils/CompositeContextProvider.ts +0 -36
- package/src/utils/getThreadMessageText.tsx +0 -15
- package/src/utils/idUtils.tsx +0 -14
- /package/src/legacy-runtime/runtime-cores/local/{useLocalRuntime.tsx → useLocalRuntime.ts} +0 -0
- /package/src/primitives/actionBar/{ActionBarEdit.tsx → ActionBarEdit.ts} +0 -0
- /package/src/primitives/actionBar/{ActionBarReload.tsx → ActionBarReload.ts} +0 -0
- /package/src/primitives/actionBar/{ActionBarSpeak.tsx → ActionBarSpeak.ts} +0 -0
- /package/src/primitives/actionBar/{useActionBarFloatStatus.tsx → useActionBarFloatStatus.ts} +0 -0
- /package/src/primitives/attachment/{AttachmentRemove.tsx → AttachmentRemove.ts} +0 -0
- /package/src/primitives/branchPicker/{BranchPickerNext.tsx → BranchPickerNext.ts} +0 -0
- /package/src/primitives/branchPicker/{BranchPickerPrevious.tsx → BranchPickerPrevious.ts} +0 -0
- /package/src/primitives/chainOfThought/{ChainOfThoughtAccordionTrigger.tsx → ChainOfThoughtAccordionTrigger.ts} +0 -0
- /package/src/primitives/composer/{ComposerAddAttachment.tsx → ComposerAddAttachment.ts} +0 -0
- /package/src/primitives/composer/{ComposerCancel.tsx → ComposerCancel.ts} +0 -0
- /package/src/primitives/composer/{ComposerDictate.tsx → ComposerDictate.ts} +0 -0
- /package/src/primitives/composer/{ComposerSend.tsx → ComposerSend.ts} +0 -0
- /package/src/primitives/composer/{ComposerStopDictation.tsx → ComposerStopDictation.ts} +0 -0
- /package/src/primitives/message/{MessageError.tsx → MessageError.ts} +0 -0
- /package/src/primitives/messagePart/{MessagePartInProgress.tsx → MessagePartInProgress.ts} +0 -0
- /package/src/primitives/reasoning/{useScrollLock.tsx → useScrollLock.ts} +0 -0
- /package/src/primitives/suggestion/{SuggestionTrigger.tsx → SuggestionTrigger.ts} +0 -0
- /package/src/primitives/thread/{ThreadScrollToBottom.tsx → ThreadScrollToBottom.ts} +0 -0
- /package/src/primitives/thread/{ThreadSuggestion.tsx → ThreadSuggestion.ts} +0 -0
- /package/src/primitives/thread/{useThreadViewportAutoScroll.tsx → useThreadViewportAutoScroll.ts} +0 -0
- /package/src/utils/{RequireAtLeastOne.tsx → RequireAtLeastOne.ts} +0 -0
- /package/src/utils/hooks/{useOnResizeContent.tsx → useOnResizeContent.ts} +0 -0
- /package/src/utils/hooks/{useOnScrollToBottom.tsx → useOnScrollToBottom.ts} +0 -0
- /package/src/utils/{useToolArgsFieldStatus.tsx → useToolArgsFieldStatus.ts} +0 -0
|
@@ -1,423 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
Attachment,
|
|
3
|
-
CompleteAttachment,
|
|
4
|
-
PendingAttachment,
|
|
5
|
-
} from "../../../types/AttachmentTypes";
|
|
6
|
-
import type { AppendMessage, Unsubscribe } from "../../../types";
|
|
7
|
-
import type { AttachmentAdapter } from "../adapters/attachment";
|
|
8
|
-
import type {
|
|
9
|
-
ComposerRuntimeCore,
|
|
10
|
-
ComposerRuntimeEventType,
|
|
11
|
-
DictationState,
|
|
12
|
-
} from "../core/ComposerRuntimeCore";
|
|
13
|
-
import type { MessageRole, RunConfig } from "../../../types/AssistantTypes";
|
|
14
|
-
import type { QuoteInfo } from "../../../types/QuoteTypes";
|
|
15
|
-
import { BaseSubscribable } from "../remote-thread-list/BaseSubscribable";
|
|
16
|
-
import type { DictationAdapter } from "../adapters/speech/SpeechAdapterTypes";
|
|
17
|
-
|
|
18
|
-
const isAttachmentComplete = (a: Attachment): a is CompleteAttachment =>
|
|
19
|
-
a.status.type === "complete";
|
|
20
|
-
|
|
21
|
-
export abstract class BaseComposerRuntimeCore
|
|
22
|
-
extends BaseSubscribable
|
|
23
|
-
implements ComposerRuntimeCore
|
|
24
|
-
{
|
|
25
|
-
public readonly isEditing = true;
|
|
26
|
-
|
|
27
|
-
protected abstract getAttachmentAdapter(): AttachmentAdapter | undefined;
|
|
28
|
-
protected abstract getDictationAdapter(): DictationAdapter | undefined;
|
|
29
|
-
|
|
30
|
-
public get attachmentAccept(): string {
|
|
31
|
-
return this.getAttachmentAdapter()?.accept ?? "*";
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
private _attachments: readonly Attachment[] = [];
|
|
35
|
-
public get attachments() {
|
|
36
|
-
return this._attachments;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
protected setAttachments(value: readonly Attachment[]) {
|
|
40
|
-
this._attachments = value;
|
|
41
|
-
this._notifySubscribers();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
public abstract get canCancel(): boolean;
|
|
45
|
-
|
|
46
|
-
public get isEmpty() {
|
|
47
|
-
return !this.text.trim() && !this.attachments.length;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
private _text = "";
|
|
51
|
-
|
|
52
|
-
get text() {
|
|
53
|
-
return this._text;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
private _role: MessageRole = "user";
|
|
57
|
-
|
|
58
|
-
get role() {
|
|
59
|
-
return this._role;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
private _runConfig: RunConfig = {};
|
|
63
|
-
|
|
64
|
-
get runConfig() {
|
|
65
|
-
return this._runConfig;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
private _quote: QuoteInfo | undefined = undefined;
|
|
69
|
-
|
|
70
|
-
get quote() {
|
|
71
|
-
return this._quote;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
public setQuote(quote: QuoteInfo | undefined) {
|
|
75
|
-
if (this._quote === quote) return;
|
|
76
|
-
|
|
77
|
-
this._quote = quote;
|
|
78
|
-
this._notifySubscribers();
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
public setText(value: string) {
|
|
82
|
-
if (this._text === value) return;
|
|
83
|
-
|
|
84
|
-
this._text = value;
|
|
85
|
-
// When dictation is active and the user manually edits the composer text,
|
|
86
|
-
// treat the new text as the updated base so speech results are appended
|
|
87
|
-
// instead of overwriting manual edits.
|
|
88
|
-
if (this._dictation) {
|
|
89
|
-
this._dictationBaseText = value;
|
|
90
|
-
this._currentInterimText = "";
|
|
91
|
-
const { status, inputDisabled } = this._dictation;
|
|
92
|
-
this._dictation = inputDisabled ? { status, inputDisabled } : { status };
|
|
93
|
-
}
|
|
94
|
-
this._notifySubscribers();
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
public setRole(role: MessageRole) {
|
|
98
|
-
if (this._role === role) return;
|
|
99
|
-
|
|
100
|
-
this._role = role;
|
|
101
|
-
this._notifySubscribers();
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
public setRunConfig(runConfig: RunConfig) {
|
|
105
|
-
if (this._runConfig === runConfig) return;
|
|
106
|
-
|
|
107
|
-
this._runConfig = runConfig;
|
|
108
|
-
this._notifySubscribers();
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
private _emptyTextAndAttachments() {
|
|
112
|
-
this._attachments = [];
|
|
113
|
-
this._text = "";
|
|
114
|
-
this._notifySubscribers();
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
private async _onClearAttachments() {
|
|
118
|
-
const adapter = this.getAttachmentAdapter();
|
|
119
|
-
if (adapter) {
|
|
120
|
-
await Promise.all(this._attachments.map((a) => adapter.remove(a)));
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
public async reset() {
|
|
125
|
-
if (
|
|
126
|
-
this._attachments.length === 0 &&
|
|
127
|
-
this._text === "" &&
|
|
128
|
-
this._role === "user" &&
|
|
129
|
-
Object.keys(this._runConfig).length === 0 &&
|
|
130
|
-
this._quote === undefined
|
|
131
|
-
) {
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
this._role = "user";
|
|
136
|
-
this._runConfig = {};
|
|
137
|
-
this._quote = undefined;
|
|
138
|
-
|
|
139
|
-
const task = this._onClearAttachments();
|
|
140
|
-
this._emptyTextAndAttachments();
|
|
141
|
-
await task;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
public async clearAttachments() {
|
|
145
|
-
const task = this._onClearAttachments();
|
|
146
|
-
this.setAttachments([]);
|
|
147
|
-
|
|
148
|
-
await task;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
public async send() {
|
|
152
|
-
if (this._dictationSession) {
|
|
153
|
-
this._dictationSession.cancel();
|
|
154
|
-
this._cleanupDictation();
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
const adapter = this.getAttachmentAdapter();
|
|
158
|
-
const attachments =
|
|
159
|
-
adapter && this.attachments.length > 0
|
|
160
|
-
? Promise.all(
|
|
161
|
-
this.attachments.map(async (a) => {
|
|
162
|
-
if (isAttachmentComplete(a)) return a;
|
|
163
|
-
const result = await adapter.send(a);
|
|
164
|
-
return result as CompleteAttachment;
|
|
165
|
-
}),
|
|
166
|
-
)
|
|
167
|
-
: [];
|
|
168
|
-
|
|
169
|
-
const text = this.text;
|
|
170
|
-
const quote = this._quote;
|
|
171
|
-
this._quote = undefined;
|
|
172
|
-
this._emptyTextAndAttachments();
|
|
173
|
-
|
|
174
|
-
const message: Omit<AppendMessage, "parentId" | "sourceId"> = {
|
|
175
|
-
createdAt: new Date(),
|
|
176
|
-
role: this.role,
|
|
177
|
-
content: text ? [{ type: "text", text }] : [],
|
|
178
|
-
attachments: await attachments,
|
|
179
|
-
runConfig: this.runConfig,
|
|
180
|
-
metadata: { custom: { ...(quote ? { quote } : {}) } },
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
this.handleSend(message);
|
|
184
|
-
this._notifyEventSubscribers("send");
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
public cancel() {
|
|
188
|
-
this.handleCancel();
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
protected abstract handleSend(
|
|
192
|
-
message: Omit<AppendMessage, "parentId" | "sourceId">,
|
|
193
|
-
): void;
|
|
194
|
-
protected abstract handleCancel(): void;
|
|
195
|
-
|
|
196
|
-
async addAttachment(file: File) {
|
|
197
|
-
const adapter = this.getAttachmentAdapter();
|
|
198
|
-
if (!adapter) throw new Error("Attachments are not supported");
|
|
199
|
-
|
|
200
|
-
const upsertAttachment = (a: PendingAttachment) => {
|
|
201
|
-
const idx = this._attachments.findIndex(
|
|
202
|
-
(attachment) => attachment.id === a.id,
|
|
203
|
-
);
|
|
204
|
-
if (idx !== -1)
|
|
205
|
-
this._attachments = [
|
|
206
|
-
...this._attachments.slice(0, idx),
|
|
207
|
-
a,
|
|
208
|
-
...this._attachments.slice(idx + 1),
|
|
209
|
-
];
|
|
210
|
-
else {
|
|
211
|
-
this._attachments = [...this._attachments, a];
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
this._notifySubscribers();
|
|
215
|
-
};
|
|
216
|
-
|
|
217
|
-
const promiseOrGenerator = adapter.add({ file });
|
|
218
|
-
if (Symbol.asyncIterator in promiseOrGenerator) {
|
|
219
|
-
for await (const r of promiseOrGenerator) {
|
|
220
|
-
upsertAttachment(r);
|
|
221
|
-
}
|
|
222
|
-
} else {
|
|
223
|
-
upsertAttachment(await promiseOrGenerator);
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
this._notifyEventSubscribers("attachmentAdd");
|
|
227
|
-
this._notifySubscribers();
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
async removeAttachment(attachmentId: string) {
|
|
231
|
-
const adapter = this.getAttachmentAdapter();
|
|
232
|
-
if (!adapter) throw new Error("Attachments are not supported");
|
|
233
|
-
|
|
234
|
-
const index = this._attachments.findIndex((a) => a.id === attachmentId);
|
|
235
|
-
if (index === -1) throw new Error("Attachment not found");
|
|
236
|
-
const attachment = this._attachments[index]!;
|
|
237
|
-
|
|
238
|
-
await adapter.remove(attachment);
|
|
239
|
-
|
|
240
|
-
// this._attachments.toSpliced(index, 1); - not yet widely supported
|
|
241
|
-
this._attachments = [
|
|
242
|
-
...this._attachments.slice(0, index),
|
|
243
|
-
...this._attachments.slice(index + 1),
|
|
244
|
-
];
|
|
245
|
-
this._notifySubscribers();
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
private _dictation: DictationState | undefined;
|
|
249
|
-
private _dictationSession: DictationAdapter.Session | undefined;
|
|
250
|
-
private _dictationUnsubscribes: Unsubscribe[] = [];
|
|
251
|
-
private _dictationBaseText = "";
|
|
252
|
-
private _currentInterimText = "";
|
|
253
|
-
private _dictationSessionIdCounter = 0;
|
|
254
|
-
private _activeDictationSessionId: number | undefined;
|
|
255
|
-
private _isCleaningDictation = false;
|
|
256
|
-
|
|
257
|
-
public get dictation(): DictationState | undefined {
|
|
258
|
-
return this._dictation;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
private _isActiveSession(
|
|
262
|
-
sessionId: number,
|
|
263
|
-
session: DictationAdapter.Session,
|
|
264
|
-
): boolean {
|
|
265
|
-
return (
|
|
266
|
-
this._activeDictationSessionId === sessionId &&
|
|
267
|
-
this._dictationSession === session
|
|
268
|
-
);
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
public startDictation(): void {
|
|
272
|
-
const adapter = this.getDictationAdapter();
|
|
273
|
-
if (!adapter) {
|
|
274
|
-
throw new Error("Dictation adapter not configured");
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
if (this._dictationSession) {
|
|
278
|
-
for (const unsub of this._dictationUnsubscribes) {
|
|
279
|
-
unsub();
|
|
280
|
-
}
|
|
281
|
-
this._dictationUnsubscribes = [];
|
|
282
|
-
const oldSession = this._dictationSession;
|
|
283
|
-
oldSession.stop().catch(() => {});
|
|
284
|
-
this._dictationSession = undefined;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
const inputDisabled = adapter.disableInputDuringDictation ?? false;
|
|
288
|
-
|
|
289
|
-
this._dictationBaseText = this._text;
|
|
290
|
-
this._currentInterimText = "";
|
|
291
|
-
|
|
292
|
-
const session = adapter.listen();
|
|
293
|
-
this._dictationSession = session;
|
|
294
|
-
const sessionId = ++this._dictationSessionIdCounter;
|
|
295
|
-
this._activeDictationSessionId = sessionId;
|
|
296
|
-
this._dictation = { status: session.status, inputDisabled };
|
|
297
|
-
this._notifySubscribers();
|
|
298
|
-
|
|
299
|
-
const unsubSpeech = session.onSpeech((result) => {
|
|
300
|
-
if (!this._isActiveSession(sessionId, session)) return;
|
|
301
|
-
const isFinal = result.isFinal !== false;
|
|
302
|
-
|
|
303
|
-
const needsSeparator =
|
|
304
|
-
this._dictationBaseText &&
|
|
305
|
-
!this._dictationBaseText.endsWith(" ") &&
|
|
306
|
-
result.transcript;
|
|
307
|
-
const separator = needsSeparator ? " " : "";
|
|
308
|
-
|
|
309
|
-
if (isFinal) {
|
|
310
|
-
this._dictationBaseText =
|
|
311
|
-
this._dictationBaseText + separator + result.transcript;
|
|
312
|
-
this._currentInterimText = "";
|
|
313
|
-
this._text = this._dictationBaseText;
|
|
314
|
-
|
|
315
|
-
if (this._dictation) {
|
|
316
|
-
const { transcript: _, ...rest } = this._dictation;
|
|
317
|
-
this._dictation = rest;
|
|
318
|
-
}
|
|
319
|
-
this._notifySubscribers();
|
|
320
|
-
} else {
|
|
321
|
-
this._currentInterimText = separator + result.transcript;
|
|
322
|
-
this._text = this._dictationBaseText + this._currentInterimText;
|
|
323
|
-
|
|
324
|
-
if (this._dictation) {
|
|
325
|
-
this._dictation = {
|
|
326
|
-
...this._dictation,
|
|
327
|
-
transcript: result.transcript,
|
|
328
|
-
};
|
|
329
|
-
}
|
|
330
|
-
this._notifySubscribers();
|
|
331
|
-
}
|
|
332
|
-
});
|
|
333
|
-
this._dictationUnsubscribes.push(unsubSpeech);
|
|
334
|
-
|
|
335
|
-
const unsubStart = session.onSpeechStart(() => {
|
|
336
|
-
if (!this._isActiveSession(sessionId, session)) return;
|
|
337
|
-
|
|
338
|
-
this._dictation = {
|
|
339
|
-
status: { type: "running" },
|
|
340
|
-
inputDisabled,
|
|
341
|
-
...(this._dictation?.transcript && {
|
|
342
|
-
transcript: this._dictation.transcript,
|
|
343
|
-
}),
|
|
344
|
-
};
|
|
345
|
-
this._notifySubscribers();
|
|
346
|
-
});
|
|
347
|
-
this._dictationUnsubscribes.push(unsubStart);
|
|
348
|
-
|
|
349
|
-
const unsubEnd = session.onSpeechEnd(() => {
|
|
350
|
-
this._cleanupDictation({ sessionId });
|
|
351
|
-
});
|
|
352
|
-
this._dictationUnsubscribes.push(unsubEnd);
|
|
353
|
-
|
|
354
|
-
const statusInterval = setInterval(() => {
|
|
355
|
-
if (!this._isActiveSession(sessionId, session)) return;
|
|
356
|
-
|
|
357
|
-
if (session.status.type === "ended") {
|
|
358
|
-
this._cleanupDictation({ sessionId });
|
|
359
|
-
}
|
|
360
|
-
}, 100);
|
|
361
|
-
this._dictationUnsubscribes.push(() => clearInterval(statusInterval));
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
public stopDictation(): void {
|
|
365
|
-
if (!this._dictationSession) return;
|
|
366
|
-
|
|
367
|
-
const session = this._dictationSession;
|
|
368
|
-
const sessionId = this._activeDictationSessionId;
|
|
369
|
-
session.stop().finally(() => {
|
|
370
|
-
this._cleanupDictation({ sessionId });
|
|
371
|
-
});
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
private _cleanupDictation(options?: { sessionId: number | undefined }): void {
|
|
375
|
-
const isStaleSession =
|
|
376
|
-
options?.sessionId !== undefined &&
|
|
377
|
-
options.sessionId !== this._activeDictationSessionId;
|
|
378
|
-
if (isStaleSession || this._isCleaningDictation) return;
|
|
379
|
-
|
|
380
|
-
this._isCleaningDictation = true;
|
|
381
|
-
try {
|
|
382
|
-
for (const unsub of this._dictationUnsubscribes) {
|
|
383
|
-
unsub();
|
|
384
|
-
}
|
|
385
|
-
this._dictationUnsubscribes = [];
|
|
386
|
-
this._dictationSession = undefined;
|
|
387
|
-
this._activeDictationSessionId = undefined;
|
|
388
|
-
this._dictation = undefined;
|
|
389
|
-
this._dictationBaseText = "";
|
|
390
|
-
this._currentInterimText = "";
|
|
391
|
-
this._notifySubscribers();
|
|
392
|
-
} finally {
|
|
393
|
-
this._isCleaningDictation = false;
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
private _eventSubscribers = new Map<
|
|
398
|
-
ComposerRuntimeEventType,
|
|
399
|
-
Set<() => void>
|
|
400
|
-
>();
|
|
401
|
-
|
|
402
|
-
protected _notifyEventSubscribers(event: ComposerRuntimeEventType) {
|
|
403
|
-
const subscribers = this._eventSubscribers.get(event);
|
|
404
|
-
if (!subscribers) return;
|
|
405
|
-
|
|
406
|
-
for (const callback of subscribers) callback();
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
public unstable_on(event: ComposerRuntimeEventType, callback: () => void) {
|
|
410
|
-
const subscribers = this._eventSubscribers.get(event);
|
|
411
|
-
if (!subscribers) {
|
|
412
|
-
this._eventSubscribers.set(event, new Set([callback]));
|
|
413
|
-
} else {
|
|
414
|
-
subscribers.add(callback);
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
return () => {
|
|
418
|
-
const subscribers = this._eventSubscribers.get(event);
|
|
419
|
-
if (!subscribers) return;
|
|
420
|
-
subscribers.delete(callback);
|
|
421
|
-
};
|
|
422
|
-
}
|
|
423
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import type { AppendMessage, ThreadMessage } from "../../../types";
|
|
2
|
-
import { getThreadMessageText } from "../../../utils/getThreadMessageText";
|
|
3
|
-
import type { AttachmentAdapter } from "../adapters/attachment";
|
|
4
|
-
import type { DictationAdapter } from "../adapters/speech/SpeechAdapterTypes";
|
|
5
|
-
import type { ThreadRuntimeCore } from "../core/ThreadRuntimeCore";
|
|
6
|
-
import { BaseComposerRuntimeCore } from "./BaseComposerRuntimeCore";
|
|
7
|
-
|
|
8
|
-
export class DefaultEditComposerRuntimeCore extends BaseComposerRuntimeCore {
|
|
9
|
-
public get canCancel() {
|
|
10
|
-
return true;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
protected getAttachmentAdapter() {
|
|
14
|
-
return this.runtime.adapters?.attachments;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
protected getDictationAdapter() {
|
|
18
|
-
return this.runtime.adapters?.dictation;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
private _nonTextParts;
|
|
22
|
-
private _previousText;
|
|
23
|
-
private _parentId;
|
|
24
|
-
private _sourceId;
|
|
25
|
-
constructor(
|
|
26
|
-
private runtime: ThreadRuntimeCore & {
|
|
27
|
-
adapters?:
|
|
28
|
-
| {
|
|
29
|
-
attachments?: AttachmentAdapter | undefined;
|
|
30
|
-
dictation?: DictationAdapter | undefined;
|
|
31
|
-
}
|
|
32
|
-
| undefined;
|
|
33
|
-
},
|
|
34
|
-
private endEditCallback: () => void,
|
|
35
|
-
{ parentId, message }: { parentId: string | null; message: ThreadMessage },
|
|
36
|
-
) {
|
|
37
|
-
super();
|
|
38
|
-
this._parentId = parentId;
|
|
39
|
-
this._sourceId = message.id;
|
|
40
|
-
this._previousText = getThreadMessageText(message);
|
|
41
|
-
this.setText(this._previousText);
|
|
42
|
-
|
|
43
|
-
this.setRole(message.role);
|
|
44
|
-
this.setAttachments(message.attachments ?? []);
|
|
45
|
-
|
|
46
|
-
this._nonTextParts = message.content.filter((part) => part.type !== "text");
|
|
47
|
-
|
|
48
|
-
// Use the runConfig from the regular (non-edit) composer as the initial runConfig for the edit composer
|
|
49
|
-
this.setRunConfig({ ...runtime.composer.runConfig });
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
public async handleSend(
|
|
53
|
-
message: Omit<AppendMessage, "parentId" | "sourceId">,
|
|
54
|
-
) {
|
|
55
|
-
const text = getThreadMessageText(message as AppendMessage);
|
|
56
|
-
if (text !== this._previousText) {
|
|
57
|
-
this.runtime.append({
|
|
58
|
-
...message,
|
|
59
|
-
content: [...message.content, ...this._nonTextParts] as any,
|
|
60
|
-
parentId: this._parentId,
|
|
61
|
-
sourceId: this._sourceId,
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
this.handleCancel();
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
public handleCancel() {
|
|
69
|
-
this.endEditCallback();
|
|
70
|
-
this._notifySubscribers();
|
|
71
|
-
}
|
|
72
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import type { AppendMessage, PendingAttachment } from "../../../types";
|
|
2
|
-
import type { AttachmentAdapter } from "../adapters/attachment";
|
|
3
|
-
import type { DictationAdapter } from "../adapters/speech/SpeechAdapterTypes";
|
|
4
|
-
import type { ThreadComposerRuntimeCore } from "../core/ComposerRuntimeCore";
|
|
5
|
-
import type { ThreadRuntimeCore } from "../core/ThreadRuntimeCore";
|
|
6
|
-
import { BaseComposerRuntimeCore } from "./BaseComposerRuntimeCore";
|
|
7
|
-
|
|
8
|
-
export class DefaultThreadComposerRuntimeCore
|
|
9
|
-
extends BaseComposerRuntimeCore
|
|
10
|
-
implements ThreadComposerRuntimeCore
|
|
11
|
-
{
|
|
12
|
-
private _canCancel = false;
|
|
13
|
-
public get canCancel() {
|
|
14
|
-
return this._canCancel;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
public override get attachments(): readonly PendingAttachment[] {
|
|
18
|
-
return super.attachments as readonly PendingAttachment[];
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
protected getAttachmentAdapter() {
|
|
22
|
-
return this.runtime.adapters?.attachments;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
protected getDictationAdapter() {
|
|
26
|
-
return this.runtime.adapters?.dictation;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
constructor(
|
|
30
|
-
private runtime: Omit<ThreadRuntimeCore, "composer"> & {
|
|
31
|
-
adapters?:
|
|
32
|
-
| {
|
|
33
|
-
attachments?: AttachmentAdapter | undefined;
|
|
34
|
-
dictation?: DictationAdapter | undefined;
|
|
35
|
-
}
|
|
36
|
-
| undefined;
|
|
37
|
-
},
|
|
38
|
-
) {
|
|
39
|
-
super();
|
|
40
|
-
this.connect();
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
public connect() {
|
|
44
|
-
return this.runtime.subscribe(() => {
|
|
45
|
-
if (this.canCancel !== this.runtime.capabilities.cancel) {
|
|
46
|
-
this._canCancel = this.runtime.capabilities.cancel;
|
|
47
|
-
this._notifySubscribers();
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
public async handleSend(
|
|
53
|
-
message: Omit<AppendMessage, "parentId" | "sourceId">,
|
|
54
|
-
) {
|
|
55
|
-
this.runtime.append({
|
|
56
|
-
...(message as AppendMessage),
|
|
57
|
-
parentId: this.runtime.messages.at(-1)?.id ?? null,
|
|
58
|
-
sourceId: null,
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
public async handleCancel() {
|
|
63
|
-
this.runtime.cancelRun();
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ComponentType } from "react";
|
|
2
|
-
import type { ModelContextProvider } from "../../../model-context/ModelContextTypes";
|
|
3
|
-
import type { Unsubscribe } from "../../../types/Unsubscribe";
|
|
4
|
-
import { ThreadListRuntimeCore } from "./ThreadListRuntimeCore";
|
|
5
|
-
|
|
6
|
-
export type AssistantRuntimeCore = {
|
|
7
|
-
readonly threads: ThreadListRuntimeCore;
|
|
8
|
-
|
|
9
|
-
registerModelContextProvider: (provider: ModelContextProvider) => Unsubscribe;
|
|
10
|
-
getModelContextProvider: () => ModelContextProvider;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* EXPERIMENTAL: A component that is rendered inside the AssistantRuntimeProvider.
|
|
14
|
-
*
|
|
15
|
-
* Note: This field is expected to never change.
|
|
16
|
-
* To update the component, use a zustand store.
|
|
17
|
-
*/
|
|
18
|
-
readonly RenderComponent?: ComponentType | undefined;
|
|
19
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type ModelContextProvider } from "../../../model-context/ModelContextTypes";
|
|
2
|
-
import type { Unsubscribe } from "../../../types/Unsubscribe";
|
|
3
|
-
import type { AssistantRuntimeCore } from "./AssistantRuntimeCore";
|
|
4
|
-
import { CompositeContextProvider } from "../../../utils/CompositeContextProvider";
|
|
5
|
-
import { ThreadListRuntimeCore } from "./ThreadListRuntimeCore";
|
|
6
|
-
|
|
7
|
-
export abstract class BaseAssistantRuntimeCore implements AssistantRuntimeCore {
|
|
8
|
-
protected readonly _contextProvider = new CompositeContextProvider();
|
|
9
|
-
public abstract get threads(): ThreadListRuntimeCore;
|
|
10
|
-
|
|
11
|
-
public registerModelContextProvider(
|
|
12
|
-
provider: ModelContextProvider,
|
|
13
|
-
): Unsubscribe {
|
|
14
|
-
return this._contextProvider.registerModelContextProvider(provider);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
public getModelContextProvider(): ModelContextProvider {
|
|
18
|
-
return this._contextProvider;
|
|
19
|
-
}
|
|
20
|
-
}
|