Files
agent-ui/frontend/vite.config.ts
josedario87 9f9f335439 feat: Auto-save components, soft delete, tags, compact WCO header
- Auto-save rendered Vue components to DB on render_vue_component
- Soft delete (archive) instead of hard delete for components
- Tags support for component categorization
- Gallery limited to 10 most recent items per section
- Upsert with ON CONFLICT for component saves
- PUT endpoint for partial component updates
- Collapsible toolbar with animated toggle button
- Window Controls Overlay support for PWA titlebar
- Compact header mode (32px) with hidden dot toggle
- Dynamic theme-color meta sync for Windows titlebar
2026-02-15 02:54:27 -06:00

88 lines
2.2 KiB
TypeScript

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { VitePWA } from 'vite-plugin-pwa'
import { fileURLToPath } from 'url'
import path from 'path'
const __dirname = path.dirname(fileURLToPath(import.meta.url))
export default defineConfig({
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
// 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.svg', 'icons/*.svg', 'icons/*.png'],
devOptions: {
enabled: true,
type: 'module',
suppressWarnings: true
},
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg,woff2}'],
navigateFallbackDenylist: [/^\/api\//],
// Don't cache API calls - let them go directly to network
runtimeCaching: []
},
manifest: {
name: 'Agent UI',
short_name: 'AgentUI',
description: 'Dynamic canvas for Claude Code interaction via WebMCP',
theme_color: '#0f0f14',
background_color: '#0f0f14',
display: 'standalone',
display_override: ['window-controls-overlay'],
orientation: 'any',
start_url: '/',
scope: '/',
categories: ['developer', 'utilities'],
icons: [
{
src: 'icons/icon.svg',
sizes: 'any',
type: 'image/svg+xml',
purpose: 'any'
},
{
src: 'icons/icon-192.png',
sizes: '192x192',
type: 'image/png'
},
{
src: 'icons/icon-512.png',
sizes: '512x512',
type: 'image/png'
},
{
src: 'icons/icon-maskable-512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'maskable'
}
]
}
})
],
server: {
port: 4100,
host: true,
allowedHosts: ['z590.interno.com', 'z590.nucleoriofrio.com', 'localhost'],
cors: true,
proxy: {
'/api': 'http://localhost:4101'
},
watch: {
usePolling: false
}
},
build: {
sourcemap: true
}
})