Developer tools for TanStack AI in Preact applications.
npm install @tanstack/preact-ai-devtools
# or
pnpm add @tanstack/preact-ai-devtools
# or
yarn add @tanstack/preact-ai-devtoolsAdd the AiDevtoolsPanel component to your app:
import { AiDevtoolsPanel } from '@tanstack/preact-ai-devtools'
function App() {
return (
<>
<YourApp />
<AiDevtoolsPanel />
</>
)
}You can also use the devtools as a plugin:
import { aiDevtoolsPlugin } from '@tanstack/preact-ai-devtools'
import { useAIProvider } from '@tanstack/ai-preact'
function App() {
const ai = useAIProvider({
// your config
plugins: [aiDevtoolsPlugin()],
})
return <YourApp />
}For production builds, import from the production entry point to exclude devtools code:
import { AiDevtoolsPanel } from '@tanstack/preact-ai-devtools/production'The devtools will automatically be disabled in production environments when using the main entry point.
