Create plugins/index.ts bootstrap and claude-provider.ts implementing the AIProviderAdapter interface from @aiui/core. The Claude provider wraps the existing proxy streaming logic as an async generator. Plugin initialization is called in main.ts before app mount. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
33 lines
733 B
TypeScript
33 lines
733 B
TypeScript
import { createApp } from 'vue'
|
|
import { createPinia } from 'pinia'
|
|
import { createRouter, createWebHistory } from 'vue-router'
|
|
import App from './App.vue'
|
|
import './styles/main.css'
|
|
import { initializePlugins } from './plugins'
|
|
|
|
const router = createRouter({
|
|
history: createWebHistory(),
|
|
routes: [
|
|
{
|
|
path: '/',
|
|
name: 'chat',
|
|
component: () => import('./pages/ChatPage.vue'),
|
|
},
|
|
{
|
|
path: '/widget-demo',
|
|
name: 'widget-demo',
|
|
component: () => import('./pages/WidgetDemoPage.vue'),
|
|
},
|
|
],
|
|
})
|
|
|
|
const app = createApp(App)
|
|
app.use(createPinia())
|
|
app.use(router)
|
|
|
|
initializePlugins().catch((err) => {
|
|
console.error('[AIUI] Failed to initialize plugins:', err)
|
|
})
|
|
|
|
app.mount('#app')
|