@assistant-ui/core 0.3.1 → 0.3.3
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/index.d.ts +4 -4
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +6 -7
- package/dist/internal.js +5 -6
- package/dist/react/AssistantProvider.d.ts +1 -1
- package/dist/react/AssistantProvider.d.ts.map +1 -1
- package/dist/react/AssistantProvider.js +35 -9
- package/dist/react/AssistantProvider.js.map +1 -1
- package/dist/react/AssistantRuntimeProvider.d.ts +1 -1
- package/dist/react/AssistantRuntimeProvider.js +1 -1
- package/dist/react/RuntimeAdapter.js +2 -2
- package/dist/react/adapters/LocalStorageThreadListAdapter.d.ts.map +1 -1
- package/dist/react/adapters/LocalStorageThreadListAdapter.js +17 -33
- package/dist/react/adapters/LocalStorageThreadListAdapter.js.map +1 -1
- package/dist/react/client/DataRenderers.js +1 -1
- package/dist/react/client/Interactables.js +1 -1
- package/dist/react/client/Tools.js +2 -2
- package/dist/react/index.d.ts +2 -1
- package/dist/react/index.js +2 -1
- package/dist/react/interactables-legacy/Interactables.js +1 -1
- package/dist/react/interactables-legacy/useAssistantInteractable.js +1 -1
- package/dist/react/interactables-legacy/useInteractableState.js +2 -2
- package/dist/react/model-context/useAssistantContext.js +1 -1
- package/dist/react/model-context/useAssistantDataUI.js +2 -2
- package/dist/react/model-context/useAssistantInstructions.js +2 -2
- package/dist/react/model-context/useAssistantTool.js +2 -2
- package/dist/react/model-context/useAssistantToolUI.js +2 -2
- package/dist/react/model-context/useAuiToolOverrides.js +1 -1
- package/dist/react/model-context/useInlineRender.js +1 -1
- package/dist/react/model-context/useInteractable.js +1 -1
- package/dist/react/model-context/useInteractableState.js +2 -2
- package/dist/react/model-context/useInteractableVersions.js +2 -2
- package/dist/react/model-context/useToolArgsStatus.js +2 -2
- package/dist/react/primitive-hooks/useActionBarCopy.js +52 -25
- package/dist/react/primitive-hooks/useActionBarCopy.js.map +1 -1
- package/dist/react/primitive-hooks/useActionBarEdit.js +2 -2
- package/dist/react/primitive-hooks/useActionBarFeedback.js +2 -2
- package/dist/react/primitive-hooks/useActionBarReload.js +2 -2
- package/dist/react/primitive-hooks/useActionBarSpeak.js +2 -2
- package/dist/react/primitive-hooks/useActionBarStopSpeaking.js +2 -2
- package/dist/react/primitive-hooks/useBranchPickerNext.js +2 -2
- package/dist/react/primitive-hooks/useBranchPickerPrevious.js +2 -2
- package/dist/react/primitive-hooks/useComposerAddAttachment.js +2 -2
- package/dist/react/primitive-hooks/useComposerCancel.js +2 -2
- package/dist/react/primitive-hooks/useComposerDictate.js +2 -2
- package/dist/react/primitive-hooks/useComposerSend.js +2 -2
- package/dist/react/primitive-hooks/useEditComposerCancel.js +2 -2
- package/dist/react/primitive-hooks/useEditComposerSend.js +2 -2
- package/dist/react/primitive-hooks/useMessageBranching.js +2 -2
- package/dist/react/primitive-hooks/useMessageReload.js +2 -2
- package/dist/react/primitive-hooks/useSuggestionTrigger.js +2 -2
- package/dist/react/primitive-hooks/useThreadListItemArchive.js +2 -2
- package/dist/react/primitive-hooks/useThreadListItemDelete.js +2 -2
- package/dist/react/primitive-hooks/useThreadListItemTrigger.js +2 -2
- package/dist/react/primitive-hooks/useThreadListItemUnarchive.js +2 -2
- package/dist/react/primitive-hooks/useThreadListLoadMore.js +2 -2
- package/dist/react/primitive-hooks/useThreadListNew.js +2 -2
- package/dist/react/primitive-hooks/useThreadMessageIds.js +1 -1
- package/dist/react/primitive-hooks/useVoice.js +2 -2
- package/dist/react/primitives/chainOfThought/ChainOfThoughtParts.js +2 -2
- package/dist/react/primitives/composer/ComposerAttachments.js +2 -2
- package/dist/react/primitives/composer/ComposerIf.js +1 -1
- package/dist/react/primitives/composer/ComposerQueue.js +1 -1
- package/dist/react/primitives/generativeUI/GenerativeUI.js +2 -2
- package/dist/react/primitives/message/MessageAttachments.js +2 -2
- package/dist/react/primitives/message/MessageGroupedParts.d.ts +2 -1
- package/dist/react/primitives/message/MessageGroupedParts.d.ts.map +1 -1
- package/dist/react/primitives/message/MessageGroupedParts.js +3 -3
- package/dist/react/primitives/message/MessageGroupedParts.js.map +1 -1
- package/dist/react/primitives/message/MessageParts.js +2 -2
- package/dist/react/primitives/message/MessageQuote.js +2 -2
- package/dist/react/primitives/part/PartMessages.js +2 -2
- package/dist/react/primitives/thread/ThreadMessages.js +2 -2
- package/dist/react/primitives/thread/ThreadSuggestions.js +2 -2
- package/dist/react/primitives/threadList/ThreadListItems.js +2 -2
- package/dist/react/primitives/threadListItem/ThreadListItemTitle.js +1 -1
- package/dist/react/providers/AttachmentByIndexProvider.js +1 -1
- package/dist/react/providers/ChainOfThoughtByIndicesProvider.js +1 -1
- package/dist/react/providers/ChainOfThoughtPartByIndexProvider.js +1 -1
- package/dist/react/providers/MessageByIdProvider.js +1 -1
- package/dist/react/providers/MessageByIndexProvider.js +1 -1
- package/dist/react/providers/PartByIndexProvider.js +1 -1
- package/dist/react/providers/QueueItemByIndexProvider.js +1 -1
- package/dist/react/providers/ReadonlyThreadProvider.js +2 -2
- package/dist/react/providers/SuggestionByIndexProvider.js +1 -1
- package/dist/react/providers/TextMessagePartProvider.js +2 -2
- package/dist/react/providers/ThreadListItemByIndexProvider.js +1 -1
- package/dist/react/providers/ThreadListItemRuntimeProvider.js +1 -1
- package/dist/react/runtimes/RemoteThreadListHookInstanceManager.d.ts.map +1 -1
- package/dist/react/runtimes/RemoteThreadListHookInstanceManager.js +14 -13
- package/dist/react/runtimes/RemoteThreadListHookInstanceManager.js.map +1 -1
- package/dist/react/runtimes/RemoteThreadListThreadListRuntimeCore.d.ts +3 -0
- package/dist/react/runtimes/RemoteThreadListThreadListRuntimeCore.d.ts.map +1 -1
- package/dist/react/runtimes/RemoteThreadListThreadListRuntimeCore.js +22 -12
- package/dist/react/runtimes/RemoteThreadListThreadListRuntimeCore.js.map +1 -1
- package/dist/react/runtimes/RuntimeAdapterProvider.js +1 -1
- package/dist/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.js +9 -23
- package/dist/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.js.map +1 -1
- package/dist/react/runtimes/cloud/auiV0.d.ts +24 -2
- package/dist/react/runtimes/cloud/auiV0.d.ts.map +1 -1
- package/dist/react/runtimes/cloud/auiV0.js +24 -5
- package/dist/react/runtimes/cloud/auiV0.js.map +1 -1
- package/dist/react/runtimes/external-message-converter.js +1 -1
- package/dist/react/runtimes/useExternalStoreRuntime.js +1 -1
- package/dist/react/runtimes/useExternalStoreSharedOptions.js +1 -1
- package/dist/react/runtimes/useLocalRuntime.js +1 -1
- package/dist/react/runtimes/useRemoteThreadListRuntime.js +7 -13
- package/dist/react/runtimes/useRemoteThreadListRuntime.js.map +1 -1
- package/dist/react/utils/useJSONEqual.js +1 -1
- package/dist/runtime/api/message-runtime.d.ts.map +1 -1
- package/dist/runtime/api/message-runtime.js +5 -1
- package/dist/runtime/api/message-runtime.js.map +1 -1
- package/dist/runtime/internal.d.ts +4 -4
- package/dist/runtime/internal.js +4 -4
- package/dist/runtime/utils/thread-message-like.js +2 -2
- package/dist/runtime/utils/thread-message-like.js.map +1 -1
- package/dist/runtimes/remote-thread-list/types.d.ts +5 -4
- package/dist/runtimes/remote-thread-list/types.d.ts.map +1 -1
- package/dist/store/clients/chain-of-thought-client.d.ts.map +1 -1
- package/dist/store/clients/chain-of-thought-client.js +30 -24
- package/dist/store/clients/chain-of-thought-client.js.map +1 -1
- package/dist/store/clients/model-context-client.js +1 -1
- package/dist/store/clients/no-op-composer-client.js +1 -1
- package/dist/store/clients/suggestions.js +2 -2
- package/dist/store/clients/thread-message-client.d.ts.map +1 -1
- package/dist/store/clients/thread-message-client.js +103 -91
- package/dist/store/clients/thread-message-client.js.map +1 -1
- package/dist/store/runtime-clients/composer-runtime-client.js +2 -2
- package/dist/store/runtime-clients/message-runtime-client.js +2 -2
- package/dist/store/runtime-clients/thread-list-item-runtime-client.js +2 -2
- package/dist/store/runtime-clients/thread-list-runtime-client.js +2 -2
- package/dist/store/runtime-clients/thread-runtime-client.js +2 -2
- package/dist/store/scopes/thread.d.ts +1 -1
- package/dist/store/scopes/thread.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/message.d.ts +11 -1
- package/dist/types/message.d.ts.map +1 -1
- package/dist/types/message.js.map +1 -1
- package/dist/utils/data-url.js +2 -2
- package/dist/utils/data-url.js.map +1 -1
- package/dist/utils/getGroupStatus.d.ts +9 -0
- package/dist/utils/getGroupStatus.d.ts.map +1 -0
- package/dist/utils/getGroupStatus.js +15 -0
- package/dist/utils/getGroupStatus.js.map +1 -0
- package/dist/utils/normalizePartStatus.d.ts +8 -0
- package/dist/utils/normalizePartStatus.d.ts.map +1 -0
- package/dist/utils/normalizePartStatus.js +39 -0
- package/dist/utils/normalizePartStatus.js.map +1 -0
- package/package.json +4 -4
- package/src/index.ts +1 -0
- package/src/internal.ts +1 -7
- package/src/react/AssistantProvider.tsx +28 -15
- package/src/react/AssistantRuntimeProvider.test.tsx +101 -0
- package/src/react/adapters/LocalStorageThreadListAdapter.tsx +28 -7
- package/src/react/index.ts +4 -0
- package/src/react/primitive-hooks/useActionBarCopy.test.ts +109 -14
- package/src/react/primitive-hooks/useActionBarCopy.ts +27 -2
- package/src/react/primitives/message/MessageGroupedParts.tsx +4 -4
- package/src/react/runtimes/RemoteThreadListHookInstanceManager.tsx +16 -13
- package/src/react/runtimes/RemoteThreadListThreadListRuntimeCore.tsx +53 -10
- package/src/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.ts +7 -5
- package/src/react/runtimes/cloud/auiV0.ts +51 -12
- package/src/react/runtimes/useRemoteThreadListRuntime.ts +9 -15
- package/src/runtime/api/message-runtime.test.ts +140 -0
- package/src/runtime/api/message-runtime.ts +10 -5
- package/src/runtime/utils/thread-message-like.ts +2 -2
- package/src/runtimes/remote-thread-list/types.ts +5 -4
- package/src/store/clients/chain-of-thought-client.ts +2 -7
- package/src/store/clients/thread-message-client.test.ts +84 -0
- package/src/store/clients/thread-message-client.ts +14 -4
- package/src/store/scopes/thread.ts +1 -1
- package/src/tests/auiV0Encode.test.ts +93 -0
- package/src/tests/remote-thread-list-reactive-threadId.test.ts +0 -92
- package/src/tests/thread-message-like.test.ts +15 -0
- package/src/tests/useRemoteThreadListRuntime-controlled.test.tsx +293 -0
- package/src/types/index.ts +1 -0
- package/src/types/message.ts +19 -0
- package/src/utils/data-url.test.ts +26 -2
- package/src/utils/data-url.ts +2 -2
- package/src/utils/getGroupStatus.test.ts +36 -0
- package/src/utils/getGroupStatus.ts +31 -0
- package/src/utils/normalizePartStatus.test.ts +59 -0
- package/src/utils/normalizePartStatus.ts +55 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ModelContext } from "../../store/clients/model-context-client.js";
|
|
2
2
|
import { isStandaloneToolDisplay, makeToolCallTextComponent } from "../model-context/toolbox.js";
|
|
3
|
-
import { attachTransformScopes, useAssistantClientRef } from "@assistant-ui/store";
|
|
4
|
-
import { useEffect, useState } from "@assistant-ui/tap/react-shim";
|
|
5
3
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
4
|
+
import { useEffect, useState } from "@assistant-ui/tap/react-shim";
|
|
5
|
+
import { attachTransformScopes, useAssistantClientRef } from "@assistant-ui/store";
|
|
6
6
|
import { resource, useResources, withKey } from "@assistant-ui/tap";
|
|
7
7
|
//#region src/react/client/Tools.ts
|
|
8
8
|
/**
|
package/dist/react/index.d.ts
CHANGED
|
@@ -58,6 +58,7 @@ import { useExternalStoreSharedOptions } from "./runtimes/useExternalStoreShared
|
|
|
58
58
|
import { JoinStrategy, convertExternalMessages, useExternalMessageConverter } from "./runtimes/external-message-converter.js";
|
|
59
59
|
import { createMessageConverter } from "./runtimes/createMessageConverter.js";
|
|
60
60
|
import { useStreamingTiming } from "./runtimes/useStreamingTiming.js";
|
|
61
|
+
import { RuntimeExtras, createRuntimeExtras } from "./runtimes/createRuntimeExtras.js";
|
|
61
62
|
import { RemoteThreadListHookInstanceManager } from "./runtimes/RemoteThreadListHookInstanceManager.js";
|
|
62
63
|
import { RemoteThreadListThreadListRuntimeCore } from "./runtimes/RemoteThreadListThreadListRuntimeCore.js";
|
|
63
64
|
import { useRemoteThreadListRuntime } from "./runtimes/useRemoteThreadListRuntime.js";
|
|
@@ -111,4 +112,4 @@ import { useEditComposerCancel } from "./primitive-hooks/useEditComposerCancel.j
|
|
|
111
112
|
import { useEditComposerSend } from "./primitive-hooks/useEditComposerSend.js";
|
|
112
113
|
import { useMessageError } from "./primitive-hooks/useMessageError.js";
|
|
113
114
|
import { LocalRuntimeOptions, splitLocalRuntimeOptions, useLocalRuntime } from "./runtimes/useLocalRuntime.js";
|
|
114
|
-
export { type AssistantContextConfig, type AssistantDataUI, type AssistantDataUIProps, type AssistantInteractableProps, AssistantProviderBase, type AssistantProviderBaseProps, AssistantRuntimeProvider, type AssistantTool, type AssistantToolProps, type AssistantToolUI, type AssistantToolUIProps, type AsyncStorageLike, ChainOfThoughtByIndicesProvider, ChainOfThoughtPartByIndexProvider, ChainOfThoughtPrimitiveParts, CloudFileAttachmentAdapter, ComposerAttachmentByIndexProvider, ComposerPrimitiveAttachmentByIndex, ComposerPrimitiveAttachments, ComposerPrimitiveIf, ComposerPrimitiveQueue, type DataMessagePartComponent, type DataMessagePartProps, DataRenderers, type DataRenderersClientSchema, type DataRenderersMethods, type DataRenderersState, type EmptyMessagePartComponent, type EmptyMessagePartProps, type EnrichedPartState, type FileMessagePartComponent, type FileMessagePartProps, type GenerativeUIComponentRegistry, type GenerativeUIMessagePartComponent, type GenerativeUIMessagePartProps, GenerativeUIRender, GenerativeUIRenderError, type GenerativeUIRenderProps, type GroupByContext, type ImageMessagePartComponent, type ImageMessagePartProps, type InteractableDefinition, type InteractablePersistedState, type InteractablePersistenceAdapter, type InteractablePersistenceStatus, type InteractableRegistration, type InteractableStateSchema, Interactables, type InteractablesClientSchema, type InteractablesMethods, type InteractablesState, type JoinStrategy, type LocalRuntimeOptions, type McpAppResourceOutput, type McpToolkitDefinition, type McpToolkitEntry, type McpToolkitToolConfig, MessageAttachmentByIndexProvider, MessageByIndexProvider, MessagePartComponent, MessagePartPrimitiveInProgress, MessagePrimitiveAttachmentByIndex, MessagePrimitiveAttachments, MessagePrimitiveGenerativeUI, MessagePrimitiveGroupedParts, MessagePrimitivePartByIndex, MessagePrimitiveParts, MessagePrimitiveQuote, PartByIndexProvider, PartPrimitiveMessages, PartPrimitiveMessagesImpl, type PartState, type ProviderToolConfig, QueueItemByIndexProvider, type QueueItemByIndexProviderProps, type QuoteMessagePartComponent, type QuoteMessagePartProps, ReadonlyThreadProvider, type ReasoningGroupComponent, type ReasoningGroupProps, type ReasoningMessagePartComponent, type ReasoningMessagePartProps, RemoteThreadListHookInstanceManager, RemoteThreadListThreadListRuntimeCore, RuntimeAdapter, RuntimeAdapterProvider, type RuntimeAdapters, type SourceMessagePartComponent, type SourceMessagePartProps, type StreamingTimingAccessors, type StreamingTimingOptions, type StreamingTimingState, SuggestionByIndexProvider, type SuggestionByIndexProviderProps, type TextMessagePartComponent, type TextMessagePartProps, TextMessagePartProvider, ThreadListItemByIndexProvider, ThreadListItemPrimitiveTitle, ThreadListItemRuntimeProvider, ThreadListPrimitiveItemByIndex, ThreadListPrimitiveItems, ThreadPrimitiveMessageByIndex, ThreadPrimitiveMessages, ThreadPrimitiveMessagesImpl, ThreadPrimitiveSuggestionByIndex, ThreadPrimitiveSuggestions, ThreadPrimitiveSuggestionsImpl, ThreadPrimitiveUnstable_MessageById, type TitleGenerationAdapter, type ToolArgsStatus, type ToolCallMessagePartComponent, type ToolCallMessagePartProps, type ToolCallText, type ToolDefinition, type Toolkit, type ToolkitDefinition, type ToolkitDefinitionEntry, Tools, type ToolsClientSchema, type ToolsMethods, type ToolsState, type Unstable_AudioMessagePartComponent, type Unstable_AudioMessagePartProps, type Unstable_InferInteractableState, type Unstable_InteractableConfig, type Unstable_InteractableDefinition, type Unstable_InteractablePersistedState, type Unstable_InteractablePersistenceAdapter, type Unstable_InteractablePersistenceStatus, type Unstable_InteractableRegistration, type Unstable_InteractableStateSchema, type Unstable_InteractableToolConfig, type Unstable_InteractableToolRenderProps, type Unstable_InteractableVersionInfo, type Unstable_InteractablesClientSchema, type Unstable_InteractablesConfig, type Unstable_InteractablesMethods, type Unstable_InteractablesState, type UseActionBarCopyOptions, type UseComposerIfProps, type UseSuggestionTriggerOptions, convertExternalMessages, createLocalStorageAdapter, createMessageConverter, createSimpleTitleAdapter, defineMcpToolkit, defineToolkit, externalTool, getMessageQuote, getRenderComponent, groupPartByType, hitl, hitlTool, humanTool, makeAssistantDataUI, makeAssistantTool, makeAssistantToolUI, defaultComponents as messagePartsDefaultComponents, providerTool, splitLocalRuntimeOptions, stubTool, unstable_Interactables, unstable_interactableTool, unstable_useInteractable, unstable_useInteractableState, unstable_useInteractableVersions, unstable_useThreadMessageIds, useActionBarCopy, useActionBarEdit, useActionBarFeedbackNegative, useActionBarFeedbackPositive, useActionBarReload, useActionBarSpeak, useActionBarStopSpeaking, useAssistantCloudThreadHistoryAdapter, useAssistantContext, useAssistantDataUI, useAssistantInstructions, useAssistantInteractable, useAssistantTool, useAssistantToolUI, useAuiToolOverrides, useBranchPickerNext, useBranchPickerPrevious, useCloudThreadListAdapter, useComposerAddAttachment, useComposerCancel, useComposerDictate, useComposerSend, useEditComposerCancel, useEditComposerSend, useExternalMessageConverter, useExternalStoreRuntime, useExternalStoreSharedOptions, useInlineRender, useInteractableState, useLocalRuntime, useMessageBranching, useMessageError, useMessageReload, useRemoteThreadListRuntime, useRuntimeAdapters, useStreamingTiming, useSuggestionTrigger, useThreadIsEmpty, useThreadIsRunning, useThreadListItemArchive, useThreadListItemDelete, useThreadListItemTrigger, useThreadListItemUnarchive, useThreadListLoadMore, useThreadListNew, useThreadMessages, useToolArgsStatus, useVoiceControls, useVoiceState, useVoiceVolume };
|
|
115
|
+
export { type AssistantContextConfig, type AssistantDataUI, type AssistantDataUIProps, type AssistantInteractableProps, AssistantProviderBase, type AssistantProviderBaseProps, AssistantRuntimeProvider, type AssistantTool, type AssistantToolProps, type AssistantToolUI, type AssistantToolUIProps, type AsyncStorageLike, ChainOfThoughtByIndicesProvider, ChainOfThoughtPartByIndexProvider, ChainOfThoughtPrimitiveParts, CloudFileAttachmentAdapter, ComposerAttachmentByIndexProvider, ComposerPrimitiveAttachmentByIndex, ComposerPrimitiveAttachments, ComposerPrimitiveIf, ComposerPrimitiveQueue, type DataMessagePartComponent, type DataMessagePartProps, DataRenderers, type DataRenderersClientSchema, type DataRenderersMethods, type DataRenderersState, type EmptyMessagePartComponent, type EmptyMessagePartProps, type EnrichedPartState, type FileMessagePartComponent, type FileMessagePartProps, type GenerativeUIComponentRegistry, type GenerativeUIMessagePartComponent, type GenerativeUIMessagePartProps, GenerativeUIRender, GenerativeUIRenderError, type GenerativeUIRenderProps, type GroupByContext, type ImageMessagePartComponent, type ImageMessagePartProps, type InteractableDefinition, type InteractablePersistedState, type InteractablePersistenceAdapter, type InteractablePersistenceStatus, type InteractableRegistration, type InteractableStateSchema, Interactables, type InteractablesClientSchema, type InteractablesMethods, type InteractablesState, type JoinStrategy, type LocalRuntimeOptions, type McpAppResourceOutput, type McpToolkitDefinition, type McpToolkitEntry, type McpToolkitToolConfig, MessageAttachmentByIndexProvider, MessageByIndexProvider, MessagePartComponent, MessagePartPrimitiveInProgress, MessagePrimitiveAttachmentByIndex, MessagePrimitiveAttachments, MessagePrimitiveGenerativeUI, MessagePrimitiveGroupedParts, MessagePrimitivePartByIndex, MessagePrimitiveParts, MessagePrimitiveQuote, PartByIndexProvider, PartPrimitiveMessages, PartPrimitiveMessagesImpl, type PartState, type ProviderToolConfig, QueueItemByIndexProvider, type QueueItemByIndexProviderProps, type QuoteMessagePartComponent, type QuoteMessagePartProps, ReadonlyThreadProvider, type ReasoningGroupComponent, type ReasoningGroupProps, type ReasoningMessagePartComponent, type ReasoningMessagePartProps, RemoteThreadListHookInstanceManager, RemoteThreadListThreadListRuntimeCore, RuntimeAdapter, RuntimeAdapterProvider, type RuntimeAdapters, type RuntimeExtras, type SourceMessagePartComponent, type SourceMessagePartProps, type StreamingTimingAccessors, type StreamingTimingOptions, type StreamingTimingState, SuggestionByIndexProvider, type SuggestionByIndexProviderProps, type TextMessagePartComponent, type TextMessagePartProps, TextMessagePartProvider, ThreadListItemByIndexProvider, ThreadListItemPrimitiveTitle, ThreadListItemRuntimeProvider, ThreadListPrimitiveItemByIndex, ThreadListPrimitiveItems, ThreadPrimitiveMessageByIndex, ThreadPrimitiveMessages, ThreadPrimitiveMessagesImpl, ThreadPrimitiveSuggestionByIndex, ThreadPrimitiveSuggestions, ThreadPrimitiveSuggestionsImpl, ThreadPrimitiveUnstable_MessageById, type TitleGenerationAdapter, type ToolArgsStatus, type ToolCallMessagePartComponent, type ToolCallMessagePartProps, type ToolCallText, type ToolDefinition, type Toolkit, type ToolkitDefinition, type ToolkitDefinitionEntry, Tools, type ToolsClientSchema, type ToolsMethods, type ToolsState, type Unstable_AudioMessagePartComponent, type Unstable_AudioMessagePartProps, type Unstable_InferInteractableState, type Unstable_InteractableConfig, type Unstable_InteractableDefinition, type Unstable_InteractablePersistedState, type Unstable_InteractablePersistenceAdapter, type Unstable_InteractablePersistenceStatus, type Unstable_InteractableRegistration, type Unstable_InteractableStateSchema, type Unstable_InteractableToolConfig, type Unstable_InteractableToolRenderProps, type Unstable_InteractableVersionInfo, type Unstable_InteractablesClientSchema, type Unstable_InteractablesConfig, type Unstable_InteractablesMethods, type Unstable_InteractablesState, type UseActionBarCopyOptions, type UseComposerIfProps, type UseSuggestionTriggerOptions, convertExternalMessages, createLocalStorageAdapter, createMessageConverter, createRuntimeExtras, createSimpleTitleAdapter, defineMcpToolkit, defineToolkit, externalTool, getMessageQuote, getRenderComponent, groupPartByType, hitl, hitlTool, humanTool, makeAssistantDataUI, makeAssistantTool, makeAssistantToolUI, defaultComponents as messagePartsDefaultComponents, providerTool, splitLocalRuntimeOptions, stubTool, unstable_Interactables, unstable_interactableTool, unstable_useInteractable, unstable_useInteractableState, unstable_useInteractableVersions, unstable_useThreadMessageIds, useActionBarCopy, useActionBarEdit, useActionBarFeedbackNegative, useActionBarFeedbackPositive, useActionBarReload, useActionBarSpeak, useActionBarStopSpeaking, useAssistantCloudThreadHistoryAdapter, useAssistantContext, useAssistantDataUI, useAssistantInstructions, useAssistantInteractable, useAssistantTool, useAssistantToolUI, useAuiToolOverrides, useBranchPickerNext, useBranchPickerPrevious, useCloudThreadListAdapter, useComposerAddAttachment, useComposerCancel, useComposerDictate, useComposerSend, useEditComposerCancel, useEditComposerSend, useExternalMessageConverter, useExternalStoreRuntime, useExternalStoreSharedOptions, useInlineRender, useInteractableState, useLocalRuntime, useMessageBranching, useMessageError, useMessageReload, useRemoteThreadListRuntime, useRuntimeAdapters, useStreamingTiming, useSuggestionTrigger, useThreadIsEmpty, useThreadIsRunning, useThreadListItemArchive, useThreadListItemDelete, useThreadListItemTrigger, useThreadListItemUnarchive, useThreadListLoadMore, useThreadListNew, useThreadMessages, useToolArgsStatus, useVoiceControls, useVoiceState, useVoiceVolume };
|
package/dist/react/index.js
CHANGED
|
@@ -45,6 +45,7 @@ import { useExternalStoreSharedOptions } from "./runtimes/useExternalStoreShared
|
|
|
45
45
|
import { convertExternalMessages, useExternalMessageConverter } from "./runtimes/external-message-converter.js";
|
|
46
46
|
import { createMessageConverter } from "./runtimes/createMessageConverter.js";
|
|
47
47
|
import { useStreamingTiming } from "./runtimes/useStreamingTiming.js";
|
|
48
|
+
import { createRuntimeExtras } from "./runtimes/createRuntimeExtras.js";
|
|
48
49
|
import { RemoteThreadListHookInstanceManager } from "./runtimes/RemoteThreadListHookInstanceManager.js";
|
|
49
50
|
import { RemoteThreadListThreadListRuntimeCore } from "./runtimes/RemoteThreadListThreadListRuntimeCore.js";
|
|
50
51
|
import { useRemoteThreadListRuntime } from "./runtimes/useRemoteThreadListRuntime.js";
|
|
@@ -100,4 +101,4 @@ import { useEditComposerCancel } from "./primitive-hooks/useEditComposerCancel.j
|
|
|
100
101
|
import { useEditComposerSend } from "./primitive-hooks/useEditComposerSend.js";
|
|
101
102
|
import { useMessageError } from "./primitive-hooks/useMessageError.js";
|
|
102
103
|
import { splitLocalRuntimeOptions, useLocalRuntime } from "./runtimes/useLocalRuntime.js";
|
|
103
|
-
export { AssistantProviderBase, AssistantRuntimeProvider, ChainOfThoughtByIndicesProvider, ChainOfThoughtPartByIndexProvider, ChainOfThoughtPrimitiveParts, CloudFileAttachmentAdapter, ComposerAttachmentByIndexProvider, ComposerPrimitiveAttachmentByIndex, ComposerPrimitiveAttachments, ComposerPrimitiveIf, ComposerPrimitiveQueue, DataRenderers, GenerativeUIRender, GenerativeUIRenderError, Interactables, MessageAttachmentByIndexProvider, MessageByIndexProvider, MessagePartComponent, MessagePartPrimitiveInProgress, MessagePrimitiveAttachmentByIndex, MessagePrimitiveAttachments, MessagePrimitiveGenerativeUI, MessagePrimitiveGroupedParts, MessagePrimitivePartByIndex, MessagePrimitiveParts, MessagePrimitiveQuote, PartByIndexProvider, PartPrimitiveMessages, PartPrimitiveMessagesImpl, QueueItemByIndexProvider, ReadonlyThreadProvider, RemoteThreadListHookInstanceManager, RemoteThreadListThreadListRuntimeCore, RuntimeAdapter, RuntimeAdapterProvider, SuggestionByIndexProvider, TextMessagePartProvider, ThreadListItemByIndexProvider, ThreadListItemPrimitiveTitle, ThreadListItemRuntimeProvider, ThreadListPrimitiveItemByIndex, ThreadListPrimitiveItems, ThreadPrimitiveMessageByIndex, ThreadPrimitiveMessages, ThreadPrimitiveMessagesImpl, ThreadPrimitiveSuggestionByIndex, ThreadPrimitiveSuggestions, ThreadPrimitiveSuggestionsImpl, ThreadPrimitiveUnstable_MessageById, Tools, convertExternalMessages, createLocalStorageAdapter, createMessageConverter, createSimpleTitleAdapter, defineMcpToolkit, defineToolkit, externalTool, getMessageQuote, getRenderComponent, groupPartByType, hitl, hitlTool, humanTool, makeAssistantDataUI, makeAssistantTool, makeAssistantToolUI, defaultComponents as messagePartsDefaultComponents, providerTool, splitLocalRuntimeOptions, stubTool, unstable_Interactables, unstable_interactableTool, unstable_useInteractable, unstable_useInteractableState, unstable_useInteractableVersions, unstable_useThreadMessageIds, useActionBarCopy, useActionBarEdit, useActionBarFeedbackNegative, useActionBarFeedbackPositive, useActionBarReload, useActionBarSpeak, useActionBarStopSpeaking, useAssistantCloudThreadHistoryAdapter, useAssistantContext, useAssistantDataUI, useAssistantInstructions, useAssistantInteractable, useAssistantTool, useAssistantToolUI, useAuiToolOverrides, useBranchPickerNext, useBranchPickerPrevious, useCloudThreadListAdapter, useComposerAddAttachment, useComposerCancel, useComposerDictate, useComposerSend, useEditComposerCancel, useEditComposerSend, useExternalMessageConverter, useExternalStoreRuntime, useExternalStoreSharedOptions, useInlineRender, useInteractableState, useLocalRuntime, useMessageBranching, useMessageError, useMessageReload, useRemoteThreadListRuntime, useRuntimeAdapters, useStreamingTiming, useSuggestionTrigger, useThreadIsEmpty, useThreadIsRunning, useThreadListItemArchive, useThreadListItemDelete, useThreadListItemTrigger, useThreadListItemUnarchive, useThreadListLoadMore, useThreadListNew, useThreadMessages, useToolArgsStatus, useVoiceControls, useVoiceState, useVoiceVolume };
|
|
104
|
+
export { AssistantProviderBase, AssistantRuntimeProvider, ChainOfThoughtByIndicesProvider, ChainOfThoughtPartByIndexProvider, ChainOfThoughtPrimitiveParts, CloudFileAttachmentAdapter, ComposerAttachmentByIndexProvider, ComposerPrimitiveAttachmentByIndex, ComposerPrimitiveAttachments, ComposerPrimitiveIf, ComposerPrimitiveQueue, DataRenderers, GenerativeUIRender, GenerativeUIRenderError, Interactables, MessageAttachmentByIndexProvider, MessageByIndexProvider, MessagePartComponent, MessagePartPrimitiveInProgress, MessagePrimitiveAttachmentByIndex, MessagePrimitiveAttachments, MessagePrimitiveGenerativeUI, MessagePrimitiveGroupedParts, MessagePrimitivePartByIndex, MessagePrimitiveParts, MessagePrimitiveQuote, PartByIndexProvider, PartPrimitiveMessages, PartPrimitiveMessagesImpl, QueueItemByIndexProvider, ReadonlyThreadProvider, RemoteThreadListHookInstanceManager, RemoteThreadListThreadListRuntimeCore, RuntimeAdapter, RuntimeAdapterProvider, SuggestionByIndexProvider, TextMessagePartProvider, ThreadListItemByIndexProvider, ThreadListItemPrimitiveTitle, ThreadListItemRuntimeProvider, ThreadListPrimitiveItemByIndex, ThreadListPrimitiveItems, ThreadPrimitiveMessageByIndex, ThreadPrimitiveMessages, ThreadPrimitiveMessagesImpl, ThreadPrimitiveSuggestionByIndex, ThreadPrimitiveSuggestions, ThreadPrimitiveSuggestionsImpl, ThreadPrimitiveUnstable_MessageById, Tools, convertExternalMessages, createLocalStorageAdapter, createMessageConverter, createRuntimeExtras, createSimpleTitleAdapter, defineMcpToolkit, defineToolkit, externalTool, getMessageQuote, getRenderComponent, groupPartByType, hitl, hitlTool, humanTool, makeAssistantDataUI, makeAssistantTool, makeAssistantToolUI, defaultComponents as messagePartsDefaultComponents, providerTool, splitLocalRuntimeOptions, stubTool, unstable_Interactables, unstable_interactableTool, unstable_useInteractable, unstable_useInteractableState, unstable_useInteractableVersions, unstable_useThreadMessageIds, useActionBarCopy, useActionBarEdit, useActionBarFeedbackNegative, useActionBarFeedbackPositive, useActionBarReload, useActionBarSpeak, useActionBarStopSpeaking, useAssistantCloudThreadHistoryAdapter, useAssistantContext, useAssistantDataUI, useAssistantInstructions, useAssistantInteractable, useAssistantTool, useAssistantToolUI, useAuiToolOverrides, useBranchPickerNext, useBranchPickerPrevious, useCloudThreadListAdapter, useComposerAddAttachment, useComposerCancel, useComposerDictate, useComposerSend, useEditComposerCancel, useEditComposerSend, useExternalMessageConverter, useExternalStoreRuntime, useExternalStoreSharedOptions, useInlineRender, useInteractableState, useLocalRuntime, useMessageBranching, useMessageError, useMessageReload, useRemoteThreadListRuntime, useRuntimeAdapters, useStreamingTiming, useSuggestionTrigger, useThreadIsEmpty, useThreadIsRunning, useThreadListItemArchive, useThreadListItemDelete, useThreadListItemTrigger, useThreadListItemUnarchive, useThreadListLoadMore, useThreadListNew, useThreadMessages, useToolArgsStatus, useVoiceControls, useVoiceState, useVoiceVolume };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ModelContext } from "../../store/clients/model-context-client.js";
|
|
2
2
|
import { buildInteractableModelContext } from "./interactable-model-context.js";
|
|
3
3
|
import { toJSONSchema, toPartialJSONSchema } from "assistant-stream";
|
|
4
|
-
import { attachTransformScopes, useAssistantClientRef } from "@assistant-ui/store";
|
|
5
4
|
import { useCallback, useEffect, useMemo, useRef, useState } from "@assistant-ui/tap/react-shim";
|
|
5
|
+
import { attachTransformScopes, useAssistantClientRef } from "@assistant-ui/store";
|
|
6
6
|
import { resource } from "@assistant-ui/tap";
|
|
7
7
|
//#region src/react/interactables-legacy/Interactables.ts
|
|
8
8
|
const PERSISTENCE_DEBOUNCE_MS = 500;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useAui } from "@assistant-ui/store";
|
|
2
1
|
import { useEffect, useId, useRef } from "@assistant-ui/tap/react-shim";
|
|
2
|
+
import { useAui } from "@assistant-ui/store";
|
|
3
3
|
//#region src/react/interactables-legacy/useAssistantInteractable.ts
|
|
4
4
|
/**
|
|
5
5
|
* @deprecated Since 2026-06-14 — migrate to the Unstable / Experimental API.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/interactables-legacy/useInteractableState.ts
|
|
5
5
|
/**
|
|
6
6
|
* Reads and writes the state of a registered interactable.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useAui } from "@assistant-ui/store";
|
|
2
1
|
import { useEffect, useRef } from "@assistant-ui/tap/react-shim";
|
|
2
|
+
import { useAui } from "@assistant-ui/store";
|
|
3
3
|
//#region src/react/model-context/useAssistantContext.ts
|
|
4
4
|
const useAssistantContext = (config) => {
|
|
5
5
|
const { getContext, disabled = false } = config;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui } from "@assistant-ui/store";
|
|
2
|
-
import { useEffect } from "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import { useEffect } from "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/model-context/useAssistantDataUI.ts
|
|
5
5
|
/**
|
|
6
6
|
* Registers a renderer for named `data` message parts while the component is
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui } from "@assistant-ui/store";
|
|
2
|
-
import { useEffect } from "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import { useEffect } from "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/model-context/useAssistantInstructions.ts
|
|
5
5
|
const getInstructions = (instruction) => {
|
|
6
6
|
if (typeof instruction === "string") return { instruction };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isStandaloneToolDisplay, makeToolCallTextComponent } from "./toolbox.js";
|
|
2
|
-
import { useAui } from "@assistant-ui/store";
|
|
3
|
-
import { useEffect } from "@assistant-ui/tap/react-shim";
|
|
4
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
|
+
import { useEffect } from "@assistant-ui/tap/react-shim";
|
|
4
|
+
import { useAui } from "@assistant-ui/store";
|
|
5
5
|
//#region src/react/model-context/useAssistantTool.ts
|
|
6
6
|
/**
|
|
7
7
|
* Registers a tool with the assistant model context while the component is
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui } from "@assistant-ui/store";
|
|
2
|
-
import { useEffect } from "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import { useEffect } from "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/model-context/useAssistantToolUI.ts
|
|
5
5
|
/**
|
|
6
6
|
* Registers a tool-call renderer while the component is mounted.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useAui } from "@assistant-ui/store";
|
|
2
1
|
import { useEffect, useRef } from "@assistant-ui/tap/react-shim";
|
|
2
|
+
import { useAui } from "@assistant-ui/store";
|
|
3
3
|
//#region src/react/model-context/useAuiToolOverrides.ts
|
|
4
4
|
/**
|
|
5
5
|
* Overrides toolkit entries for the current assistant scope.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useEffect, useState } from "@assistant-ui/tap/react-shim";
|
|
2
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import { useEffect, useState } from "@assistant-ui/tap/react-shim";
|
|
3
3
|
import { create } from "zustand";
|
|
4
4
|
//#region src/react/model-context/useInlineRender.ts
|
|
5
5
|
const useInlineRender = (toolUI) => {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { interactableToolName, unstable_getInteractableVersions } from "../../model-context/interactable-composer-metadata.js";
|
|
3
3
|
import { unstable_useInteractableState } from "./useInteractableState.js";
|
|
4
4
|
import { useJSONEqual } from "../utils/useJSONEqual.js";
|
|
5
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
6
5
|
import { useEffect, useId, useMemo, useRef } from "@assistant-ui/tap/react-shim";
|
|
6
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
7
7
|
//#region src/react/model-context/useInteractable.ts
|
|
8
8
|
const useInteractable = (name, config) => {
|
|
9
9
|
const aui = useAui();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
3
|
-
import "@assistant-ui/tap/react-shim";
|
|
4
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
|
+
import "@assistant-ui/tap/react-shim";
|
|
4
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
5
5
|
//#region src/react/model-context/useInteractableState.ts
|
|
6
6
|
const useInteractableState = (id) => {
|
|
7
7
|
const $ = c(17);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { unstable_getInteractableVersions } from "../../model-context/interactable-composer-metadata.js";
|
|
2
2
|
import { unstable_useInteractableState } from "./useInteractableState.js";
|
|
3
3
|
import { useJSONEqual } from "../utils/useJSONEqual.js";
|
|
4
|
-
import { useAuiState } from "@assistant-ui/store";
|
|
5
|
-
import "@assistant-ui/tap/react-shim";
|
|
6
4
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
5
|
+
import "@assistant-ui/tap/react-shim";
|
|
6
|
+
import { useAuiState } from "@assistant-ui/store";
|
|
7
7
|
//#region src/react/model-context/useInteractableVersions.ts
|
|
8
8
|
const useInteractableVersions = (id, name) => {
|
|
9
9
|
const $ = c(8);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getPartialJsonObjectFieldState, getPartialJsonObjectMeta } from "assistant-stream/utils";
|
|
2
|
-
import { useAuiState } from "@assistant-ui/store";
|
|
3
|
-
import "@assistant-ui/tap/react-shim";
|
|
4
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
|
+
import "@assistant-ui/tap/react-shim";
|
|
4
|
+
import { useAuiState } from "@assistant-ui/store";
|
|
5
5
|
//#region src/react/model-context/useToolArgsStatus.ts
|
|
6
6
|
/**
|
|
7
7
|
* Reads whether each argument field for the current tool-call message part is
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import { useEffect, useRef } from "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useActionBarCopy.ts
|
|
5
5
|
const useActionBarCopy = (t0) => {
|
|
6
|
-
const $ = c(
|
|
6
|
+
const $ = c(15);
|
|
7
7
|
let t1;
|
|
8
8
|
if ($[0] !== t0) {
|
|
9
9
|
t1 = t0 === void 0 ? {} : t0;
|
|
@@ -17,39 +17,66 @@ const useActionBarCopy = (t0) => {
|
|
|
17
17
|
const isCopied = useAuiState(_temp3);
|
|
18
18
|
const isEditing = useAuiState(_temp4);
|
|
19
19
|
const composerValue = useAuiState(_temp5);
|
|
20
|
+
const copiedTimerRef = useRef(void 0);
|
|
21
|
+
const scopeGenerationRef = useRef(0);
|
|
20
22
|
let t3;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
let t4;
|
|
24
|
+
if ($[2] !== aui) {
|
|
25
|
+
t3 = () => () => {
|
|
26
|
+
scopeGenerationRef.current = scopeGenerationRef.current + 1;
|
|
27
|
+
if (copiedTimerRef.current === void 0) return;
|
|
28
|
+
clearTimeout(copiedTimerRef.current);
|
|
29
|
+
copiedTimerRef.current = void 0;
|
|
30
|
+
aui.message.setIsCopied(false);
|
|
31
|
+
};
|
|
32
|
+
t4 = [aui];
|
|
33
|
+
$[2] = aui;
|
|
34
|
+
$[3] = t3;
|
|
35
|
+
$[4] = t4;
|
|
36
|
+
} else {
|
|
37
|
+
t3 = $[3];
|
|
38
|
+
t4 = $[4];
|
|
39
|
+
}
|
|
40
|
+
useEffect(t3, t4);
|
|
41
|
+
let t5;
|
|
42
|
+
if ($[5] !== aui || $[6] !== composerValue || $[7] !== copiedDuration || $[8] !== copyToClipboard || $[9] !== isEditing) {
|
|
43
|
+
t5 = () => {
|
|
23
44
|
if (!copyToClipboard) return;
|
|
24
45
|
const valueToCopy = isEditing ? composerValue : aui.message.getCopyText();
|
|
25
46
|
if (!valueToCopy) return;
|
|
47
|
+
const scopeGeneration = scopeGenerationRef.current;
|
|
26
48
|
Promise.resolve(copyToClipboard(valueToCopy)).then(() => {
|
|
49
|
+
if (scopeGeneration !== scopeGenerationRef.current) return;
|
|
50
|
+
if (copiedTimerRef.current !== void 0) clearTimeout(copiedTimerRef.current);
|
|
27
51
|
aui.message.setIsCopied(true);
|
|
28
|
-
setTimeout(() =>
|
|
52
|
+
copiedTimerRef.current = setTimeout(() => {
|
|
53
|
+
copiedTimerRef.current = void 0;
|
|
54
|
+
aui.message.setIsCopied(false);
|
|
55
|
+
}, copiedDuration);
|
|
29
56
|
}, _temp6);
|
|
30
57
|
};
|
|
31
|
-
$[
|
|
32
|
-
$[
|
|
33
|
-
$[
|
|
34
|
-
$[
|
|
35
|
-
$[
|
|
36
|
-
$[
|
|
37
|
-
} else
|
|
38
|
-
const copy =
|
|
39
|
-
const
|
|
40
|
-
let
|
|
41
|
-
if ($[
|
|
42
|
-
|
|
58
|
+
$[5] = aui;
|
|
59
|
+
$[6] = composerValue;
|
|
60
|
+
$[7] = copiedDuration;
|
|
61
|
+
$[8] = copyToClipboard;
|
|
62
|
+
$[9] = isEditing;
|
|
63
|
+
$[10] = t5;
|
|
64
|
+
} else t5 = $[10];
|
|
65
|
+
const copy = t5;
|
|
66
|
+
const t6 = disabled || !copyToClipboard;
|
|
67
|
+
let t7;
|
|
68
|
+
if ($[11] !== copy || $[12] !== isCopied || $[13] !== t6) {
|
|
69
|
+
t7 = {
|
|
43
70
|
copy,
|
|
44
|
-
disabled:
|
|
71
|
+
disabled: t6,
|
|
45
72
|
isCopied
|
|
46
73
|
};
|
|
47
|
-
$[
|
|
48
|
-
$[
|
|
49
|
-
$[
|
|
50
|
-
$[
|
|
51
|
-
} else
|
|
52
|
-
return
|
|
74
|
+
$[11] = copy;
|
|
75
|
+
$[12] = isCopied;
|
|
76
|
+
$[13] = t6;
|
|
77
|
+
$[14] = t7;
|
|
78
|
+
} else t7 = $[14];
|
|
79
|
+
return t7;
|
|
53
80
|
};
|
|
54
81
|
function _temp(c) {
|
|
55
82
|
return c.type === "text" && c.text.length > 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useActionBarCopy.js","names":["useCallback","useAui","useAuiState","UseActionBarCopyOptions","copiedDuration","copyToClipboard","text","Promise","useActionBarCopy","t0","$","_c","t1","undefined","t2","aui","disabled","_temp2","isCopied","_temp3","isEditing","_temp4","composerValue","_temp5","t3","
|
|
1
|
+
{"version":3,"file":"useActionBarCopy.js","names":["useCallback","useEffect","useRef","useAui","useAuiState","UseActionBarCopyOptions","copiedDuration","copyToClipboard","text","Promise","useActionBarCopy","t0","$","_c","t1","undefined","t2","aui","disabled","_temp2","isCopied","_temp3","isEditing","_temp4","composerValue","_temp5","copiedTimerRef","scopeGenerationRef","t3","t4","current","clearTimeout","message","setIsCopied","t5","valueToCopy","getCopyText","scopeGeneration","resolve","then","setTimeout","_temp6","copy","t6","t7","_temp","c","type","length","s","role","status","parts","some","s_0","s_1","composer","s_2"],"sources":["../../../src/react/primitive-hooks/useActionBarCopy.ts"],"sourcesContent":["import { useCallback, useEffect, useRef } from \"react\";\nimport { useAui, useAuiState } from \"@assistant-ui/store\";\n\nexport type UseActionBarCopyOptions = {\n copiedDuration?: number | undefined;\n copyToClipboard?: ((text: string) => void | Promise<void>) | undefined;\n};\n\nexport const useActionBarCopy = ({\n copiedDuration = 3000,\n copyToClipboard,\n}: UseActionBarCopyOptions = {}) => {\n const aui = useAui();\n const disabled = useAuiState((s) => {\n return !(\n (s.message.role !== \"assistant\" ||\n s.message.status?.type !== \"running\") &&\n s.message.parts.some((c) => c.type === \"text\" && c.text.length > 0)\n );\n });\n const isCopied = useAuiState((s) => s.message.isCopied);\n const isEditing = useAuiState((s) => s.composer.isEditing);\n const composerValue = useAuiState((s) => s.composer.text);\n const copiedTimerRef = useRef<ReturnType<typeof setTimeout> | undefined>(\n undefined,\n );\n const scopeGenerationRef = useRef(0);\n\n useEffect(\n () => () => {\n scopeGenerationRef.current += 1;\n if (copiedTimerRef.current === undefined) return;\n\n clearTimeout(copiedTimerRef.current);\n copiedTimerRef.current = undefined;\n aui.message.setIsCopied(false);\n },\n [aui],\n );\n\n const copy = useCallback(() => {\n if (!copyToClipboard) return;\n\n const valueToCopy = isEditing ? composerValue : aui.message.getCopyText();\n if (!valueToCopy) return;\n const scopeGeneration = scopeGenerationRef.current;\n\n // The rejection handler swallows clipboard write failures (permission denied,\n // API unavailable) so they don't surface as unhandled promise rejections.\n Promise.resolve(copyToClipboard(valueToCopy)).then(\n () => {\n if (scopeGeneration !== scopeGenerationRef.current) return;\n\n if (copiedTimerRef.current !== undefined) {\n clearTimeout(copiedTimerRef.current);\n }\n aui.message.setIsCopied(true);\n copiedTimerRef.current = setTimeout(() => {\n copiedTimerRef.current = undefined;\n aui.message.setIsCopied(false);\n }, copiedDuration);\n },\n () => {},\n );\n }, [aui, isEditing, composerValue, copiedDuration, copyToClipboard]);\n\n return { copy, disabled: disabled || !copyToClipboard, isCopied };\n};\n"],"mappings":";;;;AAQA,MAAaU,oBAAmBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAACG,KAAAH,OAAAI,KAAAA,IAAA,CAGH,IAHGJ;EAGFC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAHE,MAAA,EAAAN,gBAAAU,IAAAT,oBAAAO;CAC/B,MAAAR,iBAAAU,OAAAD,KAAAA,IAAA,MAAAC;CAGA,MAAAC,MAAYd,OAAO;CACnB,MAAAe,WAAiBd,YAAYe,MAM5B;CACD,MAAAC,WAAiBhB,YAAYiB,MAAyB;CACtD,MAAAC,YAAkBlB,YAAYmB,MAA2B;CACzD,MAAAC,gBAAsBpB,YAAYqB,MAAsB;CACxD,MAAAC,iBAAuBxB,OACrBa,KAAAA,CACF;CACA,MAAAY,qBAA2BzB,OAAO,CAAC;CAAE,IAAA0B;CAAA,IAAAC;CAAA,IAAAjB,EAAA,OAAAK,KAAA;EAGnCW,iBAAM;GACJD,mBAAkBG,UAAlBH,mBAAkBG,UAAY;GAC9B,IAAIJ,eAAcI,YAAaf,KAAAA,GAAS;GAExCgB,aAAaL,eAAcI,OAAQ;GACnCJ,eAAcI,UAAWf,KAAAA;GACzBE,IAAGe,QAAQC,YAAa,KAAK;EAAC;EAEhCJ,KAAA,CAACZ,GAAG;EAACL,EAAA,KAAAK;EAAAL,EAAA,KAAAgB;EAAAhB,EAAA,KAAAiB;CAAA,OAAA;EAAAD,KAAAhB,EAAA;EAAAiB,KAAAjB,EAAA;CAAA;CATPX,UACE2B,IAQAC,EACF;CAAC,IAAAK;CAAA,IAAAtB,EAAA,OAAAK,OAAAL,EAAA,OAAAY,iBAAAZ,EAAA,OAAAN,kBAAAM,EAAA,OAAAL,mBAAAK,EAAA,OAAAU,WAAA;EAEwBY,WAAA;GACvB,IAAI,CAAC3B,iBAAe;GAEpB,MAAA4B,cAAoBb,YAAAE,gBAA4BP,IAAGe,QAAQI,YAAa;GACxE,IAAI,CAACD,aAAW;GAChB,MAAAE,kBAAwBV,mBAAkBG;GAI1CrB,QAAO6B,QAAS/B,gBAAgB4B,WAAW,CAAC,CAAC,CAAAI,WAC3C;IACE,IAAIF,oBAAoBV,mBAAkBG,SAAQ;IAElD,IAAIJ,eAAcI,YAAaf,KAAAA,GAC7BgB,aAAaL,eAAcI,OAAQ;IAErCb,IAAGe,QAAQC,YAAa,IAAI;IAC5BP,eAAcI,UAAWU,iBAAW;KAClCd,eAAcI,UAAWf,KAAAA;KACzBE,IAAGe,QAAQC,YAAa,KAAK;IAAC,GAC7B3B,cAAc;GAHK,GAKxBmC,MACF;EAAC;EACF7B,EAAA,KAAAK;EAAAL,EAAA,KAAAY;EAAAZ,EAAA,KAAAN;EAAAM,EAAA,KAAAL;EAAAK,EAAA,KAAAU;EAAAV,EAAA,MAAAsB;CAAA,OAAAA,KAAAtB,EAAA;CAxBD,MAAA8B,OAAaR;CA0BY,MAAAS,KAAAzB,YAAA,CAAaX;CAAe,IAAAqC;CAAA,IAAAhC,EAAA,QAAA8B,QAAA9B,EAAA,QAAAQ,YAAAR,EAAA,QAAA+B,IAAA;EAA9CC,KAAA;GAAAF;GAAAxB,UAAkByB;GAA4BvB;EAAW;EAACR,EAAA,MAAA8B;EAAA9B,EAAA,MAAAQ;EAAAR,EAAA,MAAA+B;EAAA/B,EAAA,MAAAgC;CAAA,OAAAA,KAAAhC,EAAA;CAAA,OAA1DgC;AAA0D;AA1DnC,SAAAC,MAAAC,GAAA;CAAA,OASEA,EAACC,SAAU,UAAUD,EAACtC,KAAKwC,SAAU;AAAC;AATxC,SAAA7B,OAAA8B,GAAA;CAAA,OAMrB,GACJA,EAACjB,QAAQkB,SAAU,eAClBD,EAACjB,QAAQmB,QAAaJ,SAAK,cAC7BE,EAACjB,QAAQoB,MAAMC,KAAMR,KAA6C;AACnE;AAV2B,SAAAxB,OAAAiC,KAAA;CAAA,OAYML,IAACjB,QAAQZ;AAAS;AAZxB,SAAAG,OAAAgC,KAAA;CAAA,OAaON,IAACO,SAASlC;AAAU;AAb3B,SAAAG,OAAAgC,KAAA;CAAA,OAcWR,IAACO,SAAShD;AAAK;AAd1B,SAAAiC,SAAA,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useActionBarEdit.ts
|
|
5
5
|
const useActionBarEdit = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useActionBarFeedback.ts
|
|
5
5
|
const useActionBarFeedbackPositive = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useActionBarReload.ts
|
|
5
5
|
const useActionBarReload = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useActionBarSpeak.ts
|
|
5
5
|
const useActionBarSpeak = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useActionBarStopSpeaking.ts
|
|
5
5
|
const useActionBarStopSpeaking = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useBranchPickerNext.ts
|
|
5
5
|
const useBranchPickerNext = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useBranchPickerPrevious.ts
|
|
5
5
|
const useBranchPickerPrevious = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useComposerAddAttachment.ts
|
|
5
5
|
const useComposerAddAttachment = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useComposerCancel.ts
|
|
5
5
|
const useComposerCancel = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useComposerDictate.ts
|
|
5
5
|
const useComposerDictate = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useComposerSend.ts
|
|
5
5
|
const useComposerSend = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useEditComposerCancel.ts
|
|
5
5
|
const useEditComposerCancel = () => {
|
|
6
6
|
const $ = c(4);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useEditComposerSend.ts
|
|
5
5
|
const useEditComposerSend = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useMessageBranching.ts
|
|
5
5
|
const useMessageBranching = () => {
|
|
6
6
|
const $ = c(9);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useMessageReload.ts
|
|
5
5
|
const useMessageReload = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useSuggestionTrigger.ts
|
|
5
5
|
const useSuggestionTrigger = (t0) => {
|
|
6
6
|
const $ = c(8);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useThreadListItemArchive.ts
|
|
5
5
|
const useThreadListItemArchive = () => {
|
|
6
6
|
const $ = c(4);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useThreadListItemDelete.ts
|
|
5
5
|
const useThreadListItemDelete = () => {
|
|
6
6
|
const $ = c(4);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useThreadListItemTrigger.ts
|
|
5
5
|
const useThreadListItemTrigger = () => {
|
|
6
6
|
const $ = c(4);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useThreadListItemUnarchive.ts
|
|
5
5
|
const useThreadListItemUnarchive = () => {
|
|
6
6
|
const $ = c(4);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useThreadListLoadMore.ts
|
|
5
5
|
const useThreadListLoadMore = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useThreadListNew.ts
|
|
5
5
|
const useThreadListNew = () => {
|
|
6
6
|
const $ = c(4);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useAuiState } from "@assistant-ui/store";
|
|
2
1
|
import { useRef } from "@assistant-ui/tap/react-shim";
|
|
2
|
+
import { useAuiState } from "@assistant-ui/store";
|
|
3
3
|
//#region src/react/primitive-hooks/useThreadMessageIds.ts
|
|
4
4
|
const useThreadMessageIds = () => {
|
|
5
5
|
const messages = useAuiState((s) => s.thread.messages);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import { useSyncExternalStore } from "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import { useSyncExternalStore } from "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useVoice.ts
|
|
5
5
|
const useVoiceState = () => {
|
|
6
6
|
return useAuiState(_temp);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ChainOfThoughtPartByIndexProvider } from "../../providers/ChainOfThoughtPartByIndexProvider.js";
|
|
2
2
|
import { MessagePartComponent } from "../message/MessageParts.js";
|
|
3
|
-
import { RenderChildrenWithAccessor, useAuiState } from "@assistant-ui/store";
|
|
4
|
-
import { useMemo } from "@assistant-ui/tap/react-shim";
|
|
5
3
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
4
|
+
import { useMemo } from "@assistant-ui/tap/react-shim";
|
|
5
|
+
import { RenderChildrenWithAccessor, useAuiState } from "@assistant-ui/store";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/react/primitives/chainOfThought/ChainOfThoughtParts.tsx
|
|
8
8
|
const ChainOfThoughtPrimitivePartsInner = ({ children }) => {
|