@assistant-ui/react-native 0.1.33 → 0.1.34

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 CHANGED
@@ -13,9 +13,9 @@ import { threadListItem_d_exports } from "./primitives/threadListItem.js";
13
13
  import { chainOfThought_d_exports } from "./primitives/chainOfThought.js";
14
14
  import { suggestion_d_exports } from "./primitives/suggestion.js";
15
15
  import { index_d_exports } from "./primitives/error/index.js";
16
- import { AppendMessage, AssistantRuntime, Attachment, AttachmentAdapter, AttachmentRuntime, ChatModelAdapter, ChatModelRunOptions, ChatModelRunResult, CompleteAttachment, ComposerRuntime, CompositeAttachmentAdapter, CreateAttachment, DataMessagePart, EditComposerRuntime, ExportedMessageRepository, ExportedMessageRepositoryItem, FeedbackAdapter, FileMessagePart, ImageMessagePart, InMemoryThreadListAdapter, LanguageModelConfig, LanguageModelV1CallSettings, MessageRole, MessageRuntime, MessageStatus, ModelContext, ModelContextProvider, ModelContextRegistry, ModelContextRegistryInstructionHandle, ModelContextRegistryProviderHandle, ModelContextRegistryToolHandle, PendingAttachment, RealtimeVoiceAdapter, ReasoningMessagePart, RemoteThreadListAdapter, RemoteThreadListOptions, RespondToToolApprovalOptions, RunConfig, RuntimeCapabilities, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, SourceMessagePart, SuggestionAdapter, TextMessagePart, ThreadAssistantMessage, ThreadAssistantMessagePart, ThreadComposerRuntime, ThreadHistoryAdapter, ThreadListItemRuntime, ThreadListRuntime, ThreadMessage, ThreadMessageLike, ThreadRuntime, ThreadSystemMessage, ThreadUserMessage, ThreadUserMessagePart, ToolApprovalOption, ToolApprovalOptionKind, ToolApprovalResponse, ToolCallMessagePart, ToolCallTiming, ToolModelContentPart, Unstable_AudioMessagePart, Unstable_InteractableSnapshotEntry, Unstable_InteractableVersion, Unsubscribe, VoiceSessionControls, VoiceSessionHelpers, createVoiceSession, fromThreadMessageLike, generateId, mergeModelContexts, tool, unstable_formatInteractableSnapshot, unstable_getInteractableSnapshots, unstable_getInteractableVersions } from "@assistant-ui/core";
17
- import { AssistantClient, AssistantEventCallback, AssistantEventName, AssistantEventPayload, AssistantEventScope, AssistantEventSelector, AssistantState, AuiIf, AuiProvider, useAui, useAuiEvent, useAuiState } from "@assistant-ui/store";
16
+ import { AppendMessage, AssistantRuntime, Attachment, AttachmentAdapter, AttachmentRuntime, ChatModelAdapter, ChatModelRunOptions, ChatModelRunResult, CompleteAttachment, ComposerRuntime, CompositeAttachmentAdapter, CreateAttachment, DataMessagePart, EditComposerRuntime, ExportedMessageRepository, ExportedMessageRepositoryItem, FeedbackAdapter, FileMessagePart, ImageMessagePart, InMemoryThreadListAdapter, LanguageModelConfig, LanguageModelV1CallSettings, MessageRole, MessageRuntime, MessageStatus, ModelContext, ModelContextProvider, ModelContextRegistry, ModelContextRegistryInstructionHandle, ModelContextRegistryProviderHandle, ModelContextRegistryToolHandle, PendingAttachment, RealtimeVoiceAdapter, ReasoningMessagePart, RemoteThreadListAdapter, RemoteThreadListOptions, RemoteThreadListProviderComponent, RespondToToolApprovalOptions, RunConfig, RuntimeCapabilities, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, SourceMessagePart, SuggestionAdapter, TextMessagePart, ThreadAssistantMessage, ThreadAssistantMessagePart, ThreadComposerRuntime, ThreadHistoryAdapter, ThreadListItemRuntime, ThreadListRuntime, ThreadMessage, ThreadMessageLike, ThreadRuntime, ThreadSystemMessage, ThreadUserMessage, ThreadUserMessagePart, ToolApprovalOption, ToolApprovalOptionKind, ToolApprovalResponse, ToolCallMessagePart, ToolCallTiming, ToolModelContentPart, Unstable_AudioMessagePart, Unstable_InteractableSnapshotEntry, Unstable_InteractableVersion, Unsubscribe, VoiceSessionControls, VoiceSessionHelpers, createVoiceSession, fromThreadMessageLike, generateId, mergeModelContexts, tool, unstable_formatInteractableSnapshot, unstable_getInteractableSnapshots, unstable_getInteractableVersions } from "@assistant-ui/core";
17
+ import { AssistantClient, AssistantEventCallback, AssistantEventName, AssistantEventPayload, AssistantEventScope, AssistantEventSelector, AssistantState, AuiConfig, AuiIf, AuiProvider, useAui, useAuiEvent, useAuiState } from "@assistant-ui/store";
18
18
  import { AssistantContextConfig, AssistantDataUI, AssistantDataUIProps, AssistantInteractableProps, AssistantTool, AssistantToolProps, AssistantToolUI, AssistantToolUIProps, ChainOfThoughtByIndicesProvider, ChainOfThoughtPartByIndexProvider, ComposerAttachmentByIndexProvider, DataMessagePartComponent, DataMessagePartProps, DataRenderers, EmptyMessagePartComponent, EmptyMessagePartProps, FileMessagePartComponent, FileMessagePartProps, GroupByContext, ImageMessagePartComponent, ImageMessagePartProps, Interactables, McpToolkitDefinition, McpToolkitEntry, McpToolkitToolConfig, MessageAttachmentByIndexProvider, MessageByIndexProvider, PartByIndexProvider, ProviderToolConfig, ReasoningGroupComponent, ReasoningGroupProps, ReasoningMessagePartComponent, ReasoningMessagePartProps, RuntimeAdapterProvider, RuntimeAdapters, SourceMessagePartComponent, SourceMessagePartProps, SuggestionByIndexProvider, TextMessagePartComponent, TextMessagePartProps, TextMessagePartProvider, ThreadListItemByIndexProvider, ThreadListItemRuntimeProvider, ToolArgsStatus, ToolCallMessagePartComponent, ToolCallMessagePartProps, ToolCallText, ToolDefinition, Toolkit, ToolkitDefinition, ToolkitDefinitionEntry, Tools, Unstable_AudioMessagePartComponent, Unstable_AudioMessagePartProps, Unstable_InferInteractableState, Unstable_InteractableConfig, Unstable_InteractableDefinition, Unstable_InteractablePersistedState, Unstable_InteractablePersistenceAdapter, Unstable_InteractablePersistenceStatus, Unstable_InteractableRegistration, Unstable_InteractableStateSchema, Unstable_InteractableToolConfig, Unstable_InteractableToolRenderProps, Unstable_InteractableVersionInfo, Unstable_InteractablesClientSchema, Unstable_InteractablesConfig, Unstable_InteractablesMethods, Unstable_InteractablesState, defineMcpToolkit, defineToolkit, externalTool, groupPartByType, hitl, hitlTool, humanTool, makeAssistantDataUI, makeAssistantTool, makeAssistantToolUI, providerTool, stubTool, unstable_Interactables, unstable_interactableTool, unstable_useInteractable, unstable_useInteractableState, unstable_useInteractableVersions, unstable_useThreadMessageIds, useAssistantContext, useAssistantDataUI, useAssistantInstructions, useAssistantInteractable, useAssistantTool, useAssistantToolUI, useAuiToolOverrides, useInlineRender, useInteractableState, useRuntimeAdapters, useToolArgsStatus, useVoiceControls, useVoiceState, useVoiceVolume } from "@assistant-ui/core/react";
19
19
  import { AttachmentState, ChainOfThoughtClient, ComposerState, MessageState, ModelContext as ModelContextClient, SuggestionConfig, Suggestions, ThreadListItemState, ThreadState, ThreadsState } from "@assistant-ui/core/store";
20
20
  import { Tool } from "assistant-stream";
21
- export { actionBar_d_exports as ActionBarPrimitive, type AppendMessage, type AssistantClient, type AssistantContextConfig, type AssistantDataUI, type AssistantDataUIProps, type AssistantEventCallback, type AssistantEventName, type AssistantEventPayload, type AssistantEventScope, type AssistantEventSelector, type AssistantInteractableProps, type AssistantRuntime, AssistantRuntimeProvider, type AssistantState, type AssistantTool, type AssistantToolProps, type AssistantToolUI, type AssistantToolUIProps, type Attachment, type AttachmentAdapter, attachment_d_exports as AttachmentPrimitive, type AttachmentRuntime, type AttachmentState, AuiIf, AuiProvider, branchPicker_d_exports as BranchPickerPrimitive, ChainOfThoughtByIndicesProvider, ChainOfThoughtClient, ChainOfThoughtPartByIndexProvider, chainOfThought_d_exports as ChainOfThoughtPrimitive, type ChatModelAdapter, type ChatModelRunOptions, type ChatModelRunResult, type CompleteAttachment, ComposerAttachmentByIndexProvider, composer_d_exports as ComposerPrimitive, type ComposerRuntime, type ComposerState, CompositeAttachmentAdapter, type CreateAttachment, type DataMessagePart, type DataMessagePartComponent, type DataMessagePartProps, DataRenderers, type EditComposerRuntime, type EmptyMessagePartComponent, type EmptyMessagePartProps, index_d_exports as ErrorPrimitive, ExportedMessageRepository, type ExportedMessageRepositoryItem, type FeedbackAdapter, type FileMessagePart, type FileMessagePartComponent, type FileMessagePartProps, type GroupByContext, type ImageMessagePart, type ImageMessagePartComponent, type ImageMessagePartProps, InMemoryThreadListAdapter, Interactables, type LanguageModelConfig, type LanguageModelV1CallSettings, type LocalRuntimeOptions, type McpToolkitDefinition, type McpToolkitEntry, type McpToolkitToolConfig, MessageAttachmentByIndexProvider, MessageByIndexProvider, message_d_exports as MessagePrimitive, type MessageRole, type MessageRuntime, type MessageState, type MessageStatus, type ModelContext, ModelContextClient, type ModelContextProvider, ModelContextRegistry, type ModelContextRegistryInstructionHandle, type ModelContextRegistryProviderHandle, type ModelContextRegistryToolHandle, PartByIndexProvider, type PendingAttachment, type ProviderToolConfig, type RealtimeVoiceAdapter, type ReasoningGroupComponent, type ReasoningGroupProps, type ReasoningMessagePart, type ReasoningMessagePartComponent, type ReasoningMessagePartProps, type RemoteThreadListAdapter, type RemoteThreadListOptions, type RespondToToolApprovalOptions, type RunConfig, RuntimeAdapterProvider, type RuntimeAdapters, type RuntimeCapabilities, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, type SourceMessagePart, type SourceMessagePartComponent, type SourceMessagePartProps, type SuggestionAdapter, SuggestionByIndexProvider, type SuggestionConfig, suggestion_d_exports as SuggestionPrimitive, Suggestions, type TextMessagePart, type TextMessagePartComponent, type TextMessagePartProps, TextMessagePartProvider, type ThreadAssistantMessage, type ThreadAssistantMessagePart, type ThreadComposerRuntime, type ThreadHistoryAdapter, ThreadListItemByIndexProvider, threadListItem_d_exports as ThreadListItemPrimitive, type ThreadListItemRuntime, ThreadListItemRuntimeProvider, type ThreadListItemState, threadList_d_exports as ThreadListPrimitive, type ThreadListRuntime, type ThreadMessage, type ThreadMessageLike, thread_d_exports as ThreadPrimitive, type ThreadRuntime, type ThreadState, type ThreadSystemMessage, type ThreadUserMessage, type ThreadUserMessagePart, type ThreadsState, type Tool, type ToolApprovalOption, type ToolApprovalOptionKind, type ToolApprovalResponse, type ToolArgsStatus, type ToolCallMessagePart, type ToolCallMessagePartComponent, type ToolCallMessagePartProps, type ToolCallText, type ToolCallTiming, type ToolDefinition, type ToolModelContentPart, type Toolkit, type ToolkitDefinition, type ToolkitDefinitionEntry, Tools, type Unstable_AudioMessagePart, 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_InteractableSnapshotEntry, type Unstable_InteractableStateSchema, type Unstable_InteractableToolConfig, type Unstable_InteractableToolRenderProps, type Unstable_InteractableVersion, type Unstable_InteractableVersionInfo, type Unstable_InteractablesClientSchema, type Unstable_InteractablesConfig, type Unstable_InteractablesMethods, type Unstable_InteractablesState, type Unsubscribe, type VoiceSessionControls, type VoiceSessionHelpers, createVoiceSession, defineMcpToolkit, defineToolkit, externalTool, fromThreadMessageLike, generateId, groupPartByType, hitl, hitlTool, humanTool, makeAssistantDataUI, makeAssistantTool, makeAssistantToolUI, mergeModelContexts, providerTool, stubTool, tool, unstable_Interactables, unstable_formatInteractableSnapshot, unstable_getInteractableSnapshots, unstable_getInteractableVersions, unstable_interactableTool, unstable_useInteractable, unstable_useInteractableState, unstable_useInteractableVersions, unstable_useThreadMessageIds, useAssistantContext, useAssistantDataUI, useAssistantInstructions, useAssistantInteractable, useAssistantTool, useAssistantToolUI, useAui, useAuiEvent, useAuiState, useAuiToolOverrides, useInlineRender, useInteractableState, useLocalRuntime, useRemoteThreadListRuntime, useRuntimeAdapters, useToolArgsStatus, useVoiceControls, useVoiceState, useVoiceVolume };
21
+ export { actionBar_d_exports as ActionBarPrimitive, type AppendMessage, type AssistantClient, type AssistantContextConfig, type AssistantDataUI, type AssistantDataUIProps, type AssistantEventCallback, type AssistantEventName, type AssistantEventPayload, type AssistantEventScope, type AssistantEventSelector, type AssistantInteractableProps, type AssistantRuntime, AssistantRuntimeProvider, type AssistantState, type AssistantTool, type AssistantToolProps, type AssistantToolUI, type AssistantToolUIProps, type Attachment, type AttachmentAdapter, attachment_d_exports as AttachmentPrimitive, type AttachmentRuntime, type AttachmentState, AuiConfig, AuiIf, AuiProvider, branchPicker_d_exports as BranchPickerPrimitive, ChainOfThoughtByIndicesProvider, ChainOfThoughtClient, ChainOfThoughtPartByIndexProvider, chainOfThought_d_exports as ChainOfThoughtPrimitive, type ChatModelAdapter, type ChatModelRunOptions, type ChatModelRunResult, type CompleteAttachment, ComposerAttachmentByIndexProvider, composer_d_exports as ComposerPrimitive, type ComposerRuntime, type ComposerState, CompositeAttachmentAdapter, type CreateAttachment, type DataMessagePart, type DataMessagePartComponent, type DataMessagePartProps, DataRenderers, type EditComposerRuntime, type EmptyMessagePartComponent, type EmptyMessagePartProps, index_d_exports as ErrorPrimitive, ExportedMessageRepository, type ExportedMessageRepositoryItem, type FeedbackAdapter, type FileMessagePart, type FileMessagePartComponent, type FileMessagePartProps, type GroupByContext, type ImageMessagePart, type ImageMessagePartComponent, type ImageMessagePartProps, InMemoryThreadListAdapter, Interactables, type LanguageModelConfig, type LanguageModelV1CallSettings, type LocalRuntimeOptions, type McpToolkitDefinition, type McpToolkitEntry, type McpToolkitToolConfig, MessageAttachmentByIndexProvider, MessageByIndexProvider, message_d_exports as MessagePrimitive, type MessageRole, type MessageRuntime, type MessageState, type MessageStatus, type ModelContext, ModelContextClient, type ModelContextProvider, ModelContextRegistry, type ModelContextRegistryInstructionHandle, type ModelContextRegistryProviderHandle, type ModelContextRegistryToolHandle, PartByIndexProvider, type PendingAttachment, type ProviderToolConfig, type RealtimeVoiceAdapter, type ReasoningGroupComponent, type ReasoningGroupProps, type ReasoningMessagePart, type ReasoningMessagePartComponent, type ReasoningMessagePartProps, type RemoteThreadListAdapter, type RemoteThreadListOptions, type RemoteThreadListProviderComponent, type RespondToToolApprovalOptions, type RunConfig, RuntimeAdapterProvider, type RuntimeAdapters, type RuntimeCapabilities, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, type SourceMessagePart, type SourceMessagePartComponent, type SourceMessagePartProps, type SuggestionAdapter, SuggestionByIndexProvider, type SuggestionConfig, suggestion_d_exports as SuggestionPrimitive, Suggestions, type TextMessagePart, type TextMessagePartComponent, type TextMessagePartProps, TextMessagePartProvider, type ThreadAssistantMessage, type ThreadAssistantMessagePart, type ThreadComposerRuntime, type ThreadHistoryAdapter, ThreadListItemByIndexProvider, threadListItem_d_exports as ThreadListItemPrimitive, type ThreadListItemRuntime, ThreadListItemRuntimeProvider, type ThreadListItemState, threadList_d_exports as ThreadListPrimitive, type ThreadListRuntime, type ThreadMessage, type ThreadMessageLike, thread_d_exports as ThreadPrimitive, type ThreadRuntime, type ThreadState, type ThreadSystemMessage, type ThreadUserMessage, type ThreadUserMessagePart, type ThreadsState, type Tool, type ToolApprovalOption, type ToolApprovalOptionKind, type ToolApprovalResponse, type ToolArgsStatus, type ToolCallMessagePart, type ToolCallMessagePartComponent, type ToolCallMessagePartProps, type ToolCallText, type ToolCallTiming, type ToolDefinition, type ToolModelContentPart, type Toolkit, type ToolkitDefinition, type ToolkitDefinitionEntry, Tools, type Unstable_AudioMessagePart, 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_InteractableSnapshotEntry, type Unstable_InteractableStateSchema, type Unstable_InteractableToolConfig, type Unstable_InteractableToolRenderProps, type Unstable_InteractableVersion, type Unstable_InteractableVersionInfo, type Unstable_InteractablesClientSchema, type Unstable_InteractablesConfig, type Unstable_InteractablesMethods, type Unstable_InteractablesState, type Unsubscribe, type VoiceSessionControls, type VoiceSessionHelpers, createVoiceSession, defineMcpToolkit, defineToolkit, externalTool, fromThreadMessageLike, generateId, groupPartByType, hitl, hitlTool, humanTool, makeAssistantDataUI, makeAssistantTool, makeAssistantToolUI, mergeModelContexts, providerTool, stubTool, tool, unstable_Interactables, unstable_formatInteractableSnapshot, unstable_getInteractableSnapshots, unstable_getInteractableVersions, unstable_interactableTool, unstable_useInteractable, unstable_useInteractableState, unstable_useInteractableVersions, unstable_useThreadMessageIds, useAssistantContext, useAssistantDataUI, useAssistantInstructions, useAssistantInteractable, useAssistantTool, useAssistantToolUI, useAui, useAuiEvent, useAuiState, useAuiToolOverrides, useInlineRender, useInteractableState, useLocalRuntime, useRemoteThreadListRuntime, useRuntimeAdapters, useToolArgsStatus, useVoiceControls, useVoiceState, useVoiceVolume };
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import { chainOfThought_exports } from "./primitives/chainOfThought.js";
13
13
  import { suggestion_exports } from "./primitives/suggestion.js";
14
14
  import { error_exports } from "./primitives/error/index.js";
15
15
  import { CompositeAttachmentAdapter, ExportedMessageRepository, InMemoryThreadListAdapter, ModelContextRegistry, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, createVoiceSession, fromThreadMessageLike, generateId, mergeModelContexts, tool, unstable_formatInteractableSnapshot, unstable_getInteractableSnapshots, unstable_getInteractableVersions } from "@assistant-ui/core";
16
- import { AuiIf, AuiProvider, useAui, useAuiEvent, useAuiState } from "@assistant-ui/store";
16
+ import { AuiConfig, AuiIf, AuiProvider, useAui, useAuiEvent, useAuiState } from "@assistant-ui/store";
17
17
  import { ChainOfThoughtByIndicesProvider, ChainOfThoughtPartByIndexProvider, ComposerAttachmentByIndexProvider, DataRenderers, Interactables, MessageAttachmentByIndexProvider, MessageByIndexProvider, PartByIndexProvider, RuntimeAdapterProvider, SuggestionByIndexProvider, TextMessagePartProvider, ThreadListItemByIndexProvider, ThreadListItemRuntimeProvider, Tools, defineMcpToolkit, defineToolkit, externalTool, groupPartByType, hitl, hitlTool, humanTool, makeAssistantDataUI, makeAssistantTool, makeAssistantToolUI, providerTool, stubTool, unstable_Interactables, unstable_interactableTool, unstable_useInteractable, unstable_useInteractableState, unstable_useInteractableVersions, unstable_useThreadMessageIds, useAssistantContext, useAssistantDataUI, useAssistantInstructions, useAssistantInteractable, useAssistantTool, useAssistantToolUI, useAuiToolOverrides, useInlineRender, useInteractableState, useRuntimeAdapters, useToolArgsStatus, useVoiceControls, useVoiceState, useVoiceVolume } from "@assistant-ui/core/react";
18
18
  import { ChainOfThoughtClient, ModelContext as ModelContextClient, Suggestions } from "@assistant-ui/core/store";
19
- export { actionBar_exports as ActionBarPrimitive, AssistantRuntimeProvider, attachment_exports as AttachmentPrimitive, AuiIf, AuiProvider, branchPicker_exports as BranchPickerPrimitive, ChainOfThoughtByIndicesProvider, ChainOfThoughtClient, ChainOfThoughtPartByIndexProvider, chainOfThought_exports as ChainOfThoughtPrimitive, ComposerAttachmentByIndexProvider, composer_exports as ComposerPrimitive, CompositeAttachmentAdapter, DataRenderers, error_exports as ErrorPrimitive, ExportedMessageRepository, InMemoryThreadListAdapter, Interactables, MessageAttachmentByIndexProvider, MessageByIndexProvider, message_exports as MessagePrimitive, ModelContextClient, ModelContextRegistry, PartByIndexProvider, RuntimeAdapterProvider, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, SuggestionByIndexProvider, suggestion_exports as SuggestionPrimitive, Suggestions, TextMessagePartProvider, ThreadListItemByIndexProvider, threadListItem_exports as ThreadListItemPrimitive, ThreadListItemRuntimeProvider, threadList_exports as ThreadListPrimitive, thread_exports as ThreadPrimitive, Tools, createVoiceSession, defineMcpToolkit, defineToolkit, externalTool, fromThreadMessageLike, generateId, groupPartByType, hitl, hitlTool, humanTool, makeAssistantDataUI, makeAssistantTool, makeAssistantToolUI, mergeModelContexts, providerTool, stubTool, tool, unstable_Interactables, unstable_formatInteractableSnapshot, unstable_getInteractableSnapshots, unstable_getInteractableVersions, unstable_interactableTool, unstable_useInteractable, unstable_useInteractableState, unstable_useInteractableVersions, unstable_useThreadMessageIds, useAssistantContext, useAssistantDataUI, useAssistantInstructions, useAssistantInteractable, useAssistantTool, useAssistantToolUI, useAui, useAuiEvent, useAuiState, useAuiToolOverrides, useInlineRender, useInteractableState, useLocalRuntime, useRemoteThreadListRuntime, useRuntimeAdapters, useToolArgsStatus, useVoiceControls, useVoiceState, useVoiceVolume };
19
+ export { actionBar_exports as ActionBarPrimitive, AssistantRuntimeProvider, attachment_exports as AttachmentPrimitive, AuiConfig, AuiIf, AuiProvider, branchPicker_exports as BranchPickerPrimitive, ChainOfThoughtByIndicesProvider, ChainOfThoughtClient, ChainOfThoughtPartByIndexProvider, chainOfThought_exports as ChainOfThoughtPrimitive, ComposerAttachmentByIndexProvider, composer_exports as ComposerPrimitive, CompositeAttachmentAdapter, DataRenderers, error_exports as ErrorPrimitive, ExportedMessageRepository, InMemoryThreadListAdapter, Interactables, MessageAttachmentByIndexProvider, MessageByIndexProvider, message_exports as MessagePrimitive, ModelContextClient, ModelContextRegistry, PartByIndexProvider, RuntimeAdapterProvider, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, SuggestionByIndexProvider, suggestion_exports as SuggestionPrimitive, Suggestions, TextMessagePartProvider, ThreadListItemByIndexProvider, threadListItem_exports as ThreadListItemPrimitive, ThreadListItemRuntimeProvider, threadList_exports as ThreadListPrimitive, thread_exports as ThreadPrimitive, Tools, createVoiceSession, defineMcpToolkit, defineToolkit, externalTool, fromThreadMessageLike, generateId, groupPartByType, hitl, hitlTool, humanTool, makeAssistantDataUI, makeAssistantTool, makeAssistantToolUI, mergeModelContexts, providerTool, stubTool, tool, unstable_Interactables, unstable_formatInteractableSnapshot, unstable_getInteractableSnapshots, unstable_getInteractableVersions, unstable_interactableTool, unstable_useInteractable, unstable_useInteractableState, unstable_useInteractableVersions, unstable_useThreadMessageIds, useAssistantContext, useAssistantDataUI, useAssistantInstructions, useAssistantInteractable, useAssistantTool, useAssistantToolUI, useAui, useAuiEvent, useAuiState, useAuiToolOverrides, useInlineRender, useInteractableState, useLocalRuntime, useRemoteThreadListRuntime, useRuntimeAdapters, useToolArgsStatus, useVoiceControls, useVoiceState, useVoiceVolume };
@@ -1,26 +1,40 @@
1
1
  import { useAuiState } from "@assistant-ui/store";
2
2
  import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
3
3
  import { Text } from "react-native";
4
- import { jsxs } from "react/jsx-runtime";
4
+ import { jsx } from "react/jsx-runtime";
5
5
  //#region src/primitives/attachment/AttachmentThumb.tsx
6
- const AttachmentThumb = (props) => {
7
- const $ = c(3);
8
- const ext = useAuiState(_temp);
9
- let t0;
10
- if ($[0] !== ext || $[1] !== props) {
11
- t0 = /* @__PURE__ */ jsxs(Text, {
12
- ...props,
13
- children: [".", ext]
6
+ const AttachmentThumb = (t0) => {
7
+ const $ = c(6);
8
+ let children;
9
+ let textProps;
10
+ if ($[0] !== t0) {
11
+ ({children, ...textProps} = t0);
12
+ $[0] = t0;
13
+ $[1] = children;
14
+ $[2] = textProps;
15
+ } else {
16
+ children = $[1];
17
+ textProps = $[2];
18
+ }
19
+ const label = useAuiState(_temp);
20
+ const t1 = children ?? label;
21
+ let t2;
22
+ if ($[3] !== t1 || $[4] !== textProps) {
23
+ t2 = /* @__PURE__ */ jsx(Text, {
24
+ ...textProps,
25
+ children: t1
14
26
  });
15
- $[0] = ext;
16
- $[1] = props;
17
- $[2] = t0;
18
- } else t0 = $[2];
19
- return t0;
27
+ $[3] = t1;
28
+ $[4] = textProps;
29
+ $[5] = t2;
30
+ } else t2 = $[5];
31
+ return t2;
20
32
  };
21
33
  function _temp(s) {
22
- const parts = s.attachment.name.split(".");
23
- return parts.length > 1 ? parts.pop() : "";
34
+ const name = s.attachment.name;
35
+ const dot = name.lastIndexOf(".");
36
+ if (dot > 0 && dot < name.length - 1) return `.${name.slice(dot + 1)}`;
37
+ return s.attachment.type;
24
38
  }
25
39
  //#endregion
26
40
  export { AttachmentThumb };
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentThumb.js","names":["FC","Text","TextProps","useAuiState","AttachmentThumbProps","AttachmentThumb","props","$","_c","ext","_temp","t0","s","parts","attachment","name","split","length","pop"],"sources":["../../../src/primitives/attachment/AttachmentThumb.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { Text, type TextProps } from \"react-native\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport type AttachmentThumbProps = TextProps;\n\nexport const AttachmentThumb: FC<AttachmentThumbProps> = (props) => {\n const ext = useAuiState((s) => {\n const parts = s.attachment.name.split(\".\");\n return parts.length > 1 ? parts.pop()! : \"\";\n });\n return <Text {...props}>.{ext}</Text>;\n};\n"],"mappings":";;;;;AAMA,MAAaK,mBAA4CC,UAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACvD,MAAAC,MAAYN,YAAYO,KAGvB;CAAE,IAAAC;CAAA,IAAAJ,EAAA,OAAAE,OAAAF,EAAA,OAAAD,OAAA;EACIK,KAAA,qBAAC,MAAD;GAAK,GAAKL;GAAV,UAAA,CAAiB,KAAEG,GAAd;;EAAyBF,EAAA,KAAAE;EAAAF,EAAA,KAAAD;EAAAC,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,OAA9BI;AAA8B;AALkB,SAAAD,MAAAE,GAAA;CAErD,MAAAC,QAAcD,EAACE,WAAWC,KAAKC,MAAO,GAAG;CAAE,OACpCH,MAAKI,SAAU,IAAIJ,MAAKK,IAAW,IAAnC;AAAoC"}
1
+ {"version":3,"file":"AttachmentThumb.js","names":["FC","Text","TextProps","useAuiState","AttachmentThumbProps","AttachmentThumb","t0","$","_c","children","textProps","label","_temp","t1","t2","s","name","attachment","dot","lastIndexOf","length","slice","type"],"sources":["../../../src/primitives/attachment/AttachmentThumb.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { Text, type TextProps } from \"react-native\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport type AttachmentThumbProps = TextProps;\n\nexport const AttachmentThumb: FC<AttachmentThumbProps> = ({\n children,\n ...textProps\n}) => {\n const label = useAuiState((s) => {\n const name = s.attachment.name;\n const dot = name.lastIndexOf(\".\");\n if (dot > 0 && dot < name.length - 1) {\n return `.${name.slice(dot + 1)}`;\n }\n return s.attachment.type;\n });\n return <Text {...textProps}>{children ?? label}</Text>;\n};\n"],"mappings":";;;;;AAMA,MAAaK,mBAA4CC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAH,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAG,aAAAC,aAAAJ;EAGzDC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAA;EAAAD,WAAAF,EAAA;EAAAG,YAAAH,EAAA;CAAA;CACC,MAAAI,QAAcR,YAAYS,KAOzB;CAC4B,MAAAC,KAAAJ,YAAAE;CAAiB,IAAAG;CAAA,IAAAP,EAAA,OAAAM,MAAAN,EAAA,OAAAG,WAAA;EAAvCI,KAAA,oBAAC,MAAD;GAAK,GAAKJ;GAAYG,UAAAA;EAAjB,CAAA;EAA0CN,EAAA,KAAAM;EAAAN,EAAA,KAAAG;EAAAH,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OAA/CO;AAA+C;AAZC,SAAAF,MAAAG,GAAA;CAKrD,MAAAC,OAAaD,EAACE,WAAWD;CACzB,MAAAE,MAAYF,KAAIG,YAAa,GAAG;CAChC,IAAID,MAAM,KAAKA,MAAMF,KAAII,SAAU,GAAC,OAC3B,IAAIJ,KAAIK,MAAOH,MAAM,CAAC;CAC9B,OACMH,EAACE,WAAWK;AAAK"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@assistant-ui/react-native",
3
- "version": "0.1.33",
3
+ "version": "0.1.34",
4
4
  "description": "React Native bindings for assistant-ui",
5
5
  "keywords": [
6
6
  "assistant",
@@ -31,10 +31,10 @@
31
31
  ],
32
32
  "sideEffects": false,
33
33
  "dependencies": {
34
- "@assistant-ui/core": "^0.3.0",
35
- "@assistant-ui/store": "^0.3.0",
36
- "@assistant-ui/tap": "^0.9.7",
37
- "assistant-stream": "^0.3.29",
34
+ "@assistant-ui/core": "^0.3.6",
35
+ "@assistant-ui/store": "^0.3.4",
36
+ "@assistant-ui/tap": "^0.9.10",
37
+ "assistant-stream": "^0.3.34",
38
38
  "zustand": "^5.0.14"
39
39
  },
40
40
  "peerDependencies": {
@@ -56,7 +56,7 @@
56
56
  "react-native": "^0.86.0",
57
57
  "react-native-web": "^0.21.2",
58
58
  "vitest": "^4.1.10",
59
- "@assistant-ui/x-buildutils": "0.0.20"
59
+ "@assistant-ui/x-buildutils": "0.0.21"
60
60
  },
61
61
  "publishConfig": {
62
62
  "access": "public",
package/src/index.ts CHANGED
@@ -65,6 +65,7 @@ export type {
65
65
  export type {
66
66
  RemoteThreadListAdapter,
67
67
  RemoteThreadListOptions,
68
+ RemoteThreadListProviderComponent,
68
69
  } from "@assistant-ui/core";
69
70
  export { InMemoryThreadListAdapter } from "@assistant-ui/core";
70
71
  export { createVoiceSession } from "@assistant-ui/core";
@@ -93,6 +94,7 @@ export {
93
94
  useAuiState,
94
95
  useAuiEvent,
95
96
  AuiProvider,
97
+ AuiConfig,
96
98
  AuiIf,
97
99
  type AssistantClient,
98
100
  type AssistantState,
@@ -4,7 +4,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
4
4
  import { AttachmentThumb } from "./AttachmentThumb";
5
5
 
6
6
  const h = vi.hoisted(() => ({
7
- attachment: { name: "" },
7
+ attachment: { name: "", type: "file" },
8
8
  }));
9
9
 
10
10
  vi.mock("@assistant-ui/store", () => ({
@@ -20,6 +20,7 @@ describe("AttachmentThumb", () => {
20
20
 
21
21
  beforeEach(() => {
22
22
  h.attachment.name = "";
23
+ h.attachment.type = "file";
23
24
  container = document.createElement("div");
24
25
  document.body.appendChild(container);
25
26
  root = createRoot(container);
@@ -32,8 +33,9 @@ describe("AttachmentThumb", () => {
32
33
  container.remove();
33
34
  });
34
35
 
35
- const mount = async (name: string) => {
36
+ const mount = async (name: string, type = "file") => {
36
37
  h.attachment.name = name;
38
+ h.attachment.type = type;
37
39
  await act(async () => {
38
40
  root.render(<AttachmentThumb testID="thumb" />);
39
41
  });
@@ -50,19 +52,32 @@ describe("AttachmentThumb", () => {
50
52
  expect(el.textContent).toBe(".gz");
51
53
  });
52
54
 
53
- it("renders just a dot when the name has no extension", async () => {
54
- const el = await mount("noext");
55
- expect(el.textContent).toBe(".");
55
+ it("falls back to the attachment type when the name has no extension", async () => {
56
+ const el = await mount("noext", "document");
57
+ expect(el.textContent).toBe("document");
56
58
  });
57
59
 
58
- it("renders just a dot for an empty name", async () => {
59
- const el = await mount("");
60
- expect(el.textContent).toBe(".");
60
+ it("falls back to the attachment type for an empty name", async () => {
61
+ const el = await mount("", "image");
62
+ expect(el.textContent).toBe("image");
61
63
  });
62
64
 
63
- it("treats a leading-dot name as an extension", async () => {
65
+ it("treats a leading-dot name as extensionless", async () => {
64
66
  const el = await mount(".gitignore");
65
- expect(el.textContent).toBe(".gitignore");
67
+ expect(el.textContent).toBe("file");
68
+ });
69
+
70
+ it("falls back to the attachment type for a trailing-dot name", async () => {
71
+ const el = await mount("report.", "image");
72
+ expect(el.textContent).toBe("image");
73
+ });
74
+ it("renders custom children instead of the extension", async () => {
75
+ h.attachment.name = "photo.png";
76
+ await act(async () => {
77
+ root.render(<AttachmentThumb testID="thumb">custom</AttachmentThumb>);
78
+ });
79
+ const el = container.querySelector('[data-testid="thumb"]') as HTMLElement;
80
+ expect(el.textContent).toBe("custom");
66
81
  });
67
82
 
68
83
  it("forwards props to the underlying Text", async () => {
@@ -4,10 +4,17 @@ import { useAuiState } from "@assistant-ui/store";
4
4
 
5
5
  export type AttachmentThumbProps = TextProps;
6
6
 
7
- export const AttachmentThumb: FC<AttachmentThumbProps> = (props) => {
8
- const ext = useAuiState((s) => {
9
- const parts = s.attachment.name.split(".");
10
- return parts.length > 1 ? parts.pop()! : "";
7
+ export const AttachmentThumb: FC<AttachmentThumbProps> = ({
8
+ children,
9
+ ...textProps
10
+ }) => {
11
+ const label = useAuiState((s) => {
12
+ const name = s.attachment.name;
13
+ const dot = name.lastIndexOf(".");
14
+ if (dot > 0 && dot < name.length - 1) {
15
+ return `.${name.slice(dot + 1)}`;
16
+ }
17
+ return s.attachment.type;
11
18
  });
12
- return <Text {...props}>.{ext}</Text>;
19
+ return <Text {...textProps}>{children ?? label}</Text>;
13
20
  };