Replies: 2 comments
-
|
There's an open PR that's severly out of date, we will bring it into the fold soon! |
Beta Was this translation helpful? Give feedback.
-
For anyone who wants this today without waiting for the official wrapper PR: there's no first-party Versions we're on: Client ( <script setup lang="ts">
import { AiDevtoolsCore } from '@tanstack/ai-devtools-core'
import { createVuePanel } from '@tanstack/devtools-utils/vue'
import { TanStackDevtools } from '@tanstack/vue-devtools'
const [AiDevtoolsPanel] = createVuePanel(AiDevtoolsCore)
const plugins = [
{
name: 'TanStack AI',
component: AiDevtoolsPanel,
props: { devtoolsProps: {} },
},
]
// Connect to the server event bus so server-only run/tool events show up
// alongside the client-side hook timeline.
const eventBusConfig = { connectToServerBus: true }
</script>
<template>
<TanStackDevtools :plugins="plugins" :event-bus-config="eventBusConfig" />
</template>Mounted gated behind const isDev = import.meta.env.DEV
const DevtoolsAi = isDev ? defineAsyncComponent(() => import('@/components/DevtoolsAi.vue')) : null
// ...
// <component :is="DevtoolsAi" v-if="DevtoolsAi" />Server — to also see server-side run/tool events, start the event bus at boot and add // boot
if (NODE_ENV === 'development') {
const { ServerEventBus } = await import('@tanstack/devtools-event-bus/server')
await new ServerEventBus().start() // default ws://localhost:4206
}
// chat service
import { devtoolsMiddleware } from '@tanstack/ai-event-client'
const devtools = NODE_ENV === 'development' ? [devtoolsMiddleware()] : []
chat({ /* ... */, middleware: [...devtools, ...userMiddleware] })One snag worth flagging: This has been working well for us — both the client hook timeline and the server-side tool calls show up in one panel. Happy to share more detail if it's useful for the official Vue wrapper. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I see devtools for React, Svelte and Solid. But no mention of Vue. Is there way to use AI devtools with Vue Currently
Beta Was this translation helpful? Give feedback.
All reactions