@assistant-ui/react 0.7.0 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/api/AssistantRuntime.d.ts +4 -34
- package/dist/api/AssistantRuntime.d.ts.map +1 -1
- package/dist/api/AssistantRuntime.js.map +1 -1
- package/dist/api/AssistantRuntime.mjs.map +1 -1
- package/dist/api/AttachmentRuntime.d.ts +4 -4
- package/dist/api/AttachmentRuntime.d.ts.map +1 -1
- package/dist/api/AttachmentRuntime.js.map +1 -1
- package/dist/api/AttachmentRuntime.mjs.map +1 -1
- package/dist/api/ComposerRuntime.d.ts +10 -10
- package/dist/api/ComposerRuntime.d.ts.map +1 -1
- package/dist/api/ComposerRuntime.js.map +1 -1
- package/dist/api/ComposerRuntime.mjs.map +1 -1
- package/dist/api/ContentPartRuntime.d.ts +2 -2
- package/dist/api/ContentPartRuntime.d.ts.map +1 -1
- package/dist/api/ContentPartRuntime.js.map +1 -1
- package/dist/api/ContentPartRuntime.mjs.map +1 -1
- package/dist/api/MessageRuntime.d.ts +7 -7
- package/dist/api/MessageRuntime.d.ts.map +1 -1
- package/dist/api/MessageRuntime.js +2 -2
- package/dist/api/MessageRuntime.js.map +1 -1
- package/dist/api/MessageRuntime.mjs +2 -2
- package/dist/api/MessageRuntime.mjs.map +1 -1
- package/dist/api/RuntimePathTypes.d.ts +33 -33
- package/dist/api/RuntimePathTypes.d.ts.map +1 -1
- package/dist/api/RuntimePathTypes.js.map +1 -1
- package/dist/api/ThreadListItemRuntime.d.ts +4 -4
- package/dist/api/ThreadListItemRuntime.d.ts.map +1 -1
- package/dist/api/ThreadListItemRuntime.js.map +1 -1
- package/dist/api/ThreadListItemRuntime.mjs.map +1 -1
- package/dist/api/ThreadListRuntime.d.ts +9 -9
- package/dist/api/ThreadListRuntime.d.ts.map +1 -1
- package/dist/api/ThreadListRuntime.js.map +1 -1
- package/dist/api/ThreadListRuntime.mjs.map +1 -1
- package/dist/api/ThreadRuntime.d.ts +45 -56
- package/dist/api/ThreadRuntime.d.ts.map +1 -1
- package/dist/api/ThreadRuntime.js.map +1 -1
- package/dist/api/ThreadRuntime.mjs.map +1 -1
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js.map +1 -1
- package/dist/context/providers/ThreadListItemRuntimeProvider.d.ts +1 -1
- package/dist/context/providers/ThreadListItemRuntimeProvider.d.ts.map +1 -1
- package/dist/context/react/AssistantContext.d.ts +10 -48
- package/dist/context/react/AssistantContext.d.ts.map +1 -1
- package/dist/context/react/AttachmentContext.d.ts +16 -16
- package/dist/context/react/MessageContext.d.ts +6 -36
- package/dist/context/react/MessageContext.d.ts.map +1 -1
- package/dist/context/react/ThreadContext.d.ts +10 -138
- package/dist/context/react/ThreadContext.d.ts.map +1 -1
- package/dist/context/stores/AssistantToolUIs.d.ts +9 -6
- package/dist/context/stores/AssistantToolUIs.d.ts.map +1 -1
- package/dist/context/stores/AssistantToolUIs.js.map +1 -1
- package/dist/context/stores/AssistantToolUIs.mjs.map +1 -1
- package/dist/context/stores/MessageUtils.d.ts +7 -12
- package/dist/context/stores/MessageUtils.d.ts.map +1 -1
- package/dist/context/stores/MessageUtils.js.map +1 -1
- package/dist/context/stores/MessageUtils.mjs.map +1 -1
- package/dist/context/stores/ThreadViewport.d.ts +6 -10
- package/dist/context/stores/ThreadViewport.d.ts.map +1 -1
- package/dist/context/stores/ThreadViewport.js +0 -1
- package/dist/context/stores/ThreadViewport.js.map +1 -1
- package/dist/context/stores/ThreadViewport.mjs +0 -2
- package/dist/context/stores/ThreadViewport.mjs.map +1 -1
- package/dist/primitive-hooks/contentPart/useContentPartDisplay.d.ts +1 -1
- package/dist/primitive-hooks/contentPart/useContentPartImage.d.ts +1 -1
- package/dist/primitive-hooks/contentPart/useContentPartText.d.ts +1 -1
- package/dist/runtimes/core/BaseThreadRuntimeCore.d.ts +2 -4
- package/dist/runtimes/core/BaseThreadRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/core/ThreadRuntimeCore.d.ts +22 -22
- package/dist/runtimes/core/ThreadRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/core/ThreadRuntimeCore.js.map +1 -1
- package/dist/runtimes/edge/converters/fromCoreMessage.d.ts.map +1 -1
- package/dist/runtimes/edge/converters/fromCoreMessage.js +6 -3
- package/dist/runtimes/edge/converters/fromCoreMessage.js.map +1 -1
- package/dist/runtimes/edge/converters/fromCoreMessage.mjs +6 -3
- package/dist/runtimes/edge/converters/fromCoreMessage.mjs.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.d.ts +3 -3
- package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.d.ts +2 -11
- package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/external-store/ThreadMessageLike.d.ts +5 -1
- package/dist/runtimes/external-store/ThreadMessageLike.d.ts.map +1 -1
- package/dist/runtimes/external-store/ThreadMessageLike.js +18 -6
- package/dist/runtimes/external-store/ThreadMessageLike.js.map +1 -1
- package/dist/runtimes/external-store/ThreadMessageLike.mjs +18 -6
- package/dist/runtimes/external-store/ThreadMessageLike.mjs.map +1 -1
- package/dist/runtimes/local/ChatModelAdapter.d.ts +4 -4
- package/dist/runtimes/local/ChatModelAdapter.d.ts.map +1 -1
- package/dist/runtimes/local/ChatModelAdapter.js.map +1 -1
- package/dist/runtimes/local/LocalThreadRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/local/LocalThreadRuntimeCore.js +1 -0
- package/dist/runtimes/local/LocalThreadRuntimeCore.js.map +1 -1
- package/dist/runtimes/local/LocalThreadRuntimeCore.mjs +1 -0
- package/dist/runtimes/local/LocalThreadRuntimeCore.mjs.map +1 -1
- package/dist/types/AssistantTypes.d.ts +13 -4
- package/dist/types/AssistantTypes.d.ts.map +1 -1
- package/dist/types/AssistantTypes.js.map +1 -1
- package/package.json +3 -3
- package/src/api/AssistantRuntime.ts +2 -2
- package/src/api/AttachmentRuntime.ts +4 -4
- package/src/api/ComposerRuntime.ts +10 -10
- package/src/api/ContentPartRuntime.ts +2 -2
- package/src/api/MessageRuntime.ts +9 -9
- package/src/api/RuntimePathTypes.ts +26 -26
- package/src/api/ThreadListItemRuntime.ts +4 -4
- package/src/api/ThreadListRuntime.ts +10 -10
- package/src/api/ThreadRuntime.ts +45 -14
- package/src/api/index.ts +4 -0
- package/src/context/stores/AssistantToolUIs.ts +9 -2
- package/src/context/stores/MessageUtils.ts +6 -6
- package/src/context/stores/ThreadViewport.tsx +5 -6
- package/src/runtimes/core/ThreadRuntimeCore.tsx +28 -29
- package/src/runtimes/edge/converters/fromCoreMessage.ts +4 -0
- package/src/runtimes/external-store/ThreadMessageLike.tsx +21 -4
- package/src/runtimes/local/ChatModelAdapter.tsx +4 -4
- package/src/runtimes/local/LocalThreadRuntimeCore.tsx +1 -0
- package/src/types/AssistantTypes.ts +13 -5
@@ -117,22 +117,27 @@ export type MessageStatus =
|
|
117
117
|
export type ThreadSystemMessage = MessageCommonProps & {
|
118
118
|
role: "system";
|
119
119
|
content: [TextContentPart];
|
120
|
+
metadata: {
|
121
|
+
custom: Record<string, unknown>;
|
122
|
+
};
|
120
123
|
};
|
121
124
|
|
122
125
|
export type ThreadUserMessage = MessageCommonProps & {
|
123
126
|
role: "user";
|
124
127
|
content: ThreadUserContentPart[];
|
125
128
|
attachments: readonly CompleteAttachment[];
|
126
|
-
|
129
|
+
metadata: {
|
130
|
+
custom: Record<string, unknown>;
|
131
|
+
};
|
127
132
|
};
|
128
133
|
|
129
134
|
export type ThreadAssistantMessage = MessageCommonProps & {
|
130
135
|
role: "assistant";
|
131
136
|
content: ThreadAssistantContentPart[];
|
132
137
|
status: MessageStatus;
|
133
|
-
metadata
|
134
|
-
steps
|
135
|
-
custom
|
138
|
+
metadata: {
|
139
|
+
steps: ThreadStep[];
|
140
|
+
custom: Record<string, unknown>;
|
136
141
|
};
|
137
142
|
};
|
138
143
|
|
@@ -144,7 +149,10 @@ export type AppendMessage = CoreMessage & {
|
|
144
149
|
|
145
150
|
type BaseThreadMessage = {
|
146
151
|
status?: ThreadAssistantMessage["status"];
|
147
|
-
metadata
|
152
|
+
metadata: {
|
153
|
+
steps?: ThreadStep[];
|
154
|
+
custom: Record<string, unknown>;
|
155
|
+
};
|
148
156
|
attachments?: ThreadUserMessage["attachments"];
|
149
157
|
};
|
150
158
|
|