@assistant-ui/react 0.10.29 → 0.10.31
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/api/AttachmentRuntime.d.ts +1 -1
- package/dist/api/AttachmentRuntime.d.ts.map +1 -1
- package/dist/api/AttachmentRuntime.js.map +1 -1
- package/dist/api/ComposerRuntime.d.ts +3 -10
- package/dist/api/ComposerRuntime.d.ts.map +1 -1
- package/dist/api/ComposerRuntime.js.map +1 -1
- package/dist/api/MessagePartRuntime.d.ts +1 -1
- package/dist/api/MessagePartRuntime.d.ts.map +1 -1
- package/dist/api/MessagePartRuntime.js.map +1 -1
- package/dist/api/MessageRuntime.d.ts +10 -4
- package/dist/api/MessageRuntime.d.ts.map +1 -1
- package/dist/api/MessageRuntime.js.map +1 -1
- package/dist/api/RuntimeBindings.d.ts +38 -0
- package/dist/api/RuntimeBindings.d.ts.map +1 -0
- package/dist/api/RuntimeBindings.js +1 -0
- package/dist/api/RuntimeBindings.js.map +1 -0
- package/dist/api/ThreadListItemRuntime.d.ts +2 -12
- package/dist/api/ThreadListItemRuntime.d.ts.map +1 -1
- package/dist/api/ThreadListItemRuntime.js.map +1 -1
- package/dist/api/ThreadRuntime.d.ts +1 -1
- package/dist/api/ThreadRuntime.d.ts.map +1 -1
- package/dist/api/ThreadRuntime.js.map +1 -1
- package/dist/context/react/AttachmentContext.d.ts +48 -48
- package/dist/primitives/message/MessagePartsGroupedByParentId.d.ts.map +1 -1
- package/dist/primitives/message/MessagePartsGroupedByParentId.js +9 -17
- package/dist/primitives/message/MessagePartsGroupedByParentId.js.map +1 -1
- package/dist/runtimes/core/ThreadListRuntimeCore.d.ts +2 -1
- package/dist/runtimes/core/ThreadListRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreRuntimeCore.d.ts +1 -1
- package/dist/runtimes/external-store/ExternalStoreRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreRuntimeCore.js +1 -1
- package/dist/runtimes/external-store/ExternalStoreRuntimeCore.js.map +1 -1
- package/dist/types/AssistantTypes.d.ts +4 -50
- package/dist/types/AssistantTypes.d.ts.map +1 -1
- package/dist/types/AttachmentTypes.d.ts +1 -1
- package/dist/types/AttachmentTypes.d.ts.map +1 -1
- package/dist/types/MessagePartTypes.d.ts +49 -0
- package/dist/types/MessagePartTypes.d.ts.map +1 -0
- package/dist/types/MessagePartTypes.js +1 -0
- package/dist/types/MessagePartTypes.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/api/AttachmentRuntime.ts +1 -1
- package/src/api/ComposerRuntime.ts +12 -16
- package/src/api/MessagePartRuntime.ts +1 -1
- package/src/api/MessageRuntime.ts +2 -5
- package/src/api/RuntimeBindings.ts +70 -0
- package/src/api/ThreadListItemRuntime.ts +5 -14
- package/src/api/ThreadRuntime.ts +1 -1
- package/src/primitives/message/MessagePartsGroupedByParentId.tsx +22 -29
- package/src/runtimes/core/ThreadListRuntimeCore.tsx +2 -1
- package/src/runtimes/external-store/ExternalStoreRuntimeCore.tsx +1 -1
- package/src/types/AssistantTypes.ts +27 -70
- package/src/types/AttachmentTypes.ts +1 -1
- package/src/types/MessagePartTypes.ts +69 -0
- package/src/types/index.ts +3 -0
@@ -0,0 +1,69 @@
|
|
1
|
+
import { ReadonlyJSONObject } from "assistant-stream/utils";
|
2
|
+
|
3
|
+
export type TextMessagePart = {
|
4
|
+
readonly type: "text";
|
5
|
+
readonly text: string;
|
6
|
+
readonly parentId?: string;
|
7
|
+
};
|
8
|
+
|
9
|
+
export type ReasoningMessagePart = {
|
10
|
+
readonly type: "reasoning";
|
11
|
+
readonly text: string;
|
12
|
+
readonly parentId?: string;
|
13
|
+
};
|
14
|
+
|
15
|
+
export type SourceMessagePart = {
|
16
|
+
readonly type: "source";
|
17
|
+
readonly sourceType: "url";
|
18
|
+
readonly id: string;
|
19
|
+
readonly url: string;
|
20
|
+
readonly title?: string;
|
21
|
+
readonly parentId?: string;
|
22
|
+
};
|
23
|
+
|
24
|
+
export type ImageMessagePart = {
|
25
|
+
readonly type: "image";
|
26
|
+
readonly image: string;
|
27
|
+
};
|
28
|
+
|
29
|
+
export type FileMessagePart = {
|
30
|
+
readonly type: "file";
|
31
|
+
readonly data: string;
|
32
|
+
readonly mimeType: string;
|
33
|
+
};
|
34
|
+
|
35
|
+
export type Unstable_AudioMessagePart = {
|
36
|
+
readonly type: "audio";
|
37
|
+
readonly audio: {
|
38
|
+
readonly data: string;
|
39
|
+
readonly format: "mp3" | "wav";
|
40
|
+
};
|
41
|
+
};
|
42
|
+
|
43
|
+
export type ToolCallMessagePart<
|
44
|
+
TArgs = ReadonlyJSONObject,
|
45
|
+
TResult = unknown,
|
46
|
+
> = {
|
47
|
+
readonly type: "tool-call";
|
48
|
+
readonly toolCallId: string;
|
49
|
+
readonly toolName: string;
|
50
|
+
readonly args: TArgs;
|
51
|
+
readonly result?: TResult | undefined;
|
52
|
+
readonly isError?: boolean | undefined;
|
53
|
+
readonly argsText: string;
|
54
|
+
readonly artifact?: unknown;
|
55
|
+
readonly parentId?: string;
|
56
|
+
};
|
57
|
+
|
58
|
+
export type ThreadUserMessagePart =
|
59
|
+
| TextMessagePart
|
60
|
+
| ImageMessagePart
|
61
|
+
| FileMessagePart
|
62
|
+
| Unstable_AudioMessagePart;
|
63
|
+
|
64
|
+
export type ThreadAssistantMessagePart =
|
65
|
+
| TextMessagePart
|
66
|
+
| ReasoningMessagePart
|
67
|
+
| ToolCallMessagePart
|
68
|
+
| SourceMessagePart
|
69
|
+
| FileMessagePart;
|
package/src/types/index.ts
CHANGED
@@ -87,4 +87,7 @@ export type {
|
|
87
87
|
ToolCallMessagePartProps as ToolCallContentPartProps,
|
88
88
|
} from "./MessagePartComponentTypes";
|
89
89
|
|
90
|
+
// Thread list item types
|
91
|
+
export type { ThreadListItemStatus } from "../api/ThreadListItemRuntime";
|
92
|
+
|
90
93
|
export type { Unsubscribe } from "./Unsubscribe";
|