@assistant-ui/react 0.5.66 → 0.5.68
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{edge-D7ch2oPK.d.mts → edge-BhYWMe-K.d.mts} +26 -6
- package/dist/{edge-D7ch2oPK.d.ts → edge-BhYWMe-K.d.ts} +26 -6
- package/dist/index.d.mts +485 -663
- package/dist/index.d.ts +485 -663
- package/dist/index.js +1208 -962
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1297 -1051
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
@@ -3,18 +3,38 @@ import { ReactNode } from 'react';
|
|
3
3
|
import { JSONSchema7 } from 'json-schema';
|
4
4
|
import { z } from 'zod';
|
5
5
|
|
6
|
+
type PendingAttachmentStatus = {
|
7
|
+
type: "running";
|
8
|
+
reason: "uploading";
|
9
|
+
progress: number;
|
10
|
+
} | {
|
11
|
+
type: "requires-action";
|
12
|
+
reason: "composer-send";
|
13
|
+
} | {
|
14
|
+
type: "incomplete";
|
15
|
+
reason: "error" | "upload-paused";
|
16
|
+
};
|
17
|
+
type CompleteAttachmentStatus = {
|
18
|
+
type: "complete";
|
19
|
+
};
|
20
|
+
type AttachmentStatus = PendingAttachmentStatus | CompleteAttachmentStatus;
|
6
21
|
type BaseAttachment = {
|
7
22
|
id: string;
|
8
23
|
type: "image" | "document" | "file";
|
9
24
|
name: string;
|
25
|
+
contentType?: string;
|
26
|
+
file?: File;
|
27
|
+
content?: CoreUserContentPart[];
|
10
28
|
};
|
11
|
-
type
|
29
|
+
type PendingAttachment = BaseAttachment & {
|
30
|
+
status: PendingAttachmentStatus;
|
12
31
|
file: File;
|
13
32
|
};
|
14
|
-
type
|
15
|
-
|
33
|
+
type CompleteAttachment = BaseAttachment & {
|
34
|
+
status: CompleteAttachmentStatus;
|
16
35
|
content: CoreUserContentPart[];
|
17
36
|
};
|
37
|
+
type Attachment = PendingAttachment | CompleteAttachment;
|
18
38
|
|
19
39
|
type TextContentPart = {
|
20
40
|
type: "text";
|
@@ -88,7 +108,7 @@ type ThreadSystemMessage = MessageCommonProps & {
|
|
88
108
|
type ThreadUserMessage = MessageCommonProps & {
|
89
109
|
role: "user";
|
90
110
|
content: ThreadUserContentPart[];
|
91
|
-
attachments: readonly
|
111
|
+
attachments: readonly CompleteAttachment[];
|
92
112
|
status?: undefined;
|
93
113
|
metadata?: undefined;
|
94
114
|
};
|
@@ -108,7 +128,7 @@ type ThreadAssistantMessage = MessageCommonProps & {
|
|
108
128
|
};
|
109
129
|
type AppendMessage = CoreMessage & {
|
110
130
|
parentId: string | null;
|
111
|
-
attachments?: readonly
|
131
|
+
attachments?: readonly CompleteAttachment[] | undefined;
|
112
132
|
};
|
113
133
|
type ThreadMessage = ThreadSystemMessage | ThreadUserMessage | ThreadAssistantMessage;
|
114
134
|
/** Core Message Types (without UI content parts) */
|
@@ -464,4 +484,4 @@ declare const createEdgeRuntimeAPI: (options: CreateEdgeRuntimeAPIOptions) => {
|
|
464
484
|
POST: (request: Request) => Promise<Response>;
|
465
485
|
};
|
466
486
|
|
467
|
-
export { type
|
487
|
+
export { type Attachment as A, getEdgeRuntimeResponse as B, type CoreMessage as C, type EdgeRuntimeRequestOptions as E, type ImageContentPart as I, type ModelConfig as M, type PendingAttachment as P, type ThreadMessage as T, type UIContentPart as U, type AppendMessage as a, type ModelConfigProvider as b, type ThreadAssistantContentPart as c, type MessageStatus as d, type ThreadRoundtrip as e, type PendingAttachmentStatus as f, type CompleteAttachment as g, type CompleteAttachmentStatus as h, type Tool as i, type TextContentPart as j, type ToolCallContentPart as k, type CoreToolCallContentPart as l, type CreateEdgeRuntimeAPIOptions as m, type ThreadUserContentPart as n, type ContentPartStatus as o, type ToolCallContentPartStatus as p, type AttachmentStatus as q, type ThreadSystemMessage as r, type ThreadAssistantMessage as s, type ThreadUserMessage as t, type CoreUserContentPart as u, type CoreAssistantContentPart as v, type CoreSystemMessage as w, type CoreUserMessage as x, type CoreAssistantMessage as y, createEdgeRuntimeAPI as z };
|
@@ -3,18 +3,38 @@ import { ReactNode } from 'react';
|
|
3
3
|
import { JSONSchema7 } from 'json-schema';
|
4
4
|
import { z } from 'zod';
|
5
5
|
|
6
|
+
type PendingAttachmentStatus = {
|
7
|
+
type: "running";
|
8
|
+
reason: "uploading";
|
9
|
+
progress: number;
|
10
|
+
} | {
|
11
|
+
type: "requires-action";
|
12
|
+
reason: "composer-send";
|
13
|
+
} | {
|
14
|
+
type: "incomplete";
|
15
|
+
reason: "error" | "upload-paused";
|
16
|
+
};
|
17
|
+
type CompleteAttachmentStatus = {
|
18
|
+
type: "complete";
|
19
|
+
};
|
20
|
+
type AttachmentStatus = PendingAttachmentStatus | CompleteAttachmentStatus;
|
6
21
|
type BaseAttachment = {
|
7
22
|
id: string;
|
8
23
|
type: "image" | "document" | "file";
|
9
24
|
name: string;
|
25
|
+
contentType?: string;
|
26
|
+
file?: File;
|
27
|
+
content?: CoreUserContentPart[];
|
10
28
|
};
|
11
|
-
type
|
29
|
+
type PendingAttachment = BaseAttachment & {
|
30
|
+
status: PendingAttachmentStatus;
|
12
31
|
file: File;
|
13
32
|
};
|
14
|
-
type
|
15
|
-
|
33
|
+
type CompleteAttachment = BaseAttachment & {
|
34
|
+
status: CompleteAttachmentStatus;
|
16
35
|
content: CoreUserContentPart[];
|
17
36
|
};
|
37
|
+
type Attachment = PendingAttachment | CompleteAttachment;
|
18
38
|
|
19
39
|
type TextContentPart = {
|
20
40
|
type: "text";
|
@@ -88,7 +108,7 @@ type ThreadSystemMessage = MessageCommonProps & {
|
|
88
108
|
type ThreadUserMessage = MessageCommonProps & {
|
89
109
|
role: "user";
|
90
110
|
content: ThreadUserContentPart[];
|
91
|
-
attachments: readonly
|
111
|
+
attachments: readonly CompleteAttachment[];
|
92
112
|
status?: undefined;
|
93
113
|
metadata?: undefined;
|
94
114
|
};
|
@@ -108,7 +128,7 @@ type ThreadAssistantMessage = MessageCommonProps & {
|
|
108
128
|
};
|
109
129
|
type AppendMessage = CoreMessage & {
|
110
130
|
parentId: string | null;
|
111
|
-
attachments?: readonly
|
131
|
+
attachments?: readonly CompleteAttachment[] | undefined;
|
112
132
|
};
|
113
133
|
type ThreadMessage = ThreadSystemMessage | ThreadUserMessage | ThreadAssistantMessage;
|
114
134
|
/** Core Message Types (without UI content parts) */
|
@@ -464,4 +484,4 @@ declare const createEdgeRuntimeAPI: (options: CreateEdgeRuntimeAPIOptions) => {
|
|
464
484
|
POST: (request: Request) => Promise<Response>;
|
465
485
|
};
|
466
486
|
|
467
|
-
export { type
|
487
|
+
export { type Attachment as A, getEdgeRuntimeResponse as B, type CoreMessage as C, type EdgeRuntimeRequestOptions as E, type ImageContentPart as I, type ModelConfig as M, type PendingAttachment as P, type ThreadMessage as T, type UIContentPart as U, type AppendMessage as a, type ModelConfigProvider as b, type ThreadAssistantContentPart as c, type MessageStatus as d, type ThreadRoundtrip as e, type PendingAttachmentStatus as f, type CompleteAttachment as g, type CompleteAttachmentStatus as h, type Tool as i, type TextContentPart as j, type ToolCallContentPart as k, type CoreToolCallContentPart as l, type CreateEdgeRuntimeAPIOptions as m, type ThreadUserContentPart as n, type ContentPartStatus as o, type ToolCallContentPartStatus as p, type AttachmentStatus as q, type ThreadSystemMessage as r, type ThreadAssistantMessage as s, type ThreadUserMessage as t, type CoreUserContentPart as u, type CoreAssistantContentPart as v, type CoreSystemMessage as w, type CoreUserMessage as x, type CoreAssistantMessage as y, createEdgeRuntimeAPI as z };
|