Files
LocalAGI/webui/react-ui/vite.config.js
T
Ettore Di Giacinto 775b1a9ab8 chore: drop agents avatars (#411)
This functionality makes LocalAGI harder to starts without no real gain.
While having agents avatars is nice, on generating a new agent is
required a new image to be created, which, on small HW could become a
huge computational strain.

It moves the agent list view to tabular, and cleanups the index page to
improve readability.

We can go back at this, but the motivations are mainly:

- Do not waste computation and be more lightweight
- Less models to download unless the user wants to download image models
- Let's not make look the application "weird" as images could be
  generated which are not good looking at all

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2026-02-09 18:59:52 +01:00

38 lines
1.1 KiB
JavaScript

import { defineConfig, loadEnv } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig(({ mode }) => {
// Load environment variables
const env = loadEnv(mode, process.cwd(), '')
// Define backend URL with port from environment variable or default to 8080
const backendUrl = `http://${env.BACKEND_HOST || 'localhost'}:${env.BACKEND_PORT || '3000'}`
return {
plugins: [react()],
base: '/app', // Set the base path for production builds
server: {
proxy: {
// Proxy API requests to your Go backend
'/api': backendUrl,
// Proxy SSE endpoints
'/sse': backendUrl,
// Add other endpoints as needed
'/settings': backendUrl,
'/agents': backendUrl,
'/create': backendUrl,
'/delete': backendUrl,
'/pause': backendUrl,
'/start': backendUrl,
'/talk': backendUrl,
'/notify': backendUrl,
'/chat': backendUrl,
'/status': backendUrl,
'/action': backendUrl,
'/actions': backendUrl
}
}
}
});