split up
This commit is contained in:
@@ -6,7 +6,6 @@ import type {
|
||||
RemoveUIMessage,
|
||||
} from "@langchain/langgraph-sdk/react-ui/types";
|
||||
|
||||
// Define the type for the context value
|
||||
type StreamContextType = ReturnType<
|
||||
typeof useStream<
|
||||
{ messages: Message[]; ui: UIMessage[] },
|
||||
@@ -18,10 +17,8 @@ type StreamContextType = ReturnType<
|
||||
>
|
||||
>;
|
||||
|
||||
// Create the context with a default undefined value
|
||||
const StreamContext = createContext<StreamContextType | undefined>(undefined);
|
||||
|
||||
// Create a provider component
|
||||
export const StreamProvider: React.FC<{ children: ReactNode }> = ({
|
||||
children,
|
||||
}) => {
|
||||
@@ -37,8 +34,6 @@ export const StreamProvider: React.FC<{ children: ReactNode }> = ({
|
||||
assistantId: "agent",
|
||||
});
|
||||
|
||||
console.log("StreamProvider", streamValue);
|
||||
|
||||
return (
|
||||
<StreamContext.Provider value={streamValue}>
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user