Adding a tool which is an async generator works as it should. However in my case, tool will be a simple component displaying the data. No async requests are required. Cannot make typecheck to pass.
Expected Behavior
I want to return a simple component, by type checker wants me to use async generators.
Steps to Reproduce the Problem
Follow the project setup in README.md
Add the following tool:
hangmanStatus: {
description: "Return the current status of the hangman game.",
parameters: z.object({ state: z.string() }),
render: (data) => ({
data,
component: <TextInput value={data.state} />,
}),
},
Get a TS error
Type '{ data: { state: string; }; component: Element; }' is missing the following properties from type 'AsyncGenerator<ReactElement<any, string | JSXElementConstructor<any>>, ToolGeneratorReturn, unknown>': next, return, throw, [Symbol.asyncIterator]
Current Behavior
Adding a tool which is an async generator works as it should. However in my case, tool will be a simple component displaying the data. No async requests are required. Cannot make typecheck to pass.
Expected Behavior
I want to return a simple component, by type checker wants me to use async generators.
Steps to Reproduce the Problem
Environment