Register with React
With a stabletransport from createAGUITransport, import useChat from @hastekit/react:
Register with CopilotKit
Use CopilotKit’suseFrontendTool and useHastekitClientTools from @hastekit/copilotkit/react inside the provider:
HastekitAgent is imported from @hastekit/copilotkit. When opening an existing thread, pass page.run?.pendingToolCallIds as the hook’s pendingToolCallIds option so unanswered calls can be recovered.