fix: Allow users to config whether or not stream subgraphs

This commit is contained in:
bracesproul
2025-05-16 14:49:28 -07:00
parent b44be763fb
commit 6f1db4c60a
+7
View File
@@ -613,6 +613,12 @@ interface SubmitOptions<
optimisticValues?:
| Partial<StateType>
| ((prev: StateType) => Partial<StateType>);
/**
* Whether or not to stream the nodes of any subgraphs called
* by the assistant.
* @default false
*/
streamSubgraphs?: boolean;
}
export function useStream<
@@ -868,6 +874,7 @@ export function useStream<
checkpoint,
streamMode,
streamSubgraphs: submitOptions?.streamSubgraphs ?? false,
}) as AsyncGenerator<EventStreamEvent>;
let streamError: StreamError | undefined;