fix: restore assistant approval flows
This commit is contained in:
1 parent
d0e28a5fc9
commit
a5fa6d3afe
10 files changed
+398
-37
No files matched your search
@@ -0,0 +1,23 @@
|
||||
"use client";
|
||||
|
||||
import type { PropsWithChildren } from "react";
|
||||
import type { AssistantRuntime, Toolkit } from "@assistant-ui/react";
|
||||
import { AssistantRuntimeProvider, Tools, useAui } from "@assistant-ui/react";
|
||||
|
||||
interface AssistantRuntimeProviderWithToolsProps extends PropsWithChildren {
|
||||
runtime: AssistantRuntime;
|
||||
toolkit: Toolkit;
|
||||
}
|
||||
|
||||
export const AssistantRuntimeProviderWithTools = ({
|
||||
children,
|
||||
runtime,
|
||||
toolkit,
|
||||
}: AssistantRuntimeProviderWithToolsProps) => {
|
||||
const toolsAui = useAui({ tools: Tools({ toolkit }) });
|
||||
return (
|
||||
<AssistantRuntimeProvider aui={toolsAui} runtime={runtime}>
|
||||
{children}
|
||||
</AssistantRuntimeProvider>
|
||||
);
|
||||
};
|
||||
Reference in new issue
Block a user