From 6f1db4c60a5bc56f3a31c7a7a0c769da495a3096 Mon Sep 17 00:00:00 2001 From: bracesproul Date: Fri, 16 May 2025 14:49:28 -0700 Subject: [PATCH] fix: Allow users to config whether or not stream subgraphs --- libs/sdk-js/src/react/stream.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libs/sdk-js/src/react/stream.tsx b/libs/sdk-js/src/react/stream.tsx index 2e16f76ee..4f2c5a631 100644 --- a/libs/sdk-js/src/react/stream.tsx +++ b/libs/sdk-js/src/react/stream.tsx @@ -613,6 +613,12 @@ interface SubmitOptions< optimisticValues?: | Partial | ((prev: StateType) => Partial); + /** + * 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; let streamError: StreamError | undefined;