Files
agent-ui/frontend/vite.config.ts
josedario87 075e167389 feat: Add dynamic Vue 3 components system
- Add dynamicComponents.ts service (~300 lines)
  - CSS scoping with high specificity
  - Async setup support with Suspense
  - Event bus for inter-component communication
  - Shared Pinia store with main app
  - No app overhead (uses render + createVNode)

- Add MCP tools for Vue components
  - render_vue_component
  - save_vue_component
  - load_vue_component
  - list_vue_components
  - delete_vue_component

- Add SQLite table for component persistence
- Add TypeScript declarations for webmcp
- Configure Vite for runtime template compilation
- Add comprehensive README with documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 04:15:53 -06:00

53 lines
1.1 KiB
TypeScript

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { VitePWA } from 'vite-plugin-pwa'
export default defineConfig({
resolve: {
alias: {
// Habilitar compilación de templates en runtime para componentes dinámicos
'vue': 'vue/dist/vue.esm-bundler.js'
}
},
plugins: [
vue(),
VitePWA({
registerType: 'autoUpdate',
includeAssets: ['favicon.ico', 'icons/*.png'],
manifest: {
name: 'Agent UI - Dynamic Canvas',
short_name: 'AgentUI',
description: 'Dynamic canvas for Claude Code interaction',
theme_color: '#1a1a2e',
background_color: '#1a1a2e',
display: 'standalone',
icons: [
{
src: 'icons/icon-192.png',
sizes: '192x192',
type: 'image/png'
},
{
src: 'icons/icon-512.png',
sizes: '512x512',
type: 'image/png'
}
]
}
})
],
server: {
port: 4100,
host: true,
proxy: {
'/api': 'http://localhost:4101'
},
watch: {
usePolling: false
}
},
build: {
sourcemap: true
}
})