@assistant-ui/react 0.10.19 → 0.10.20

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/package.json CHANGED
@@ -28,7 +28,7 @@
28
28
  "conversational-ui",
29
29
  "conversational-ai"
30
30
  ],
31
- "version": "0.10.19",
31
+ "version": "0.10.20",
32
32
  "license": "MIT",
33
33
  "type": "module",
34
34
  "exports": {
@@ -72,6 +72,9 @@ export type CreateAppendMessage =
72
72
  role?: AppendMessage["role"] | undefined;
73
73
  content: AppendMessage["content"];
74
74
  attachments?: AppendMessage["attachments"] | undefined;
75
+ metadata?: AppendMessage["metadata"] | undefined;
76
+ createdAt?: Date | undefined;
77
+ runConfig?: AppendMessage["runConfig"] | undefined;
75
78
  startRun?: boolean | undefined;
76
79
  };
77
80
 
@@ -92,16 +95,16 @@ const toAppendMessage = (
92
95
  };
93
96
  }
94
97
 
95
- if (message.role && message.parentId && message.attachments) {
96
- return message as AppendMessage;
97
- }
98
-
99
98
  return {
100
- ...message,
99
+ createdAt: message.createdAt ?? new Date(),
101
100
  parentId: message.parentId ?? messages.at(-1)?.id ?? null,
102
101
  sourceId: message.sourceId ?? null,
103
102
  role: message.role ?? "user",
103
+ content: message.content,
104
104
  attachments: message.attachments ?? [],
105
+ metadata: message.metadata ?? { custom: {} },
106
+ runConfig: message.runConfig ?? {},
107
+ startRun: message.startRun,
105
108
  } as AppendMessage;
106
109
  };
107
110
 
@@ -2,3 +2,5 @@ export * from "./attachment";
2
2
  export * from "./feedback";
3
3
  export * from "./speech";
4
4
  export * from "./suggestion";
5
+ export * from "./RuntimeAdapterProvider";
6
+ export * from "./thread-history/ThreadHistoryAdapter";