This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//... | |
const transport = new StreamableHTTPTransport( | |
createStreamableHTTPTransportConfig("http://localhost:3000/mcp"), | |
); | |
mcpClient = await experimental_createMCPClient({ | |
transport, | |
}); | |
const mcpTools = await mcpClient.tools(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable @typescript-eslint/no-explicit-any */ | |
import { type TRPCQueryOptions } from '@trpc/tanstack-react-query'; | |
import { unstable_noStore } from 'next/cache'; | |
import { Fragment, Suspense, type ReactNode } from 'react'; | |
import { ErrorBoundary } from 'react-error-boundary'; | |
import { HydrateClient, prefetch as prefetchTRPC } from '@/trpc/server'; | |
type AwaitProps<T> = | |
| { | |
promise: Promise<T>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Fragment, Suspense, type ReactNode } from 'react'; | |
import { ErrorBoundary } from 'react-error-boundary'; | |
type AwaitProps<T> = | |
| { | |
promise: Promise<T>; | |
children: (data: T) => ReactNode; | |
fallback?: ReactNode; | |
errorComponent?: ReactNode | null; | |
} |