@assistant-ui/core 0.1.5 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/attachment.d.ts +1 -1
- package/dist/adapters/attachment.d.ts.map +1 -1
- package/dist/adapters/feedback.d.ts +1 -1
- package/dist/adapters/feedback.d.ts.map +1 -1
- package/dist/adapters/index.d.ts +2 -0
- package/dist/adapters/index.d.ts.map +1 -1
- package/dist/adapters/index.js +1 -0
- package/dist/adapters/index.js.map +1 -1
- package/dist/adapters/mention.d.ts +24 -0
- package/dist/adapters/mention.d.ts.map +1 -0
- package/dist/adapters/mention.js +42 -0
- package/dist/adapters/mention.js.map +1 -0
- package/dist/adapters/speech.d.ts +1 -1
- package/dist/adapters/speech.d.ts.map +1 -1
- package/dist/adapters/suggestion.d.ts +1 -1
- package/dist/adapters/suggestion.d.ts.map +1 -1
- package/dist/index.d.ts +47 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -5
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +5 -2
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +13 -2
- package/dist/internal.js.map +1 -1
- package/dist/model-context/frame/host.d.ts +1 -1
- package/dist/model-context/frame/host.d.ts.map +1 -1
- package/dist/model-context/frame/provider.d.ts +1 -1
- package/dist/model-context/frame/provider.d.ts.map +1 -1
- package/dist/model-context/registry.d.ts +1 -1
- package/dist/model-context/registry.d.ts.map +1 -1
- package/dist/model-context/types.d.ts +1 -1
- package/dist/model-context/types.d.ts.map +1 -1
- package/dist/react/AssistantRuntimeProvider.d.ts +0 -1
- package/dist/react/AssistantRuntimeProvider.d.ts.map +1 -1
- package/dist/react/AssistantRuntimeProvider.js +0 -9
- package/dist/react/AssistantRuntimeProvider.js.map +1 -1
- package/dist/react/RuntimeAdapter.d.ts.map +1 -1
- package/dist/react/RuntimeAdapter.js +7 -7
- package/dist/react/RuntimeAdapter.js.map +1 -1
- package/dist/react/client/Tools.js +5 -6
- package/dist/react/client/Tools.js.map +1 -1
- package/dist/react/index.d.ts +69 -9
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +69 -8
- package/dist/react/index.js.map +1 -1
- package/dist/react/model-context/useInlineRender.d.ts +1 -1
- package/dist/react/model-context/useInlineRender.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useActionBarSpeak.d.ts +5 -0
- package/dist/react/primitive-hooks/useActionBarSpeak.d.ts.map +1 -0
- package/dist/react/primitive-hooks/useActionBarSpeak.js +15 -0
- package/dist/react/primitive-hooks/useActionBarSpeak.js.map +1 -0
- package/dist/react/primitive-hooks/useActionBarStopSpeaking.d.ts +5 -0
- package/dist/react/primitive-hooks/useActionBarStopSpeaking.d.ts.map +1 -0
- package/dist/react/primitive-hooks/useActionBarStopSpeaking.js +11 -0
- package/dist/react/primitive-hooks/useActionBarStopSpeaking.js.map +1 -0
- package/dist/react/primitive-hooks/useBranchPickerNext.d.ts +5 -0
- package/dist/react/primitive-hooks/useBranchPickerNext.d.ts.map +1 -0
- package/dist/react/primitive-hooks/useBranchPickerNext.js +18 -0
- package/dist/react/primitive-hooks/useBranchPickerNext.js.map +1 -0
- package/dist/react/primitive-hooks/useBranchPickerPrevious.d.ts +5 -0
- package/dist/react/primitive-hooks/useBranchPickerPrevious.d.ts.map +1 -0
- package/dist/react/primitive-hooks/useBranchPickerPrevious.js +18 -0
- package/dist/react/primitive-hooks/useBranchPickerPrevious.js.map +1 -0
- package/dist/react/primitive-hooks/useComposerDictate.d.ts +5 -0
- package/dist/react/primitive-hooks/useComposerDictate.d.ts.map +1 -0
- package/dist/react/primitive-hooks/useComposerDictate.js +13 -0
- package/dist/react/primitive-hooks/useComposerDictate.js.map +1 -0
- package/dist/react/primitive-hooks/useComposerSend.d.ts +2 -1
- package/dist/react/primitive-hooks/useComposerSend.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useComposerSend.js +5 -3
- package/dist/react/primitive-hooks/useComposerSend.js.map +1 -1
- package/dist/react/primitive-hooks/useMessageError.d.ts +2 -0
- package/dist/react/primitive-hooks/useMessageError.d.ts.map +1 -0
- package/dist/react/primitive-hooks/useMessageError.js +8 -0
- package/dist/react/primitive-hooks/useMessageError.js.map +1 -0
- package/dist/react/primitive-hooks/useSuggestionTrigger.d.ts +10 -0
- package/dist/react/primitive-hooks/useSuggestionTrigger.d.ts.map +1 -0
- package/dist/react/primitive-hooks/useSuggestionTrigger.js +32 -0
- package/dist/react/primitive-hooks/useSuggestionTrigger.js.map +1 -0
- package/dist/react/primitive-hooks/useThreadListItemArchive.d.ts +4 -0
- package/dist/react/primitive-hooks/useThreadListItemArchive.d.ts.map +1 -0
- package/dist/react/primitive-hooks/useThreadListItemArchive.js +10 -0
- package/dist/react/primitive-hooks/useThreadListItemArchive.js.map +1 -0
- package/dist/react/primitive-hooks/useThreadListItemDelete.d.ts +4 -0
- package/dist/react/primitive-hooks/useThreadListItemDelete.d.ts.map +1 -0
- package/dist/react/primitive-hooks/useThreadListItemDelete.js +10 -0
- package/dist/react/primitive-hooks/useThreadListItemDelete.js.map +1 -0
- package/dist/react/primitive-hooks/useThreadListItemTrigger.d.ts +4 -0
- package/dist/react/primitive-hooks/useThreadListItemTrigger.d.ts.map +1 -0
- package/dist/react/primitive-hooks/useThreadListItemTrigger.js +10 -0
- package/dist/react/primitive-hooks/useThreadListItemTrigger.js.map +1 -0
- package/dist/react/primitive-hooks/useThreadListItemUnarchive.d.ts +4 -0
- package/dist/react/primitive-hooks/useThreadListItemUnarchive.d.ts.map +1 -0
- package/dist/react/primitive-hooks/useThreadListItemUnarchive.js +10 -0
- package/dist/react/primitive-hooks/useThreadListItemUnarchive.js.map +1 -0
- package/dist/react/primitive-hooks/useThreadListNew.d.ts +4 -0
- package/dist/react/primitive-hooks/useThreadListNew.d.ts.map +1 -0
- package/dist/react/primitive-hooks/useThreadListNew.js +10 -0
- package/dist/react/primitive-hooks/useThreadListNew.js.map +1 -0
- package/dist/react/primitives/chainOfThought/ChainOfThoughtParts.d.ts +23 -13
- package/dist/react/primitives/chainOfThought/ChainOfThoughtParts.d.ts.map +1 -1
- package/dist/react/primitives/chainOfThought/ChainOfThoughtParts.js +16 -8
- package/dist/react/primitives/chainOfThought/ChainOfThoughtParts.js.map +1 -1
- package/dist/react/primitives/composer/ComposerAttachments.d.ts +19 -8
- package/dist/react/primitives/composer/ComposerAttachments.d.ts.map +1 -1
- package/dist/react/primitives/composer/ComposerAttachments.js +19 -7
- package/dist/react/primitives/composer/ComposerAttachments.js.map +1 -1
- package/dist/react/primitives/composer/ComposerQueue.d.ts +31 -0
- package/dist/react/primitives/composer/ComposerQueue.d.ts.map +1 -0
- package/dist/react/primitives/composer/ComposerQueue.js +30 -0
- package/dist/react/primitives/composer/ComposerQueue.js.map +1 -0
- package/dist/react/primitives/message/MessageAttachments.d.ts +19 -8
- package/dist/react/primitives/message/MessageAttachments.d.ts.map +1 -1
- package/dist/react/primitives/message/MessageAttachments.js +19 -7
- package/dist/react/primitives/message/MessageAttachments.js.map +1 -1
- package/dist/react/primitives/message/MessageParts.d.ts +41 -5
- package/dist/react/primitives/message/MessageParts.d.ts.map +1 -1
- package/dist/react/primitives/message/MessageParts.js +113 -5
- package/dist/react/primitives/message/MessageParts.js.map +1 -1
- package/dist/react/primitives/message/MessageQuote.d.ts +10 -0
- package/dist/react/primitives/message/MessageQuote.d.ts.map +1 -0
- package/dist/react/primitives/message/MessageQuote.js +27 -0
- package/dist/react/primitives/message/MessageQuote.js.map +1 -0
- package/dist/react/primitives/part/PartMessages.d.ts +37 -0
- package/dist/react/primitives/part/PartMessages.d.ts.map +1 -0
- package/dist/react/primitives/part/PartMessages.js +49 -0
- package/dist/react/primitives/part/PartMessages.js.map +1 -0
- package/dist/react/primitives/thread/ThreadMessages.d.ts +54 -72
- package/dist/react/primitives/thread/ThreadMessages.d.ts.map +1 -1
- package/dist/react/primitives/thread/ThreadMessages.js +32 -37
- package/dist/react/primitives/thread/ThreadMessages.js.map +1 -1
- package/dist/react/primitives/thread/ThreadSuggestions.d.ts +18 -10
- package/dist/react/primitives/thread/ThreadSuggestions.d.ts.map +1 -1
- package/dist/react/primitives/thread/ThreadSuggestions.js +25 -11
- package/dist/react/primitives/thread/ThreadSuggestions.js.map +1 -1
- package/dist/react/primitives/threadList/ThreadListItems.d.ts +18 -6
- package/dist/react/primitives/threadList/ThreadListItems.d.ts.map +1 -1
- package/dist/react/primitives/threadList/ThreadListItems.js +15 -7
- package/dist/react/primitives/threadList/ThreadListItems.js.map +1 -1
- package/dist/react/providers/QueueItemByIndexProvider.d.ts +6 -0
- package/dist/react/providers/QueueItemByIndexProvider.d.ts.map +1 -0
- package/dist/react/providers/QueueItemByIndexProvider.js +13 -0
- package/dist/react/providers/QueueItemByIndexProvider.js.map +1 -0
- package/dist/react/providers/ReadonlyThreadProvider.d.ts +9 -0
- package/dist/react/providers/ReadonlyThreadProvider.d.ts.map +1 -0
- package/dist/react/providers/ReadonlyThreadProvider.js +52 -0
- package/dist/react/providers/ReadonlyThreadProvider.js.map +1 -0
- package/dist/react/runtimes/RemoteThreadListHookInstanceManager.d.ts +1 -1
- package/dist/react/runtimes/RemoteThreadListHookInstanceManager.d.ts.map +1 -1
- package/dist/react/runtimes/RemoteThreadListHookInstanceManager.js +1 -1
- package/dist/react/runtimes/RemoteThreadListHookInstanceManager.js.map +1 -1
- package/dist/react/runtimes/RemoteThreadListThreadListRuntimeCore.d.ts +1 -1
- package/dist/react/runtimes/RemoteThreadListThreadListRuntimeCore.d.ts.map +1 -1
- package/dist/react/runtimes/RemoteThreadListThreadListRuntimeCore.js +2 -1
- package/dist/react/runtimes/RemoteThreadListThreadListRuntimeCore.js.map +1 -1
- package/dist/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.d.ts +1 -1
- package/dist/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.d.ts.map +1 -1
- package/dist/react/runtimes/cloud/CloudFileAttachmentAdapter.d.ts +1 -1
- package/dist/react/runtimes/cloud/CloudFileAttachmentAdapter.d.ts.map +1 -1
- package/dist/react/runtimes/cloud/auiV0.d.ts +1 -1
- package/dist/react/runtimes/cloud/auiV0.d.ts.map +1 -1
- package/dist/react/runtimes/createMessageConverter.d.ts +1 -1
- package/dist/react/runtimes/createMessageConverter.d.ts.map +1 -1
- package/dist/react/runtimes/external-message-converter.d.ts +2 -1
- package/dist/react/runtimes/external-message-converter.d.ts.map +1 -1
- package/dist/react/runtimes/useLocalRuntime.d.ts +6 -6
- package/dist/react/runtimes/useLocalRuntime.js +1 -1
- package/dist/react/runtimes/useLocalRuntime.js.map +1 -1
- package/dist/react/runtimes/useToolInvocations.d.ts +1 -1
- package/dist/react/runtimes/useToolInvocations.d.ts.map +1 -1
- package/dist/react/types/MessagePartComponentTypes.d.ts +3 -1
- package/dist/react/types/MessagePartComponentTypes.d.ts.map +1 -1
- package/dist/react/utils/getMessageQuote.d.ts +9 -0
- package/dist/react/utils/getMessageQuote.d.ts.map +1 -0
- package/dist/react/utils/getMessageQuote.js +7 -0
- package/dist/react/utils/getMessageQuote.js.map +1 -0
- package/dist/runtime/api/assistant-runtime.d.ts +2 -2
- package/dist/runtime/api/assistant-runtime.d.ts.map +1 -1
- package/dist/runtime/api/attachment-runtime.d.ts +2 -1
- package/dist/runtime/api/attachment-runtime.d.ts.map +1 -1
- package/dist/runtime/api/attachment-runtime.js.map +1 -1
- package/dist/runtime/api/bindings.d.ts +1 -1
- package/dist/runtime/api/bindings.d.ts.map +1 -1
- package/dist/runtime/api/composer-runtime.d.ts +5 -1
- package/dist/runtime/api/composer-runtime.d.ts.map +1 -1
- package/dist/runtime/api/composer-runtime.js +2 -1
- package/dist/runtime/api/composer-runtime.js.map +1 -1
- package/dist/runtime/api/message-part-runtime.d.ts +3 -1
- package/dist/runtime/api/message-part-runtime.d.ts.map +1 -1
- package/dist/runtime/api/message-runtime.d.ts +3 -1
- package/dist/runtime/api/message-runtime.d.ts.map +1 -1
- package/dist/runtime/api/message-runtime.js +2 -1
- package/dist/runtime/api/message-runtime.js.map +1 -1
- package/dist/runtime/api/thread-list-item-runtime.d.ts +1 -1
- package/dist/runtime/api/thread-list-item-runtime.d.ts.map +1 -1
- package/dist/runtime/api/thread-list-runtime.d.ts +1 -1
- package/dist/runtime/api/thread-list-runtime.d.ts.map +1 -1
- package/dist/runtime/api/thread-list-runtime.js +2 -1
- package/dist/runtime/api/thread-list-runtime.js.map +1 -1
- package/dist/runtime/api/thread-runtime.d.ts +18 -10
- package/dist/runtime/api/thread-runtime.d.ts.map +1 -1
- package/dist/runtime/api/thread-runtime.js +9 -3
- package/dist/runtime/api/thread-runtime.js.map +1 -1
- package/dist/runtime/base/base-assistant-runtime-core.d.ts +2 -2
- package/dist/runtime/base/base-assistant-runtime-core.d.ts.map +1 -1
- package/dist/runtime/base/base-composer-runtime-core.d.ts +5 -2
- package/dist/runtime/base/base-composer-runtime-core.d.ts.map +1 -1
- package/dist/runtime/base/base-composer-runtime-core.js +1 -1
- package/dist/runtime/base/base-composer-runtime-core.js.map +1 -1
- package/dist/runtime/base/base-thread-runtime-core.d.ts +3 -2
- package/dist/runtime/base/base-thread-runtime-core.d.ts.map +1 -1
- package/dist/runtime/base/base-thread-runtime-core.js.map +1 -1
- package/dist/runtime/base/default-edit-composer-runtime-core.d.ts +1 -1
- package/dist/runtime/base/default-edit-composer-runtime-core.d.ts.map +1 -1
- package/dist/runtime/base/default-thread-composer-runtime-core.d.ts +1 -1
- package/dist/runtime/base/default-thread-composer-runtime-core.d.ts.map +1 -1
- package/dist/runtime/interfaces/assistant-runtime-core.d.ts +2 -2
- package/dist/runtime/interfaces/assistant-runtime-core.d.ts.map +1 -1
- package/dist/runtime/interfaces/composer-runtime-core.d.ts +5 -1
- package/dist/runtime/interfaces/composer-runtime-core.d.ts.map +1 -1
- package/dist/runtime/interfaces/thread-list-runtime-core.d.ts +1 -1
- package/dist/runtime/interfaces/thread-list-runtime-core.d.ts.map +1 -1
- package/dist/runtime/interfaces/thread-runtime-core.d.ts +5 -2
- package/dist/runtime/interfaces/thread-runtime-core.d.ts.map +1 -1
- package/dist/runtime/utils/auto-status.d.ts +1 -1
- package/dist/runtime/utils/auto-status.d.ts.map +1 -1
- package/dist/runtime/utils/chat-model-adapter.d.ts +3 -2
- package/dist/runtime/utils/chat-model-adapter.d.ts.map +1 -1
- package/dist/runtime/utils/external-store-message.d.ts +1 -1
- package/dist/runtime/utils/external-store-message.d.ts.map +1 -1
- package/dist/runtime/utils/message-repository.d.ts +2 -1
- package/dist/runtime/utils/message-repository.d.ts.map +1 -1
- package/dist/runtime/utils/message-repository.js.map +1 -1
- package/dist/runtime/utils/thread-message-like.d.ts +3 -1
- package/dist/runtime/utils/thread-message-like.d.ts.map +1 -1
- package/dist/runtime/utils/thread-message-like.js.map +1 -1
- package/dist/runtimes/external-store/external-store-adapter.d.ts +1 -1
- package/dist/runtimes/external-store/external-store-adapter.d.ts.map +1 -1
- package/dist/runtimes/external-store/external-store-thread-list-runtime-core.d.ts +1 -1
- package/dist/runtimes/external-store/external-store-thread-list-runtime-core.d.ts.map +1 -1
- package/dist/runtimes/external-store/external-store-thread-runtime-core.d.ts +2 -2
- package/dist/runtimes/external-store/external-store-thread-runtime-core.d.ts.map +1 -1
- package/dist/runtimes/external-store/external-store-thread-runtime-core.js +2 -0
- package/dist/runtimes/external-store/external-store-thread-runtime-core.js.map +1 -1
- package/dist/runtimes/external-store/thread-message-converter.d.ts +1 -1
- package/dist/runtimes/external-store/thread-message-converter.d.ts.map +1 -1
- package/dist/runtimes/internal.d.ts +1 -0
- package/dist/runtimes/internal.d.ts.map +1 -1
- package/dist/runtimes/internal.js +2 -0
- package/dist/runtimes/internal.js.map +1 -1
- package/dist/runtimes/local/local-thread-list-runtime-core.d.ts +1 -1
- package/dist/runtimes/local/local-thread-list-runtime-core.d.ts.map +1 -1
- package/dist/runtimes/local/local-thread-list-runtime-core.js +1 -1
- package/dist/runtimes/local/local-thread-list-runtime-core.js.map +1 -1
- package/dist/runtimes/local/local-thread-runtime-core.d.ts +3 -2
- package/dist/runtimes/local/local-thread-runtime-core.d.ts.map +1 -1
- package/dist/runtimes/local/local-thread-runtime-core.js +1 -0
- package/dist/runtimes/local/local-thread-runtime-core.js.map +1 -1
- package/dist/runtimes/local/should-continue.d.ts +1 -1
- package/dist/runtimes/local/should-continue.d.ts.map +1 -1
- package/dist/runtimes/readonly/ReadonlyThreadRuntimeCore.d.ts +86 -0
- package/dist/runtimes/readonly/ReadonlyThreadRuntimeCore.d.ts.map +1 -0
- package/dist/runtimes/readonly/ReadonlyThreadRuntimeCore.js +170 -0
- package/dist/runtimes/readonly/ReadonlyThreadRuntimeCore.js.map +1 -0
- package/dist/runtimes/remote-thread-list/empty-thread-core.d.ts.map +1 -1
- package/dist/runtimes/remote-thread-list/empty-thread-core.js +1 -0
- package/dist/runtimes/remote-thread-list/empty-thread-core.js.map +1 -1
- package/dist/runtimes/remote-thread-list/optimistic-state.d.ts +9 -0
- package/dist/runtimes/remote-thread-list/optimistic-state.d.ts.map +1 -1
- package/dist/runtimes/remote-thread-list/optimistic-state.js +20 -0
- package/dist/runtimes/remote-thread-list/optimistic-state.js.map +1 -1
- package/dist/runtimes/remote-thread-list/types.d.ts +1 -1
- package/dist/runtimes/remote-thread-list/types.d.ts.map +1 -1
- package/dist/store/clients/model-context-client.js +1 -1
- package/dist/store/clients/model-context-client.js.map +1 -1
- package/dist/store/clients/no-op-composer-client.d.ts.map +1 -1
- package/dist/store/clients/no-op-composer-client.js +4 -0
- package/dist/store/clients/no-op-composer-client.js.map +1 -1
- package/dist/store/clients/runtime-adapter.d.ts +1 -1
- package/dist/store/clients/runtime-adapter.d.ts.map +1 -1
- package/dist/store/clients/runtime-adapter.js +20 -27
- package/dist/store/clients/runtime-adapter.js.map +1 -1
- package/dist/store/clients/suggestions.d.ts.map +1 -1
- package/dist/store/clients/suggestions.js.map +1 -1
- package/dist/store/clients/thread-message-client.d.ts +1 -1
- package/dist/store/clients/thread-message-client.d.ts.map +1 -1
- package/dist/store/clients/thread-message-client.js.map +1 -1
- package/dist/store/index.d.ts +17 -2
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/index.js +5 -3
- package/dist/store/index.js.map +1 -1
- package/dist/store/internal.d.ts +7 -1
- package/dist/store/internal.d.ts.map +1 -1
- package/dist/store/internal.js +7 -1
- package/dist/store/internal.js.map +1 -1
- package/dist/store/runtime-clients/attachment-runtime-client.d.ts +1 -1
- package/dist/store/runtime-clients/attachment-runtime-client.d.ts.map +1 -1
- package/dist/store/runtime-clients/composer-runtime-client.d.ts +1 -1
- package/dist/store/runtime-clients/composer-runtime-client.d.ts.map +1 -1
- package/dist/store/runtime-clients/composer-runtime-client.js +4 -0
- package/dist/store/runtime-clients/composer-runtime-client.js.map +1 -1
- package/dist/store/runtime-clients/message-part-runtime-client.d.ts +1 -1
- package/dist/store/runtime-clients/message-part-runtime-client.d.ts.map +1 -1
- package/dist/store/runtime-clients/message-runtime-client.d.ts +1 -1
- package/dist/store/runtime-clients/message-runtime-client.d.ts.map +1 -1
- package/dist/store/runtime-clients/tap-subscribable.d.ts +1 -1
- package/dist/store/runtime-clients/tap-subscribable.d.ts.map +1 -1
- package/dist/store/runtime-clients/thread-list-item-runtime-client.d.ts +1 -1
- package/dist/store/runtime-clients/thread-list-item-runtime-client.d.ts.map +1 -1
- package/dist/store/runtime-clients/thread-list-item-runtime-client.js.map +1 -1
- package/dist/store/runtime-clients/thread-list-runtime-client.d.ts +2 -1
- package/dist/store/runtime-clients/thread-list-runtime-client.d.ts.map +1 -1
- package/dist/store/runtime-clients/thread-list-runtime-client.js.map +1 -1
- package/dist/store/runtime-clients/thread-runtime-client.d.ts +1 -1
- package/dist/store/runtime-clients/thread-runtime-client.d.ts.map +1 -1
- package/dist/store/runtime-clients/thread-runtime-client.js +2 -1
- package/dist/store/runtime-clients/thread-runtime-client.js.map +1 -1
- package/dist/store/scope-registration.d.ts +2 -0
- package/dist/store/scope-registration.d.ts.map +1 -1
- package/dist/store/scopes/attachment.d.ts +2 -2
- package/dist/store/scopes/attachment.d.ts.map +1 -1
- package/dist/store/scopes/chain-of-thought.d.ts +2 -1
- package/dist/store/scopes/chain-of-thought.d.ts.map +1 -1
- package/dist/store/scopes/composer.d.ts +26 -3
- package/dist/store/scopes/composer.d.ts.map +1 -1
- package/dist/store/scopes/message.d.ts +4 -2
- package/dist/store/scopes/message.d.ts.map +1 -1
- package/dist/store/scopes/model-context.d.ts +2 -2
- package/dist/store/scopes/model-context.d.ts.map +1 -1
- package/dist/store/scopes/part.d.ts +3 -2
- package/dist/store/scopes/part.d.ts.map +1 -1
- package/dist/store/scopes/queue-item.d.ts +20 -0
- package/dist/store/scopes/queue-item.d.ts.map +1 -0
- package/dist/store/scopes/queue-item.js +2 -0
- package/dist/store/scopes/queue-item.js.map +1 -0
- package/dist/store/scopes/thread-list-item.d.ts +2 -1
- package/dist/store/scopes/thread-list-item.d.ts.map +1 -1
- package/dist/store/scopes/thread.d.ts +9 -2
- package/dist/store/scopes/thread.d.ts.map +1 -1
- package/dist/store/scopes/threads.d.ts +1 -1
- package/dist/store/scopes/threads.d.ts.map +1 -1
- package/dist/subscribable/subscribable.d.ts +1 -1
- package/dist/subscribable/subscribable.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/mention.d.ts +32 -0
- package/dist/types/mention.d.ts.map +1 -0
- package/dist/types/mention.js +2 -0
- package/dist/types/mention.js.map +1 -0
- package/dist/utils/composite-context-provider.d.ts +1 -1
- package/dist/utils/composite-context-provider.d.ts.map +1 -1
- package/dist/utils/composite-context-provider.js +1 -1
- package/dist/utils/composite-context-provider.js.map +1 -1
- package/dist/utils/text.d.ts +1 -1
- package/dist/utils/text.d.ts.map +1 -1
- package/dist/utils/text.js.map +1 -1
- package/package.json +12 -12
- package/src/adapters/attachment.ts +1 -1
- package/src/adapters/feedback.ts +1 -1
- package/src/adapters/index.ts +4 -0
- package/src/adapters/mention.ts +77 -0
- package/src/adapters/speech.ts +1 -1
- package/src/adapters/suggestion.ts +1 -1
- package/src/index.ts +265 -5
- package/src/internal.ts +37 -2
- package/src/model-context/frame/host.ts +1 -1
- package/src/model-context/frame/provider.ts +1 -1
- package/src/model-context/registry.ts +1 -1
- package/src/model-context/types.ts +1 -1
- package/src/react/AssistantRuntimeProvider.tsx +1 -12
- package/src/react/RuntimeAdapter.ts +7 -8
- package/src/react/client/DataRenderers.ts +2 -2
- package/src/react/client/Tools.ts +7 -8
- package/src/react/index.ts +162 -10
- package/src/react/model-context/useInlineRender.ts +1 -1
- package/src/react/primitive-hooks/useActionBarSpeak.ts +20 -0
- package/src/react/primitive-hooks/useActionBarStopSpeaking.ts +13 -0
- package/src/react/primitive-hooks/useBranchPickerNext.ts +19 -0
- package/src/react/primitive-hooks/useBranchPickerPrevious.ts +19 -0
- package/src/react/primitive-hooks/useComposerDictate.ts +18 -0
- package/src/react/primitive-hooks/useComposerSend.ts +11 -4
- package/src/react/primitive-hooks/useMessageError.ts +10 -0
- package/src/react/primitive-hooks/useSuggestionTrigger.ts +43 -0
- package/src/react/primitive-hooks/useThreadListItemArchive.ts +12 -0
- package/src/react/primitive-hooks/useThreadListItemDelete.ts +12 -0
- package/src/react/primitive-hooks/useThreadListItemTrigger.ts +12 -0
- package/src/react/primitive-hooks/useThreadListItemUnarchive.ts +12 -0
- package/src/react/primitive-hooks/useThreadListNew.ts +12 -0
- package/src/react/primitives/chainOfThought/ChainOfThoughtParts.tsx +72 -28
- package/src/react/primitives/composer/ComposerAttachments.tsx +69 -30
- package/src/react/primitives/composer/ComposerQueue.tsx +58 -0
- package/src/react/primitives/message/MessageAttachments.tsx +69 -30
- package/src/react/primitives/message/MessageParts.tsx +212 -24
- package/src/react/primitives/message/MessageQuote.tsx +37 -0
- package/src/react/primitives/part/PartMessages.tsx +75 -0
- package/src/react/primitives/thread/ThreadMessages.tsx +113 -99
- package/src/react/primitives/thread/ThreadSuggestions.tsx +72 -28
- package/src/react/primitives/threadList/ThreadListItems.tsx +69 -23
- package/src/react/providers/QueueItemByIndexProvider.tsx +21 -0
- package/src/react/providers/ReadonlyThreadProvider.tsx +84 -0
- package/src/react/runtimes/RemoteThreadListHookInstanceManager.tsx +1 -1
- package/src/react/runtimes/RemoteThreadListThreadListRuntimeCore.tsx +2 -1
- package/src/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.ts +1 -1
- package/src/react/runtimes/cloud/CloudFileAttachmentAdapter.ts +2 -2
- package/src/react/runtimes/cloud/auiV0.ts +1 -1
- package/src/react/runtimes/createMessageConverter.ts +1 -1
- package/src/react/runtimes/external-message-converter.ts +2 -2
- package/src/react/runtimes/useLocalRuntime.ts +1 -1
- package/src/react/runtimes/useToolInvocations.ts +1 -1
- package/src/react/types/MessagePartComponentTypes.ts +4 -0
- package/src/react/utils/getMessageQuote.ts +18 -0
- package/src/runtime/api/assistant-runtime.ts +2 -2
- package/src/runtime/api/attachment-runtime.ts +2 -1
- package/src/runtime/api/bindings.ts +1 -1
- package/src/runtime/api/composer-runtime.ts +9 -10
- package/src/runtime/api/message-part-runtime.ts +3 -3
- package/src/runtime/api/message-runtime.ts +5 -6
- package/src/runtime/api/thread-list-item-runtime.ts +1 -1
- package/src/runtime/api/thread-list-runtime.ts +5 -3
- package/src/runtime/api/thread-runtime.ts +19 -11
- package/src/runtime/base/base-assistant-runtime-core.ts +2 -2
- package/src/runtime/base/base-composer-runtime-core.ts +6 -7
- package/src/runtime/base/base-thread-runtime-core.ts +3 -2
- package/src/runtime/base/default-edit-composer-runtime-core.ts +1 -1
- package/src/runtime/base/default-thread-composer-runtime-core.ts +1 -1
- package/src/runtime/interfaces/assistant-runtime-core.ts +2 -2
- package/src/runtime/interfaces/composer-runtime-core.ts +5 -8
- package/src/runtime/interfaces/thread-list-runtime-core.ts +1 -1
- package/src/runtime/interfaces/thread-runtime-core.ts +5 -7
- package/src/runtime/utils/auto-status.ts +1 -1
- package/src/runtime/utils/chat-model-adapter.ts +7 -5
- package/src/runtime/utils/external-store-message.ts +1 -1
- package/src/runtime/utils/message-repository.ts +2 -1
- package/src/runtime/utils/thread-message-like.ts +3 -4
- package/src/runtimes/external-store/external-store-adapter.ts +1 -1
- package/src/runtimes/external-store/external-store-thread-list-runtime-core.ts +1 -1
- package/src/runtimes/external-store/external-store-thread-runtime-core.ts +4 -2
- package/src/runtimes/external-store/thread-message-converter.ts +1 -1
- package/src/runtimes/internal.ts +3 -0
- package/src/runtimes/local/local-thread-list-runtime-core.ts +1 -1
- package/src/runtimes/local/local-thread-runtime-core.ts +4 -3
- package/src/runtimes/local/should-continue.ts +1 -1
- package/src/runtimes/readonly/ReadonlyThreadRuntimeCore.ts +224 -0
- package/src/runtimes/remote-thread-list/empty-thread-core.ts +1 -0
- package/src/runtimes/remote-thread-list/optimistic-state.ts +27 -0
- package/src/runtimes/remote-thread-list/types.ts +1 -1
- package/src/store/clients/chain-of-thought-client.ts +1 -1
- package/src/store/clients/model-context-client.ts +2 -2
- package/src/store/clients/no-op-composer-client.ts +5 -1
- package/src/store/clients/runtime-adapter.ts +21 -32
- package/src/store/clients/suggestions.ts +2 -1
- package/src/store/clients/thread-message-client.ts +4 -3
- package/src/store/index.ts +83 -2
- package/src/store/internal.ts +7 -1
- package/src/store/runtime-clients/attachment-runtime-client.ts +1 -1
- package/src/store/runtime-clients/composer-runtime-client.ts +8 -4
- package/src/store/runtime-clients/message-part-runtime-client.ts +1 -1
- package/src/store/runtime-clients/message-runtime-client.ts +2 -2
- package/src/store/runtime-clients/tap-subscribable.ts +1 -1
- package/src/store/runtime-clients/thread-list-item-runtime-client.ts +5 -2
- package/src/store/runtime-clients/thread-list-runtime-client.ts +3 -2
- package/src/store/runtime-clients/thread-runtime-client.ts +6 -4
- package/src/store/scope-registration.ts +2 -0
- package/src/store/scopes/attachment.ts +2 -2
- package/src/store/scopes/chain-of-thought.ts +2 -1
- package/src/store/scopes/composer.ts +27 -9
- package/src/store/scopes/message.ts +4 -3
- package/src/store/scopes/model-context.ts +2 -2
- package/src/store/scopes/part.ts +3 -3
- package/src/store/scopes/queue-item.ts +20 -0
- package/src/store/scopes/thread-list-item.ts +2 -4
- package/src/store/scopes/thread.ts +11 -4
- package/src/store/scopes/threads.ts +1 -1
- package/src/subscribable/subscribable.ts +1 -1
- package/src/tests/MessageRepository.test.ts +2 -1
- package/src/tests/OptimisticState-list-race.test.ts +256 -0
- package/src/tests/external-store-thread-runtime-core.test.ts +1 -1
- package/src/tests/mention-formatter.test.ts +112 -0
- package/src/types/index.ts +7 -0
- package/src/types/mention.ts +50 -0
- package/src/utils/composite-context-provider.ts +1 -1
- package/src/utils/text.ts +2 -1
- package/dist/model-context/frame/index.d.ts +0 -5
- package/dist/model-context/frame/index.d.ts.map +0 -1
- package/dist/model-context/frame/index.js +0 -4
- package/dist/model-context/frame/index.js.map +0 -1
- package/dist/model-context/index.d.ts +0 -8
- package/dist/model-context/index.d.ts.map +0 -1
- package/dist/model-context/index.js +0 -9
- package/dist/model-context/index.js.map +0 -1
- package/dist/react/client/index.d.ts +0 -3
- package/dist/react/client/index.d.ts.map +0 -1
- package/dist/react/client/index.js +0 -3
- package/dist/react/client/index.js.map +0 -1
- package/dist/react/model-context/index.d.ts +0 -12
- package/dist/react/model-context/index.d.ts.map +0 -1
- package/dist/react/model-context/index.js +0 -11
- package/dist/react/model-context/index.js.map +0 -1
- package/dist/react/primitive-hooks/index.d.ts +0 -15
- package/dist/react/primitive-hooks/index.d.ts.map +0 -1
- package/dist/react/primitive-hooks/index.js +0 -15
- package/dist/react/primitive-hooks/index.js.map +0 -1
- package/dist/react/providers/index.d.ts +0 -10
- package/dist/react/providers/index.d.ts.map +0 -1
- package/dist/react/providers/index.js +0 -10
- package/dist/react/providers/index.js.map +0 -1
- package/dist/react/runtimes/cloud/index.d.ts +0 -4
- package/dist/react/runtimes/cloud/index.d.ts.map +0 -1
- package/dist/react/runtimes/cloud/index.js +0 -4
- package/dist/react/runtimes/cloud/index.js.map +0 -1
- package/dist/react/runtimes/index.d.ts +0 -11
- package/dist/react/runtimes/index.d.ts.map +0 -1
- package/dist/react/runtimes/index.js +0 -11
- package/dist/react/runtimes/index.js.map +0 -1
- package/dist/react/types/index.d.ts +0 -3
- package/dist/react/types/index.d.ts.map +0 -1
- package/dist/react/types/index.js +0 -2
- package/dist/react/types/index.js.map +0 -1
- package/dist/react/types/scopes/index.d.ts +0 -3
- package/dist/react/types/scopes/index.d.ts.map +0 -1
- package/dist/react/types/scopes/index.js +0 -2
- package/dist/react/types/scopes/index.js.map +0 -1
- package/dist/runtime/index.d.ts +0 -20
- package/dist/runtime/index.d.ts.map +0 -1
- package/dist/runtime/index.js +0 -7
- package/dist/runtime/index.js.map +0 -1
- package/dist/runtimes/external-store/index.d.ts +0 -8
- package/dist/runtimes/external-store/index.d.ts.map +0 -1
- package/dist/runtimes/external-store/index.js +0 -5
- package/dist/runtimes/external-store/index.js.map +0 -1
- package/dist/runtimes/index.d.ts +0 -6
- package/dist/runtimes/index.d.ts.map +0 -1
- package/dist/runtimes/index.js +0 -4
- package/dist/runtimes/index.js.map +0 -1
- package/dist/runtimes/local/index.d.ts +0 -7
- package/dist/runtimes/local/index.d.ts.map +0 -1
- package/dist/runtimes/local/index.js +0 -5
- package/dist/runtimes/local/index.js.map +0 -1
- package/dist/store/clients/index.d.ts +0 -6
- package/dist/store/clients/index.d.ts.map +0 -1
- package/dist/store/clients/index.js +0 -6
- package/dist/store/clients/index.js.map +0 -1
- package/dist/store/runtime-clients/index.d.ts +0 -8
- package/dist/store/runtime-clients/index.d.ts.map +0 -1
- package/dist/store/runtime-clients/index.js +0 -8
- package/dist/store/runtime-clients/index.js.map +0 -1
- package/dist/store/scopes/index.d.ts +0 -12
- package/dist/store/scopes/index.d.ts.map +0 -1
- package/dist/store/scopes/index.js +0 -2
- package/dist/store/scopes/index.js.map +0 -1
- package/dist/subscribable/index.d.ts +0 -3
- package/dist/subscribable/index.d.ts.map +0 -1
- package/dist/subscribable/index.js +0 -8
- package/dist/subscribable/index.js.map +0 -1
- package/dist/utils/index.d.ts +0 -4
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js +0 -7
- package/dist/utils/index.js.map +0 -1
- package/src/model-context/frame/index.ts +0 -10
- package/src/model-context/index.ts +0 -35
- package/src/react/client/index.ts +0 -2
- package/src/react/model-context/index.ts +0 -25
- package/src/react/primitive-hooks/index.ts +0 -20
- package/src/react/providers/index.ts +0 -15
- package/src/react/runtimes/cloud/index.ts +0 -3
- package/src/react/runtimes/index.ts +0 -36
- package/src/react/types/index.ts +0 -31
- package/src/react/types/scopes/index.ts +0 -6
- package/src/runtime/index.ts +0 -109
- package/src/runtimes/external-store/index.ts +0 -15
- package/src/runtimes/index.ts +0 -28
- package/src/runtimes/local/index.ts +0 -6
- package/src/store/clients/index.ts +0 -8
- package/src/store/runtime-clients/index.ts +0 -7
- package/src/store/scopes/index.ts +0 -68
- package/src/subscribable/index.ts +0 -21
- package/src/utils/index.ts +0 -14
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MessageStatus, ThreadMessage } from "../../../types";
|
|
1
|
+
import type { MessageStatus, ThreadMessage } from "../../../types/message";
|
|
2
2
|
import { fromThreadMessageLike } from "../../../runtime/utils/thread-message-like";
|
|
3
3
|
import { CloudMessage } from "assistant-cloud";
|
|
4
4
|
import { isJSONValue } from "../../../utils/json/is-json";
|
|
@@ -16,11 +16,11 @@ import type { ToolExecutionStatus } from "./useToolInvocations";
|
|
|
16
16
|
import type { ReadonlyJSONValue } from "assistant-stream/utils";
|
|
17
17
|
import { generateErrorMessageId } from "../../utils/id";
|
|
18
18
|
import type {
|
|
19
|
-
MessageTiming,
|
|
20
19
|
ThreadAssistantMessage,
|
|
21
20
|
ThreadMessage,
|
|
22
21
|
ToolCallMessagePart,
|
|
23
|
-
} from "../../types";
|
|
22
|
+
} from "../../types/message";
|
|
23
|
+
import type { MessageTiming } from "../../types/message";
|
|
24
24
|
|
|
25
25
|
export namespace useExternalMessageConverter {
|
|
26
26
|
export type Message =
|
|
@@ -8,7 +8,7 @@ import type { LocalRuntimeOptionsBase } from "../../runtimes/local/local-runtime
|
|
|
8
8
|
import { AssistantRuntimeImpl, LocalRuntimeCore } from "../../internal";
|
|
9
9
|
import { useAuiState } from "@assistant-ui/store";
|
|
10
10
|
import { useRemoteThreadListRuntime } from "./useRemoteThreadListRuntime";
|
|
11
|
-
import { useCloudThreadListAdapter } from "./cloud";
|
|
11
|
+
import { useCloudThreadListAdapter } from "./cloud/useCloudThreadListAdapter";
|
|
12
12
|
import { useRuntimeAdapters } from "./RuntimeAdapterProvider";
|
|
13
13
|
import type { AssistantCloud } from "assistant-cloud";
|
|
14
14
|
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
type ReadonlyJSONValue,
|
|
14
14
|
} from "assistant-stream/utils";
|
|
15
15
|
import { isJSONValueEqual } from "../../utils/json/is-json-equal";
|
|
16
|
-
import type { ThreadMessage } from "../../types";
|
|
16
|
+
import type { ThreadMessage } from "../../types/message";
|
|
17
17
|
|
|
18
18
|
export type AssistantTransportState = {
|
|
19
19
|
readonly messages: readonly ThreadMessage[];
|
|
@@ -9,6 +9,7 @@ import type {
|
|
|
9
9
|
TextMessagePart,
|
|
10
10
|
ToolCallMessagePart,
|
|
11
11
|
Unstable_AudioMessagePart,
|
|
12
|
+
QuoteInfo,
|
|
12
13
|
} from "../..";
|
|
13
14
|
import type { MessagePartState } from "../..";
|
|
14
15
|
import { ToolResponse } from "assistant-stream";
|
|
@@ -64,3 +65,6 @@ export type ToolCallMessagePartComponent<
|
|
|
64
65
|
TArgs = any,
|
|
65
66
|
TResult = any,
|
|
66
67
|
> = ComponentType<ToolCallMessagePartProps<TArgs, TResult>>;
|
|
68
|
+
|
|
69
|
+
export type QuoteMessagePartProps = QuoteInfo;
|
|
70
|
+
export type QuoteMessagePartComponent = ComponentType<QuoteMessagePartProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { QuoteInfo } from "../../types/quote";
|
|
2
|
+
|
|
3
|
+
type MessageQuoteState = {
|
|
4
|
+
message: {
|
|
5
|
+
metadata?: unknown;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const getMessageQuote = (
|
|
10
|
+
state: MessageQuoteState,
|
|
11
|
+
): QuoteInfo | undefined => {
|
|
12
|
+
const metadata = state.message.metadata;
|
|
13
|
+
if (!metadata || typeof metadata !== "object") return undefined;
|
|
14
|
+
|
|
15
|
+
return (metadata as { custom?: Record<string, unknown> }).custom?.quote as
|
|
16
|
+
| QuoteInfo
|
|
17
|
+
| undefined;
|
|
18
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Unsubscribe } from "../../types";
|
|
2
|
-
import type { ModelContextProvider } from "../../model-context";
|
|
1
|
+
import type { Unsubscribe } from "../../types/unsubscribe";
|
|
2
|
+
import type { ModelContextProvider } from "../../model-context/types";
|
|
3
3
|
import type { AssistantRuntimeCore } from "../interfaces/assistant-runtime-core";
|
|
4
4
|
import type { ThreadRuntime } from "./thread-runtime";
|
|
5
5
|
import {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { Attachment, CompleteAttachment
|
|
1
|
+
import type { Attachment, CompleteAttachment } from "../../types/attachment";
|
|
2
|
+
import type { Unsubscribe } from "../../types/unsubscribe";
|
|
2
3
|
import type { SubscribableWithState } from "../../subscribable/subscribable";
|
|
3
4
|
|
|
4
5
|
import type { ComposerRuntimeCoreBinding } from "./bindings";
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
QuoteInfo,
|
|
7
|
-
Unsubscribe,
|
|
8
|
-
} from "../../types";
|
|
1
|
+
import type { Attachment, CreateAttachment } from "../../types/attachment";
|
|
2
|
+
import type { MessageRole } from "../../types/message";
|
|
3
|
+
import type { QuoteInfo } from "../../types/quote";
|
|
4
|
+
import type { Unsubscribe } from "../../types/unsubscribe";
|
|
5
|
+
import type { RunConfig } from "../../types/message";
|
|
9
6
|
import {
|
|
10
7
|
LazyMemoizeSubject,
|
|
8
|
+
EventSubscriptionSubject,
|
|
9
|
+
} from "../../subscribable/subscribable";
|
|
10
|
+
import {
|
|
11
11
|
ShallowMemoizeSubject,
|
|
12
12
|
SKIP_UPDATE,
|
|
13
|
-
|
|
14
|
-
} from "../../subscribable";
|
|
13
|
+
} from "../../subscribable/subscribable";
|
|
15
14
|
import type {
|
|
16
15
|
ComposerRuntimeCore,
|
|
17
16
|
ComposerRuntimeEventType,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
ThreadAssistantMessagePart,
|
|
3
3
|
ThreadUserMessagePart,
|
|
4
|
-
MessagePartStatus,
|
|
5
4
|
ToolCallMessagePartStatus,
|
|
6
|
-
|
|
7
|
-
} from "../../types";
|
|
5
|
+
} from "../../types/message";
|
|
6
|
+
import type { Unsubscribe } from "../../types/unsubscribe";
|
|
7
|
+
import type { MessagePartStatus } from "../../types/message";
|
|
8
8
|
import type { SubscribableWithState } from "../../subscribable/subscribable";
|
|
9
9
|
import type { ThreadRuntimeCoreBinding } from "./thread-runtime";
|
|
10
10
|
import type { MessageStateBinding } from "./bindings";
|
|
@@ -4,20 +4,19 @@ import {
|
|
|
4
4
|
} from "../interfaces/thread-runtime-core";
|
|
5
5
|
import { symbolInnerMessage } from "../utils/external-store-message";
|
|
6
6
|
import type {
|
|
7
|
-
MessagePartStatus,
|
|
8
|
-
RunConfig,
|
|
9
7
|
ToolCallMessagePartStatus,
|
|
10
8
|
ThreadMessage,
|
|
11
9
|
ThreadAssistantMessagePart,
|
|
12
10
|
ThreadUserMessagePart,
|
|
13
|
-
|
|
14
|
-
} from "../../types";
|
|
11
|
+
} from "../../types/message";
|
|
12
|
+
import type { Unsubscribe } from "../../types/unsubscribe";
|
|
13
|
+
import type { MessagePartStatus, RunConfig } from "../../types/message";
|
|
15
14
|
import { getThreadMessageText } from "../../utils/text";
|
|
15
|
+
import { NestedSubscriptionSubject } from "../../subscribable/subscribable";
|
|
16
16
|
import {
|
|
17
|
-
NestedSubscriptionSubject,
|
|
18
17
|
SKIP_UPDATE,
|
|
19
18
|
ShallowMemoizeSubject,
|
|
20
|
-
} from "../../subscribable";
|
|
19
|
+
} from "../../subscribable/subscribable";
|
|
21
20
|
import {
|
|
22
21
|
AttachmentRuntime,
|
|
23
22
|
AttachmentState,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Unsubscribe } from "../../types";
|
|
1
|
+
import type { Unsubscribe } from "../../types/unsubscribe";
|
|
2
2
|
import type { SubscribableWithState } from "../../subscribable/subscribable";
|
|
3
3
|
import type { ThreadListItemRuntimePath } from "./paths";
|
|
4
4
|
import type { ThreadListRuntimeCoreBinding } from "./thread-list-runtime";
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import type { Unsubscribe } from "../../types";
|
|
1
|
+
import type { Unsubscribe } from "../../types/unsubscribe";
|
|
2
2
|
import {
|
|
3
3
|
LazyMemoizeSubject,
|
|
4
|
+
NestedSubscriptionSubject,
|
|
5
|
+
} from "../../subscribable/subscribable";
|
|
6
|
+
import {
|
|
4
7
|
SKIP_UPDATE,
|
|
5
8
|
ShallowMemoizeSubject,
|
|
6
|
-
|
|
7
|
-
} from "../../subscribable";
|
|
9
|
+
} from "../../subscribable/subscribable";
|
|
8
10
|
import type { ThreadListRuntimeCore } from "../interfaces/thread-list-runtime-core";
|
|
9
11
|
import {
|
|
10
12
|
ThreadListItemRuntime,
|
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
MessageRuntimeImpl,
|
|
15
15
|
MessageState,
|
|
16
16
|
} from "./message-runtime";
|
|
17
|
+
import { NestedSubscriptionSubject } from "../../subscribable/subscribable";
|
|
17
18
|
import {
|
|
18
|
-
NestedSubscriptionSubject,
|
|
19
19
|
ShallowMemoizeSubject,
|
|
20
20
|
SKIP_UPDATE,
|
|
21
|
-
} from "../../subscribable";
|
|
21
|
+
} from "../../subscribable/subscribable";
|
|
22
22
|
import type { SubscribableWithState } from "../../subscribable/subscribable";
|
|
23
23
|
import {
|
|
24
24
|
ThreadComposerRuntime,
|
|
@@ -30,15 +30,12 @@ import {
|
|
|
30
30
|
ThreadRuntimePath,
|
|
31
31
|
} from "./paths";
|
|
32
32
|
import type { ThreadListItemState } from "./bindings";
|
|
33
|
-
import type {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
Unsubscribe,
|
|
38
|
-
} from "../../types";
|
|
39
|
-
import { EventSubscriptionSubject } from "../../subscribable";
|
|
33
|
+
import type { AppendMessage, ThreadMessage } from "../../types/message";
|
|
34
|
+
import type { Unsubscribe } from "../../types/unsubscribe";
|
|
35
|
+
import type { RunConfig } from "../../types/message";
|
|
36
|
+
import { EventSubscriptionSubject } from "../../subscribable/subscribable";
|
|
40
37
|
import { symbolInnerMessage } from "../utils/external-store-message";
|
|
41
|
-
import { ModelContext } from "../../model-context";
|
|
38
|
+
import { ModelContext } from "../../model-context/types";
|
|
42
39
|
import {
|
|
43
40
|
ChatModelRunOptions,
|
|
44
41
|
ChatModelRunResult,
|
|
@@ -263,6 +260,11 @@ export type ThreadRuntime = {
|
|
|
263
260
|
* Resume a run with the given configuration.
|
|
264
261
|
* @param config The configuration for resuming the run
|
|
265
262
|
**/
|
|
263
|
+
resumeRun(config: CreateResumeRunConfig): void;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* @deprecated Use `resumeRun` instead.
|
|
267
|
+
*/
|
|
266
268
|
unstable_resumeRun(config: CreateResumeRunConfig): void;
|
|
267
269
|
|
|
268
270
|
/**
|
|
@@ -377,6 +379,7 @@ export class ThreadRuntimeImpl implements ThreadRuntime {
|
|
|
377
379
|
|
|
378
380
|
protected __internal_bindMethods() {
|
|
379
381
|
this.append = this.append.bind(this);
|
|
382
|
+
this.resumeRun = this.resumeRun.bind(this);
|
|
380
383
|
this.unstable_resumeRun = this.unstable_resumeRun.bind(this);
|
|
381
384
|
this.unstable_loadExternalState =
|
|
382
385
|
this.unstable_loadExternalState.bind(this);
|
|
@@ -431,10 +434,15 @@ export class ThreadRuntimeImpl implements ThreadRuntime {
|
|
|
431
434
|
return this._threadBinding.getState().startRun(toStartRunConfig(config));
|
|
432
435
|
}
|
|
433
436
|
|
|
434
|
-
public
|
|
437
|
+
public resumeRun(config: CreateResumeRunConfig) {
|
|
435
438
|
return this._threadBinding.getState().resumeRun(toResumeRunConfig(config));
|
|
436
439
|
}
|
|
437
440
|
|
|
441
|
+
/** @deprecated Use `resumeRun` instead. */
|
|
442
|
+
public unstable_resumeRun(config: CreateResumeRunConfig) {
|
|
443
|
+
return this.resumeRun(config);
|
|
444
|
+
}
|
|
445
|
+
|
|
438
446
|
public exportExternalState() {
|
|
439
447
|
return this._threadBinding.getState().exportExternalState();
|
|
440
448
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Unsubscribe } from "../../types";
|
|
2
|
-
import type { ModelContextProvider } from "../../model-context";
|
|
1
|
+
import type { Unsubscribe } from "../../types/unsubscribe";
|
|
2
|
+
import type { ModelContextProvider } from "../../model-context/types";
|
|
3
3
|
import { CompositeContextProvider } from "../../utils/composite-context-provider";
|
|
4
4
|
import type { AssistantRuntimeCore } from "../interfaces/assistant-runtime-core";
|
|
5
5
|
import type { ThreadListRuntimeCore } from "../interfaces/thread-list-runtime-core";
|
|
@@ -3,13 +3,12 @@ import type {
|
|
|
3
3
|
CompleteAttachment,
|
|
4
4
|
CreateAttachment,
|
|
5
5
|
PendingAttachment,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} from "../../
|
|
12
|
-
import { BaseSubscribable } from "../../subscribable";
|
|
6
|
+
} from "../../types/attachment";
|
|
7
|
+
import type { MessageRole, AppendMessage } from "../../types/message";
|
|
8
|
+
import type { QuoteInfo } from "../../types/quote";
|
|
9
|
+
import type { Unsubscribe } from "../../types/unsubscribe";
|
|
10
|
+
import type { RunConfig } from "../../types/message";
|
|
11
|
+
import { BaseSubscribable } from "../../subscribable/subscribable";
|
|
13
12
|
import type { AttachmentAdapter } from "../../adapters/attachment";
|
|
14
13
|
import type {
|
|
15
14
|
ComposerRuntimeCore,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { AppendMessage, ThreadMessage
|
|
2
|
-
import type {
|
|
1
|
+
import type { AppendMessage, ThreadMessage } from "../../types/message";
|
|
2
|
+
import type { Unsubscribe } from "../../types/unsubscribe";
|
|
3
|
+
import type { ModelContextProvider } from "../../model-context/types";
|
|
3
4
|
import { getThreadMessageText } from "../../utils/text";
|
|
4
5
|
import {
|
|
5
6
|
ExportedMessageRepository,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AppendMessage, ThreadMessage } from "../../types";
|
|
1
|
+
import type { AppendMessage, ThreadMessage } from "../../types/message";
|
|
2
2
|
import { getThreadMessageText } from "../../utils/text";
|
|
3
3
|
import type { AttachmentAdapter } from "../../adapters/attachment";
|
|
4
4
|
import type { DictationAdapter } from "../../adapters/speech";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AppendMessage } from "../../types";
|
|
1
|
+
import type { AppendMessage } from "../../types/message";
|
|
2
2
|
import type { AttachmentAdapter } from "../../adapters/attachment";
|
|
3
3
|
import type { DictationAdapter } from "../../adapters/speech";
|
|
4
4
|
import type { ThreadComposerRuntimeCore } from "../interfaces/composer-runtime-core";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Unsubscribe } from "../../types";
|
|
2
|
-
import type { ModelContextProvider } from "../../model-context";
|
|
1
|
+
import type { Unsubscribe } from "../../types/unsubscribe";
|
|
2
|
+
import type { ModelContextProvider } from "../../model-context/types";
|
|
3
3
|
import type { ThreadListRuntimeCore } from "./thread-list-runtime-core";
|
|
4
4
|
|
|
5
5
|
export type AssistantRuntimeCore = {
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
CreateAttachment,
|
|
7
|
-
Unsubscribe,
|
|
8
|
-
} from "../../types";
|
|
1
|
+
import type { MessageRole } from "../../types/message";
|
|
2
|
+
import type { QuoteInfo } from "../../types/quote";
|
|
3
|
+
import type { Attachment, CreateAttachment } from "../../types/attachment";
|
|
4
|
+
import type { Unsubscribe } from "../../types/unsubscribe";
|
|
5
|
+
import type { RunConfig } from "../../types/message";
|
|
9
6
|
import type { DictationAdapter } from "../../adapters/speech";
|
|
10
7
|
|
|
11
8
|
export type ComposerRuntimeEventType = "send" | "attachmentAdd";
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import type { ReadonlyJSONValue } from "assistant-stream/utils";
|
|
2
|
-
import type { ModelContext } from "../../model-context";
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
AppendMessage,
|
|
7
|
-
ThreadMessage,
|
|
8
|
-
} from "../../types";
|
|
2
|
+
import type { ModelContext } from "../../model-context/types";
|
|
3
|
+
import type { Unsubscribe } from "../../types/unsubscribe";
|
|
4
|
+
import type { AppendMessage, ThreadMessage } from "../../types/message";
|
|
5
|
+
import type { RunConfig } from "../../types/message";
|
|
9
6
|
import type { SpeechSynthesisAdapter } from "../../adapters/speech";
|
|
10
7
|
import type {
|
|
11
8
|
ChatModelRunOptions,
|
|
@@ -29,6 +26,7 @@ export type RuntimeCapabilities = {
|
|
|
29
26
|
readonly dictation: boolean;
|
|
30
27
|
readonly attachments: boolean;
|
|
31
28
|
readonly feedback: boolean;
|
|
29
|
+
readonly queue: boolean;
|
|
32
30
|
};
|
|
33
31
|
|
|
34
32
|
export type AddToolResultOptions = {
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
FileMessagePart,
|
|
3
3
|
MessageStatus,
|
|
4
|
-
MessageTiming,
|
|
5
4
|
ReasoningMessagePart,
|
|
6
|
-
RunConfig,
|
|
7
5
|
SourceMessagePart,
|
|
8
|
-
TextMessagePart,
|
|
9
6
|
ThreadAssistantMessagePart,
|
|
10
7
|
ThreadMessage,
|
|
11
8
|
ThreadStep,
|
|
12
9
|
ToolCallMessagePart,
|
|
13
|
-
} from "../../types";
|
|
14
|
-
import type {
|
|
10
|
+
} from "../../types/message";
|
|
11
|
+
import type {
|
|
12
|
+
MessageTiming,
|
|
13
|
+
RunConfig,
|
|
14
|
+
TextMessagePart,
|
|
15
|
+
} from "../../types/message";
|
|
16
|
+
import type { ModelContext } from "../../model-context/types";
|
|
15
17
|
import { ReadonlyJSONValue } from "assistant-stream/utils";
|
|
16
18
|
|
|
17
19
|
export type ChatModelRunUpdate = {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ThreadMessage } from "../../types/message";
|
|
2
|
+
import type { RunConfig } from "../../types/message";
|
|
2
3
|
import { generateId, generateOptimisticId } from "../../utils/id";
|
|
3
4
|
import type { ThreadMessageLike } from "./thread-message-like";
|
|
4
5
|
import { getAutoStatus } from "./auto-status";
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { parsePartialJsonObject } from "assistant-stream/utils";
|
|
2
2
|
import { generateId } from "../../utils/id";
|
|
3
3
|
import type {
|
|
4
|
-
MessageTiming,
|
|
5
4
|
ReasoningMessagePart,
|
|
6
5
|
SourceMessagePart,
|
|
7
6
|
ThreadStep,
|
|
8
7
|
MessageStatus,
|
|
9
|
-
TextMessagePart,
|
|
10
8
|
ImageMessagePart,
|
|
11
9
|
ThreadMessage,
|
|
12
10
|
ThreadAssistantMessagePart,
|
|
@@ -14,11 +12,12 @@ import type {
|
|
|
14
12
|
ThreadUserMessagePart,
|
|
15
13
|
ThreadUserMessage,
|
|
16
14
|
ThreadSystemMessage,
|
|
17
|
-
CompleteAttachment,
|
|
18
15
|
FileMessagePart,
|
|
19
16
|
DataMessagePart,
|
|
20
17
|
Unstable_AudioMessagePart,
|
|
21
|
-
} from "../../types";
|
|
18
|
+
} from "../../types/message";
|
|
19
|
+
import type { CompleteAttachment } from "../../types/attachment";
|
|
20
|
+
import type { MessageTiming, TextMessagePart } from "../../types/message";
|
|
22
21
|
import { ReadonlyJSONObject, ReadonlyJSONValue } from "assistant-stream/utils";
|
|
23
22
|
|
|
24
23
|
type DataPrefixedPart = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AppendMessage, ThreadMessage } from "../../types";
|
|
1
|
+
import type { AppendMessage, ThreadMessage } from "../../types/message";
|
|
2
2
|
import type { ThreadMessageLike } from "../../runtime/utils/thread-message-like";
|
|
3
3
|
import type { AttachmentAdapter } from "../../adapters/attachment";
|
|
4
4
|
import type {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AppendMessage, ThreadMessage } from "../../types";
|
|
1
|
+
import type { AppendMessage, ThreadMessage } from "../../types/message";
|
|
2
2
|
import type {
|
|
3
3
|
AddToolResultOptions,
|
|
4
4
|
ResumeRunConfig,
|
|
@@ -24,7 +24,7 @@ import type {
|
|
|
24
24
|
ThreadRuntimeCore,
|
|
25
25
|
} from "../../runtime/interfaces/thread-runtime-core";
|
|
26
26
|
import { BaseThreadRuntimeCore } from "../../runtime/base/base-thread-runtime-core";
|
|
27
|
-
import type { ModelContextProvider } from "../../model-context";
|
|
27
|
+
import type { ModelContextProvider } from "../../model-context/types";
|
|
28
28
|
import {
|
|
29
29
|
ExportedMessageRepository,
|
|
30
30
|
MessageRepository,
|
|
@@ -65,6 +65,7 @@ export class ExternalStoreThreadRuntimeCore
|
|
|
65
65
|
dictation: false,
|
|
66
66
|
attachments: false,
|
|
67
67
|
feedback: false,
|
|
68
|
+
queue: false,
|
|
68
69
|
};
|
|
69
70
|
|
|
70
71
|
public get capabilities() {
|
|
@@ -139,6 +140,7 @@ export class ExternalStoreThreadRuntimeCore
|
|
|
139
140
|
unstable_copy: this._store.unstable_capabilities?.copy !== false,
|
|
140
141
|
attachments: !!this._store.adapters?.attachments,
|
|
141
142
|
feedback: !!this._store.adapters?.feedback,
|
|
143
|
+
queue: false,
|
|
142
144
|
};
|
|
143
145
|
if (!shallowEqual(this._capabilities, newCapabilities)) {
|
|
144
146
|
this._capabilities = newCapabilities;
|
package/src/runtimes/internal.ts
CHANGED
|
@@ -17,6 +17,9 @@ export {
|
|
|
17
17
|
export { ThreadMessageConverter } from "./external-store/thread-message-converter";
|
|
18
18
|
export type { ConverterCallback } from "./external-store/thread-message-converter";
|
|
19
19
|
|
|
20
|
+
// Readonly Runtime
|
|
21
|
+
export { ReadonlyThreadRuntimeCore } from "./readonly/ReadonlyThreadRuntimeCore";
|
|
22
|
+
|
|
20
23
|
// Remote Thread List
|
|
21
24
|
export { OptimisticState } from "./remote-thread-list/optimistic-state";
|
|
22
25
|
export { EMPTY_THREAD_CORE } from "./remote-thread-list/empty-thread-core";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ThreadListRuntimeCore } from "../../runtime/interfaces/thread-list-runtime-core";
|
|
2
|
-
import { BaseSubscribable } from "../../subscribable";
|
|
2
|
+
import { BaseSubscribable } from "../../subscribable/subscribable";
|
|
3
3
|
import type { LocalThreadRuntimeCore } from "./local-thread-runtime-core";
|
|
4
4
|
|
|
5
5
|
export type LocalThreadFactory = () => LocalThreadRuntimeCore;
|
|
@@ -16,11 +16,11 @@ import type {
|
|
|
16
16
|
} from "../../runtime/interfaces/thread-runtime-core";
|
|
17
17
|
import { BaseThreadRuntimeCore } from "../../runtime/base/base-thread-runtime-core";
|
|
18
18
|
import type {
|
|
19
|
-
RunConfig,
|
|
20
19
|
AppendMessage,
|
|
21
20
|
ThreadAssistantMessage,
|
|
22
|
-
} from "../../types";
|
|
23
|
-
import type {
|
|
21
|
+
} from "../../types/message";
|
|
22
|
+
import type { RunConfig } from "../../types/message";
|
|
23
|
+
import type { ModelContextProvider } from "../../model-context/types";
|
|
24
24
|
|
|
25
25
|
class AbortError extends Error {
|
|
26
26
|
override name = "AbortError";
|
|
@@ -47,6 +47,7 @@ export class LocalThreadRuntimeCore
|
|
|
47
47
|
dictation: false,
|
|
48
48
|
attachments: false,
|
|
49
49
|
feedback: false,
|
|
50
|
+
queue: false,
|
|
50
51
|
};
|
|
51
52
|
|
|
52
53
|
private abortController: AbortController | null = null;
|