@springbrand/chat-client 0.1.3-alpha.24 → 0.1.3-alpha.25
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
|
@@ -178,6 +178,8 @@ type SharedChatConnectionOptions = {
|
|
|
178
178
|
onMessage?: (message: MessageEvent) => void;
|
|
179
179
|
inboxAgent?: string;
|
|
180
180
|
sessionAgent?: string;
|
|
181
|
+
/** Skip history loading when the caller has just created this Chat. */
|
|
182
|
+
skipInitialMessages?: boolean;
|
|
181
183
|
/** Host projection used only until the selected Session sends its first state. */
|
|
182
184
|
initialTurnActive?: boolean;
|
|
183
185
|
};
|
|
@@ -402,8 +404,9 @@ export function useUniversalAgentChat(): ChatRuntime {
|
|
|
402
404
|
connectionError: sdkConnectionError,
|
|
403
405
|
} = useAgentChat<RuntimeState, ChatMessage>({
|
|
404
406
|
agent: chatAgent,
|
|
405
|
-
getInitialMessages:
|
|
406
|
-
|
|
407
|
+
getInitialMessages: connection.skipInitialMessages
|
|
408
|
+
? null
|
|
409
|
+
: ({ url }) => loadInitialMessages(url, connection.credentials),
|
|
407
410
|
...(connection.credentials === undefined
|
|
408
411
|
? {}
|
|
409
412
|
: { credentials: connection.credentials }),
|