mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-05 09:17:47 +02:00
fix(sdk-js): make sure to wrap client component in UseStreamContext
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@langchain/langgraph-sdk",
|
||||
"version": "0.0.67",
|
||||
"version": "0.0.68",
|
||||
"description": "Client library for interacting with the LangGraph API",
|
||||
"type": "module",
|
||||
"packageManager": "yarn@1.22.19",
|
||||
|
||||
@@ -175,7 +175,11 @@ export function LoadExternalComponent({
|
||||
}, [uiClient, uiNamespace, message.name, shadowRootId, hasClientComponent]);
|
||||
|
||||
if (hasClientComponent) {
|
||||
return React.createElement(clientComponent, message.props);
|
||||
return (
|
||||
<UseStreamContext.Provider value={{ stream, meta }}>
|
||||
{React.createElement(clientComponent, message.props)}
|
||||
</UseStreamContext.Provider>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user