mirror of
https://github.com/mudler/LocalAGI.git
synced 2026-07-23 18:55:52 -04:00
775b1a9ab8
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>
38 lines
1.1 KiB
JavaScript
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
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|